/* ============================================================
   OFF COURT SOCIAL CLUB — carousel edition, merlot-led palette
   PP Editorial New (display) + Geist (body/sans)

   Palette follows the teaser reference: merlot/ink carry the hero,
   enroll and footer, chalk beige is reserved for the ticker band.
   Copper is a single accent: the scroll-cue sweep and the enroll
   field focus state.
   ============================================================ */

@font-face {
  font-family: "Editorial New";
  src: url("assets/fonts/editorial-new-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Editorial New";
  src: url("assets/fonts/editorial-new-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-italic-variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --merlot: #6A0024;
  --merlot-lift: #7D0A2C;
  --merlot-deep: #4D0019;
  --wine-black: #26060F;
  --ink: #170509;
  --chalk: #F2E5C6;
  --copper: #C9906B;
  --copper-lift: #E8B795;

  --chalk-70: rgba(242, 229, 198, 0.72);
  --chalk-45: rgba(242, 229, 198, 0.48);
  --chalk-18: rgba(242, 229, 198, 0.20);
  --chalk-10: rgba(242, 229, 198, 0.11);

  /* legacy aliases — keep the rest of the sheet's selectors unchanged */
  --champagne: var(--chalk);
  --paper: var(--chalk);

  --display: "Editorial New", Georgia, serif;
  --sans: "Geist", -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --gutter: clamp(24px, 6.5vw, 120px);

  /* spacing scale — one system, used everywhere */
  --sp-2xs: clamp(10px, 1.2vh, 16px);
  --sp-xs:  clamp(18px, 2.6vh, 32px);
  --sp-sm:  clamp(28px, 4vh, 56px);
  --sp-md:  clamp(44px, 6.5vh, 96px);
  --sp-lg:  clamp(64px, 9.5vh, 144px);
  --sp-xl:  clamp(88px, 13vh, 192px);

  --content-max: 1680px;
  --copy-max: 640px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--chalk);
  color: var(--chalk);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--merlot); color: var(--chalk); }

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 70;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  transform: translateZ(0);
}

main { position: relative; }

/* ============ type ============ */

.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  opacity: 0.8;
}

h2, .ob-welcome {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0.01em;
}

h2 em, .ob-welcome em {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.br-lg { display: none; }
@media (min-width: 768px) { .br-lg { display: inline; } }

/* ============ buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  padding: 16px 36px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease,
    letter-spacing 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn:hover { letter-spacing: 0.32em; }

.btn-light {
  background: var(--chalk);
  color: var(--merlot);
  border-color: var(--chalk);
  width: 100%;
}
.btn-light:hover { background: var(--copper-lift); border-color: var(--copper-lift); }

/* ============ 01 · hero carousel ============ */

#hero {
  position: relative;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background: var(--ink);
}

.film-wrap {
  position: absolute;
  inset: 0;
  background: var(--ink);
}

#film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(23, 5, 9, 0.45), rgba(23, 5, 9, 0) 30%),
    linear-gradient(to top, rgba(23, 5, 9, 0.6), rgba(23, 5, 9, 0.14) 42%, rgba(23, 5, 9, 0) 62%);
  pointer-events: none;
}

.hero-haze {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  -webkit-mask-image: radial-gradient(ellipse 64% 50% at 50% 80%, rgba(0, 0, 0, 0.9), transparent 72%);
  mask-image: radial-gradient(ellipse 64% 50% at 50% 80%, rgba(0, 0, 0, 0.9), transparent 72%);
}

@media (min-width: 900px) {
  .hero-haze {
    -webkit-mask-image: radial-gradient(ellipse 46% 52% at 26% 78%, rgba(0, 0, 0, 0.9), transparent 72%);
    mask-image: radial-gradient(ellipse 46% 52% at 26% 78%, rgba(0, 0, 0, 0.9), transparent 72%);
  }
}

.hero-exit {
  position: absolute;
  inset: 0;
  background: var(--chalk);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(10px, 3vw, 32px);
  padding: clamp(18px, 3.2vw, 32px) var(--gutter);
}

.nav-mark { display: block; flex: none; }

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
}

.nav-mark img {
  display: block;
  height: clamp(38px, 6vw, 52px);
  width: auto;
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.nav-mark:hover img { opacity: 0.8; transform: translateY(-1px); }

.music-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(34px, 6vw, 40px);
  height: clamp(34px, 6vw, 40px);
  flex: none;
  color: var(--chalk);
  background: transparent;
  border: 1px solid var(--chalk-45);
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}
.music-toggle:hover { background: var(--chalk-10); border-color: var(--chalk-70); }

.music-icon { width: 17px; height: 17px; }
.music-icon .music-mute { opacity: 0; }
.music-toggle[aria-pressed="true"] .music-wave { opacity: 0; }
.music-toggle[aria-pressed="true"] .music-mute { opacity: 1; }

.nav-cta {
  color: var(--chalk);
  text-decoration: none;
  font-size: clamp(9px, 2.4vw, 11px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: clamp(9px, 2vw, 13px) clamp(12px, 3.2vw, 22px);
  border: 1px solid var(--chalk-45);
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease,
    letter-spacing 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.nav-cta:hover { background: var(--chalk); color: var(--merlot); border-color: var(--chalk); letter-spacing: 0.18em; }

.hero-copy {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(160vw, 1200px);
  height: 72%;
  background: radial-gradient(ellipse 66% 55% at 30% 78%, rgba(23, 5, 9, 0.5), rgba(23, 5, 9, 0) 72%);
  pointer-events: none;
  z-index: -1;
}

.hero-copy-block {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: left;
  padding: 0 var(--gutter) calc(max(80px, 16vh) + env(safe-area-inset-bottom, 0px));
}

.hero-kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 14px;
  text-shadow: 0 1px 12px rgba(23, 5, 9, 0.55);
  color: var(--chalk);
}

.hero-line {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.04;
  font-size: clamp(18px, 5.25vw, 66px);
  text-shadow: 0 2px 20px rgba(23, 5, 9, 0.5);
  max-width: 18em;
  color: var(--chalk);
}

.hero-line em {
  font-style: italic;
  font-weight: 400;
}

.hero-el {
  opacity: 0;
  will-change: transform, opacity;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.cue-text {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  opacity: 0.75;
  padding-left: 0.4em;
  color: var(--chalk);
}

.cue-line {
  display: block;
  width: 1px;
  height: 36px;
  background: var(--chalk-18);
  position: relative;
  overflow: hidden;
}

/* the one deliberate use of copper on the page — mirrors the reference's
   own scroll-cue sweep treatment */
.cue-line::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 100%;
  height: 40%;
  background: var(--copper);
  animation: cue 2.8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

@keyframes cue {
  0% { top: -40%; }
  70%, 100% { top: 110%; }
}

/* ============ 02 · ticker ============ */

#amenities {
  background: var(--chalk);
  color: var(--merlot);
  padding: clamp(26px, 4.2vh, 44px) 0;
  position: relative;
  z-index: 3;
  overflow: hidden;
}

.am-ticker {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.am-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: clamp(20px, 3vw, 40px);
  animation: am-ticker-scroll 30s linear infinite;
}

@keyframes am-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .am-track { animation: none; }
}

.am-item {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-size: clamp(20px, 2.2vw, 30px);
  color: var(--merlot);
  white-space: nowrap;
}

.am-dot {
  font-size: clamp(20px, 2.2vw, 30px);
  color: var(--merlot);
  opacity: 0.4;
}

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

/* ============ 03 · enroll — merlot, the reference's warm dark moment ============ */

#enroll {
  background: var(--merlot);
  color: var(--chalk);
  padding: clamp(36px, 6vh, 64px) var(--gutter) clamp(28px, 4.5vh, 44px);
}

.ob-inner {
  max-width: var(--copy-max);
  margin: 0 auto;
  text-align: center;
}

.ob-title {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  font-size: clamp(32px, 6.4vw, 52px);
  color: var(--chalk);
  margin: 0 0 clamp(24px, 4vh, 40px);
}

#ob-form { text-align: left; }

@media (min-width: 900px) {
  .ob-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 24px;
    margin-bottom: clamp(14px, 2.2vh, 22px);
  }
  .ob-fields .field { margin-bottom: 0; }
}

.field { margin-bottom: clamp(12px, 2vh, 20px); }

.field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  opacity: 0.6;
  color: var(--chalk);
  margin-bottom: 3px;
  transition: opacity 0.5s ease, letter-spacing 0.6s ease;
}

.field:focus-within label { opacity: 1; letter-spacing: 0.44em; }

.field input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--chalk-45);
  border-radius: 0;
  color: var(--chalk);
  font-family: var(--display);
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 400;
  padding: 7px 0 9px;
  outline: none;
  transition: border-color 0.5s ease;
}

.field input:focus { border-bottom-color: var(--copper); }

#ob-form .btn-light {
  margin-top: clamp(4px, 1vh, 10px);
  min-height: 46px;
}

.ob-note {
  margin-top: clamp(12px, 2vh, 18px);
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.6;
}

#ob-success { padding: clamp(14px, 2.6vh, 24px) 0; }

.ob-welcome {
  font-size: clamp(28px, 5.6vw, 44px);
  line-height: 1.15;
  color: var(--chalk);
  max-width: 14em;
  margin: 0 auto;
}

/* ============ 04 · footer — deepest note, ink not merlot ============ */

footer {
  background: var(--ink);
  padding: clamp(24px, 4vh, 44px) var(--gutter) clamp(16px, 2.4vh, 26px);
  text-align: center;
}

.foot-soon {
  font-family: var(--display);
  font-size: clamp(20px, 4vw, 32px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: clamp(12px, 2vh, 20px);
}

.foot-soon em {
  font-style: italic;
  font-weight: 400;
}

.foot-logo {
  display: block;
  height: 28px;
  width: auto;
  margin: 0 auto clamp(8px, 1.2vh, 12px);
  opacity: 0.95;
}

.foot-links {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 48px);
  flex-wrap: wrap;
  margin-bottom: clamp(10px, 1.6vh, 16px);
}

.foot-links a {
  color: var(--chalk);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.8;
  padding: 12px 4px;
  transition: opacity 0.4s ease, letter-spacing 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.foot-links a:hover { opacity: 1; letter-spacing: 0.34em; }

.foot-copy {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
}

/* ============ reduced motion ============ */

body.reduced .carousel-track { transition: none; }
body.reduced .am-track { animation: none; }
body.reduced .scroll-cue { display: none; }
body.reduced #hero { height: auto; min-height: 100svh; }
