/* The Golf Trip: website styles. Colours match the app's default look (src/lib/theme.js). */
:root {
  --green: #1F4B33;
  --green-deep: #153524;
  --green-soft: #2C6346;
  --gold: #E0B84A;
  --gold-pale: #F3DFA3;
  --paper: #F1F4EE;
  --white: #FFFFFF;
  --ink: #15202E;
  --muted: #46564C;
  --line: #C9D3C6;
  --error: #9B2C1F;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-soft); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.005em; margin: 0; }
h1 { font-size: clamp(3rem, 8.5vw, 5.75rem); }
h2 { font-size: clamp(2.1rem, 5vw, 3.25rem); }
h3 { font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.01em;
  border: 2px solid transparent; border-radius: 6px; text-decoration: none; cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-pale); color: var(--ink); }
.btn-line { border-color: currentColor; color: var(--green); background: transparent; }
.btn-line:hover { background: var(--white); }

/* Header */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); }
.brand img { width: 38px; height: 38px; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.55rem; letter-spacing: 0.01em; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.top nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.top nav a:not(.btn):hover { text-decoration: underline; }
.top .btn { min-height: 42px; font-size: 1.1rem; padding: 0 16px; }
@media (max-width: 720px) { .top nav a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: clamp(24px, 5vw, 64px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { color: var(--green); max-width: 9ch; }
.hero .lede { margin-top: 22px; font-size: 1.25rem; max-width: 34ch; color: var(--ink); }
.hero .actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.hero .small { margin-top: 18px; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 11ch; }
}

/* The honour board: the one loud thing on the page */
.board {
  position: relative;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #1A3F2B, var(--green-deep));
  color: var(--gold);
  border-radius: 6px;
  padding: 14px;
  box-shadow: 0 1px 0 #0d2418, 0 24px 48px -28px rgba(10, 30, 20, 0.7);
}
.board-inner { border: 2px solid var(--gold); outline: 1px solid rgba(224, 184, 74, 0.45); outline-offset: -8px; padding: 30px clamp(18px, 4vw, 34px) 26px; }
.board-title { text-align: center; font-family: var(--display); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.board-title .cup { display: block; font-size: 0.95rem; color: var(--gold-pale); letter-spacing: 0.3em; }
.board-title .name { display: block; font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.1; margin-top: 4px; }
.board-rule { height: 0; border-top: 2px solid var(--gold); width: 64px; margin: 14px auto 18px; }
.board ol { list-style: none; margin: 0; padding: 0; font-family: var(--display); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; font-size: clamp(1.1rem, 2.4vw, 1.3rem); }
.board li { display: grid; grid-template-columns: 5.4ch 1fr; gap: 14px; padding: 5px 0; }
.board li .yr { color: var(--gold-pale); }
.board li.muted span:last-child { color: rgba(224, 184, 74, 0.55); }
.board li.next span:last-child { border-bottom: 2px dashed rgba(224, 184, 74, 0.7); height: 1.15em; align-self: center; }
.board-caption { margin-top: 14px; color: var(--muted); font-size: 0.95rem; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .board li { opacity: 0; animation: engrave 0.5s ease-out forwards; }
  .board li:nth-child(1) { animation-delay: 0.15s; }
  .board li:nth-child(2) { animation-delay: 0.3s; }
  .board li:nth-child(3) { animation-delay: 0.45s; }
  .board li:nth-child(4) { animation-delay: 0.6s; }
  .board li:nth-child(5) { animation-delay: 0.75s; }
  .board li:nth-child(6) { animation-delay: 0.9s; }
  .board li:nth-child(7) { animation-delay: 1.05s; }
  .board li:nth-child(8) { animation-delay: 1.35s; }
  @keyframes engrave { from { opacity: 0; transform: translateY(4px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
}

/* Sections */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 40rem; }
.section-head p { margin-top: 14px; font-size: 1.15rem; color: var(--muted); }
.rule-top { border-top: 1px solid var(--line); }

/* What makes it yours: a 2 × 2 set divided by rules, not cards */
.yours { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--green); }
.yours > div { padding: 26px 32px 30px 0; border-bottom: 1px solid var(--line); }
.yours > div:nth-child(odd) { border-right: 1px solid var(--line); }
.yours > div:nth-child(even) { padding-left: 32px; padding-right: 0; }
.yours h3 { color: var(--green); }
.yours p { margin-top: 8px; max-width: 42ch; }
@media (max-width: 720px) {
  .yours { grid-template-columns: 1fr; }
  .yours > div, .yours > div:nth-child(even) { padding: 22px 0 24px; border-right: 0; }
}

/* How a trip runs: a real sequence, so it's numbered */
.how { background: var(--white); }
.how .wrap { display: grid; grid-template-columns: 1fr 340px; gap: clamp(32px, 6vw, 88px); align-items: start; }
.steps { list-style: none; margin: 36px 0 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 0 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--gold);
  -webkit-text-stroke: 1px #B38B24;
}
.steps h3 { font-size: 1.45rem; color: var(--ink); }
.steps p { margin-top: 4px; color: var(--muted); max-width: 46ch; }
@media (max-width: 860px) { .how .wrap { grid-template-columns: 1fr; } .phone { margin: 8px auto 0; } }

/* Phone mock-up of a live leaderboard */
.phone { width: 300px; max-width: 100%; border: 10px solid var(--ink); border-radius: 34px; background: var(--paper); overflow: hidden; box-shadow: 0 30px 60px -36px rgba(21, 32, 46, 0.6); position: sticky; top: 24px; }
.phone-bar { background: var(--green); color: var(--white); padding: 18px 18px 14px; }
.phone-bar .trip { font-size: 0.85rem; color: #CFE0D4; }
.phone-bar .rd { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; display: flex; align-items: center; gap: 8px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--body); font-size: 0.75rem; font-weight: 600; background: var(--gold); color: var(--ink); border-radius: 99px; padding: 2px 8px 2px 7px; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #B3261E; }
.lb { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.lb th { font-weight: 600; font-size: 0.75rem; color: var(--muted); text-align: right; padding: 10px 14px 6px; }
.lb th:nth-child(2) { text-align: left; }
.lb td { padding: 9px 14px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.lb td:first-child { width: 2.2em; color: var(--muted); }
.lb td:nth-child(2) { text-align: left; font-weight: 600; }
.lb td:last-child { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--green); }
.lb tr.lead td { background: #FBF3DC; }
.feed { margin: 10px 12px 14px; background: var(--white); border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; border-left: 4px solid var(--gold); }
.feed b { color: var(--green); }

/* Clubs band */
.clubs { background: var(--green); color: var(--white); }
.clubs .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.clubs h2 { color: var(--white); }
.clubs p { margin-top: 16px; font-size: 1.15rem; color: #DCE8DF; max-width: 46ch; }
.clubs ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,0.25); }
.clubs li { padding: 16px 0 16px 34px; border-bottom: 1px solid rgba(255,255,255,0.25); position: relative; font-size: 1.08rem; }
.clubs li::before { content: ''; position: absolute; left: 4px; top: 22px; width: 14px; height: 9px; border-left: 3px solid var(--gold); border-bottom: 3px solid var(--gold); transform: rotate(-45deg); }
.clubs .btn { margin-top: 28px; }
.clubs a:not(.btn) { color: var(--gold-pale); }
@media (max-width: 860px) { .clubs .wrap { grid-template-columns: 1fr; } }

/* Register form */
.register .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.register .section-head p + p { margin-top: 12px; }
form { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 6px; padding: clamp(20px, 4vw, 34px); }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend, label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
.roles { display: grid; gap: 8px; }
.roles label { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.roles label:has(input:checked) { border-color: var(--green); background: #EAF1EC; }
.roles input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; }
.field { margin-bottom: 18px; }
input[type=text], input[type=email], select {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #9AA89E; border-radius: 6px;
}
input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--green); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: 0.92rem; color: var(--muted); margin: 4px 0 18px; }
form .btn { width: 100%; }
.form-msg { margin-top: 14px; font-weight: 500; }
.form-msg.error { color: var(--error); }
.done h3 { color: var(--green); }
.done p { margin-top: 8px; }
@media (max-width: 860px) { .register .wrap { grid-template-columns: 1fr; } }

/* Questions */
.faq { max-width: 46rem; margin-top: 28px; border-top: 2px solid var(--green); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 36px 18px 0; font-family: var(--display); font-weight: 600; font-size: 1.4rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 1.8rem; color: var(--green); }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { padding: 0 0 20px; max-width: 60ch; }

/* Footer */
.foot { background: var(--green-deep); color: #CFE0D4; padding: 40px 0 48px; font-size: 0.98rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; }
.foot .brand { color: var(--white); }
.foot a { color: var(--white); }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }

/* Plain pages (privacy, thanks) */
.page { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.page .wrap { max-width: 46rem; }
.page h1 { font-size: clamp(2.6rem, 6vw, 3.75rem); color: var(--green); }
.page h2 { font-size: 1.75rem; margin: 36px 0 10px; color: var(--green); }
.page p, .page ul { margin: 0 0 14px; }
.page .updated { color: var(--muted); margin-top: 10px; }
.board-fig { margin: 0; }
.done { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 6px; padding: 28px; }
.page .back { margin-top: 36px; }
.page .lead-gap { margin-top: 16px; }
