/* Tollgait — shared styles.
   Palette lifted directly from Theme.swift so the site and the app are the
   same object: deep warm ink, honey amber, sage-grey, bone. */

:root {
  --ink:    #0C100E;   /* Theme.base   — deep warm ink */
  --raised: #161B18;   /* Theme.raised — cards */
  --bone:   #F1ECE2;   /* Theme.text   */
  --sage:   #7C837A;   /* Theme.muted  */
  --honey:  #E7B667;   /* Theme.accent */
  --ember:  #6E4A1E;   /* the glow under the horizon */

  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
             Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, sans-serif;

  --measure: 34rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── The sky ──────────────────────────────────────────────────────────────
   Dawn breaking over a toll road. In the app the sky dims as the budget is
   spent; here it simply holds, warm, above the ridgeline.                  */

.sky {
  position: relative;
  background:
    radial-gradient(130% 100% at 50% 128%,
      var(--honey) 0%, var(--ember) 30%, transparent 68%),
    var(--ink);
  padding: 2.25rem 1.5rem 0;
  overflow: hidden;
}

.wrap { max-width: var(--measure); margin: 0 auto; }
.wrap--wide { max-width: 46rem; }

/* ── Masthead ─────────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  color: var(--bone);
  text-decoration: none;
}

.masthead nav { display: flex; gap: 1.35rem; }

.masthead nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover,
.masthead nav a[aria-current] { color: var(--honey); border-bottom-color: var(--honey); }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { padding: 4.5rem 0 5.5rem; }

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 7.5vw, 3.1rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
  letter-spacing: -0.01em;
}

.hero p { color: var(--bone); opacity: 0.82; margin: 0 0 2rem; }

.page-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  line-height: 1.15;
  margin: 3.25rem 0 3.5rem;
}

/* ── The ridgeline: the one element the site is remembered by ──────────────
   It lives inside the sky so the ink silhouettes read against the glow, and
   bleeds past the sky's own padding to reach both edges.                    */

.horizon {
  display: block;
  width: calc(100% + 3rem);
  margin: 0 -1.5rem -1px;
  /* Explicit height with preserveAspectRatio="none": at the intrinsic ratio a
     1200-wide viewBox flattens to a wavy line on a phone. This keeps the peaks
     reading as terrain at every width. */
  height: clamp(72px, 10vw, 140px);
}

/* ── Ground: everything below the horizon ─────────────────────────────── */

.ground { background: var(--ink); padding: 3.5rem 1.5rem 4.5rem; }

/* Small spaced gold labels — the app's own `.tracking()` labels, carried over. */
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--honey);
  opacity: 0.8;
  margin: 0 0 0.85rem;
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 2rem 0 0.4rem;
}

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

section + section { margin-top: 3.25rem; }

a { color: var(--honey); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bone); }

ul { padding-left: 1.1rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--honey); }

.lede { font-size: 1.15rem; line-height: 1.55; }
.muted { color: var(--sage); }
.small { font-size: 0.9rem; }

/* A gate: a rule with a gap in it, because that is what the product is. */
.gate {
  border: 0;
  height: 1px;
  background: linear-gradient(to right,
    transparent, var(--honey) 12%, var(--honey) 44%,
    transparent 44%, transparent 56%,
    var(--honey) 56%, var(--honey) 88%, transparent);
  opacity: 0.35;
  margin: 3.25rem 0;
}

.cta {
  display: inline-block;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--honey);
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 600;
}

.cta:hover { background: var(--bone); color: var(--ink); }

.card {
  background: var(--raised);
  border: 1px solid rgba(231, 182, 103, 0.14);
  border-radius: 3px;
  padding: 1.35rem 1.5rem;
}

footer {
  border-top: 1px solid rgba(124, 131, 122, 0.18);
  margin-top: 4rem;
  padding-top: 1.5rem;
  color: var(--sage);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

footer a { color: var(--sage); }
footer a:hover { color: var(--honey); }

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

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero p, .hero .cta {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero p    { animation-delay: 0.08s; }
  .hero .cta { animation-delay: 0.16s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(0.6rem); }
    to   { opacity: 1; transform: none; }
  }
}
