@import url("fonts/fonts.css");

/* Until Saira has loaded, a narrowed system bold keeps the headline on the
   same lines, so the phone hero does not jump when the font arrives. */
@font-face {
  font-family: "Saira fallback";
  font-weight: 800;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Roboto Bold"), local("Roboto-Bold");
  size-adjust: 63%;
}

:root {
  --ink: #0B0F0C;
  --wall: #141A15;
  --glass: rgba(255, 255, 255, .22);
  --turf: #127A3E;
  --line: #FFFFFF;
  --ball: #D9F23A;
  --ball-hover: #E8FF6B;
  --text: #FFFFFF;
  --text-soft: #E6F3EA;
  --text-wall: #BAC5BD;
  --alert: #FFB4A8;
  --display: "Saira Extra Condensed", "Saira fallback", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 5.5vw, 56px);
  --lw: 4px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--turf) var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ball); color: var(--ink); }

svg { display: block; }

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: .22em;
}
a:hover { text-decoration-color: var(--ball); }

:focus-visible { outline: 3px solid var(--ball); outline-offset: 3px; }

h1, h2, h3, .launch strong { text-wrap: balance; }
p { text-wrap: pretty; }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 20;
  background: var(--ball); color: var(--ink);
  padding: 12px 16px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* The court: turf with glass side walls */
.court {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--turf);
  box-shadow: inset 3px 0 0 var(--glass), inset -3px 0 0 var(--glass);
}

/* Back walls (header and footer) */
.wall { position: relative; background: var(--wall); }

.wall-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px;
  padding: 8px var(--gutter);
  box-shadow: inset 0 -3px 0 var(--glass);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  color: var(--text); text-decoration: none;
}
.brand-mark { width: 51px; height: 34px; }
.brand-word { width: 104px; height: 14px; }
.brand-uf { width: 20px; height: 11px; }

/* The smallest phones: shrink the lockup so "Om oss" stays on one line. */
@media (max-width: 359px) {
  .brand { gap: 7px; }
  .brand-mark { width: 42px; height: 28px; }
  .brand-word { width: 86px; height: 12px; }
  .brand-uf { width: 17px; height: 9px; }
}

.nav { display: flex; align-items: center; gap: 2px; margin-right: -10px; }
.nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px;
  padding: 0 10px;
  font-weight: 600; text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--ball); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--ball); }
.nav svg { width: 24px; height: 24px; }
.nav .wide { display: none; }

/* Court lettering */
.painted {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: .94;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* Hero: our half of the court, back zone */
.back {
  --h1: clamp(3.2rem, 15vw, 6rem);
  --back-pad: clamp(22px, 6vw, 64px);
  display: flow-root;
  padding: var(--back-pad) var(--gutter) 14px;
}
.back h1 { font-size: var(--h1); }

/* Phones and tablets: the racket tip hangs from the back wall beside the
   first two lines of the headline, and the lead gets the full width below.
   The width leaves room for "MINDRE" (2.52em) beside it; the height ends
   just above the third line so "MER PADEL." stays whole. */
.hero-tip {
  float: right;
  width: min(46vw, 100% - 12px - 2.6 * var(--h1), 300px);
  height: calc(1.88 * var(--h1) + var(--back-pad) - 2px);
  margin: calc(-1 * var(--back-pad)) 0 0 12px;
}

.lead {
  margin: 12px 0 0;
  max-width: 46ch;
  color: var(--text-soft);
  font-size: clamp(1.0625rem, 1rem + .45vw, 1.25rem);
  font-weight: 500;
  line-height: 1.45;
}

.hero-art { display: none; width: 100%; height: auto; }

/* Service zone: service line on top, centre line down to the net */
.service {
  position: relative;
  padding: 34px var(--gutter) 36px;
  border-top: var(--lw) solid var(--line);
  scroll-margin-top: 30px;
}
.service::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: var(--lw); margin-left: calc(var(--lw) / -2);
  background: var(--line);
}

.t-ball {
  position: absolute; z-index: 2;
  top: calc(var(--lw) / -2); left: 50%;
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(5px 7px 3px rgba(4, 33, 15, .45));
  animation: drop 1.15s .35s both;
  transition: opacity .3s;
}
.signed-up .t-ball { opacity: 0; }

@keyframes drop {
  0% { transform: translate(-50%, -420%); animation-timing-function: cubic-bezier(.55, 0, .85, .35); }
  45% { transform: translate(-50%, -50%); animation-timing-function: cubic-bezier(.15, .65, .4, 1); }
  66% { transform: translate(-50%, -160%); animation-timing-function: cubic-bezier(.55, 0, .85, .35); }
  82% { transform: translate(-50%, -50%); animation-timing-function: cubic-bezier(.15, .65, .4, 1); }
  91% { transform: translate(-50%, -82%); animation-timing-function: cubic-bezier(.55, 0, .85, .35); }
  100% { transform: translate(-50%, -50%); }
}

/* The service box */
.box {
  position: relative; z-index: 1;
  max-width: 540px;
  margin: 0 auto;
  padding: 16px clamp(16px, 4.5vw, 30px) 18px;
  background: var(--turf);
  border: var(--lw) solid var(--line);
  scroll-margin-bottom: 20px;
}

.launch { margin: 0 0 12px; line-height: 1.45; }
.launch strong {
  display: block;
  margin-bottom: 4px;
  font: 800 clamp(1.3rem, 1.1rem + 1.2vw, 1.9rem)/1 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
}

label { display: block; margin-bottom: 6px; font-weight: 600; }

.field { display: grid; gap: 10px; }

input[type="email"] {
  color-scheme: light;
  width: 100%; height: 54px;
  padding: 0 14px;
  border: 0; border-radius: 0;
  background: #FFFFFF;
  color: var(--ink);
  font: 500 1.0625rem var(--body);
  caret-color: var(--turf);
  box-shadow: inset 0 -3px 0 #CFDAD2;
}
input[type="email"]::placeholder { color: #5D6A61; opacity: 1; }
input[type="email"][aria-invalid="true"] { box-shadow: inset 0 0 0 3px var(--alert); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 0; border-radius: 0;
  background: var(--ball);
  color: var(--ink);
  font: 800 1.35rem/1 var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 16px -8px rgba(4, 33, 15, .6);
  transition: background-color .15s ease-out, transform .2s cubic-bezier(.2, .8, .2, 1);
}
.btn:hover { background: var(--ball-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .8; cursor: progress; transform: none; }

.error {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 12px 0 0;
  font-weight: 600; line-height: 1.4;
}
.error[hidden] { display: none; }
.error svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--alert); }

.fine { margin: 12px 0 0; color: var(--text-soft); font-size: .9375rem; line-height: 1.45; }

.done[hidden] { display: none; }
.done:focus { outline: none; }
.done-ball { width: 46px; height: 46px; margin-bottom: 10px; animation: land .9s cubic-bezier(.2, .8, .2, 1) both; }
.done .painted { font-size: clamp(2.6rem, 9vw, 3.4rem); }
.done p { margin: 10px 0 0; }
.done .btn { margin-top: 18px; }

@keyframes land {
  0% { transform: translateY(-140%); opacity: 0; }
  55% { transform: translateY(0); opacity: 1; }
  75% { transform: translateY(-22%); }
  100% { transform: translateY(0); }
}

/* The net */
.net {
  position: relative;
  height: 34px;
  background:
    linear-gradient(var(--line), var(--line)) 0 0 / 100% 6px no-repeat,
    repeating-linear-gradient(45deg, rgba(11, 15, 12, .5) 0 1.5px, transparent 1.5px 8px),
    repeating-linear-gradient(-45deg, rgba(11, 15, 12, .5) 0 1.5px, transparent 1.5px 8px),
    rgba(11, 15, 12, .28);
}
.net::before, .net::after {
  content: "";
  position: absolute; top: -8px; bottom: -8px;
  width: 12px;
  background: var(--ink);
}
.net::before { left: 0; }
.net::after { right: 0; }

/* The other half: how it works */
.steps { padding: clamp(44px, 9vw, 88px) var(--gutter) clamp(28px, 6vw, 56px); }

.section-title { font-size: clamp(2.7rem, 11vw, 4.6rem); }

.step-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; }

.step {
  --step-pad: 26px;
  display: grid;
  align-content: start;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "no art" "text text";
  gap: 10px 18px;
  padding: var(--step-pad) 0 28px;
  border-top: var(--lw) solid var(--line);
}
.step-no { grid-area: no; font-size: clamp(4.6rem, 22vw, 6rem); line-height: .78; }
.step-art { grid-area: art; width: 100%; max-width: 260px; height: auto; justify-self: end; }
.step-art.from-line { margin-top: calc(-1 * var(--step-pad)); }
.step-text { grid-area: text; }
.step h3 {
  margin: 0;
  font: 800 2rem/1 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.step p { margin: 8px 0 0; max-width: 36ch; color: var(--text-soft); }

.why {
  padding: clamp(36px, 8vw, 80px) var(--gutter);
  border-top: var(--lw) solid var(--line);
}
.why-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; }
.why-list li { padding: 18px 0; border-top: 2px solid rgba(255, 255, 255, .4); }
.why-list li:first-child { border-top: 0; padding-top: 4px; }
.why-list h3 {
  margin: 0 0 6px;
  font: 800 1.9rem/1 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.why-list p { margin: 0; max-width: 40ch; color: var(--text-soft); }

.final {
  padding: clamp(44px, 9vw, 96px) var(--gutter);
  border-top: var(--lw) solid var(--line);
  text-align: center;
}
.final p { max-width: 44ch; margin: 14px auto 26px; color: var(--text-soft); }

/* Footer wall */
.wall-foot {
  display: grid; gap: 18px;
  padding: 34px var(--gutter) 30px;
  box-shadow: inset 0 3px 0 var(--glass);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
.uf-note { margin: 0; color: var(--text-wall); font-size: .9375rem; }

/* Inner pages */
.page { padding: clamp(36px, 8vw, 80px) var(--gutter) clamp(48px, 9vw, 96px); }
.page h1 { font-size: clamp(3.2rem, 15vw, 5.4rem); }
.page .lead { max-width: 52ch; }
.prose { max-width: 62ch; }
.prose h2 {
  margin: 34px 0 8px;
  font: 800 1.85rem/1 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.prose p, .prose ul { margin: 0 0 12px; color: var(--text-soft); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--text); }

.team { list-style: none; margin: 30px 0 34px; padding: 0; max-width: 62ch; }
.team li { padding: 16px 0 18px; border-top: var(--lw) solid var(--line); }
.team strong {
  display: block;
  font: 800 clamp(1.9rem, 1.5rem + 2vw, 2.6rem)/1 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.team span { display: block; margin-top: 6px; color: var(--text-soft); }

.page .btn { margin-top: 18px; }
.page .fine a { display: inline-flex; align-items: center; min-height: 44px; }

/* Larger screens */
@media (min-width: 520px) {
  .field { grid-template-columns: minmax(0, 1fr) auto; }
}

@media (min-width: 720px) {
  .nav .wide { display: inline-flex; }
  .why-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
  .why-list li, .why-list li:first-child { border-top: var(--lw) solid var(--line); padding-top: 18px; }
}

@media (min-width: 960px) {
  .wall-top { min-height: 68px; }
  .back {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "title art" "lead art";
    column-gap: 48px;
    align-items: center;
    padding-bottom: 28px;
  }
  .back h1 { grid-area: title; align-self: end; }
  .back .lead { grid-area: lead; align-self: start; max-width: 34ch; margin-top: 18px; }
  .hero-tip { display: none; }
  .hero-art { display: block; grid-area: art; max-width: 520px; justify-self: center; }
  .service { padding-top: 54px; padding-bottom: 64px; }

  .step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--lw) solid var(--line); margin-top: 34px; }
  .step {
    --step-pad: 30px;
    padding: var(--step-pad) 30px 8px;
    border-top: 0;
    border-left: var(--lw) solid var(--line);
  }
  .step:first-child { border-left: 0; padding-left: 0; }
  .step:last-child { padding-right: 0; }
  .wall-foot { grid-template-columns: auto 1fr; align-items: center; column-gap: 40px; }
  .foot-links { justify-content: flex-end; }
  .uf-note { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .t-ball, .done-ball { animation: none; }
  .btn { transition: none; }
}
