/* Shared landing-page system for the six app sub-sites.
   Each page sets its theme on <body class="app"> via these custom properties:

     --bg          page background
     --surface     raised surface (cards, modal, footer edge)
     --text        primary text
     --muted       secondary text
     --accent      brand accent (actions, icons, details)
     --on-accent   text color placed on a solid --accent fill
     --display     display/heading font stack
     --body        body font stack

   Markup conventions: .container frame, .navbar, .hero-grid + .phone-frame,
   .feature-grid/.feature-card, .section/.section-title, .support-card,
   .footer, #androidModal + assets/app.js. */

:root {
  --page-gutter: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.app {
  /* Token-derived defaults; a page may override any of these. */
  --line: color-mix(in srgb, var(--text) 10%, transparent);
  --line-strong: color-mix(in srgb, var(--text) 22%, transparent);
  --frame: var(--surface);

  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p, h1, h2, h3, h4, blockquote { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: fixed; left: 16px; top: 16px; z-index: 100;
  padding: 14px 20px; color: var(--bg); background: var(--text);
  border-radius: 8px; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--page-gutter); }

/* --- Nav --- */
.navbar { border-bottom: 1px solid var(--line); }
.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: .04em;
}
.logo svg { color: var(--accent); }
.logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--muted); font-size: 15px;
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat;
  background-position: left bottom; background-size: 0 1px;
  transition: background-size 220ms cubic-bezier(.16, 1, .3, 1), color .2s;
}
.nav-links a:hover { color: var(--text); background-size: 100% 1px; }
.nav-links .btn-outline { color: var(--text); background-image: none; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 14px 26px; border: 0; border-radius: 999px;
  background: var(--accent-fill, var(--accent)); color: var(--on-accent);
  font-weight: 600; font-size: 16px;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform 120ms ease-out;
}
.btn:hover { background: color-mix(in srgb, var(--accent-fill, var(--accent)) 86%, var(--text)); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn-full-width { width: 100%; }

/* --- Hero --- */
.hero { padding-block: 72px 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 64px; }
.hero-content h1 {
  font-family: var(--display);
  font-size: clamp(44px, 6.2vw, var(--h1-max, 80px)); font-weight: 700;
  line-height: 1.04; letter-spacing: -.02em; text-wrap: balance;
}
.hero-content h1 .accent { color: var(--accent); }
.hero-sub { margin-top: 24px; max-width: 540px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.cta-group { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.hero-visual { display: flex; justify-content: flex-end; }
.phone-frame {
  position: relative; width: min(340px, 82vw);
  padding: 12px; border-radius: 44px;
  background: var(--frame, #1a1a1e);
  border: 1px solid var(--line);
  animation: float 6s ease-in-out infinite alternate;
}
.phone-frame .notch {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 24px; border-radius: 999px; background: var(--frame, #1a1a1e); z-index: 2;
}
.app-screenshot { width: 100%; border-radius: 34px; }

/* --- Sections --- */
.section { padding-block: 64px; }
.section-title {
  font-family: var(--display);
  font-size: clamp(30px, 3.4vw, 42px); font-weight: 700;
  line-height: 1.1; letter-spacing: -.02em; text-wrap: balance;
}
.section-sub { margin-top: 14px; max-width: 640px; color: var(--muted); font-size: 16px; }

/* --- Feature cards --- */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; margin-top: 48px;
}
.feature-card {
  position: relative; overflow: hidden;
  padding: 36px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .22s ease, transform .22s ease;
}
.feature-card:hover {
  border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 45%, transparent);
  transform: translateY(-3px);
}
.icon-box {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 14px; margin-bottom: 22px;
  color: var(--card-accent, var(--accent));
  background: color-mix(in srgb, var(--card-accent, var(--accent)) 14%, transparent);
}
.icon-box svg { width: 24px; height: 24px; }
.feature-card h3 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.feature-card p { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* Color swatch (Daily Bars rhyme colors) and numbered steps (Verbalyze) */
.swatch {
  display: block; width: 48px; height: 8px; border-radius: 999px; margin-bottom: 22px;
  background: var(--card-accent, var(--accent));
}
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; margin-bottom: 20px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--display); font-weight: 700; font-size: 18px;
}

/* --- Split section (QuitPilot modes) --- */
.split-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 64px; }
.stack { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.mini-card {
  padding: 24px 28px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--card-accent, var(--line));
  font: inherit; text-align: left; width: 100%; cursor: pointer;
  transition: border-color .2s ease;
}
.mini-card.active { border-color: var(--card-accent, var(--accent)); }
.mini-title { font-family: var(--display); font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.mode-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--card-accent, var(--accent)); flex: 0 0 auto; }
.mini-card p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.mode-panel {
  padding: 36px 40px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line);
  transition: opacity .16s ease;
}
.mode-panel.is-switching { opacity: 0; }
.panel-kicker { font-size: 15px; color: var(--muted); }
.panel-kicker span { color: var(--text); font-weight: 600; }
.metric-list { margin-top: 20px; list-style: none; }
.metric-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.metric-list li + li { margin-top: 14px; }

/* --- Quote section (Ravn) --- */
.quote-section blockquote {
  font-family: var(--display); font-size: clamp(22px, 3vw, 34px); font-weight: 600;
  line-height: 1.35; letter-spacing: -.01em; text-wrap: balance; max-width: 860px;
}
.quote-section blockquote .accent { color: var(--accent); }
.quote-section .quote-body { margin-top: 28px; max-width: 640px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.quote-section .quote-body p + p { margin-top: 16px; }
.quote-section .quote-note { margin-top: 24px; color: var(--accent); font-size: 15px; font-style: italic; }

/* --- Story: a signed note from the maker (the human slot) --- */
.story-heading {
  font-family: var(--display); font-size: clamp(20px, 2.4vw, 30px); font-weight: 600;
  letter-spacing: -.01em;
}
.story-heading .accent { color: var(--accent-ink, var(--accent)); }
.story { margin-top: 24px; max-width: 640px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.story-by { margin-top: 24px; color: var(--accent-ink, var(--accent)); font-size: 15px; font-style: italic; }

/* --- Banner (Verbalyze science note) --- */
.banner {
  margin-top: 48px; padding: 36px 40px; border-radius: 24px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.banner h3 { font-family: var(--display); font-size: 20px; font-weight: 700; }
.banner p { margin-top: 10px; color: var(--muted); font-size: 16px; max-width: 720px; }

/* --- Support --- */
.support-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 56px 40px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line);
}
.support-card h2 { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.support-card > p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.support-card .btn { margin-top: 28px; }
.support-card .email-text { margin-top: 16px; color: var(--text); font-size: 15px; }
.support-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; font-size: 14px; }
.support-links a { color: var(--muted); }
.support-links a:hover { color: var(--text); }
.support-links .separator { color: var(--muted); }

/* --- Footer --- */
.footer { margin-top: 48px; border-top: 1px solid var(--line); padding-block: 40px; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer-brand { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: .06em; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-copyright { color: var(--muted); font-size: 14px; }
.disclaimer { max-width: 620px; color: var(--muted); font-size: 14px; }

/* --- Android modal --- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(5, 5, 8, .82);
  align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.modal-overlay.active { display: flex; opacity: 1; pointer-events: auto; }
.modal-content {
  background: var(--surface); border: 1px solid var(--line-strong);
  padding: 44px; border-radius: 24px; max-width: 460px; text-align: center;
  transform: scale(.96); transition: transform .25s ease;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-icon { color: var(--accent); margin-bottom: 18px; }
.modal-icon svg { width: 48px; height: 48px; }
.modal-title { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.modal-text { margin-top: 14px; color: var(--muted); font-size: 16px; }
.modal-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.modal-close { background: transparent; border: 0; color: var(--muted); font-size: 15px; padding: 8px; text-decoration: underline; }
.modal-close:hover { color: var(--text); }

/* --- Motion --- */
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-14px); } }
@keyframes hero-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.hero-content > *:not(h1), .hero-visual {
  animation: hero-in .8s cubic-bezier(.16, 1, .3, 1) both;
}
.hero-content > *:nth-child(3) { animation-delay: .1s; }
.hero-content > *:nth-child(4) { animation-delay: .2s; }
.hero-visual { animation-delay: .15s; }

.fade-in-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
.fade-in-up.delay-100 { transition-delay: .1s; }
.fade-in-up.delay-200 { transition-delay: .2s; }

/* --- Responsive --- */
@media (max-width: 1000px) {
  :root { --page-gutter: 32px; }
  .hero { padding-block: 56px 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { justify-content: center; }
  .phone-frame { width: min(280px, 74vw); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  :root { --page-gutter: 22px; }
  .nav-container { padding-block: 16px; }
  /* On phones, legal links collapse into the footer;
     section anchors and the contact pill stay. */
  .nav-links li.nav-legal { display: none; }
  .nav-links { gap: 20px; }
  .hero { padding-block: 40px 24px; }
  .section { padding-block: 44px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 28px; }
  .cta-group .btn { flex: 1; }
  .modal-content { padding: 32px 24px; }
}

@media (max-width: 720px) {
  .nav-links a { font-size: 14px; }
  .nav-links .btn-outline { padding: 7px 14px; min-height: 0; font-size: 14px; }
}

@media (max-width: 560px) {
  /* Phones: wordmark + the contact pill only; everything else is in the footer. */
  .nav-links li:not(:last-child) { display: none; }
}

@media (max-width: 480px) {
  .logo svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-content > *, .hero-visual { animation: none; }
  .phone-frame { animation: none; }
  .mode-panel { transition: none; }
  .fade-in-up { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
