/* Tapwah site styles. Shared by tapwah.com and the app's login pages (app.tapwah.com).
   Tokens first: color, type, space. Light by default, dark via prefers-color-scheme,
   and data-theme="light" / "dark" on <html> overrides either way. */

:root {
  color-scheme: light dark;

  /* Color: cool paper, deep blue ink, pool-tile teal, one lemon for the main action. */
  --paper: #f3f7f7;
  --surface: #ffffff;
  --sunk: #e6eef0;
  --ink: #11283a;
  --ink-2: #475b69;
  --line: #cfdce1;
  --tap: #0b6e7a;
  --tap-soft: #d6eef0;
  --lemon: #f5cf4a;
  --lemon-ink: #11283a;
  --lemon-edge: #d9b02a;
  --bubble-me: #11283a;
  --bubble-me-ink: #ffffff;
  --bezel: #11283a;
  --focus: #0b6e7a;
  --warn-bg: #fff4cc;
  --warn-ink: #5c4500;

  /* Type: rounded display (SF Pro Rounded on Apple devices, Segoe UI Variable on Windows), system body. */
  --font-display: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.4rem + 2vw, 2.625rem);
  --step-4: clamp(2.375rem, 1.6rem + 3.6vw, 4rem);

  /* Space and shape */
  --gutter: 1rem;
  --wrap: 72rem;
  --measure: 66ch;
  --radius-s: 0.5rem;
  --radius-m: 1rem;
  --radius-pill: 999px;
  --section: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1a24;
    --surface: #12293a;
    --sunk: #0f2230;
    --ink: #e7eff1;
    --ink-2: #a3b4be;
    --line: #26404f;
    --tap: #6bcfd9;
    --tap-soft: #143a45;
    --bubble-me: #e7eff1;
    --bubble-me-ink: #0c1a24;
    --bezel: #04090d;
    --focus: #6bcfd9;
    --warn-bg: #3a3010;
    --warn-ink: #f5e3a3;
  }
}

:root[data-theme="dark"] {
  --paper: #0c1a24;
  --surface: #12293a;
  --sunk: #0f2230;
  --ink: #e7eff1;
  --ink-2: #a3b4be;
  --line: #26404f;
  --tap: #6bcfd9;
  --tap-soft: #143a45;
  --bubble-me: #e7eff1;
  --bubble-me-ink: #0c1a24;
  --bezel: #04090d;
  --focus: #6bcfd9;
  --warn-bg: #3a3010;
  --warn-ink: #f5e3a3;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-wrap: break-word;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--tap); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }
small, .fine { font-size: var(--step--1); color: var(--ink-2); }

.skip {
  position: absolute; left: 0.5rem; top: -4rem;
  background: var(--surface); color: var(--ink); padding: 0.5rem 0.75rem;
  border-radius: var(--radius-s); z-index: 10;
}
.skip:focus { top: 0.5rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 36rem; }
.section { padding-block: var(--section); }
.section-sunk { background: var(--sunk); }
.section-head { max-width: 40rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.875rem; padding: 0.625rem 1.25rem;
  border-radius: var(--radius-pill);
  font: 700 1rem/1.2 var(--font-display);
  text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn-main { background: var(--lemon); color: var(--lemon-ink); border-color: var(--lemon-edge); }
.btn-main:hover { background: #ffd95c; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink-2); }
.btn-small { min-height: 2.5rem; padding: 0.4rem 1rem; font-size: 0.9375rem; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.logo {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 800 1.375rem/1 var(--font-display); letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.logo-mark { width: 1.75rem; height: 1.75rem; flex: none; }
.nav { display: flex; gap: 0.25rem; margin-left: auto; }
.nav a {
  color: var(--ink); text-decoration: none; padding: 0.5rem 0.7rem; border-radius: var(--radius-s);
  font-weight: 550;
}
.nav a:hover { background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--tap); }
.head-actions { display: flex; gap: 0.5rem; align-items: center; }
.head-actions .login { color: var(--ink); font-weight: 600; text-decoration: none; padding: 0.5rem 0.6rem; }
.menu { display: none; position: relative; margin-left: auto; }
.menu summary {
  list-style: none; cursor: pointer; padding: 0.5rem 0.85rem; border: 2px solid var(--line);
  border-radius: var(--radius-pill); font-weight: 700; font-family: var(--font-display);
}
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 20;
  width: min(17rem, calc(100vw - 2rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 0.5rem; display: grid; gap: 0.125rem;
}
.menu-panel a { color: var(--ink); text-decoration: none; padding: 0.65rem 0.75rem; border-radius: var(--radius-s); font-weight: 600; }
.menu-panel a:hover { background: var(--sunk); }
.menu-panel .btn { margin-top: 0.4rem; }

@media (max-width: 56rem) {
  .nav, .head-actions { display: none; }
  .menu { display: block; }
}

/* Hero */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--section); }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 72rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 3.5rem; }
}
.hero h1 { max-width: 13ch; }
.hero .lede { margin-bottom: 1.75rem; }

/* The prompt box: a chat composer you can use before signing up. */
.composer {
  background: var(--surface); border: 2px solid var(--ink); border-radius: 1.25rem;
  padding: 0.75rem; max-width: 36rem;
}
.composer label { display: block; font-weight: 700; font-family: var(--font-display); padding: 0.25rem 0.375rem 0.5rem; }
.composer textarea {
  display: block; width: 100%; min-height: 5.5rem; resize: vertical;
  border: 0; background: transparent; color: var(--ink);
  font: inherit; line-height: 1.45; padding: 0.375rem;
  border-radius: var(--radius-s);
}
.composer textarea::placeholder { color: var(--ink-2); }
.composer textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.composer-foot { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; padding: 0.5rem 0.25rem 0.125rem; }
.composer-foot .fine { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; max-width: 36rem; }
.chips-label { font-size: var(--step--1); color: var(--ink-2); margin: 1.25rem 0 0; }
.chip {
  font: 600 0.9375rem/1.2 var(--font-body); color: var(--ink);
  background: var(--tap-soft); border: 1px solid transparent; border-radius: var(--radius-pill);
  padding: 0.55rem 0.9rem; cursor: pointer; min-height: 2.5rem;
}
.chip:hover { border-color: var(--tap); }
.chip[aria-pressed="true"] { border-color: var(--tap); background: var(--surface); }

/* Phone frame and the chat beside it */
.stage { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 1rem; position: relative; }
.phone {
  position: relative; width: min(19rem, 78vw); aspect-ratio: 600 / 1304;
  border: 0.6rem solid var(--bezel); border-radius: 3rem; background: #f2f2f7;
  overflow: hidden; margin: 0;
}
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; }
.phone-small { width: 100%; max-width: 14rem; border-width: 0.45rem; border-radius: 2.2rem; }
.video-toggle {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 2;
  font: 700 0.8125rem/1 var(--font-body); color: #fff; background: rgba(17, 40, 58, 0.82);
  border: 0; border-radius: var(--radius-pill); padding: 0.55rem 0.8rem; cursor: pointer;
}
.bubbles { display: grid; gap: 0.5rem; width: min(22rem, 100%); }
.bubble {
  margin: 0; padding: 0.65rem 0.9rem; border-radius: 1.1rem; max-width: 92%;
  font-size: 0.9375rem; line-height: 1.4;
}
.bubble-me { background: var(--bubble-me); color: var(--bubble-me-ink); justify-self: end; border-bottom-right-radius: 0.3rem; }
.bubble-them { background: var(--surface); border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: 0.3rem; }
.bubble-who { display: block; font-size: 0.75rem; font-weight: 700; opacity: 0.75; margin-bottom: 0.15rem; }
.stage figcaption { font-size: var(--step--1); color: var(--ink-2); text-align: center; max-width: 22rem; }
@media (min-width: 48rem) {
  /* The chat beside the phone, as in the app. */
  .stage { grid-template-columns: 13.5rem auto; column-gap: 1.25rem; justify-content: center; align-items: start; }
  .bubbles { width: auto; margin-top: 2.5rem; }
  .bubbles .bubble { max-width: 100%; }
  .stage .bubble-them { margin-top: 9rem; }
  .phone { width: 17.5rem; }
  .stage figcaption { grid-column: 1 / -1; justify-self: center; }
}

/* "You don't need a Mac" */
.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.callout {
  border-left: 4px solid var(--lemon-edge); background: var(--surface);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius-m) var(--radius-m) 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Steps: a real sequence, so numbered. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; } }
@media (min-width: 70rem) { .steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { counter-increment: step; position: relative; padding-top: 3.75rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: 50%; border: 2px solid var(--ink);
  font: 800 1.25rem/1 var(--font-display);
}
.steps p { color: var(--ink-2); margin: 0; }
.tag {
  display: inline-block; font: 700 0.75rem/1 var(--font-body); padding: 0.3rem 0.55rem;
  border-radius: var(--radius-pill); background: var(--warn-bg); color: var(--warn-ink);
  vertical-align: middle; margin-left: 0.35rem; letter-spacing: 0;
}

/* The usual way vs. Tapwah */
.compare { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .compare { grid-template-columns: 1.2fr 1fr; gap: 2rem; } }
.compare-col { border-radius: var(--radius-m); padding: 1.5rem; }
.compare-usual { border: 1px dashed var(--ink-2); }
.compare-tapwah { background: var(--surface); border: 2px solid var(--ink); }
.compare h3 { margin-bottom: 1rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.checklist li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.6rem; align-items: start; }
.checklist li::before {
  content: ""; width: 1.125rem; height: 1.125rem; margin-top: 0.22rem;
  border: 2px solid var(--ink-2); border-radius: 0.3rem;
}
.compare-tapwah .checklist li::before {
  border-color: var(--tap); background: var(--tap);
  -webkit-mask: none; border-radius: 50%;
}
.checklist .fine { display: block; }
.compare-note { margin-top: 1.5rem; max-width: 52rem; }

/* Showcase */
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.app { display: grid; gap: 0.85rem; justify-items: start; }
.app h2, .app h3 { margin: 0.25rem 0 0; font-size: var(--step-1); line-height: 1.2; }
.app blockquote { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.app blockquote::before { content: "Prompt: "; font-weight: 700; color: var(--ink); }

/* Pricing */
.plans { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { border-radius: var(--radius-m); padding: 1.75rem; background: var(--surface); border: 2px solid var(--ink); display: grid; gap: 0.75rem; align-content: start; }
.plan-later { border: 1px dashed var(--ink-2); background: transparent; }
.plan h2, .plan h3 { font-size: var(--step-2); margin: 0; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.plan-later .price { font-size: var(--step-1); line-height: 1.2; padding-block: 0.6rem; }
.price { font: 800 var(--step-3)/1 var(--font-display); margin: 0; }
.price span { font: 600 1rem/1.4 var(--font-body); color: var(--ink-2); }
.plan ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.plan .btn { justify-self: start; margin-top: 0.5rem; }

/* FAQ */
.faq { max-width: 48rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1.1rem 2.25rem 1.1rem 0; position: relative;
  font: 700 var(--step-1)/1.3 var(--font-display); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.95rem;
  font: 400 1.6rem/1 var(--font-body); color: var(--ink-2);
}
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 1.25rem; color: var(--ink-2); max-width: var(--measure); }
.faq .answer p:last-child { margin-bottom: 0; }

/* End-of-page call to action */
.cta-band { background: var(--ink); color: var(--paper); border-radius: 1.5rem; padding: clamp(2rem, 1rem + 4vw, 3.5rem); display: grid; gap: 1.25rem; justify-items: start; }
.cta-band h2 { margin: 0; max-width: 20ch; }
.cta-band p { margin: 0; color: var(--paper); opacity: 0.85; max-width: 40rem; }
.cta-band a:not(.btn) { color: var(--paper); }

/* Long-form text: legal pages, the blog, about */
.page-head { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem) 1.5rem; }
.page-head p { color: var(--ink-2); max-width: 40rem; font-size: var(--step-1); }
.prose { max-width: var(--measure); padding-bottom: var(--section); }
.prose h2 { font-size: var(--step-2); margin-top: 2.25em; }
.prose h3 { margin-top: 1.75em; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--font-display); }
.table-scroll { overflow-x: auto; }
.prose .callout { margin: 1.5rem 0; }
.meta { color: var(--ink-2); font-size: var(--step--1); }
.takeaways { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-m); padding: 1.25rem 1.5rem; margin: 1.5rem 0 2rem; }
.takeaways h2 { font-size: var(--step-1); margin: 0 0 0.5rem; }
.takeaways ul { margin: 0; }
.sources { font-size: 0.9375rem; }
.sources li { margin-bottom: 0.6em; }

.draft-note {
  background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius-m);
  padding: 0.9rem 1.1rem; margin-bottom: 2rem; font-weight: 600;
}
.draft-note p { margin: 0; }

.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem; max-width: 46rem; padding-bottom: var(--section); }
.posts h2 { font-size: var(--step-2); margin-bottom: 0.35rem; }
.posts h2 a { color: var(--ink); text-decoration: none; }
.posts h2 a:hover { text-decoration: underline; }
.posts p { color: var(--ink-2); margin: 0 0 0.35rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; margin-top: var(--section); }
.site-foot .wrap { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .site-foot .wrap { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.site-foot h2 { font-size: 1rem; margin: 0 0 0.6rem; letter-spacing: 0; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-foot a { color: var(--ink); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot p { color: var(--ink-2); font-size: var(--step--1); max-width: 22rem; }
.cta-tail { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Three short points side by side */
.trio { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; } }
.trio p { color: var(--ink-2); margin: 0; }

/* Logo mark colors */
.lm-bg { fill: var(--ink); }
.lm-ring { stroke: var(--lemon); opacity: 0.6; }
.lm-dot { fill: var(--lemon); }

.prose figure { margin: 1.5rem 0; }
.article-shot { width: 100%; max-width: 15rem; height: auto; border: 0.45rem solid var(--bezel); border-radius: 2.2rem; }
.cite { font-size: 0.8em; text-decoration: none; margin-left: 0.1em; white-space: nowrap; }
.prose caption { caption-side: bottom; text-align: left; padding-top: 0.5rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
