/* Recalo marketing site — tokens from claude-design/colors_and_type.css (app source of truth).
   Light + dark themes: follows system via media query; manual override via html[data-theme]. */

:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --surface-high: #f0f0f0;
  --text: #11181C;
  --heading: #11181C;
  --muted: #6e7378;
  --secondary: #6B5CE7;     /* iris/indigo — brand accent, primary buttons */
  --on-secondary: #ffffff;
  --link: #0a7ea4;
  --ghost-border: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --glow: rgba(107, 92, 231, 0.13);
  --success-muted: #e6f6ed;
  --success-text: #1d7a47;
  --shadow: 0 24px 60px rgba(19, 19, 19, 0.18);
  --phone-screen: #ffffff;
  --chapter-bg: var(--bg); /* animated by main.js per chapter */
  --chapter-tint-a: #f7f6f3;
  --chapter-tint-b: #f4f3f9;

  --radius: 16px;
  --radius-lg: 24px;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131313;
    --surface: #1c1b1b;
    --surface-high: #242322;
    --text: #e5e2e1;
    --heading: #f5f3f2;
    --muted: #9a9491;
    --secondary: #D4A843;   /* brass/amber — dark mode brand accent */
    --on-secondary: #131313;
    --link: #bac3ff;
    --ghost-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(19, 19, 19, 0.72);
    --glow: rgba(212, 168, 67, 0.09);
    --success-muted: rgba(48, 164, 108, 0.18);
    --success-text: #4ADE80;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    --phone-screen: #1c1b1b;
    --chapter-tint-a: #181716;
    --chapter-tint-b: #17161a;
  }
}

:root[data-theme="dark"] {
  --bg: #131313;
  --surface: #1c1b1b;
  --surface-high: #242322;
  --text: #e5e2e1;
  --heading: #f5f3f2;
  --muted: #9a9491;
  --secondary: #D4A843;
  --on-secondary: #131313;
  --link: #bac3ff;
  --ghost-border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(19, 19, 19, 0.72);
  --glow: rgba(212, 168, 67, 0.09);
  --success-muted: rgba(48, 164, 108, 0.18);
  --success-text: #4ADE80;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --phone-screen: #1c1b1b;
  --chapter-tint-a: #181716;
  --chapter-tint-b: #17161a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--chapter-bg);
  transition: background-color 0.9s ease;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--ghost-border);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--heading);
  text-decoration: none;
}

.wordmark svg { width: 26px; height: 26px; color: var(--secondary); }

.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--link); }

@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 26px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:active { opacity: 0.85; transform: scale(0.98); }

.btn-primary { background: var(--secondary); color: var(--on-secondary); }
.btn-primary:hover { opacity: 0.9; }

.nav .btn { padding: 9px 18px; font-size: 15px; }

.theme-toggle {
  background: none;
  border: 1px solid var(--ghost-border);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover { background: var(--surface); }

/* ---------- layout primitives ---------- */

.chapter { padding: 110px 24px; }

.chapter-inner { max-width: var(--maxw); margin: 0 auto; }

.overline {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 14px;
}

h1, h2, h3 { color: var(--heading); font-family: var(--display); margin: 0; }

h1 {
  font-size: clamp(40px, 6.5vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: 700;
}

h2 {
  font-size: clamp(29px, 4.3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.024em;
  font-weight: 700;
}

h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.012em; }

.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 620px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split.flip .copy { order: 2; }
.split.flip .visual { order: 1; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.flip .copy { order: 1; }
  .split.flip .visual { order: 2; }
  .chapter { padding: 72px 20px; }
}

.copy p { color: var(--muted); max-width: 480px; }
.copy strong { color: var(--text); }

/* ---------- hero ---------- */

.hero { padding: 96px 24px 64px; text-align: center; position: relative; overflow: hidden; }

.hero-inner { max-width: 880px; margin: 0 auto; position: relative; }

.hero .lead { margin: 22px auto 34px; }

.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.platform-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); }

.hero-glow {
  position: absolute;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 480px;
  background: radial-gradient(ellipse at center, var(--glow), transparent 65%);
  pointer-events: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 54px auto 0;
  max-width: 720px;
  padding: 0;
  list-style: none;
}

.chips li {
  background: var(--surface);
  border: 1px solid var(--ghost-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14.5px;
}

/* ---------- phone mockup (SCREENSHOT SWAP placeholders) ---------- */

.phone {
  width: 300px;
  margin: 0 auto;
  background: #131313;
  border: 1px solid var(--ghost-border);
  border-radius: 44px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.phone-screen {
  background: var(--phone-screen);
  border-radius: 35px;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.phone-notch { width: 100px; height: 22px; background: #131313; border-radius: 0 0 14px 14px; margin: 0 auto; }

.app-bar { display: flex; gap: 6px; padding: 12px 14px 8px; overflow: hidden; }

.app-tab {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-high);
  color: var(--muted);
  white-space: nowrap;
}

.app-tab.on { background: var(--heading); color: var(--bg); }

.app-body { padding: 8px 14px 18px; display: flex; flex-direction: column; gap: 9px; }

.mini-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface-high);
  border-radius: 14px;
  padding: 10px;
}

.mini-cover {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
}

.mini-card b { font-size: 13px; color: var(--heading); display: block; line-height: 1.3; }
.mini-card small { font-size: 11px; color: var(--muted); }

.bubble { border-radius: 16px; padding: 10px 13px; font-size: 13px; line-height: 1.45; max-width: 85%; }

.bubble.user { background: var(--secondary); color: var(--on-secondary); align-self: flex-end; border-bottom-right-radius: 5px; }

.bubble.ai { background: var(--surface-high); color: var(--text); align-self: flex-start; border-bottom-left-radius: 5px; }

.confirm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-muted);
  color: var(--success-text);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 5px 12px;
  align-self: flex-start;
}

/* utterance cards */
.utterances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.utterance {
  background: var(--surface);
  border: 1px solid var(--ghost-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.utterance q {
  quotes: "\201C" "\201D";
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 18px;
  line-height: 1.4;
  color: var(--heading);
}

.utterance .confirm-chip { margin-top: auto; }

.chapter-num {
  font-family: var(--display);
  font-size: 60px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--secondary);
  opacity: 0.4;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}

/* MCP conversation card — same surface language as everything else */
.mcp-card {
  background: var(--surface);
  border: 1px solid var(--ghost-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  font-size: 14.5px;
  line-height: 1.7;
}

.mcp-card .who { color: var(--secondary); font-weight: 600; }
.mcp-card .tool { color: var(--link); font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; }

.badge-soon {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--secondary);
  background: var(--surface-high);
  border-radius: 999px;
  padding: 5px 13px;
  margin-left: 10px;
  vertical-align: middle;
}

/* ---------- trust strip ---------- */

.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.trust-item {
  background: var(--surface);
  border: 1px solid var(--ghost-border);
  border-radius: var(--radius);
  padding: 22px;
}

.trust-item h3 { margin-bottom: 6px; }
.trust-item p { font-size: 15px; color: var(--muted); margin: 0; }

/* ---------- FAQ ---------- */

.faq { max-width: 720px; margin: 0 auto; }

.faq details { border-bottom: 1px solid var(--ghost-border); padding: 4px 0; }

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  color: var(--heading);
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }
.faq a { color: var(--link); }

/* ---------- closer + footer ---------- */

.closer { text-align: center; }
.closer h2 { font-size: clamp(34px, 5.2vw, 56px); }
.closer .lead { margin: 20px auto 34px; }

.footer {
  background: var(--surface);
  border-top: 1px solid var(--ghost-border);
  padding: 56px 24px 40px;
  margin-top: 110px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  font-size: 14.5px;
}

.footer a { color: var(--link); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .wordmark { font-size: 19px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col b { color: var(--heading); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.footer .fine { color: var(--muted); font-size: 13px; margin-top: 26px; }

/* ---------- legal pages ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.legal h1 { font-size: clamp(30px, 4.5vw, 40px); margin-bottom: 8px; }

.legal .effective { color: var(--muted); font-size: 14.5px; margin-bottom: 36px; }

.legal h2 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 36px 0 10px;
}

.legal p, .legal li { color: var(--text); font-size: 16px; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--link); }

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}

.reveal.in { opacity: 1; transform: none; }

.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body { transition: none; }
}
