/* Infinite Road — marketing + legal site.
   Two surfaces, one type system (Playfair Display + DM Sans, warm palette):
     body.home  → a sheet of warm notebook paper (the landing page)
     body.doc   → clean light reading layout (privacy / terms) */

:root {
  --bg: #F4EEE0;       /* notebook paper */
  --paper: #FCF8F0;    /* lighter card / callout */
  --txt: #2B2722;
  --txt-soft: #5A5249;
  --rule: #E2D8C5;
  --orange: #C0541F;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

/* ===================================================== HOME (notebook page) */

body.home {
  background: var(--bg);
  color: var(--txt);
}

.stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg);
}
/* the splash-frame road sketch (green ink, transparent) as a large, very faint
   watermark centered behind the hero — edges dissolve so text stays readable */
.road {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1080px, 96vw);
  height: min(72svh, 780px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
  background-image: url("/road.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  /* stronger toward the bottom of the sketch, dissolving as it recedes upward */
  -webkit-mask-image: linear-gradient(to top, #000 12%, transparent 78%);
  mask-image: linear-gradient(to top, #000 12%, transparent 78%);
}
/* faint warm paper shading toward the edges */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(120% 80% at 50% 22%, transparent 62%, rgba(120, 92, 52, 0.06));
}

/* subtle paper tooth */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stage > .topbar,
.stage > .hero,
.stage > .legalbar { position: relative; z-index: 2; }

.topbar {
  padding: 30px clamp(24px, 5vw, 56px);
}
.wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.3px;
  color: var(--txt);
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px clamp(24px, 5vw, 56px) 9vh;
}
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(40px, 7.5vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 14ch;
  text-wrap: balance;
  color: var(--txt);
}
.hero .sub {
  margin: 28px 0 0;
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.55;
  color: var(--txt-soft);
  max-width: 46ch;
}

/* App Store affordance (swap for the official badge when the app is live) */
.appstore {
  margin-top: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border: 1.5px solid var(--orange);
  border-radius: 999px;
  background: var(--orange);
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 18px rgba(192, 84, 31, 0.24);
}
.appstore .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #FFFFFF;
}

.legalbar {
  padding: 26px clamp(24px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--txt-soft);
}
.legalbar a { color: var(--txt-soft); }
.legalbar a:hover { color: var(--orange); }
.legalbar .sep { color: var(--rule); }

/* ============================================================= DOCS (light) */

/* Legal docs use a serious editorial serif (Spectral) for reading, with a sans
   (DM Sans) reserved for small uppercase labels. */
body.doc {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Spectral', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.72;
}
.doc a { color: var(--orange); }
.doc a:hover { text-decoration: underline; }

/* masthead */
.doc-head { border-bottom: 1px solid var(--rule); }
.doc-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.doc-head .brand {
  font-family: 'Spectral', Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--txt);
}
.doc-head .back {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--txt-soft);
}
.doc-head .back:hover { color: var(--orange); text-decoration: none; }

.wrap { max-width: 968px; margin: 0 auto; padding: 0 28px; }

.legal { padding: 60px 0 104px; }

/* two-column policy layout: sticky table of contents + document body */
.legal-grid {
  display: grid;
  grid-template-columns: 216px minmax(0, 660px);
  gap: 56px;
}
.toc {
  position: sticky;
  top: 40px;
  align-self: start;
  font-family: 'DM Sans', sans-serif;
}
.toc-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-soft);
  margin: 0 0 18px;
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 2px; }
.toc a {
  display: block;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--txt-soft);
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toc a:hover { color: var(--txt); text-decoration: none; }
.toc a.active {
  color: var(--orange);
  border-left-color: var(--orange);
}
.legal-body { min-width: 0; }

@media (max-width: 880px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
.legal h1 {
  font-family: 'Spectral', Georgia, serif;
  font-weight: 700;
  font-size: clamp(40px, 5.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 18px;
}
.legal .effective {
  font-family: 'DM Sans', sans-serif;
  color: var(--txt-soft);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 38px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--rule);
}
.legal .lede {
  font-size: 21px;
  line-height: 1.6;
  color: var(--txt);
  margin: 0 0 34px;
}
.legal h2 {
  font-family: 'Spectral', Georgia, serif;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 48px 0 14px;
  scroll-margin-top: 32px;
}
.legal-body > h2:first-of-type { margin-top: 8px; }
.legal h3 {
  font-family: 'Spectral', Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  margin: 28px 0 8px;
}
.legal p { margin: 0 0 16px; }
.legal ul { padding-left: 24px; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }
.legal strong { font-weight: 600; }
.legal code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.82em;
}
.callout {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--orange);
  border-radius: 3px;
  padding: 20px 24px;
  margin: 30px 0;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.doc-foot {
  border-top: 1px solid var(--rule);
  margin-top: 24px;
  padding: 32px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--txt-soft);
}
.doc-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  justify-content: space-between;
}
.doc-foot a { color: var(--txt-soft); }
.doc-foot a:hover { color: var(--orange); }
