@import url(fonts.css);

/* CLUB JOIA 300 brand tokens (same as the member app). */
:root {
  --ink: #050505;
  --ink-2: #0e0e10;
  --pearl: #f5f3ee;
  --pearl-muted: #bdb9b0;
  --pearl-dim: #8f8b82;
  --line: rgba(245, 243, 238, 0.14);
  --ruby: #ef233c;
  --ruby-deep: #a3101f;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--pearl); font: 300 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--ruby); color: #fff; }
:focus-visible { outline: 2px solid var(--ruby); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.eyebrow { font: 500 12px/1.4 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--pearl-muted); margin: 0 0 18px; }
.eyebrow.ruby { color: var(--ruby); }
.display, h1 { font-family: var(--serif); font-weight: 400; line-height: .98; letter-spacing: -.01em; margin: 0; }
.display { font-size: clamp(46px, 7vw, 96px); }
.display em, h1 em { font-style: italic; color: var(--ruby); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--pearl-muted); max-width: 640px; margin: 28px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--ruby); color: #fff; text-decoration: none; border: 0; border-radius: 999px; padding: 18px 34px; font: 600 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; cursor: pointer; transition: background .25s var(--ease), transform .25s var(--ease); }
.btn:hover { background: #ff3a52; transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-small { padding: 12px 20px; font-size: 11px; }
.btn-block { width: 100%; padding: 20px; }

/* NAV */
.nav { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); transition: background .35s var(--ease), padding .35s var(--ease), border-color .35s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(5,5,5,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-block: 12px; border-color: var(--line); }
.nav-logo img { width: 132px; height: auto; opacity: 0; transition: opacity .35s; }
.nav.scrolled .nav-logo img { opacity: 1; }

/* HERO */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; z-index: -2; animation: settle 2.4s var(--ease) both; }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(5,5,5,.78) 0%, rgba(5,5,5,.5) 38%, rgba(5,5,5,0) 68%),
  linear-gradient(180deg, rgba(5,5,5,.5) 0%, rgba(5,5,5,0) 28%, rgba(5,5,5,.2) 55%, rgba(5,5,5,.94) 100%); }
@media (max-width: 760px) { .hero-shade { background: linear-gradient(180deg, rgba(5,5,5,.45) 0%, rgba(5,5,5,.1) 25%, rgba(5,5,5,.55) 50%, rgba(5,5,5,.95) 100%); } }
.hero-inner { padding: 120px var(--gutter) clamp(72px, 12vh, 120px); max-width: 1200px; animation: rise 1.2s .3s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
/* Logo + tagline centred in the sky above the yacht. The tagline is never wider than the logo
   (app.js scales it to the logo's width; the CSS size is the no-JavaScript fallback). */
.brand { position: absolute; z-index: 1; left: 0; right: 0; margin: 0 auto; top: clamp(64px, 8vh, 96px); width: clamp(190px, 21vw, 320px); display: flex; flex-direction: column; align-items: center; text-align: center; animation: rise 1.2s .1s var(--ease) both; }
.brand-logo { width: 100%; height: auto; filter: drop-shadow(0 3px 18px rgba(0,0,0,.45)); }
.tagline { margin: 12px 0 0; white-space: nowrap; font: 500 clamp(6px, .58vw, 9px)/1 var(--sans); letter-spacing: .18em; padding-left: .18em; text-transform: uppercase; color: var(--pearl); text-shadow: 0 1px 10px rgba(0,0,0,.65); }
.hero-logo { width: clamp(200px, 24vw, 340px); height: auto; margin-bottom: 40px; filter: drop-shadow(0 4px 24px rgba(0,0,0,.35)); }
.hero .eyebrow { color: var(--pearl); }
.hero h1 { font-size: clamp(46px, 6.6vw, 96px); max-width: 820px; text-shadow: 0 4px 40px rgba(0,0,0,.45); }
.hero .eyebrow { text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.hero-lead { font-size: clamp(17px, 1.6vw, 21px); color: rgba(245,243,238,.85); max-width: 560px; margin: 28px 0 40px; }
.hero-cta { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.scroll-cue { position: absolute; right: var(--gutter); bottom: 40px; width: 1px; height: 64px; background: rgba(245,243,238,.25); overflow: hidden; }
.scroll-cue span { position: absolute; inset: 0; background: var(--pearl); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@media (max-width: 700px) { .scroll-cue { display: none; } }

/* BENEFITS (compare table) */
.benefits { padding: clamp(88px, 12vw, 160px) var(--gutter) clamp(72px, 10vw, 128px); max-width: 1320px; margin: 0 auto; scroll-margin-top: 40px; }
.tech { font: 800 clamp(30px, 4vw, 46px)/1.1 "Orbitron", var(--sans); letter-spacing: .01em; margin: 0; }
/* the hero's links land on the heading, just under the fixed nav (not the section's empty top) */
#benefits-title { scroll-margin-top: 112px; }
@media (max-width: 700px) { #benefits-title { scroll-margin-top: 96px; } }
.benefits-lead { color: var(--pearl-muted); font-size: clamp(15px, 1.4vw, 18px); margin: 22px 0 0; max-width: 720px; }
.table-wrap { margin-top: clamp(40px, 5vw, 64px); }
.compare { width: 100%; border-collapse: collapse; font: 400 clamp(13px, 1.25vw, 17px)/1.35 var(--sans); }
.compare thead th { font: 700 clamp(11px, 1.35vw, 19px)/1.2 "Orbitron", var(--sans); text-align: center; padding: 0 8px 26px; white-space: nowrap; }
.compare thead tr { border-bottom: 1px solid rgba(245,243,238,.55); }
.compare .tier { display: inline-flex; align-items: center; gap: 12px; }
.compare .dot { width: 14px; height: 14px; flex: none; }
.compare .dot.ruby-red { background: #b3001e; box-shadow: none; }
.compare .dot.pearly-white { background: #f1eee8; box-shadow: none; }
.compare .dot.ultra-black { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pearl); }
.compare tbody tr { border-bottom: 1px solid var(--line); }
.compare tbody th { text-align: left; font-weight: 400; padding: 18px 12px 18px 0; color: var(--pearl); }
.compare td { text-align: center; padding: 18px 8px; width: 22%; }
.compare thead td { width: auto; }
.tick { width: 16px; height: 16px; fill: none; stroke: var(--pearl); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.dash { color: var(--pearl-dim); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.benefits-cta { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 48px); }
/* the table folded to its first rows (app.js), opened by "Show all benefits" */
.table-wrap.folded { position: relative; }
.table-wrap.folded tbody tr:nth-child(n+7) { display: none; }
.table-wrap.folded::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px; background: linear-gradient(to bottom, rgba(5,5,5,0), var(--ink, #050505)); pointer-events: none; }
.compare-more { display: flex; justify-content: center; margin-top: 28px; }
.compare-more[hidden] { display: none; }
.more-toggle { display: inline-flex; align-items: center; gap: 10px; background: transparent; color: var(--pearl); border: 1px solid rgba(245,243,238,.35); border-radius: 999px; padding: 14px 26px; font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: border-color .25s var(--ease), background .25s var(--ease); }
.more-toggle:hover { border-color: var(--pearl); background: rgba(245,243,238,.06); }
.more-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.more-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (max-width: 640px) {
  .compare thead th { white-space: normal; padding-bottom: 18px; }
  .compare .tier { flex-direction: column; gap: 8px; }
  .compare tbody th { padding: 14px 8px 14px 0; }
  .compare td { padding: 14px 4px; width: 19%; }
  .benefits-cta .btn { width: 100%; }
}

/* REGISTER */
.register { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); padding: clamp(96px, 14vw, 180px) var(--gutter); max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--line); scroll-margin-top: 40px; }
@media (max-width: 960px) { .register { grid-template-columns: 1fr; } }
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 18px; }
.steps li { display: flex; align-items: baseline; gap: 18px; color: var(--pearl-muted); }
.steps span { font: 400 26px/1 var(--serif); color: var(--ruby); width: 34px; flex: none; }

.form { display: grid; gap: 22px; align-content: start; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font: 500 11px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--pearl-muted); padding: 0; }
.field small, .check small { text-transform: none; letter-spacing: 0; color: var(--pearl-dim); font-weight: 300; font-size: 12px; margin-left: 4px; }
input, select, textarea { width: 100%; background: rgba(245,243,238,.04); color: var(--pearl); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; font: 400 16px/1.4 var(--sans); transition: border-color .2s, background .2s; appearance: none; -webkit-appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--pearl-muted) 50%), linear-gradient(135deg, var(--pearl-muted) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
select option { background: var(--ink-2); color: var(--pearl); }
input::placeholder, textarea::placeholder { color: rgba(245,243,238,.3); }
input:hover, select:hover, textarea:hover { border-color: rgba(245,243,238,.3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pearl); background: rgba(245,243,238,.07); }
textarea { resize: vertical; min-height: 96px; }
.invalid input, .invalid select, .invalid textarea { border-color: var(--ruby); }
.field-error { color: #ff6b7d; font-size: 13px; margin: -2px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.chips label { cursor: pointer; text-transform: none; letter-spacing: 0; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; font: 400 15px/1 var(--sans); color: var(--pearl); transition: border-color .2s, background .2s; }
.chips label:hover span { border-color: rgba(245,243,238,.35); }
.chips input:checked + span { border-color: var(--pearl); background: rgba(245,243,238,.1); }
.chips input:focus-visible + span { outline: 2px solid var(--ruby); outline-offset: 2px; }
.invalid .chips span { border-color: rgba(239,35,60,.6); }
.dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.dot.ruby-red { background: linear-gradient(135deg, #ff3550, #8e0f22); }
.dot.pearly-white { background: linear-gradient(135deg, #ffffff, #d9d4e6); }
.dot.ultra-black { background: linear-gradient(135deg, #3a3a3e, #050505); }

.check { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; color: var(--pearl-muted); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; padding: 0; margin: 2px 0 0; border-radius: 6px; display: grid; place-content: center; }
.check input::before { content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform .15s; background: var(--pearl); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.check input:checked { border-color: var(--pearl); }
.check input:checked::before { transform: scale(1); }
.check.invalid input { border-color: var(--ruby); }
.check a { color: var(--pearl); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: rgba(239,35,60,.12); border: 1px solid rgba(239,35,60,.5); color: #ffd6dc; padding: 14px 16px; border-radius: 12px; margin: 0; font-size: 14px; }

.thanks { grid-column: 2; align-self: center; text-align: left; animation: rise .8s var(--ease) both; }
.thanks img { width: 200px; height: auto; margin-bottom: 40px; }
.thanks:focus { outline: none; }
@media (max-width: 960px) { .thanks { grid-column: 1; } }

/* FOOTER */
.footer { padding: 72px var(--gutter) 56px; border-top: 1px solid var(--line); text-align: center; color: var(--pearl-dim); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.footer img { width: 150px; height: auto; margin: 0 auto 28px; }
.footer p { margin: 8px 0; }
.footer .small { text-transform: none; letter-spacing: .02em; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (max-width: 480px) { .eyebrow { letter-spacing: .22em; } }
@media (max-width: 900px) { .brand { width: min(260px, 66vw); } .tagline { letter-spacing: .08em; padding-left: .08em; } }

/* ── Fixes for small and short screens (club-joia-300-next) ──
   The hero's logo is pinned near the top while the headline block sits at the bottom: on short
   screens (small phones, phones held sideways) they met. The headline block now keeps the logo's
   space above it, so the hero grows instead. The logo is a quarter as tall as it is wide. */
.hero { --brand-w: clamp(190px, 21vw, 320px); }
@media (max-width: 900px) { .hero { --brand-w: min(260px, 66vw); } }
.hero-inner { padding-top: calc(clamp(64px, 8vh, 96px) + var(--brand-w) / 4 + 64px); }
/* A checkbox's error message goes under its text, not into a narrow column beside it. */
.check { flex-wrap: wrap; }
.check > span { flex: 1 1 0; min-width: 0; }
.check > .field-error { flex-basis: 100%; margin: -4px 0 0 34px; }
/* the small note in a label ("with country code") keeps the label one line high, so fields side by side line up */
.field label small { line-height: 1; }
/* a field beside a taller one (its error shown) stays at the top, its box its own height */
.field { align-content: start; }
