/* Padel Cut website. Tokens come from brand/kit/brand_sheet_v2.png. */

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cinzel.woff2") format("woff2");
}

:root {
  --field: #D9D6D0;        /* light grey: the world */
  --field-hi: #E3E1DD;
  --ink: #18141E;
  --graphite: #1C1A20;
  --muted: #4A4452;
  --rule: #B9B3AB;
  --gold: #D9A441;
  --gold-light: #DCB76E;
  --gold-dark: #5E4413;
  --violet: #1A0B33;       /* deep violet: the night */
  --ivory: #F2EDE4;
  --ivory-muted: #B8AFC4;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, "Helvetica Neue", Arial, sans-serif;
  --caps: "Cinzel", "Trajan Pro", Georgia, serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);    /* ease-out-quint */

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--violet);    /* overscroll below the footer stays night */
}

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
  border-radius: 2px;
}
.night :focus-visible { outline-color: var(--gold-light); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--ivory);
  font-weight: 500;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- small caps line (the lockup's "PADEL HIGHLIGHTS" voice) ---------- */

.caps {
  margin: 0;
  font-family: var(--caps);
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.night .caps { color: var(--gold-light); }

/* ---------- header ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}
.bar-home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-left: -6px;
}
.bar-home img.ball { width: 52px; height: 52px; }
.bar-home img.name { width: 108px; height: auto; }
.bar nav ul {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.bar nav a {
  display: inline-block;
  padding: 10px 0;
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) left calc(100% - 6px) / 0 1px no-repeat;
  transition: background-size 400ms var(--ease);
}
.bar nav a:hover { background-size: 100% 1px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.hero-copy {
  padding-block: 28px 8px;
}
.hero h1 { margin: 0; }
.hero h1 img {
  width: min(78vw, 360px);
  height: auto;
}
.hero .caps { margin-top: 14px; font-size: clamp(0.6875rem, 2.6vw, 0.875rem); }
.tagline {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.15;
  color: var(--ink);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--ivory);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 300ms var(--ease);
}
.button:hover { background: var(--graphite); color: #FFFDF8; }
.button svg { width: 18px; height: 18px; flex: none; }
.textlink {
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 12px 0;
}

@media (min-width: 900px) {
  .hero-shell { padding-inline: var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; }
  .hero {
    background: #E2E1DE;
    height: clamp(520px, calc((100vw - 2 * var(--gutter)) * 0.5625), calc(100svh - 100px));
    max-height: 810px;
  }
  .hero-art, .hero-art picture, .hero-art img { height: 100%; }
  .hero-art img { aspect-ratio: auto; object-position: 50% 52%; }
  /* a veil of daylight behind the name: the court structure stays visible but steps back */
  .hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(228 227 224 / 0.84) 0%, rgb(228 227 224 / 0.74) 30%, rgb(228 227 224 / 0) 47%);
    pointer-events: none;
  }
  .hero-copy {
    position: absolute;
    inset: 0 auto 0 0;
    width: 41%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 0 0 clamp(32px, 6%, 96px);
  }
  .hero h1 img { width: min(100%, 31vw, 470px); }
  .hero .caps { font-size: clamp(0.75rem, 1vw, 1rem); margin-top: 1.1vw; }
  .tagline { font-size: clamp(1.5rem, 2.25vw, 2.25rem); margin-top: clamp(18px, 2.2vw, 34px); }
  .actions { margin-top: clamp(22px, 2.6vw, 40px); }
}

/* one load sequence: the lockup sets, then the line, then the actions */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 900ms var(--ease) both; }
  .rise:nth-child(2) { animation-delay: 120ms; }
  .rise:nth-child(3) { animation-delay: 240ms; }
  .rise:nth-child(4) { animation-delay: 360ms; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(64px, 9vw, 128px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

h2, .h2 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.after-caps { margin-top: 18px; }

/* ---------- videos ---------- */

.reel {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.clip a {
  display: grid;
  gap: 12px;
  text-decoration: none;
}
.thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--graphite);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* crops the 4:3 letterbox of hqdefault to 16:9 */
  transition: transform 700ms var(--ease);
}
.clip a:hover .thumb img { transform: scale(1.035); }
.clip-title {
  display: block;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.35;
  text-wrap: balance;
}
.clip a:hover .clip-title { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.clip-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.clip--lead .clip-title {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.3;
}

@media (max-width: 599px) {
  .clip:not(.clip--lead) a {
    grid-template-columns: 42% 1fr;
    gap: 14px;
    align-items: start;
  }
  .clip:not(.clip--lead) .clip-title { font-size: 0.9375rem; }
}
@media (min-width: 600px) {
  .reel { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .clip--lead { grid-column: 1 / -1; }
}
@media (min-width: 1040px) {
  .reel { grid-template-columns: repeat(4, 1fr); }
  .clip--lead { grid-column: 1 / 3; grid-row: 1 / 3; }
}

/* ---------- night: partners + footer ---------- */

.night {
  position: relative;
  background: var(--violet);
  color: var(--ivory);
}
/* the cut: a gold hairline, brightest at the centre, as on the banner divide */
.night::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgb(217 164 65 / 0) 0%, var(--gold) 30%, #FFE8B4 50%, var(--gold) 70%, rgb(217 164 65 / 0) 100%);
}

.partners-grid {
  display: grid;
  gap: 48px;
}
.partners .lead {
  max-width: 34ch;
  margin: 28px 0 0;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ivory);
}
.terms { margin: 0; }
.terms div {
  display: grid;
  gap: 8px;
  padding-block: 22px;
  border-top: 1px solid rgb(242 237 228 / 0.16);
}
.terms div:last-child { border-bottom: 1px solid rgb(242 237 228 / 0.16); }
.terms dt { font-size: 0.8125rem; }
.terms dd {
  margin: 0;
  max-width: 60ch;
  color: var(--ivory-muted);
}
.contact { margin-top: 40px; }
.contact a {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  color: var(--ivory);
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
.contact a:hover { color: var(--gold-light); }

@media (min-width: 900px) {
  .partners-grid { grid-template-columns: 5fr 6fr; gap: clamp(48px, 7vw, 120px); align-items: start; }
  .terms div { grid-template-columns: 11rem 1fr; gap: 24px; padding-block: 26px; }
  .terms dt { padding-top: 0.3em; }
}

.foot {
  padding-block: 40px 48px;
  font-size: 0.9375rem;
  color: var(--ivory-muted);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid rgb(242 237 228 / 0.16);
}
.foot .name { width: 120px; height: auto; }
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot a { color: var(--ivory); text-decoration: none; }
.foot a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.foot small { display: block; margin-top: 20px; font-size: 0.8125rem; }
.night.foot-only::before { display: none; }

/* ---------- legal pages ---------- */

.doc {
  padding-block: clamp(40px, 7vw, 96px) clamp(72px, 9vw, 128px);
}
.doc-body { max-width: 68ch; }
.doc h1 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.doc .updated { margin: 18px 0 0; color: var(--muted); font-size: 0.9375rem; }
.doc h2 {
  margin: 56px 0 0;
  font-size: clamp(1.75rem, 3.4vw, 2.375rem);
  line-height: 1.1;
}
.doc h3 {
  margin: 32px 0 0;
  font-size: 1.0625rem;
  font-weight: 600;
}
.doc p, .doc ul, .doc dl, .doc address { margin: 14px 0 0; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc address { font-style: normal; }
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
.doc .scopes div {
  padding-block: 14px;
  border-top: 1px solid var(--rule);
}
.doc .scopes div:last-child { border-bottom: 1px solid var(--rule); }
.doc .scopes dt { font-weight: 600; }
.doc .scopes dd { margin: 4px 0 0; }
.doc .lede { margin-top: 24px; font-size: clamp(1.125rem, 1.6vw, 1.25rem); }
.fill { background: rgb(217 164 65 / 0.28); padding: 0 0.15em; }

/* ---------- 404 ---------- */

.lost {
  display: grid;
  gap: 32px;
  justify-items: start;
  padding-block: clamp(48px, 10vw, 140px);
}
.lost img.ball { width: clamp(120px, 22vw, 220px); height: auto; }
.lost h1 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1.02;
  max-width: 14ch;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
