/* ─────────────────────────────────────────────────────────────
   WorkingMemory · Product site
   Inherits from ../colors_and_type.css; adds only site-chrome.
   ───────────────────────────────────────────────────────────── */

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container { padding: 0 24px; } }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg-0) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.lockup { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--fg-0); }
.lockup .mark { width: 150px; height: 72px; display: block; }
.lockup .mark path { fill: var(--fg-0); }
.wordmark { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 32px; letter-spacing: -0.015em; line-height: 1; white-space: nowrap; color: var(--fg-0); }
.wordmark .sep { font-family: var(--font-sans); font-style: normal; font-weight: 300; font-size: 21px; margin: 0 2px; color: var(--fg-3); }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-link { font-family: var(--font-sans); font-size: 14px; color: var(--fg-1); text-decoration: none; transition: color 220ms var(--ease-out); }
.nav-link:hover { color: var(--fg-0); }
@media (max-width: 760px) { .nav-right .nav-link:not(.btn) { display: none; } }
@media (max-width: 600px) {
  .lockup { gap: 6px; }
  .lockup .mark { width: 100px; height: 51px; }
  .wordmark { font-size: 21px; }
  .wordmark .sep { font-size: 17px; }
  .nav-inner { padding: 14px 0; }
}
@media (max-width: 420px) {
  .lockup .mark { width: 80px; height: 41px; }
  .wordmark { font-size: 17px; }
  .wordmark .sep { font-size: 14px; }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  box-sizing: border-box;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  padding: 10px 18px;
  background: var(--fg-0); color: var(--bg-0);
  border: 1px solid var(--fg-0);
  border-radius: 0;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--fg-0); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--bg-1); border-color: var(--fg-0); }

/* app store style button */
.btn.store {
  background: var(--fg-0); color: var(--bg-0);
  padding: 10px 16px;
  display: inline-flex; align-items: center; gap: 10px;
}
.btn.store svg { flex-shrink: 0; }
.btn.store .two { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn.store .two .sm { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; font-weight: 400; }
.btn.store .two .lg { font-size: 14px; font-weight: 500; }
.btn.store.ghost { background: transparent; color: var(--fg-0); border-color: var(--line-strong); }
.btn.store.ghost:hover { background: var(--bg-1); border-color: var(--fg-0); }
.btn.coming-soon { cursor: default; opacity: 0.6; }
.btn.coming-soon:hover { background: transparent; border-color: var(--line-strong); }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 72px 0 96px; position: relative; }
@media (max-width: 900px) { .hero { padding: 48px 0 64px; } }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
}

.eyebrow {
  font-family: var(--font-sans); font-size: 12px;
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--fg-2); font-weight: 500;
  margin-bottom: 24px;
}
.eyebrow .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 999px;
  background: var(--accent); margin-right: 10px; vertical-align: middle;
}

.hero h1 {
  font-family: var(--font-serif-display);
  font-weight: 400;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  color: var(--fg-0);
  text-wrap: balance;
}
.hero h1 .tagline { display: block; }

/* The pairing — embedded in the hero. Raw italic → structured sans.  */
.pairing-inline {
  margin: 28px 0 36px;
  padding: 22px 24px;
  background: var(--bg-1);
  border-left: 2px solid var(--accent);
}
.pairing-inline .raw {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 19px; line-height: 1.55; color: var(--fg-1);
  margin: 0 0 12px;
  text-wrap: pretty;
}
.pairing-inline .raw::before { content: '\201C'; color: var(--fg-3); }
.pairing-inline .raw::after  { content: '\201D'; color: var(--fg-3); }
.pairing-inline .arrow {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-2); letter-spacing: 0.08em; text-transform: uppercase;
  margin: 8px 0;
  display: flex; align-items: center; gap: 10px;
}
.pairing-inline .arrow::before { content: ''; flex: 0 0 24px; height: 1px; background: var(--line-strong); }
.pairing-inline .structured {
  font-family: var(--font-sans); font-size: 15px; color: var(--fg-0);
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;
  line-height: 1.8;
}
.chip {
  background: var(--bg-0); color: var(--fg-0);
  padding: 3px 11px; border-radius: 999px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  border: 1px solid var(--line);
}
.chip.accent { background: var(--accent-soft); color: var(--accent); border: none; }
.chip .mono { font-family: var(--font-mono); font-size: 12px; color: var(--fg-1); }

.hero .sub {
  font-size: 17px; line-height: 1.65; color: var(--fg-1);
  max-width: 50ch;
  margin: 0 0 36px;
  text-wrap: pretty;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-row .hint {
  font-family: var(--font-sans); font-size: 13px; color: var(--fg-2);
  margin-left: 8px;
}

/* phone in hero */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 380px; height: 780px;
  background: var(--bg-0);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 80px rgba(26, 31, 44, 0.14), 0 0 0 1px rgba(26, 31, 44, 0.08);
  /* Keep the dynamic island / status-chrome z-indexes local so they can't poke through the sticky nav. */
  isolation: isolate;
}
.phone::before {
  content: ''; position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%); width: 110px; height: 28px;
  background: #0a0d14; border-radius: 16px; z-index: 100;
}
.phone iframe {
  width: 100%; height: 100%; border: 0; display: block;
  background: var(--bg-0);
}
/* static phone preview — replaces live iframe in production site */
.phone-preview {
  width: 100%; height: 100%;
  background: var(--bg-0);
  padding: 58px 22px 28px;
  box-sizing: border-box;
  display: flex; flex-direction: column; gap: 20px;
  font-family: var(--font-sans);
}

/* Three-stage state machine for the phone preview. Stages stack on top of
   each other; CSS-only opacity loop walks through capture → recall → reminder. */
.pp-stage-stack {
  position: relative;
  flex: 1;
  min-height: 0;
}
.pp-stage {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 20px;
  opacity: 0;
}
.pp-stage-1 { animation: pp-stage-1 18s infinite; }
.pp-stage-2 { animation: pp-stage-2 18s infinite; }
.pp-stage-3 { animation: pp-stage-3 18s infinite; }
@keyframes pp-stage-1 {
  0%, 33%, 100% { opacity: 0; }
  3%, 30%       { opacity: 1; }
}
@keyframes pp-stage-2 {
  0%, 33%, 67%, 100% { opacity: 0; }
  36%, 64%           { opacity: 1; }
}
@keyframes pp-stage-3 {
  0%, 67%, 100% { opacity: 0; }
  70%, 97%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-stage-1, .pp-stage-2, .pp-stage-3 { animation: none; }
  .pp-stage-1 { opacity: 1; }
}

.pp-glyph {
  width: 12px; height: 12px;
  flex: 0 0 auto;
  fill: currentColor;
  vertical-align: middle;
}
.pp-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px;
}
.pp-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent, #2c4a3e);
  display: flex; align-items: center; justify-content: center;
  color: #faf8f3;
  font-family: var(--font-serif, Fraunces, serif);
  font-style: italic; font-weight: 300;
  font-size: 17px; line-height: 1;
  letter-spacing: -0.01em;
}
.pp-mark .pp-sep { opacity: 0.55; margin: 0 1px; }
.pp-mark svg { fill: #faf8f3; }
.pp-sun {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-1); font-size: 16px;
  cursor: pointer;
  transition: background 140ms var(--ease-out);
}
.pp-sun:hover { background: var(--bg-1); }

/* Dark-mode toggle on the phone preview. Redefining tokens locally keeps the
   re-theme contained — the rest of the page stays in its real prefers-color-scheme. */
.phone.pp-dark {
  --bg-0:   #1a1f2c;
  --bg-1:   #22283a;
  --bg-2:   #2c344a;
  --bg-3:   #384159;
  --fg-0:   #f4f1ea;
  --fg-1:   #c6c3bb;
  --fg-2:   #8a8f9c;
  --fg-3:   #5a6070;
  --line:         rgba(244, 241, 234, 0.08);
  --line-strong:  rgba(244, 241, 234, 0.14);
  --accent:       #a3c27a;
  --accent-soft:  rgba(163, 194, 122, 0.10);
}
.pp-day {
  font-family: var(--font-sans);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-2); font-weight: 500;
  text-align: center;
  border-top: 1px solid var(--line);
  margin: 0 40px;
  padding-top: 18px;
}
.pp-row { display: flex; flex-direction: column; gap: 6px; }
.pp-bubble {
  align-self: flex-start;
  max-width: 88%;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-0);
  font-family: var(--font-serif, Fraunces, serif);
  font-style: italic; font-weight: 300;
  font-size: 15px; line-height: 1.45;
  color: var(--fg-0);
}
.pp-bubble.pp-ask {
  align-self: flex-end;
  background: var(--bg-2);
  border-color: var(--line);
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
}
.pp-meta {
  align-self: flex-end;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--fg-2);
  padding-right: 4px;
}
.pp-meta em { font-style: normal; text-decoration: underline; text-underline-offset: 2px; color: var(--fg-1); }
.pp-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent, #2c4a3e);
  display: inline-block;
}
.pp-qmark {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-3); color: var(--fg-1);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
}
.pp-time { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.phone .status-chrome {
  position: absolute; top: 20px; left: 36px; right: 36px;
  display: flex; justify-content: space-between; z-index: 101;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--fg-0);
  pointer-events: none;
}
@media (max-width: 460px) {
  .phone { transform: scale(calc((100vw - 48px) / 380)); transform-origin: top left; }
  .phone-container,
  .phone-wrap {
    width: calc(100vw - 48px);
    height: calc(780px * (100vw - 48px) / 380);
  }
  .phone-wrap { justify-content: flex-start; }
}

/* ── Section rhythm ──────────────────────────────────────── */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .section { padding: 64px 0; } }

.section-head { max-width: 700px; margin: 0 0 56px; }
.section-head .label {
  display: block;
  font-family: var(--font-sans); font-size: 12px;
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--fg-2); font-weight: 500;
  margin-bottom: 18px;
}
.section-head h2 {
  font-family: var(--font-serif-display); font-weight: 400;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 16px; text-wrap: balance;
}
.section-head h2 em { font-style: italic; color: var(--toffee); }
.section-head p {
  font-size: 17px; line-height: 1.65; color: var(--fg-1);
  max-width: 56ch; margin: 0;
}

/* ── Three beats — continuity, connection, closure ───────── */
.beats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 860px) { .beats { grid-template-columns: 1fr; } }
.beat { background: var(--bg-0); padding: 40px 32px; display: flex; flex-direction: column; gap: 14px; }
.beat-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 26px; line-height: 1.2; color: var(--fg-0);
  letter-spacing: -0.01em; margin: 0;
}
.beat-body { font-family: var(--font-sans); font-size: 15px; line-height: 1.65; color: var(--fg-1); margin: 0; }

/* ── Principles ──────────────────────────────────────────── */
.principles {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
}
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; gap: 40px; } }
.principle h3 {
  font-family: var(--font-sans); font-size: 17px; font-weight: 500;
  color: var(--fg-0); letter-spacing: -0.005em;
  margin: 0 0 10px;
}
.principle h3 .x {
  color: var(--fg-3); margin-right: 10px; font-weight: 400;
  font-family: var(--font-serif); font-style: italic;
}
.principle p {
  font-family: var(--font-sans); font-size: 15px; line-height: 1.65;
  color: var(--fg-1); margin: 0; max-width: 44ch;
}
.principle p em {
  font-family: var(--font-serif); font-style: italic; color: var(--toffee);
}

/* ── Pricing ─────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 860px) { .pricing-grid { grid-template-columns: 1fr; } }
.tier {
  background: var(--bg-0);
  padding: 36px 32px;
  display: flex; flex-direction: column;
  position: relative;
}
.tier.featured { background: var(--bg-1); }
.tier .flag {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase;
}
.tier .name {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 24px; color: var(--fg-0);
  margin: 0 0 6px; letter-spacing: -0.01em;
}
.tier .who {
  font-family: var(--font-sans); font-size: 13px; color: var(--fg-2);
  margin: 0 0 28px;
}
.tier .price {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 52px; line-height: 1; color: var(--fg-0);
  letter-spacing: -0.03em; margin-bottom: 4px;
  display: flex; align-items: baseline; gap: 4px;
}
.tier .price .cur { font-size: 24px; color: var(--fg-2); }
.tier .price .per { font-family: var(--font-sans); font-size: 13px; color: var(--fg-2); font-weight: 400; margin-left: 4px; letter-spacing: normal; }
.tier .price.custom { font-size: 36px; font-style: italic; letter-spacing: -0.01em; }
.tier .price-sub { font-family: var(--font-sans); font-size: 13px; color: var(--fg-2); margin-bottom: 28px; }
.tier ul {
  list-style: none; padding: 0; margin: 0 0 32px;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--font-sans); font-size: 14px;
  color: var(--fg-1); line-height: 1.5;
  flex: 1;
}
.tier ul li { display: flex; gap: 12px; align-items: baseline; }
.tier ul li::before {
  content: '·';
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  flex: 0 0 10px;
  text-align: center;
}
.tier ul li.off { color: var(--fg-3); }
.tier ul li.off::before {
  content: '×';
  color: var(--fg-3);
  font-size: 16px;
  font-family: var(--font-serif);
  font-style: italic;
}
.tier .btn { width: 100%; justify-content: center; }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { max-width: 780px; }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; list-style: none;
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 22px; color: var(--fg-0); letter-spacing: -0.01em;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q .plus {
  font-family: var(--font-sans); font-size: 22px;
  color: var(--fg-2); font-weight: 300; font-style: normal;
  width: 24px; text-align: center;
  transition: transform 220ms var(--ease-out);
}
.faq-item[open] .faq-q .plus { transform: rotate(45deg); color: var(--accent); }
.faq-a {
  margin-top: 16px;
  font-family: var(--font-sans); font-size: 16px; line-height: 1.7;
  color: var(--fg-1);
  max-width: 64ch;
}
.faq-a em { font-family: var(--font-serif); font-style: italic; color: var(--toffee); }

/* ── About ───────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 80px; align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }
.about-copy h2 {
  font-family: var(--font-serif-display); font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 24px; text-wrap: balance;
}
.about-copy h2 em { font-style: italic; color: var(--toffee); }
.about-copy p {
  font-size: 16px; line-height: 1.75; color: var(--fg-1);
  max-width: 54ch; margin: 0 0 16px;
}
.about-copy p em { font-family: var(--font-serif); font-style: italic; color: var(--toffee); }
.about-copy p a { text-decoration: none; }
.about-copy p a em { text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 220ms var(--ease-out); }
.about-copy p a:hover em { color: var(--accent); }
.founders { display: flex; flex-direction: column; gap: 28px; }
.founder {
  display: grid; grid-template-columns: 56px 1fr;
  gap: 18px; align-items: start;
}
.founder-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-2); color: var(--fg-1);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic;
  font-size: 22px; font-weight: 400;
}
.founder-body .name {
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  color: var(--fg-0);
}
.founder-body .role {
  font-family: var(--font-sans); font-size: 13px; color: var(--fg-2); margin-top: 2px;
}
.founder-body .bio {
  font-family: var(--font-sans); font-size: 14px; line-height: 1.65;
  color: var(--fg-1); margin-top: 10px;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer .lockup .mark { width: 50px; height: 26px; }
.footer .wordmark { font-size: 15px; }
.footer .wordmark .sep { font-size: 13px; }
.footer .meta { font-family: var(--font-sans); font-size: 13px; color: var(--fg-2); }
.footer .meta a { color: var(--fg-2); text-decoration: none; margin-left: 24px; transition: color 220ms var(--ease-out); }
.footer .meta a:hover { color: var(--fg-0); }

/* ── Tweaks panel ────────────────────────────────────────── */
.tweaks-panel {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  background: var(--bg-0); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-float); padding: 20px 22px; width: 280px;
  font-family: var(--font-sans); display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 17px; color: var(--fg-0); margin: 0 0 14px;
}
.tweaks-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.tweaks-row:first-of-type { border-top: 0; }
.tweaks-row label { font-size: 12px; color: var(--fg-1); }
.tweaks-row .opts { display: flex; gap: 4px; }
.tweaks-row .opt {
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--fg-1); padding: 4px 10px; font-size: 12px;
  font-family: var(--font-sans); cursor: pointer; border-radius: 0;
}
.tweaks-row .opt.active { background: var(--fg-0); color: var(--bg-0); border-color: var(--fg-0); }
