/* ============================================================
   TukTuk — design tokens
   Palette pulls from the tuk-tuk itself: marigold canopy paint,
   deep petrol-green dusk, warm ink — not the generic dark-mode
   mint/blue-gradient messenger look.
   ============================================================ */

:root {
  /* light (default / un-stamped) */
  --bg: #F1ECDF;
  --surface: #FBF8F1;
  --surface-2: #FFFFFF;
  --border: #E1D6BC;
  --text: #201B12;
  --text-dim: #6E6552;
  --accent: #D98F1E;      /* marigold canopy */
  --accent-ink: #3A2A08;  /* text on accent */
  --accent-2: #2B6E5E;    /* deep petrol green */
  --shadow: 220 30% 10%;

  --font-display: ui-rounded, "SF Pro Rounded", "Segoe UI Rounded", "Nunito", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 18px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12211C;
    --surface: #17281F;
    --surface-2: #1D3128;
    --border: #294237;
    --text: #F3EFE2;
    --text-dim: #A2B0A2;
    --accent: #E7A83D;
    --accent-ink: #241703;
    --accent-2: #59B39F;
    --shadow: 220 40% 2%;
  }
}

:root[data-theme="dark"] {
  --bg: #12211C;
  --surface: #17281F;
  --surface-2: #1D3128;
  --border: #294237;
  --text: #F3EFE2;
  --text-dim: #A2B0A2;
  --accent: #E7A83D;
  --accent-ink: #241703;
  --accent-2: #59B39F;
  --shadow: 220 40% 2%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
}
.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
}
.brand .logo svg { width: 19px; height: 19px; }
nav.site-nav { display: flex; gap: 28px; }
nav.site-nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 15px;
}
nav.site-nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 88px 0 40px; position: relative; overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.14;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.hero h1 span { color: var(--accent); }
.hero p.lead {
  font-size: 18px;
  color: var(--text-dim);
  margin: 0 0 32px;
  max-width: 480px;
}

/* dashed route line — a message's trip across the hero */
.route {
  position: absolute;
  left: 0; right: 0; top: 54%;
  height: 2px;
  z-index: 0;
  pointer-events: none;
}
.route svg { width: 100%; height: 60px; display: block; }
.route path {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
  stroke-dasharray: 2 10;
  stroke-linecap: round;
}
.route circle {
  fill: var(--accent);
}
.route .dot {
  offset-path: path("M -20 30 C 200 -10, 420 70, 900 20");
  animation: drive 7s linear infinite;
}
@keyframes drive {
  0% { offset-distance: 0%; opacity: 0; }
  6% { opacity: 1; }
  94% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s, transform .15s;
}
.store-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.store-btn svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-dim); }
.store-btn .label small { display: block; color: var(--text-dim); font-size: 11px; }
.store-btn .label strong { display: block; font-size: 15px; font-family: var(--font-display); }
.store-btn.disabled { opacity: 0.55; cursor: default; pointer-events: none; }

/* Phone mockup */
.phone-mock {
  justify-self: center;
  width: 260px;
  height: 540px;
  background: var(--accent-ink);
  border-radius: 40px;
  border: 6px solid var(--surface-2);
  box-shadow: 0 30px 70px -24px hsl(var(--shadow) / 0.55);
  padding: 14px;
  position: relative;
  z-index: 1;
}
.phone-mock .screen {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-mock .chat-bar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}
.phone-mock .chat-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.phone-mock .bubbles { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 15px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.bubble.in { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid var(--border); }
.bubble.out {
  background: var(--accent);
  color: var(--accent-ink);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 600;
}
.bubble.skeleton { height: 10px; border-radius: 8px; opacity: 0.5; }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2.section-title { font-size: 30px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
p.section-sub { color: var(--text-dim); margin: 0 0 40px; max-width: 560px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-card .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-2) 16%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.feature-card .icon svg { width: 21px; height: 21px; }
.feature-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.feature-card p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

.cta-band { text-align: center; padding: 80px 0; }
.cta-band h2 { font-size: 32px; font-weight: 800; margin: 0 0 12px; }
.cta-band p { color: var(--text-dim); margin: 0 0 32px; }
.cta-band .cta-row { justify-content: center; }

footer.site { border-top: 1px solid var(--border); padding: 40px 0; }
footer.site .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer.site .links { display: flex; gap: 24px; }
footer.site a { color: var(--text-dim); text-decoration: none; font-size: 14px; }
footer.site a:hover { color: var(--text); }
footer.site .copy { color: var(--text-dim); font-size: 13px; }

/* Legal pages */
.legal { max-width: 780px; margin: 0 auto; padding: 64px 24px 96px; }
.legal h1 { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.legal .updated { color: var(--text-dim); font-size: 14px; margin-bottom: 40px; font-family: var(--font-mono); }
.legal h2 { font-size: 20px; margin-top: 40px; font-weight: 700; }
.legal p, .legal li { color: var(--text-dim); font-size: 15px; }
.legal .notice {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--text);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 32px;
}
.legal .table-scroll { overflow-x: auto; margin: 20px 0; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.legal th, .legal td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal th {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.legal td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.legal td.optional { color: var(--accent-2); font-size: 13px; white-space: nowrap; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phone-mock { justify-self: start; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  nav.site-nav { display: none; }
  .route { display: none; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 32px; }
  .features-grid { grid-template-columns: 1fr; }
  .phone-mock { display: none; }
}
