/* ============================================================= *
 * RouteHacker — warm editorial theme
 * Blends the gsap landing (cream, DM Sans, orange, fanned cards,
 * animated type) with six-faces (mono labels, gold, progress HUD,
 * scene dots, light/dark toggle). No cyber/hyper-scroll.
 * ============================================================= */
:root {
  --bg: #f4ecdc;
  --bg-grad-a: #f8f2e6;
  --bg-grad-b: #ece1c8;
  --surface: #fffdf7;
  --surface-2: #f3ead6;
  --ink: #171410;
  --ink-soft: #4a443b;
  --mute: #948a78;
  --line: #ddd2bb;
  --line-2: #cabfa6;
  --o1: #d9351f;   /* deep orange */
  --o2: #e85a2b;
  --o3: #f58b4e;
  --o4: #fdc68a;
  --gold: #c08a2e;
  --green: #3a6e00;
  --ink-panel: #1c1814;   /* dark panel (six-faces) */
  --ink-panel-fg: #efe7d8;
  --shadow: 0 30px 60px -28px rgba(120, 70, 20, .45);
  --shadow-sm: 0 12px 24px -14px rgba(120, 70, 20, .4);
  --fd: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --fb: "DM Sans", system-ui, sans-serif;
  --fm: "DM Mono", "JetBrains Mono", monospace;
  --r: 18px;
}
html[data-theme="dark"] {
  --bg: #161310; --bg-grad-a: #1c1813; --bg-grad-b: #100d0a;
  --surface: #211c16; --surface-2: #181410;
  --ink: #f0e8d8; --ink-soft: #cabfa9; --mute: #8a7c66;
  --line: #332c22; --line-2: #463d2f;
  --shadow: 0 30px 60px -28px rgba(0,0,0,.6);
  --ink-panel: #0f0c09; --ink-panel-fg: #efe7d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--fb);
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-grad-a), var(--bg-grad-b));
  background-attachment: fixed; min-height: 100vh; -webkit-font-smoothing: antialiased;
  animation: pageIn .4s ease;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.page-leave { opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease; }
@media (prefers-reduced-motion: reduce) { body, body.page-leave { animation: none; transition: none; transform: none; } }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.mono { font-family: var(--fm); }
.muted { color: var(--ink-soft); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* grain overlay */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
html[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: .04; }

/* ---- typography ---- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--fm); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--mute); font-weight: 500; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--o1);
  box-shadow: 0 0 0 3px rgba(217,53,31,.18); }
.display { font-family: var(--fd); font-weight: 700; letter-spacing: -.03em; line-height: .98;
  font-size: clamp(40px, 7vw, 92px); }
.display em { font-style: italic; font-weight: 700;
  background: linear-gradient(135deg, var(--o1), var(--o3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.display-sm { font-family: var(--fd); font-weight: 700; letter-spacing: -.02em; line-height: 1;
  font-size: clamp(26px, 3.6vw, 46px); }

/* ---- buttons ---- */
.btn { font: 600 14px var(--fb); cursor: pointer; border-radius: 999px; padding: 12px 22px;
  display: inline-flex; align-items: center; gap: 9px; border: 1px solid transparent; transition: transform .25s, filter .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--surface); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .btn-primary { background: var(--o2); color: #fff; }
.btn-accent { background: linear-gradient(135deg, var(--o1), var(--o3)); color: #fff; box-shadow: 0 12px 24px -10px rgba(217,53,31,.6); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); }
.btn .ar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(180deg, var(--o1), var(--o3)); color: #fff; font-size: 12px; transition: transform .3s; }
.btn:hover .ar { transform: rotate(45deg); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ---- nav ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 18px 0; transition: .25s; }
.nav.solid { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--fd); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.logo-dot { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(180deg, var(--o1), var(--o4));
  box-shadow: 0 4px 8px -2px rgba(220,60,30,.4), inset 0 1px 0 rgba(255,255,255,.4); }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink-soft); position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---- scroll hud (six-faces) ---- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.scroll-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--o1), var(--o3)); }
.dots { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 12px; }
.dots a { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-2); display: block; }
.dots a.active { background: var(--o1); border-color: var(--o1); }
@media (max-width: 820px) { .dots { display: none; } }

/* ---- generic surface card ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 600 11px var(--fb); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.field input, .date-btn {
  font: 15px var(--fb); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); width: 100%; }
.field input:focus { outline: none; border-color: var(--o2); box-shadow: 0 0 0 3px rgba(232,90,43,.15); }

/* ---- toast ---- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink-panel); color: var(--ink-panel-fg); padding: 13px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 200; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--o1); color: #fff; }

/* ---- footer ---- */
.site-footer { padding: 40px 0; margin-top: 40px; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer p { font: 12px var(--fm); color: var(--mute); line-height: 1.7; max-width: 620px; }

/* ---- shared mobile ---- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { padding: 12px 0; }
  .nav-inner { gap: 8px; }
  .brand-name, .logo { font-size: 15px; }
  .nav-right { gap: 8px; }
  .btn { padding: 10px 16px; font-size: 13px; }
  .site-footer .wrap { flex-direction: column; }
  .display { font-size: clamp(34px, 11vw, 60px); }
}
