/* driveavenue · Sylt — Sylt Sundown design tokens, base reset, shared chrome */

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

:root {
  /* Brand */
  --sand: #F4EEDF;
  --sand-95: rgba(244, 238, 223, 0.95);
  --sand-80: rgba(244, 238, 223, 0.80);
  --dune: #EAE0CB;
  --sundown: #C97B5C;
  --reet: #7A4A35;
  --salzwiese: #9DA68F;
  --espresso: #2B2520;
  --espresso-90: rgba(43, 37, 32, 0.90);
  --espresso-70: rgba(43, 37, 32, 0.70);
  --espresso-55: rgba(43, 37, 32, 0.55);
  --espresso-30: rgba(43, 37, 32, 0.30);
  --espresso-15: rgba(43, 37, 32, 0.15);
  --espresso-12: rgba(43, 37, 32, 0.12);
  --espresso-08: rgba(43, 37, 32, 0.08);
  --driftwood: #6B5D4F;
  --destructive: #B5432A;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-fraunces: 'Fraunces', 'Times New Roman', Georgia, serif;

  /* Geometry */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  /* Layout */
  --container: 1280px;
  --container-narrow: 840px;
  --header-h: 72px;

  /* Spatial rhythm — pages anchor to these */
  --space-section: clamp(80px, 12vw, 144px);
  --space-block: clamp(40px, 6vw, 72px);
  --space-stack: clamp(16px, 2vw, 24px);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--espresso);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' 1, 'cv01' 1;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: rgba(201, 123, 92, 0.35); color: var(--espresso); }

/* ─── TYPOGRAPHY UTILITIES ─────────────────────────────── */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

.font-display {
  font-family: var(--font-fraunces);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.92;
  font-variation-settings: 'opsz' 144;
}

.font-heading {
  font-family: var(--font-fraunces);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.08;
  font-variation-settings: 'opsz' 56;
}

.font-eyebrow {
  font-family: var(--font-fraunces);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-variation-settings: 'opsz' 9;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-fraunces);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--driftwood);
  font-variation-settings: 'opsz' 9;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}
.eyebrow--light { color: var(--sand); opacity: 0.9; }

.section-title {
  font-family: var(--font-fraunces);
  font-weight: 400;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  font-variation-settings: 'opsz' 96;
  margin-top: 22px;
  max-width: 22ch;
}

/* ─── LAYOUT ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
@media (min-width: 768px) { .container { padding: 0 40px; } }
@media (min-width: 1280px) { .container { padding: 0 56px; } }

.section { padding: var(--space-section) 0; }
.section--sand { background: var(--sand); }
.section--dune { background: var(--dune); }
.section--espresso { background: var(--espresso); color: var(--sand); }

/* ─── HEADER ────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  transition: background-color 0.45s ease, border-color 0.45s ease,
              color 0.3s ease, height 0.35s ease;
  background: transparent;
  color: var(--sand);
  border-bottom: 1px solid transparent;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
@media (min-width: 768px) { .site-header__inner { padding: 0 40px; } }
@media (min-width: 1280px) { .site-header__inner { padding: 0 56px; } }

.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  line-height: 1;
}
.brand-mark__logo {
  display: block;
  /* Fills ~78% of the 72px transparent header — proper presence */
  height: 56px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  transition: height 0.35s ease, filter 0.35s ease;
  /* Chrome wordmark on transparent (over the photo): subtle dark
     drop-shadow gives the silver letters edge definition against
     bright sky portions of the hero. */
  filter: drop-shadow(0 1px 2px rgba(43, 37, 32, 0.55));
}
.site-header.is-scrolled .brand-mark__logo,
.site-header.is-light .brand-mark__logo {
  /* Solid header (cream): invert chrome to dark silhouette so the
     wordmark stays legible against the warm sand colour, plus shrink
     to match the smaller scrolled header height. */
  height: 48px;
  filter: brightness(0) opacity(0.92);
}
@media (max-width: 640px) {
  .brand-mark__logo {
    height: 40px;
    max-width: 200px;
  }
  .site-header.is-scrolled .brand-mark__logo,
  .site-header.is-light .brand-mark__logo {
    height: 36px;
  }
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  background: var(--sundown);
  color: var(--sand);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease, padding 0.2s ease;
}
.site-header__cta:hover { background: var(--reet); }
.site-header__cta:active { transform: translateY(1px); }
.site-header__cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.site-header__cta-num { display: inline; }
.site-header__cta-label { display: none; }
@media (max-width: 640px) {
  .site-header__cta {
    padding: 9px 14px;
    font-size: 13px;
    gap: 7px;
  }
  .site-header__cta svg { width: 14px; height: 14px; }
  .site-header__cta-num { display: none; }
  .site-header__cta-label { display: inline; }
}
/* Pill keeps its sundown identity regardless of transparent / solid header bg */

.site-header.is-scrolled,
.site-header.is-light {
  background: var(--sand-95);
  color: var(--espresso);
  border-bottom-color: var(--espresso-08);
  height: 64px;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}

/* ─── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--espresso);
  color: var(--sand);
  padding: 56px 0 40px;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
@media (min-width: 768px) { .site-footer__inner { padding: 0 40px; } }
@media (min-width: 1024px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.site-footer__copy { font-size: 13px; opacity: 0.7; }
.site-footer__nav {
  display: flex;
  gap: 28px;
}
.site-footer__nav a {
  font-size: 13px;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
  letter-spacing: 0.04em;
}
.site-footer__nav a:hover { opacity: 1; color: var(--sundown); }

/* ─── PRIMARY BUTTON ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--sundown);
  color: var(--sand);
  transition: background 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: var(--reet); }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--sand);
  border-color: rgba(244, 238, 223, 0.35);
}
.btn--ghost:hover { border-color: var(--sand); background: rgba(244, 238, 223, 0.08); }

/* ─── SCROLL FADE-UP ────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ─── LEGAL PAGES ───────────────────────────────────────── */
.legal-page {
  background: var(--sand);
  padding: calc(var(--header-h) + 56px) 0 96px;
}
.legal-body {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}
@media (min-width: 768px) { .legal-body { padding: 0 40px; } }

.legal-eyebrow {
  font-family: var(--font-fraunces);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--driftwood);
  font-variation-settings: 'opsz' 9;
}
.legal-title {
  font-family: var(--font-fraunces);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--espresso);
  font-variation-settings: 'opsz' 96;
  margin-top: 16px;
}
.legal-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--driftwood);
  letter-spacing: 0.04em;
}

.legal-content { margin-top: 56px; color: var(--espresso); font-size: 15px; line-height: 1.75; }
.legal-content > * + * { margin-top: 16px; }
.legal-content h2 {
  font-family: var(--font-fraunces);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--espresso);
  font-variation-settings: 'opsz' 36;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--espresso-12);
}
.legal-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-content h3 {
  font-family: var(--font-fraunces);
  font-weight: 500;
  font-size: 17px;
  margin-top: 32px;
  font-variation-settings: 'opsz' 24;
  letter-spacing: -0.005em;
}
.legal-content p { color: var(--espresso); }
.legal-content p.muted { color: var(--driftwood); }
.legal-content a {
  color: var(--sundown);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(201, 123, 92, 0.5);
}
.legal-content a:hover { color: var(--reet); text-decoration-color: var(--reet); }
.legal-content ul, .legal-content ol {
  padding-left: 22px;
  color: var(--espresso);
}
.legal-content ul li, .legal-content ol li {
  margin-top: 6px;
}
.legal-content ul li::marker { color: var(--sundown); }
.legal-content ol li::marker { color: var(--driftwood); }
.legal-content strong { font-weight: 500; }

.legal-card {
  margin-top: 24px;
  padding: 22px 26px;
  background: var(--dune);
  border: 1px solid var(--espresso-12);
  border-radius: var(--radius-md);
}
.legal-card p { margin: 0; }
.legal-card p + p { margin-top: 8px; }
.legal-card .legal-card__label {
  font-family: var(--font-fraunces);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--driftwood);
  margin-bottom: 6px;
}

.legal-toc {
  margin-top: 24px;
  padding: 22px 26px;
  background: var(--sand);
  border: 1px solid var(--espresso-12);
  border-radius: var(--radius-md);
}
.legal-toc h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--font-fraunces);
  color: var(--driftwood);
  font-variation-settings: 'opsz' 9;
}
.legal-toc ol {
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
  counter-reset: toc;
}
.legal-toc ol li {
  counter-increment: toc;
  margin-top: 4px;
  font-size: 14px;
  color: var(--espresso);
  display: flex;
  gap: 10px;
}
.legal-toc ol li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-fraunces);
  font-feature-settings: 'tnum' 1;
  color: var(--driftwood);
  flex-shrink: 0;
  min-width: 24px;
}
.legal-toc a {
  color: var(--espresso);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.legal-toc a:hover { color: var(--sundown); border-bottom-color: var(--sundown); }

.legal-banner {
  margin-top: 32px;
  padding: 22px 26px;
  background: var(--dune);
  border: 1px solid rgba(201, 123, 92, 0.3);
  border-left: 3px solid var(--sundown);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.7;
}
.legal-banner a {
  color: var(--sundown);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal-banner a:hover { color: var(--reet); }
