/* KeepShot — "the darkroom" landing + legal site
   Warm near-black espresso canvas, gold brand light, color-coded swipe verbs.
   Space Grotesk (display) + Inter (body). Matches src/theme/index.ts. */

:root {
  /* Canvas — warm near-black espresso */
  --canvas: #14110d;
  --canvas-alt: #1e1a14;
  --canvas-deep: #0d0b08;
  --surface: #221d16;
  --surface-alt: #2a241b;
  --line: #312a20;
  --line-soft: #27211a;

  /* Text on dark — warm off-whites */
  --text: #f5efe3;
  --text-dim: #a89c88;
  --text-faint: #6e6557;

  /* Brand — gold */
  --gold: #e9b949;
  --gold-bright: #f6cb5e;
  --gold-deep: #c2932e;
  --gold-soft: #3a2f18;
  --on-gold: #1a150f;

  /* Swipe verbs */
  --keep: #3fcf8e;
  --keep-soft: #16352a;
  --archive: #f2685a;
  --archive-soft: #3a201d;
  --keeper: #e9b949;

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.4);
  --glow-gold: 0 0 60px rgba(233, 185, 73, 0.28);

  --max: 1120px;
  --font-body: "Inter", -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif;
  --font-display: "Space Grotesk", -apple-system, "SF Pro Display", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Menlo", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 82% -8%, rgba(233, 185, 73, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(63, 207, 142, 0.05), transparent 55%),
    linear-gradient(180deg, #17130e 0%, var(--canvas) 38%, var(--canvas-deep) 100%);
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: rgba(233, 185, 73, 0.3); color: #fff; }

.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus {
  left: 20px; top: 20px; z-index: 99;
  padding: 0.8rem 1rem; border-radius: 999px;
  background: var(--gold); color: var(--on-gold); font-weight: 600;
}

/* ── Shell ── */
.shell { width: min(var(--max), calc(100vw - 2.5rem)); margin: 0 auto; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(20, 17, 13, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.7rem 0;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, 0.5);
}
.brand-copy { display: grid; gap: 0.05rem; }
.brand-name {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text); position: relative;
}
.brand-name .dot { color: var(--gold); }
.brand-tag { font-size: 0.76rem; color: var(--text-faint); letter-spacing: 0.01em; }

.site-nav {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.25rem; justify-content: flex-end;
}
.site-nav a {
  padding: 0.5rem 0.85rem; border-radius: 9px; text-decoration: none;
  font-size: 0.9rem; color: var(--text-dim);
  transition: background-color 150ms, color 150ms;
}
.site-nav a:hover, .site-nav a:focus-visible {
  background: rgba(233, 185, 73, 0.1); color: var(--text);
}
.site-nav .nav-pill {
  background: var(--gold); color: var(--on-gold); font-weight: 600;
}
.site-nav .nav-pill:hover, .site-nav .nav-pill:focus-visible {
  background: var(--gold-bright); color: var(--on-gold);
}

/* ── Page main ── */
.page-main { overflow: clip; }

/* ── Sections ── */
.section { padding: 5rem 0; }
.section + .section { border-top: 1px solid var(--line-soft); }

/* ── Hero ── */
.hero { position: relative; padding-top: calc(3.5rem + env(safe-area-inset-top)); padding-bottom: 5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.82fr);
  grid-template-areas: "copy visual" "metrics visual";
  gap: 3rem; align-items: center; position: relative;
}
.hero-copy { grid-area: copy; animation: fade-up 600ms ease both; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1.25rem; padding: 0.45rem 0.85rem;
  border: 1px solid rgba(233, 185, 73, 0.28); border-radius: 999px;
  background: rgba(233, 185, 73, 0.08); color: var(--gold);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  font-family: var(--font-body);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.hero-title, .page-title, .section-title, .footer-title {
  font-family: var(--font-display); letter-spacing: -0.03em;
}
.hero-title {
  margin: 0; font-size: clamp(2.5rem, 5.5vw, 4.1rem);
  line-height: 1.04; font-weight: 700; max-width: 15ch; color: var(--text);
}
.hero-title .hl { color: var(--gold); }

.hero-lede, .page-lede, .section-lede, .feature-copy, .body-copy, .small-copy {
  color: var(--text-dim); line-height: 1.65;
}
.hero-lede { margin: 1.25rem 0 0; max-width: 50ch; font-size: 1.07rem; }

/* ── Buttons ── */
.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 1.9rem; }
.app-store-badge { display: inline-block; transition: transform 0.2s, filter 0.2s; }
.app-store-badge:hover, .app-store-badge:focus-visible { transform: translateY(-1px); filter: brightness(1.08); }
.app-store-badge img { display: block; border-radius: 11px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.1rem; padding: 0.8rem 1.3rem; border-radius: 12px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; font-family: var(--font-body);
  transition: transform 150ms, background-color 150ms, border-color 150ms;
}
.button:hover, .button:focus-visible { transform: translateY(-1px); }
.button-primary { background: var(--gold); color: var(--on-gold); box-shadow: 0 8px 30px rgba(233, 185, 73, 0.22); }
.button-primary:hover, .button-primary:focus-visible { background: var(--gold-bright); }
.button-secondary { border-color: var(--line); background: rgba(34, 29, 22, 0.6); color: var(--text); }
.button-secondary:hover, .button-secondary:focus-visible { border-color: rgba(233, 185, 73, 0.4); background: var(--surface); }

/* ── Metric row (true-facts strip) ── */
.metric-row {
  grid-area: metrics; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; margin-top: 2.25rem;
}
.metric-card { padding: 0.95rem 1.05rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.metric-label { display: block; color: var(--text-faint); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.metric-value { display: block; margin-top: 0.35rem; font-size: 1.05rem; font-weight: 700; color: var(--text); font-family: var(--font-display); letter-spacing: -0.01em; }
.metric-note { display: block; margin-top: 0.2rem; font-size: 0.78rem; color: var(--text-dim); line-height: 1.45; }

/* ── Hero visual ── */
.hero-visual { grid-area: visual; display: flex; justify-content: center; position: relative; animation: fade-up 600ms ease 80ms both; }
.hero-art-wrap { position: relative; width: min(100%, 420px); display: flex; align-items: center; justify-content: center; }
.hero-art-wrap::before {
  content: ""; position: absolute; inset: 6% 6% 6% 6%;
  background: radial-gradient(circle at 50% 45%, rgba(233, 185, 73, 0.4), rgba(233, 185, 73, 0.06) 55%, transparent 72%);
  filter: blur(8px); z-index: 0; animation: pulse-glow 5s ease-in-out infinite;
}
.hero-art { position: relative; z-index: 1; width: 100%; height: auto; animation: float 6s ease-in-out infinite; }

/* swipe-cue chips floating beside the hero art */
.cue-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.4rem; }
.cue-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line);
}
.cue-chip .arrow { font-size: 0.95rem; line-height: 1; }
.cue-keep { color: var(--keep); border-color: rgba(63, 207, 142, 0.4); }
.cue-archive { color: var(--archive); border-color: rgba(242, 104, 90, 0.4); }
.cue-keeper { color: var(--keeper); border-color: rgba(233, 185, 73, 0.4); }

/* ── Section headings ── */
.section-heading { max-width: 54rem; margin-bottom: 2.5rem; }
.section-title { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.08; font-weight: 700; color: var(--text); }
.section-lede { margin: 0.85rem 0 0; font-size: 1.02rem; max-width: 58ch; }

/* ── Shared card base ── */
.strip-card, .feature-card, .story-card, .faq-card, .support-card, .policy-card, .legal-card, .footer-panel {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-md);
}

/* ── Trust strip ── */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; }
.strip-card, .feature-card, .story-card, .faq-card, .support-card, .policy-card, .legal-card, .footer-panel { padding: 1.3rem; }
.strip-card strong, .feature-card strong, .story-card strong, .support-card strong, .policy-card strong {
  display: block; margin-bottom: 0.4rem; font-size: 0.98rem; color: var(--text);
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em;
}
.strip-card p, .feature-card p, .story-card p, .support-card p, .policy-card p, .legal-card p, .footer-panel p { margin: 0; }
.small-copy { font-size: 0.88rem; }

/* ── Features ── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.feature-card { transition: transform 200ms, border-color 200ms; }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(233, 185, 73, 0.3); }
.feature-icon {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 0.9rem; border-radius: 12px; background: var(--gold-soft);
  color: var(--gold); font-size: 1.25rem; font-weight: 700;
}
.feature-icon.fi-keep { background: var(--keep-soft); color: var(--keep); }
.feature-icon.fi-archive { background: var(--archive-soft); color: var(--archive); }

/* ── Split / How it works ── */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.story-stack { display: grid; gap: 0.85rem; }
.step-list { display: grid; gap: 0.9rem; margin-top: 1.5rem; }
.step-item { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 10px;
  background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 0.95rem;
  font-family: var(--font-display);
}
.step-text strong { display: block; margin-bottom: 0.2rem; color: var(--text); }

/* ── Privacy + visual showcase ── */
.privacy-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 2.5rem; align-items: center; }
.showcase-art-wrap { position: relative; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.showcase-art-wrap::before {
  content: ""; position: absolute; inset: 12%;
  background: radial-gradient(circle, rgba(233, 185, 73, 0.32), transparent 70%);
  filter: blur(10px);
}
.showcase-art { position: relative; z-index: 1; width: min(100%, 320px); height: auto; }
.privacy-panel { display: grid; gap: 0.85rem; }

/* ── FAQ ── */
.faq-card details { border-top: 1px solid var(--line); padding: 1.05rem 0; }
.faq-card details:first-of-type { border-top: 0; padding-top: 0; }
.faq-card summary {
  list-style: none; cursor: pointer; font-weight: 600; line-height: 1.45;
  color: var(--text); transition: color 150ms; font-family: var(--font-display); letter-spacing: -0.01em;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq-card summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; transition: transform 200ms; }
.faq-card details[open] summary::after { transform: rotate(45deg); }
.faq-card summary:hover { color: var(--gold); }
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card details p { margin: 0.65rem 0 0; color: var(--text-dim); line-height: 1.65; font-size: 0.95rem; max-width: 70ch; }

/* ── Inline link ── */
.inline-link { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.inline-link:hover { color: var(--gold-bright); }

/* ── Subpages ── */
.page-hero { padding-top: calc(3.5rem + env(safe-area-inset-top)); }
.crumbs { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; color: var(--text-faint); font-size: 0.85rem; }
.crumbs a { text-decoration: none; color: var(--text-dim); }
.crumbs a:hover { color: var(--gold); }
.page-title { margin: 1rem 0 0; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; color: var(--text); }
.page-lede { margin: 0.9rem 0 0; max-width: 56ch; font-size: 1.02rem; }

.meta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.meta-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.75rem; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-dim); font-size: 0.85rem;
}
.meta-pill strong { color: var(--text); }

.legal-layout { display: grid; gap: 0.85rem; }
.legal-card { padding: 1.5rem; }
.summary-list, .policy-list { display: grid; gap: 0.65rem; padding: 0; margin: 0; list-style: none; }
.summary-list li, .policy-list li { padding-left: 1.3rem; position: relative; color: var(--text-dim); line-height: 1.6; }
.summary-list li::before, .policy-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62rem;
  width: 6px; height: 6px; border-radius: 999px; background: var(--gold);
}
.legal-card h2, .support-card h2 {
  margin: 0 0 0.8rem; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.35rem, 3.5vw, 1.8rem); line-height: 1.12; letter-spacing: -0.02em; color: var(--text);
}
.legal-card h3 { margin: 1.1rem 0 0.45rem; font-size: 1rem; color: var(--text); font-family: var(--font-display); }
.legal-card p, .legal-card li, .support-card p, .support-card li { color: var(--text-dim); line-height: 1.65; }
.legal-card a, .support-card a { color: var(--gold); }

.support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.code-chip {
  display: inline-flex; align-items: center; padding: 0.2rem 0.5rem; border-radius: 6px;
  background: var(--gold-soft); font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold);
}
.contact-email { font-family: var(--font-display); font-weight: 600; color: var(--gold); font-size: 1.05rem; }

/* ── Footer ── */
.footer { padding: 2.75rem 0 3rem; border-top: 1px solid var(--line-soft); }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(2, minmax(150px, 0.4fr)); gap: 2rem; align-items: start; }
.footer-title { margin: 0 0 0.6rem; font-size: 1.05rem; color: var(--text); font-weight: 600; }
.footer-copy { margin: 0; color: var(--text-dim); line-height: 1.6; font-size: 0.92rem; }
.footer-links { display: grid; gap: 0.55rem; }
.footer-links a { text-decoration: none; color: var(--text-dim); font-size: 0.92rem; transition: color 150ms; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--gold); }
.small-print { margin-top: 1rem; color: var(--text-faint); font-size: 0.82rem; }
.footer .contact-email { font-size: 0.95rem; }

/* ── Animations ── */
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse-glow { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}

/* ── Responsive: tablet ── */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "visual" "metrics"; }
  .hero-art-wrap { width: min(70%, 360px); }
  .metric-row, .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid, .privacy-grid { grid-template-columns: 1fr; }
  .privacy-grid { gap: 1.5rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .support-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive: large phone / small tablet ── */
@media (max-width: 820px) {
  .site-header .shell { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .site-nav { width: 100%; justify-content: flex-start; gap: 0.2rem; }
  .site-nav a { padding: 0.45rem 0.7rem; font-size: 0.85rem; }
  .hero { padding-top: calc(2.5rem + env(safe-area-inset-top)); }
  .hero-title { max-width: none; }
  .section { padding: 3.75rem 0; }
  .metric-row, .trust-strip, .feature-grid, .support-grid, .footer-grid { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: repeat(3, 1fr); }
}

/* ── Responsive: phone ── */
@media (max-width: 640px) {
  .shell { width: min(var(--max), calc(100vw - 1.5rem)); }
  .section { padding: 3rem 0; }
  .hero-title { font-size: clamp(2.1rem, 8.5vw, 2.9rem); }
  .button-row { flex-direction: column; align-items: stretch; }
  .button, .app-store-badge { width: 100%; }
  .app-store-badge img { width: 100%; height: auto; }
  .section-heading { margin-bottom: 1.75rem; }
  .metric-row { grid-template-columns: 1fr; }
}

/* ── Responsive: iPhone SE (375px) ── */
@media (max-width: 380px) {
  .shell { width: calc(100vw - 1.25rem); }
  .hero-title { font-size: 1.95rem; }
  .hero-lede { font-size: 0.96rem; }
  .section-title { font-size: 1.55rem; }
  .brand-tag { display: none; }
  .hero-art-wrap { width: min(80%, 280px); }
}

/* ── Landscape phones ── */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding-top: 2rem; }
  .hero-grid { gap: 1.5rem; }
  .hero-art-wrap { width: min(45%, 240px); }
}
