/* VMGline — v20
   Palette: haze (overcast Baltic), sea (deep navy), flag orange (the race committee's line flag), fix green (RTK fix).
   Type: Familjen Grotesk, one family for everything, tabular figures for data. */

:root {
  --haze: #edf1f4;
  --haze-2: #e2e8ec;
  --paper: #ffffff;
  --sea: #0d2030;
  --sea-2: #142d42;
  --sea-3: #1d3a52;
  --ink: #0f1e2b;
  --ink-2: #41505c;
  --ink-3: #74818c;
  --rule: rgba(15, 30, 43, 0.14);
  --rule-dark: rgba(255, 255, 255, 0.16);
  --flag: #f0501a;
  --flag-soft: rgba(240, 80, 26, 0.12);
  --fix: #1db37a;

  --font: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* aliases kept for older markup */
  --graphite: var(--sea);
  --deep: var(--sea);
  --foam: var(--haze);
  --mist: var(--haze);
  --sand: var(--haze);
  --accent: var(--ink);
  --ink-900: var(--ink);
  --ink-700: var(--ink-2);
  --ink-500: var(--ink-3);
  --line: var(--rule);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
strong { font-weight: 600; }

:focus-visible { outline: 2px solid var(--flag); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--sea); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px;
  font-size: 0.9rem; z-index: 200;
}
.skip-link:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Type scale ===== */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 5.75rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
p { max-width: 62ch; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.45; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section--white { background: var(--paper); }
.section--sand, .section--foam { background: var(--haze); }
.section--deep { background: var(--sea); color: #fff; }
.section--deep p, .section--deep .lead { color: rgba(255,255,255,0.8); }
.section--photo { position: relative; color: #fff; }
.section--photo .section__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.section--photo .section__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,32,48,0.92) 0%, rgba(13,32,48,0.55) 60%, rgba(13,32,48,0.25) 100%); }
.section--photo .container { position: relative; }
.section--photo p { color: rgba(255,255,255,0.85); }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { margin-bottom: 18px; }
.section-head p { color: var(--ink-2); font-size: 1.125rem; }
.section--deep .section-head p { color: rgba(255,255,255,0.8); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--wide { grid-template-columns: 1.1fr 0.9fr; }
.split h2 { margin-bottom: 18px; }
.split .lead { margin-bottom: 8px; }
.cta-center h2 { margin-bottom: 18px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

@media (max-width: 860px) {
  .split, .split--wide { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
}

/* ===== Eyebrow (sentence case, quiet) ===== */
.eyebrow {
  display: inline-block; font-size: 0.95rem; font-weight: 500; color: var(--ink-3);
  margin-bottom: 14px; padding-left: 14px; border-left: 2px solid var(--flag);
}
.eyebrow--accent { color: var(--ink-2); }
.eyebrow--dark { color: rgba(255,255,255,0.72); }

/* ===== Buttons & links ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 8px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--primary { background: var(--flag); color: #fff; }
.btn--primary:hover { background: #d8440f; }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: rgba(255,255,255,0.08); }
.btn--pill { border-radius: 999px; background: var(--ink); color: #fff; }
.btn--pill:hover { background: var(--sea-2); }
.btn--sm { padding: 9px 16px; font-size: 0.9rem; }
.btn--lg { padding: 17px 30px; font-size: 1.0625rem; }
.section--deep .btn--pill, .hero .btn--pill { background: #fff; color: var(--ink); }

.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.text-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.cta-note, .steps-note { font-size: 0.95rem; color: var(--ink-3); margin-top: 24px; max-width: 70ch; }
.section--deep .cta-note, .section--deep .steps-note { color: rgba(255,255,255,0.6); }

/* ===== Nav ===== */
.nav { position: sticky; top: 0; z-index: 100; background: var(--sea); color: #fff; transition: box-shadow 0.2s; }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--rule-dark); }
.nav__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); height: var(--nav-h); display: flex; align-items: center; gap: 28px; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav__mark { width: 26px; height: 26px; fill: currentColor; }
.nav__links { display: flex; gap: 26px; margin-left: 16px; font-size: 0.98rem; color: rgba(255,255,255,0.78); }
.nav__links a:hover { color: #fff; }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav__burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; flex-direction: column; justify-content: center; gap: 5px; align-items: center; cursor: pointer; }
.nav__burger span { width: 20px; height: 2px; background: #fff; transition: transform 0.2s, opacity 0.2s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__mobile { display: none; flex-direction: column; background: var(--sea); border-top: 1px solid var(--rule-dark); padding: 12px var(--gutter) 20px; }
.nav__mobile a { padding: 12px 0; border-bottom: 1px solid var(--rule-dark); color: rgba(255,255,255,0.85); }
.nav__mobile:not([hidden]) { display: flex; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__actions .btn { display: none; }
}

/* ===== Hero ===== */
.hero { background: var(--sea); color: #fff; padding: clamp(40px, 6vw, 80px) 0 0; overflow: hidden; }
.hero__grid { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.hero__content { max-width: 820px; }
.hero__title { color: #fff; margin-bottom: 26px; }
.hero__title span { color: rgba(255,255,255,0.55); display: block; }
.hero__subtitle { font-size: clamp(1.125rem, 1.8vw, 1.4rem); line-height: 1.45; color: rgba(255,255,255,0.82); max-width: 40ch; }
.hero__subtitle strong { color: #fff; font-weight: 600; }
.hero .text-link { color: #fff; }

/* subpages reuse hero__title inside a light section */
.section--white .hero__title, .section--sand .hero__title { color: var(--ink); }
.section--white .hero__title span, .section--sand .hero__title span { color: var(--ink-3); }
.section--white .hero__subtitle, .section--sand .hero__subtitle { color: var(--ink-2); }

/* ===== Start-line visual ===== */
.startline { margin-top: clamp(32px, 4vw, 56px); position: relative; }
.startline__frame { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.startline__svg { width: 100%; height: auto; display: block; }
.startline__meta {
  display: flex; flex-wrap: wrap; gap: 8px 36px; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 18px var(--gutter) 22px;
  border-top: 1px solid var(--rule-dark); color: rgba(255,255,255,0.7); font-size: 0.95rem;
}
.startline__meta strong { color: #fff; font-weight: 600; }
.startline__meta .ocs strong { color: var(--flag); }

/* ===== Rent or own ledger ===== */
.ledger { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.ledger > div { padding: clamp(28px, 4vw, 48px) 0; }
.ledger > div + div { border-left: 1px solid var(--rule); padding-left: clamp(28px, 5vw, 72px); }
.ledger > div:first-child { padding-right: clamp(28px, 5vw, 72px); }
.ledger h3 { font-size: 1.05rem; color: var(--ink-3); font-weight: 500; margin-bottom: 22px; }
.ledger .big { font-size: clamp(2.75rem, 6vw, 4.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; margin-bottom: 10px; }
.ledger .big small { font-size: 0.4em; font-weight: 500; color: var(--ink-3); letter-spacing: -0.01em; margin-left: 6px; }
.ledger .own .big { color: var(--ink); }
.ledger .rent .big { color: var(--ink-3); }
.ledger p { color: var(--ink-2); margin-top: 14px; }
.ledger ul { list-style: none; margin-top: 22px; display: grid; gap: 10px; color: var(--ink-2); }
.ledger li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.ledger li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.ledger .own li span:last-child { font-weight: 600; }
@media (max-width: 760px) {
  .ledger { grid-template-columns: 1fr; }
  .ledger > div + div { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
  .ledger > div:first-child { padding-right: 0; }
}

/* ===== Photo + spec ledger ===== */
.photo-frame { border-radius: 10px; overflow: hidden; background: var(--haze-2); }
.photo-frame img { width: 100%; object-fit: cover; }
.photo-frame figcaption { font-size: 0.9rem; color: var(--ink-3); padding: 12px 2px 0; }

.bleed { width: 100%; }
.bleed img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 640px) { .bleed img { aspect-ratio: 4 / 3; } }

.spec { border-top: 1px solid var(--rule); }
.spec div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.spec dt { color: var(--ink-3); font-weight: 500; }
.spec dd { color: var(--ink); }
@media (max-width: 520px) { .spec div { grid-template-columns: 1fr; gap: 2px; } }

.check-list { list-style: none; display: grid; gap: 12px; margin: 22px 0 6px; }
.check-list li { padding-left: 28px; position: relative; color: var(--ink-2); }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 14px; height: 2px; background: var(--flag); }
.section--deep .check-list li, .section--photo .check-list li { color: rgba(255,255,255,0.85); }

/* ===== Prose points (race management) ===== */
.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 56px; }
.points h3 { margin-bottom: 10px; }
.points p { color: var(--ink-2); }
.section--deep .points p { color: rgba(255,255,255,0.78); }
@media (max-width: 760px) { .points { grid-template-columns: 1fr; } }

/* ===== Cards used by subpages ===== */
.mini-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 26px; }
.section--white .mini-card { background: var(--haze); border-color: transparent; }
.mini-card h3 { margin-bottom: 10px; }
.mini-card p { color: var(--ink-2); font-size: 1rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.steps .step { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--rule); background: transparent; border-radius: 0; }
.steps .step + .step { padding-left: 28px; border-left: 1px solid var(--rule); }
.step__num { display: block; font-size: 0.95rem; color: var(--flag); font-weight: 600; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.steps--stack { grid-template-columns: 1fr; }
.steps--stack .step { padding: 22px 0; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; }
.steps--stack .step h3 { grid-column: 2; margin-bottom: 6px; }
.steps--stack .step p { grid-column: 2; }
.steps--stack .step .step__num { grid-row: 1 / span 2; margin: 0.2em 0 0; }
.steps--stack .step + .step { padding-left: 0; border-left: 0; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .steps .step + .step { padding-left: 0; border-left: 0; }
}

/* ===== Table ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 500; color: var(--ink-3); font-size: 0.95rem; }
thead th:nth-child(2), tbody td:nth-child(2) { font-weight: 600; color: var(--ink); }
tbody td:first-child { color: var(--ink-3); }
tbody td { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { table { min-width: 620px; } }

/* ===== Pricing ===== */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.price-card { border: 1px solid var(--rule); border-radius: 12px; padding: clamp(28px, 4vw, 44px); background: var(--paper); display: flex; flex-direction: column; }
.price-card--featured { background: var(--sea); color: #fff; border-color: var(--sea); }
.price-card h3 { font-size: 1.1rem; font-weight: 500; margin-bottom: 18px; color: inherit; opacity: 0.8; }
.price { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; margin-bottom: 8px; }
.price span { display: block; font-size: 1rem; font-weight: 500; letter-spacing: 0; opacity: 0.7; margin-top: 10px; }
.price-card ul { list-style: none; margin: 26px 0 0; display: grid; gap: 10px; }
.price-card li { padding-left: 24px; position: relative; opacity: 0.9; }
.price-card li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 12px; height: 2px; background: var(--flag); }
.price-card .btn { margin-top: 30px; align-self: flex-start; }
.badge { display: inline-block; align-self: flex-start; font-size: 0.85rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--flag-soft); color: var(--flag); margin-bottom: 18px; }
.price-card--featured .badge { background: rgba(255,255,255,0.12); color: #fff; }
@media (max-width: 760px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ===== FAQ ===== */
.faq { max-width: 800px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 68ch; }

/* ===== Footer ===== */
.footer { background: var(--sea); color: rgba(255,255,255,0.75); padding: 64px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer__logo { color: #fff; margin-bottom: 14px; }
.footer h2 { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 14px; letter-spacing: 0; }
.footer a { display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.footer p { font-size: 0.95rem; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule-dark); font-size: 0.9rem; color: rgba(255,255,255,0.5); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ===== Misc ===== */
.cta-center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-center p { margin-left: auto; margin-right: auto; }
.cta-center .hero__cta { justify-content: center; }
.reveal, .reveal-up { opacity: 1; transform: none; }

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