/* Kevin Haggard Magic — shared app-site stylesheet
   Restyles the existing app-page markup vocabulary (.hero, .features, .feature,
   .screenshots, .cta, .card, .settings-option, .steps, .math-table, .tip,
   .effective-date, footer) in the main site's visual system.
   One file for all four app sites — replaces the per-page inline <style> blocks. */

:root {
  --navy-900: oklch(0.30 0.055 255);
  --ink: oklch(0.22 0.02 252);
  --ink-soft: oklch(0.42 0.015 250);
  --ink-mute: oklch(0.50 0.02 250);
  --paper: oklch(0.975 0.003 250);
  --paper-2: oklch(0.94 0.006 250);
  --white: oklch(1 0 0);
  --line: oklch(0.88 0.006 250);
  --accent: oklch(0.48 0.15 252);
  --accent-dark: oklch(0.42 0.14 253);
  --gutter: 40px;
  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, p { margin: 0; }
img { display: block; max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; }

/* ---------- shared site bar (injected on every app page) ---------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px var(--gutter);
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.appbar .wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; }
.appbar .wordmark .diamond { width: 16px; height: 16px; background: var(--accent); transform: rotate(45deg); }
.appbar nav { display: flex; gap: 22px; align-items: center; font-weight: 500; color: var(--ink-soft); }
.appbar nav [aria-current='page'] { color: var(--ink); font-weight: 600; }

/* ---------- hero (landing pages) ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 56px;
  align-items: center;
  padding: 72px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.hero-id { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.hero .app-icon {
  width: 84px; height: 84px; border-radius: 20px;
  box-shadow: 0 8px 24px oklch(0.2 0.03 255 / 0.18);
}
.hero-id h1 { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.hero-id .platform {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-top: 5px;
}
.hero .headline {
  font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; line-height: 1.04;
  letter-spacing: -0.03em; text-wrap: balance; max-width: 560px;
  margin-bottom: 20px;
}
.hero .tagline {
  font-size: 18px; line-height: 1.6; color: var(--ink-soft);
  max-width: 520px; text-wrap: pretty; margin-bottom: 26px;
}
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.app-store-btn { display: block; transition: transform 0.15s ease; }
.app-store-btn:hover { transform: translateY(-1px); }
.app-store-btn img { height: 52px; width: auto; }
.btn-ghost {
  border: 1px solid oklch(0.78 0.01 250);
  font-size: 15px; font-weight: 600; padding: 15px 26px;
  border-radius: 100px; color: oklch(0.32 0.02 250);
  transition: border-color 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); }

.hero-shots { display: flex; gap: 14px; justify-content: flex-end; }
.hero-shots img {
  width: 44%; max-width: 190px; border-radius: 18px;
  box-shadow: 0 20px 50px -18px oklch(0.2 0.03 255 / 0.5);
}
.hero-shots img:first-child { transform: rotate(-3deg); }
.hero-shots img:last-child { transform: rotate(3deg); }

/* ---------- features ---------- */

.features {
  padding: 72px var(--gutter);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute);
}
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--white); border: 1px solid oklch(0.89 0.006 250);
  border-radius: 14px; padding: 26px 28px;
}
.feature-icon { width: 32px; height: 32px; display: flex; align-items: center; }
.feature-icon svg { width: 26px; height: 26px; stroke: var(--accent); }
.feature h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.feature p { font-size: 15px; line-height: 1.66; color: var(--ink-soft); text-wrap: pretty; }

/* ---------- screenshots ---------- */

.screenshots {
  padding: 72px var(--gutter);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.screenshots .section-title { display: block; margin-bottom: 28px; }
.screenshot-scroll { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 240px)); gap: 20px; }
.screenshot {
  width: 100%; border-radius: 18px;
  box-shadow: 0 16px 40px -18px oklch(0.2 0.03 255 / 0.45);
  transition: transform 0.2s ease;
}
.screenshot:hover { transform: translateY(-6px); }

/* ---------- long-form context sections (about the effect / concept) ---------- */

.about-effect, .about-concept {
  padding: 72px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.about-effect .section-title, .about-concept .section-title { display: block; margin-bottom: 24px; }
.effect-card, .concept-card {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 760px;
  background: var(--white); border: 1px solid oklch(0.89 0.006 250);
  border-radius: 16px; padding: 32px 34px;
}
.effect-card p, .concept-card p { font-size: 17px; line-height: 1.76; color: var(--ink-soft); text-wrap: pretty; }
.effect-card a, .concept-card a { color: var(--accent); font-weight: 600; }
.video-wrapper {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: 12px; overflow: hidden; background: var(--paper-2);
}
.video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- cta ---------- */

.cta {
  padding: 80px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px; align-items: center;
}
.cta h2 {
  font-size: clamp(28px, 3vw, 38px); font-weight: 700; line-height: 1.08;
  letter-spacing: -0.03em; text-wrap: balance; max-width: 560px;
}
.cta p { font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin-top: 12px; }

/* ---------- help / privacy documents ---------- */

.header {
  display: flex; align-items: center; gap: 16px;
  padding: 44px var(--gutter) 40px;
  border-bottom: 1px solid var(--line);
}
.header .app-icon {
  width: 56px; height: 56px; border-radius: 14px;
  box-shadow: 0 6px 18px oklch(0.2 0.03 255 / 0.16);
}
.header h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.header .subtitle { font-size: 17px; color: var(--ink-mute); }

main {
  max-width: 780px;
  padding: 56px var(--gutter) 72px;
}

main h2 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.025em;
  margin: 48px 0 18px;
}
main h2:first-child { margin-top: 0; }
main p { font-size: 17px; line-height: 1.76; color: var(--ink-soft); margin-bottom: 14px; text-wrap: pretty; }
main a { color: var(--accent); font-weight: 600; }

.card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--white); border: 1px solid oklch(0.89 0.006 250);
  border-radius: 16px; padding: 26px 30px; margin-bottom: 18px;
}
.card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.card p { margin-bottom: 0; font-size: 16px; }
.card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.card li { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }

.settings-option {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--white); border: 1px solid oklch(0.89 0.006 250);
  border-radius: 14px; padding: 22px 24px; margin-bottom: 12px;
}
.settings-option h4 { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.settings-option > p { font-size: 15px; line-height: 1.66; color: var(--ink-soft); margin: 0; }
.option-values { display: flex; gap: 8px; flex-wrap: wrap; }
.option-tag {
  font-family: var(--mono); font-size: 12px;
  background: var(--paper-2); padding: 6px 12px; border-radius: 6px;
}
.settings-option .detail { font-size: 14px; line-height: 1.66; color: var(--ink-mute); margin: 0; }
.settings-option .detail strong { color: oklch(0.32 0.02 250); }

.tip, .effective-date {
  background: var(--white);
  border: 1px solid oklch(0.89 0.006 250);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 26px 0;
}
.tip p, .effective-date p { margin: 0; font-size: 15px; line-height: 1.7; color: oklch(0.36 0.015 250); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 0 16px 52px;
  border-bottom: 1px solid var(--line);
  font-size: 16px; line-height: 1.7; color: var(--ink-soft);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--white);
  font-family: var(--mono); font-size: 13px; font-weight: 500;
}

.math-table {
  width: 100%; border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; margin: 18px 0; font-size: 15px;
}
.math-table th, .math-table td { padding: 12px 18px; text-align: left; border-bottom: 1px solid oklch(0.93 0.005 250); }
.math-table th { background: var(--paper-2); font-weight: 600; }
.math-table td { color: var(--ink-soft); }
.math-table tr:last-child td { border-bottom: none; }

/* ---------- footer ---------- */

footer {
  padding: 32px var(--gutter);
  background: var(--navy-900);
  color: oklch(0.82 0.01 250);
  font-size: 13px; line-height: 1.7;
}
footer p { margin: 0; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
footer a { color: oklch(0.88 0.01 250); }
footer a:hover { color: var(--white); }
footer .foot-label {
  display: block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: oklch(0.66 0.02 250); margin-bottom: 6px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  :root { --gutter: 22px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 48px var(--gutter); }
  .hero-shots { justify-content: flex-start; }
  .hero-shots img { width: 46%; }
  .features { grid-template-columns: 1fr; gap: 24px; padding: 48px var(--gutter); }
  .feature-grid { grid-template-columns: 1fr; }
  .screenshots, .about-effect, .about-concept { padding: 48px var(--gutter); }
  .screenshot-scroll { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .cta { grid-template-columns: 1fr; gap: 24px; padding: 56px var(--gutter); }
  .header { flex-wrap: wrap; padding: 32px var(--gutter); }
  main { padding: 40px var(--gutter) 56px; }
  main h2 { font-size: 22px; margin-top: 36px; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .appbar { padding: 14px var(--gutter); }
  .appbar nav { gap: 16px; }

  /* Touch targets: 44px minimum on navigation and controls. Footer links sit
     inside sentences, so they gain hit area through padding rather than a
     block height that would break the line flow. */
  .appbar .wordmark,
  .appbar nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .appbar nav { flex-wrap: wrap; row-gap: 0; }
  .appbar .wordmark { white-space: nowrap; }
  footer p a { display: inline-block; padding: 11px 0; }
  .app-store-btn, .cta a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- phone ---------- */

@media (max-width: 600px) {
  /* The wordmark plus four nav links wrap into a 117px sticky bar on a phone.
     The current page's own link is redundant while you are on it, and dropping
     it returns the bar to a single row. */
  .appbar nav a[aria-current='page'] { display: none; }
  .appbar { gap: 12px; }
  .appbar nav { gap: 14px; }

  .hero-id { flex-wrap: wrap; gap: 14px; }
  .hero-id h1 { font-size: 30px; }
  .hero .app-icon { width: 64px; height: 64px; border-radius: 16px; }
  .hero .headline { font-size: 28px; }
  .cta h2 { font-size: 26px; }
}
