/* ————————————————————————————————————————————
   DriveBlock — site design system v2
   Identity pulled from the App Store listing:
   warm near-black, safety orange, chunky serif.
   ———————————————————————————————————————————— */

:root {
  --bg: #0b0806;
  --bg-warm: #140c07;
  --panel: #171009;
  --panel-2: #1e150c;
  --ink: #f5efe9;
  --dim: rgba(245, 239, 233, 0.66);
  --faint: rgba(245, 239, 233, 0.4);
  --hair: rgba(245, 239, 233, 0.12);
  --orange: #ff5a1f;
  --orange-soft: #ff8a3c;
  --orange-dim: rgba(255, 90, 31, 0.14);
  --green: #4ade80;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  --radius: 18px;
  --maxw: 1140px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--orange); color: #140903; }

/* height:auto is load-bearing: images carry width/height attrs for layout
   stability, and without it the attr height applies literally once CSS
   constrains the width — stretching every screenshot. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* ————— type ————— */

h1, h2, .display {
  font-family: var(--serif);
  font-weight: 640;
  font-variation-settings: "opsz" 100;
  letter-spacing: -0.015em;
  line-height: 1.04;
}

.accent { color: var(--orange); font-style: italic; font-weight: 600; }

.kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.4rem;
}

.lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--dim); max-width: 44rem; }

/* ————— lane-marking motif ————— */

.lane {
  position: relative;
}
.lane::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background-image: linear-gradient(to bottom, var(--orange) 0 34px, transparent 34px 74px);
  background-size: 3px 74px;
  opacity: 0.16;
  pointer-events: none;
}

.divider {
  border: 0;
  height: 3px;
  max-width: var(--maxw);
  margin: 0 auto;
  background-image: linear-gradient(to right, var(--hair) 0 28px, transparent 28px 52px);
  background-size: 52px 3px;
}

/* ————— nav ————— */

.nav {
  position: sticky; top: 0;
  z-index: 100;
  background: rgba(11, 8, 6, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { border-radius: 7px; }
.logo-text { font-family: var(--serif); font-weight: 650; font-size: 1.1rem; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 30px); }
.nav-link {
  text-decoration: none; color: var(--dim);
  font-size: 0.92rem; transition: color 0.2s;
}
.nav-link:hover { color: var(--ink); }
.nav-cta {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  color: #140903; background: var(--orange);
  padding: 10px 18px; border-radius: 100px; text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--orange-soft); transform: translateY(-1px); }
@media (max-width: 640px) { .nav-link { display: none; } }

/* ————— hero ————— */

.hero {
  position: relative;
  padding: clamp(60px, 10vh, 120px) 0 clamp(50px, 8vh, 90px);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.16), transparent 65%);
  top: -300px; right: -200px;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5rem); margin-bottom: 1.6rem; }
.hero .lede { margin-bottom: 2.2rem; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em;
  color: var(--dim);
  border: 1px solid var(--hair);
  padding: 8px 16px; border-radius: 100px;
  margin-bottom: 2.2rem;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot { 50% { opacity: 0.4; } }

.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.store-badge { transition: transform 0.25s, filter 0.25s; }
.store-badge:hover { transform: translateY(-2px); filter: drop-shadow(0 6px 24px rgba(255,90,31,0.35)); }

.hero-rating { display: flex; flex-direction: column; gap: 2px; }
.stars { color: var(--orange); font-size: 0.95rem; letter-spacing: 2px; }
.rating-text { font-size: 0.78rem; color: var(--faint); }

.hero-proof {
  margin-top: 1.8rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--faint);
}
.hero-proof span { color: var(--orange); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-shot-stack {
  position: relative;
  width: min(320px, 78vw);
  border-radius: 34px;
  overflow: hidden;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 90px rgba(255, 90, 31, 0.18);
  transform: rotate(2.5deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-shot-stack img { width: 100%; }
.hero-shot-alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.hero-visual.locked .hero-shot-alt { opacity: 1; }
.hero-visual:hover .hero-shot-stack { transform: rotate(0.5deg) translateY(-6px); }

/* toggle demo chip */
.demo-chip {
  position: absolute;
  bottom: 46px; left: 50%;
  transform: translateX(-78%);
  background: rgba(20, 12, 7, 0.92);
  border: 1px solid var(--hair);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  transition: border-color 0.3s;
}
.demo-chip:hover { border-color: rgba(255, 90, 31, 0.5); }
.demo-toggle {
  width: 46px; height: 27px; border-radius: 100px;
  background: rgba(245,239,233,0.18);
  position: relative; transition: background 0.3s; flex-shrink: 0;
}
.demo-toggle::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px; border-radius: 50%;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.demo-chip.on .demo-toggle { background: var(--orange); }
.demo-chip.on .demo-toggle::after { transform: translateX(19px); }
.demo-text { display: flex; flex-direction: column; }
.demo-title { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.demo-sub { font-family: var(--mono); font-size: 0.62rem; color: var(--faint); transition: color 0.3s; }
.demo-chip.on .demo-sub { color: var(--green); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 20px; }
  /* Smaller phone on mobile so the hero doesn't push everything below the
     fold (matches the compact-mockup pattern used by ToneAdapt, Cal AI). */
  .hero-shot-stack { width: min(240px, 56vw); }
}

/* ————— stat band ————— */

.stats-band {
  background: linear-gradient(180deg, var(--bg-warm), var(--bg));
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: clamp(50px, 8vh, 84px) 0;
}
.stats-grid {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 70px);
  align-items: center;
}
.big-stat { font-family: var(--serif); font-weight: 640; font-size: clamp(4rem, 10vw, 7.5rem); line-height: 1; color: var(--orange); }
.stat-caption { max-width: 30rem; }
.stat-caption p:first-child { font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 500; }
.stat-source { font-family: var(--mono); font-size: 0.66rem; color: var(--faint); margin-top: 8px; letter-spacing: 0.08em; }
.mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(36px, 6vh, 56px);
  border-top: 1px solid var(--hair);
}
.mini-stat { padding: 22px 20px 0 0; }
.mini-stat + .mini-stat { border-left: 1px solid var(--hair); padding-left: 22px; }
.mini-n { font-family: var(--mono); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--ink); }
.mini-l { font-size: 0.8rem; color: var(--faint); margin-top: 4px; }
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr; }
  .mini-stat + .mini-stat { border-left: 0; border-top: 1px solid var(--hair); padding: 22px 0 0; margin-top: 22px; }
}

/* ————— sections ————— */

.section { padding: clamp(70px, 11vh, 130px) 0; position: relative; }
.section-head { max-width: 46rem; margin-bottom: clamp(40px, 6vh, 64px); }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: 1.2rem; }

/* ————— screenshots gallery ————— */

.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}
.shot { text-align: center; }
.shot img {
  border-radius: 22px;
  border: 1px solid var(--hair);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s;
}
.shot:nth-child(odd) img { transform: rotate(-1.2deg); }
.shot:nth-child(even) img { transform: rotate(1.2deg); }
.shot:hover img { transform: rotate(0) translateY(-8px); box-shadow: 0 34px 80px rgba(0,0,0,0.6), 0 0 60px rgba(255,90,31,0.14); }
.shot-caption { margin-top: 16px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--faint); }
@media (max-width: 860px) {
  .shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding-bottom: 18px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  /* Narrower cards keep the gallery short and let the next phone peek in,
     signalling it's swipeable rather than a wall of full-width mockups. */
  .shot { flex: 0 0 48vw; max-width: 220px; scroll-snap-align: center; }
}
@media (max-width: 480px) {
  .shot { flex: 0 0 56vw; }
}

/* ————— how it works ————— */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.step {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: clamp(26px, 3.5vw, 40px);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s, border-color 0.35s;
}
.step:hover { transform: translateY(-5px); border-color: rgba(255, 90, 31, 0.4); }
.step-n {
  font-family: var(--serif); font-weight: 640; font-style: italic;
  font-size: 3.4rem; line-height: 1;
  color: var(--orange);
  opacity: 0.9;
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.7rem; }
.step p { font-size: 0.94rem; color: var(--dim); }
.step-ghost {
  position: absolute; right: -14px; bottom: -30px;
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: 9rem; line-height: 1;
  color: var(--orange);
  opacity: 0.05;
  pointer-events: none;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ————— guides ————— */

/* guide cards intentionally mirror the blog's .blog-card design
   (same structure, sizes, and hover) with the home palette */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}
.guide-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s;
}
.guide-card:hover { border-color: rgba(255, 90, 31, 0.45); transform: translateY(-4px); }
.guide-kicker {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: block;
}
.guide-card h3 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 12px;
}
.guide-card p { font-size: 15px; color: var(--dim); line-height: 1.65; margin-bottom: 20px; }
.guide-more {
  margin-top: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s;
}
.guide-card:hover .guide-more { gap: 10px; }

/* ————— FAQ ————— */

.faq-list { max-width: 50rem; }
.faq-item {
  border-bottom: 1px solid var(--hair);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  transition: color 0.25s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--orange-soft); }
.faq-item summary::after {
  content: "+";
  font-family: var(--serif); font-size: 1.6rem; font-weight: 400;
  color: var(--orange);
  flex-shrink: 0;
  transition: transform 0.3s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 0 26px; color: var(--dim); max-width: 44rem; }
.faq-body a { color: var(--orange); text-decoration: none; font-weight: 500; }
.faq-body a:hover { text-decoration: underline; }
.learn-more { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; display: inline-block; margin-top: 10px; }

/* ————— CTA ————— */

.cta {
  margin: clamp(40px, 8vh, 90px) auto clamp(70px, 10vh, 120px);
  max-width: var(--maxw);
  padding: 0 clamp(20px, 5vw, 48px);
}
.cta-panel {
  position: relative;
  background: linear-gradient(135deg, #ff5a1f, #ff8a3c 60%, #ffb454);
  border-radius: 28px;
  padding: clamp(50px, 8vh, 90px) clamp(28px, 6vw, 80px);
  text-align: center;
  color: #180a03;
  overflow: hidden;
}
.cta-panel::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(24,10,3,0.16) 0 34px, transparent 34px 68px);
  background-size: 68px 4px;
  background-repeat: repeat-x;
  background-position: center 52%;
  pointer-events: none;
}
.cta-panel h2 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: 1.1rem; position: relative; }
.cta-panel p { font-size: clamp(1rem, 1.7vw, 1.2rem); opacity: 0.85; max-width: 36rem; margin: 0 auto 2.2rem; position: relative; font-weight: 500; }
.cta-panel .store-badge { position: relative; display: inline-block; }
.cta-note { margin-top: 1.6rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; opacity: 0.72; position: relative; }

/* ————— footer ————— */

.footer { border-top: 1px solid var(--hair); padding: clamp(40px, 7vh, 70px) 0 34px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(28px, 4vw, 50px);
  margin-bottom: 44px;
}
.footer-brand p { font-size: 0.88rem; color: var(--faint); margin-top: 12px; max-width: 20rem; }
.footer-col h4 { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.24em; color: var(--faint); text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; color: var(--dim); text-decoration: none; font-size: 0.88rem; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--orange-soft); }
.footer-bottom {
  border-top: 1px solid var(--hair);
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--faint);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Tighten vertical rhythm on phones so the page reads as a few quick
   screens rather than an endless scroll. */
@media (max-width: 640px) {
  .section { padding: clamp(48px, 8vh, 72px) 0; }
  .hero { padding: 44px 0 40px; }
  .section-head { margin-bottom: 32px; }
  .stats-band { padding: 48px 0; }
}

/* ————— guide article layout ————— */

.article { padding: clamp(50px, 8vh, 90px) 0; }
.article-inner { max-width: 46rem; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.breadcrumbs { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 2.2rem; }
.breadcrumbs a { color: var(--faint); text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange); }
.article h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin-bottom: 1.4rem; }
.article .lede { margin-bottom: 2.6rem; }
.article h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 3rem 0 1.1rem; }
.article h3 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.7rem; }
.article p { color: var(--dim); margin-bottom: 1.15em; }
.article ul, .article ol { color: var(--dim); margin: 0 0 1.3em 1.3em; }
.article li { margin-bottom: 0.55em; }
.article li::marker { color: var(--orange); }
.article a { color: var(--orange); text-decoration: none; }
.article a:hover { text-decoration: underline; }
.article strong { color: var(--ink); }

.callout {
  background: var(--panel);
  border: 1px solid rgba(255, 90, 31, 0.3);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 2rem 0;
}
.callout p { margin-bottom: 0; }
.callout-label { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.24em; color: var(--orange); text-transform: uppercase; display: block; margin-bottom: 10px; }

.article-cta {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 24px;
  padding: 26px 30px;
  margin: 3rem 0;
  flex-wrap: wrap;
}
.article-cta img.icon { width: 62px; height: 62px; border-radius: 14px; }
.article-cta-text { flex: 1; min-width: 200px; }
.article-cta-text strong { display: block; font-family: var(--serif); font-size: 1.15rem; margin-bottom: 3px; }
.article-cta-text span { font-size: 0.84rem; color: var(--faint); }

.related { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--hair); }
.related h2 { margin-top: 0; }
.related-links { display: grid; gap: 10px; margin-top: 1.2rem; }
.related-links a {
  display: block; padding: 15px 20px;
  background: var(--panel); border: 1px solid var(--hair); border-radius: 12px;
  text-decoration: none; color: var(--ink); font-size: 0.92rem;
  transition: border-color 0.25s, transform 0.25s;
}
.related-links a:hover { border-color: rgba(255,90,31,0.4); transform: translateX(4px); text-decoration: none; }

/* ————— comparison table ————— */

.table-scroll { overflow-x: auto; margin: 2.5rem 0; }
.compare {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.compare th, .compare td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
}
.compare thead th {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.compare thead th:last-child { color: var(--orange); }
.compare td:first-child { color: var(--dim); }
.compare td:not(:first-child) { text-align: center; }
.compare .yes { color: var(--green); font-weight: 600; }
.compare .no { color: var(--faint); }
.compare .hl { color: var(--orange); font-weight: 600; }

/* ————— reveal ————— */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: opacity 0.4s ease; transform: none; }
  .hero-shot-stack, .shot img, .step, .guide-card { transition: none !important; }
}
