/* Prompter — marketing site styles (Phase 10 V3A).
   Builds on the shared design tokens in styles.css (colors, type, button
   styles, focus-ring, reduced-motion override) — this file only adds
   marketing-page-specific layout: nav, hero, and the interactive demo.
   styles.css itself is never modified, so the workspace at /app.html is
   completely unaffected by anything in this file. */

:root {
  /* Use-case category accents — additive, marketing-only tokens (--uc-
     prefix keeps them clearly distinct from styles.css's shared --accent
     family). Each is a small, functional category-coding device: it
     appears only on its own use-case card's icon and top border, nowhere
     else on the page, so the page stays a restrained violet-first
     palette rather than acquiring a rainbow aesthetic. */
  --uc-business: #a78bfa;
  --uc-learning: #7dd3c0;
  --uc-writing: #8b9eff;
  --uc-coding: #f0b86e;
  --uc-research: #e89edb;
  --uc-creative: #8bc9ff;
}

body.marketing {
  overflow-x: hidden;
}

/* marketing.css is only ever linked from the marketing page itself, so
   scoping scroll-behavior to html here cannot affect /app.html. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

#demo,
#use-cases,
#how-it-works {
  scroll-margin-top: 84px;
}

/* styles.css's .btn classes were designed for <button> elements, which
   have no default underline; the marketing page uses them on <a> tags
   (nav CTA, hero CTA) too, which need the browser's default link
   underline explicitly removed. Scoped to anchors only, and only within
   this file, so styles.css itself — and the workspace's own buttons,
   which are all real <button> elements — are completely unaffected. */
a.btn {
  text-decoration: none;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  transition: top 150ms var(--ease-out);
}
.skip-link:focus-visible {
  top: 16px;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 16, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-primary);
  text-decoration: none;
}
.wordmark .mark { flex-shrink: 0; }

.site-links {
  display: flex;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.site-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}
.site-links a:hover { color: var(--text-primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-cta { padding: 9px 18px; font-size: 14px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  width: 40px;
  height: 40px;
  padding: 0;
  position: relative;
}
.nav-toggle-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 1.5px;
  background: var(--text-primary);
  transform: translateY(-50%);
}
/* left/right here are 0, not 10px — they're relative to .nav-toggle-bar's
   own (already inset) box, not the button. Using the same 10px/10px as
   the parent would compound the inset on top of itself, leaving a
   zero-width, invisible bar — exactly the bug this replaces. */
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--text-primary);
}
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }

.mobile-nav {
  display: none;
}
.mobile-nav.open {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-0);
}
.mobile-nav a {
  padding: 14px 4px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a.btn {
  margin-top: 12px;
  border-bottom: none;
  text-align: center;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 96px 24px 72px;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero-headline {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-subhead {
  margin: 0 0 36px;
  color: var(--text-muted);
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.6;
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.btn-large { padding: 15px 28px; font-size: 16px; }
.hero-secondary-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.hero-secondary-link:hover { color: var(--text-primary); border-color: var(--border-strong); }

/* ---------- Hero visual: the one static before/after card ---------- */

.hero-visual { display: flex; justify-content: center; }
.transform-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.65);
}
.transform-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.transform-idea {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-input);
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  min-height: 1.5em;
}
.transform-arrow {
  display: flex;
  justify-content: center;
  color: var(--accent);
  margin: -8px 0 16px;
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
}
.transform-arrow.visible { opacity: 1; }
.transform-prompt {
  margin: 0;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font: 400 13px/1.7 var(--font-mono);
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 3em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.transform-prompt.visible { opacity: 1; transform: translateY(0); }
.transform-prompt mark.tag { background: var(--accent-soft); color: var(--text-primary); padding: 1px 4px; border-radius: 4px; }

/* ---------- Demo section ---------- */

.demo-section {
  position: relative;
  padding: 72px 24px 96px;
  border-top: 1px solid var(--border);
}
.demo-inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-heading {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.demo-disclaimer {
  margin: 0 auto 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.demo-widget {
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 8px;
}

.demo-tabs {
  display: flex;
  gap: 6px;
  padding: 8px;
}
.demo-tab {
  flex-shrink: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms var(--ease-out), color 150ms var(--ease-out);
}
.demo-tab[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.demo-tab:not([aria-selected="true"]):hover { background: var(--surface-2); color: var(--text-primary); }

.demo-panel {
  padding: 28px clamp(16px, 4vw, 32px) 32px;
  display: grid;
  gap: 22px;
}
.demo-panel.fading { opacity: 0; }
.demo-panel { opacity: 1; transition: opacity 180ms var(--ease-out); }

.demo-step-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.example-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 600;
  vertical-align: middle;
}

/* Deliberate weight progression across the three steps — lightest (the
   raw idea, a quote) to heaviest (the prompt, the actual deliverable) —
   so the demo reads as a flow toward one destination rather than three
   equally-weighted boxes. Also meaningfully less boxed/filled overall
   than the original all-cards version, addressing "visual density". */
.demo-idea-text {
  margin: 0;
  padding: 2px 0 2px 16px;
  border-left: 2.5px solid var(--border-strong);
  font-size: 15.5px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
}
.demo-questions {
  display: flex;
  flex-direction: column;
}
.demo-question-row {
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.demo-question-row:last-child { border-bottom: none; }
.demo-question-row .q { color: var(--text-muted); margin: 0 0 4px; }
.demo-question-row .a { color: var(--text-primary); margin: 0; }
.demo-prompt {
  margin: 0;
  padding: 18px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  font: 400 13.5px/1.75 var(--font-mono);
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.demo-prompt mark.tag { background: var(--accent-soft); color: var(--text-primary); padding: 1px 4px; border-radius: 4px; }
.demo-prompt mark.fill { background: transparent; color: var(--text-primary); outline: 1.5px dashed var(--accent); outline-offset: 1px; border-radius: 3px; }

.demo-cta {
  margin: 32px 0 0;
  text-align: center;
}
.demo-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.demo-cta a:hover { text-decoration: underline; }

/* ---------- Use cases ---------- */

.usecases-section {
  position: relative;
  padding: 80px 24px 96px;
  border-top: 1px solid var(--border);
}
.usecases-inner {
  max-width: 1160px;
  margin: 0 auto;
  text-align: center;
}
.usecases-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  text-align: left;
}
.usecase-card {
  padding: 24px 22px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-top: 2.5px solid var(--card-accent, var(--accent));
  border-radius: var(--radius-card);
}
.usecase-icon { color: var(--card-accent, var(--accent)); margin-bottom: 16px; }
.usecase-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.usecase-copy {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
}
.usecase-example {
  margin: 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.5;
  font-style: italic;
}

/* ---------- How it works ---------- */

.howitworks-section {
  padding: 80px 24px 96px;
  border-top: 1px solid var(--border);
}
.howitworks-inner {
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}
.steps-rail {
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  text-align: left;
  position: relative;
}
.steps-rail::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--border);
}
.step { position: relative; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--surface-1);
  border: 1.5px solid var(--border-strong);
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent);
  position: relative;
  z-index: 1;
}
.step h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}
.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}
.howitworks-footnote {
  margin: 48px auto 0;
  max-width: 54ch;
  color: var(--text-muted);
  font-size: 14.5px;
}

/* ---------- Final CTA ---------- */

.final-cta-section {
  padding: 96px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.final-cta-inner { max-width: 680px; margin: 0 auto; }
/* A bordered, surfaced panel — the same component language as
   .transform-card/.demo-widget elsewhere on the page — rather than bare
   text floating on the page background, so the section reads as a
   composed destination rather than an isolated heading+button. No new
   gradient or glow: typography, spacing, and the existing card surface
   only. */
.final-cta-panel {
  padding: 56px clamp(24px, 6vw, 64px);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.final-cta-heading {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.final-cta-note {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 24px 28px;
}
.site-footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-brand .wordmark { margin-bottom: 10px; }
.footer-tagline { margin: 0; color: var(--text-muted); font-size: 14px; max-width: 32ch; }
.footer-nav { display: flex; gap: 64px; }
.footer-col h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-col a {
  display: block;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  max-width: 1160px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 64px; }
  .hero-headline { text-align: left; }
}

@media (max-width: 1023px) {
  .hero-visual { order: 2; margin-top: 8px; }
  .hero-copy { order: 1; }
}

@media (max-width: 860px) {
  .site-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .usecases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .hero { padding: 56px 20px 48px; }
  .demo-section { padding: 56px 16px 64px; }
  .demo-panel { padding: 24px 16px 28px; }
  .transform-card { padding: 20px; }
  .usecases-section { padding: 64px 20px 72px; }
  .usecases-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .howitworks-section { padding: 64px 20px 72px; }
  .steps-rail { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps-rail::before { display: none; }
  .final-cta-section { padding: 72px 20px; }
  .final-cta-panel { padding: 40px 22px; }
  .site-footer-inner { flex-direction: column; gap: 32px; }
  .footer-nav { gap: 40px; }
}

/* At 320–480px, three pill tabs side by side either wrap awkwardly (one
   alone on a second line) or need horizontal scroll (hides content) —
   both explicitly avoided here. A full-width vertical stack keeps every
   example permanently visible with no scroll and no uneven wrapping. */
@media (max-width: 480px) {
  .demo-tabs { flex-direction: column; }
  .demo-tab { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .transform-arrow,
  .transform-prompt {
    opacity: 1 !important;
    transform: none !important;
  }
}
