/* ==========================================================================
   heronspeech.com — product-first landing page
   The site chrome stays quiet; the actual app windows carry the page.
   ========================================================================== */

:root {
  --site-bg: #e9eef3;
  --site-panel: #f7f9fb;
  --site-white: #ffffff;
  --ink: #15181d;
  --muted: #56606c;
  --faint: #8b94a0;
  --line: #d5dce4;
  --line-strong: #c3ccd7;
  --accent: #1479b8;
  --accent-bright: #62bbf3;
  --accent-soft: #e3f0f9;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI",
    "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--site-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  appearance: none;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, blockquote { margin: 0; }

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

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 40;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  transition: top 0.25s;
}

.skip:focus { top: 14px; }

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* ------------------------------- header ---------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--site-bg);
}

.site-head .wrap {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.site-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(10, 20, 30, 0.18);
}

.site-brand b {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
}

.site-nav a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.site-platform {
  flex: none;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.head-download {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    color 0.3s var(--ease);
}

.head-download:hover,
.head-download:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
}

.head-download.is-disabled,
.head-download.is-disabled:hover,
.head-download.is-disabled:focus-visible {
  background: #aeb9c4;
  border-color: #aeb9c4;
  color: #f2f5f8;
  cursor: default;
}

/* ---------------------------- overlay hero ------------------------------- */

.overlay-hero {
  position: relative;
  min-height: calc(100vh - 66px);
  padding: 32px 0;
  display: flex;
  align-items: center;
}

.hero-tagline {
  margin: 0;
  max-width: 20em;
  color: var(--muted);
  font-size: clamp(17px, 2.1vw, 30px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.overlay-stage {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: 48px;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 52px;
  align-self: stretch;
  min-width: 0;
  padding: 0;
  min-height: 520px;
}

.hero-brand {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  color: var(--ink);
  font-family: "Bahnschrift", "Avenir Next", "Helvetica Neue", "Futura", "Segoe UI", sans-serif;
  font-size: 58px;
  font-weight: 800;
  font-stretch: 95%;
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  min-width: 0;
}

.hero-brand-name {
  display: block;
  white-space: nowrap;
}

.hero-brand img {
  width: 116px;
  height: 116px;
  border-radius: 29px;
  box-shadow: 0 4px 14px rgba(10, 20, 30, 0.16);
}

.hero-left-download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0;
}

.hero-left-download .site-btn {
  flex-shrink: 0;
  height: 66px;
  padding: 0 34px;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 18px;
  font-stretch: normal;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.doc-download-note {
  max-width: 230px;
  margin: 0;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 12.5px;
  font-stretch: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
}

.ambient-app {
  position: relative;
  height: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6dee7;
  border-radius: 12px;
  background: #f4f6f9;
  box-shadow: 0 22px 54px -34px rgba(24, 38, 52, 0.4);
  animation: window-in 0.95s var(--ease) 0.08s both;
}

.doc-window-bar {
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid #e3e8ee;
  background: #eef1f5;
}

.doc-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.doc-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d2d9e2;
}

.doc-filename {
  color: #8b94a0;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.doc-page {
  flex: 1;
  margin: 12px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid #e5e9ef;
  border-radius: 8px;
  background: var(--site-white);
  text-align: center;
}

.doc-title-hero {
  max-width: 11em;
  min-height: 2.2em;
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 4.4vw, 60px);
  font-weight: 640;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-align: center;
}

.title-line {
  display: block;
}

.title-line-accent {
  color: var(--accent);
}

#heroCaret1 {
  display: none;
}

.ambient-caret {
  display: inline-block;
  width: 2px;
  height: 0.82em;
  margin-left: 5px;
  vertical-align: -0.04em;
  background: var(--accent);
  animation: caret 1s steps(2, end) infinite;
}

.overlay-hero-demo {
  position: static;
  width: 100%;
  margin-top: 30px;
  transform: none;
}

.hero-download {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-download-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-download .site-btn {
  height: 44px;
  padding: 0 22px;
  font-size: 13px;
}

.hero-download .hero-note {
  margin-top: 0;
  white-space: nowrap;
}

/* -------------------------------- intro ---------------------------------- */

.hero {
  padding: 76px 0 54px;
  overflow: hidden;
}

.intro {
  padding-top: 64px;
  padding-bottom: 52px;
}

.hero-copy {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--accent-bright);
  border-radius: 50%;
}

.hero h1 {
  margin: 22px 0 22px;
  font-size: clamp(46px, 6.2vw, 74px);
  font-weight: 640;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero h1 span { display: block; }

.hero-lede {
  max-width: 610px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 30px;
}

.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.site-btn span {
  transition: transform 0.35s var(--ease);
}

.site-btn:hover,
.site-btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
}

.site-btn:hover span { transform: translateX(3px); }

.site-link {
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}

.site-link:hover,
.site-link:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.site-btn.light {
  background: #f3f6f9;
  border-color: #f3f6f9;
  color: var(--ink);
}

.site-btn.light:hover,
.site-btn.light:focus-visible {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: #0b2230;
}

.site-btn.is-disabled,
.site-btn.is-disabled:hover,
.site-btn.is-disabled:focus-visible {
  background: #aeb9c4;
  border-color: #aeb9c4;
  color: #f2f5f8;
  cursor: default;
}

.site-btn.is-disabled span[aria-hidden="true"] { display: none; }

.hero-note {
  margin-top: 14px;
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

/* ------------------------------- window ---------------------------------- */

.window-stage {
  margin-top: 0;
  padding: 26px;
  border: 1px solid #cfd8e2;
  border-radius: 20px;
  background: #dfe6ee;
  animation: window-in 0.95s var(--ease) 0.12s both;
}

@keyframes window-in {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.window-caption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

/* ------------------------------ sections --------------------------------- */

.section {
  padding: 92px 0;
  border-top: 1px solid var(--line);
}

.section-scenes { background: #f8fafc; }
.section-keywords { background: #ffffff; }
.section-revise { background: #f1f5f8; }

.section-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px 42px;
  align-items: start;
  margin-bottom: 46px;
}

.section-kicker {
  padding-top: 7px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-head h2 {
  max-width: 19em;
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 640;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.section-head .section-lede {
  grid-column: 2;
  max-width: 40em;
  margin-top: -18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}

/* ------------------------- scene explorer -------------------------------- */

.scene-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 48px;
  align-items: start;
  margin-top: 0;
}

.scene-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line-strong);
}

.scene-tab {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  width: 100%;
  padding: 20px 30px 20px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  color: var(--muted);
  transition: background 0.35s var(--ease), padding-left 0.35s var(--ease);
}

.scene-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease);
}

.scene-tab::after {
  content: "→";
  position: absolute;
  right: 0;
  top: 50%;
  color: var(--accent);
  font-size: 14px;
  opacity: 0;
  transform: translate(-4px, -50%);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.scene-tab .tab-no {
  padding-top: 2px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.scene-tab .tab-title {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.scene-tab .tab-desc {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.65;
}

.scene-tab:hover { background: rgba(255, 255, 255, 0.58); }
.scene-tab:hover::after { opacity: 0.55; transform: translate(0, -50%); }

.scene-tab.is-active {
  padding-left: 20px;
  background: var(--site-white);
}
.scene-tab.is-active::before { transform: scaleY(1); }
.scene-tab.is-active::after { opacity: 1; transform: translate(0, -50%); }
.scene-tab.is-active .tab-no { color: var(--accent); }
.scene-tab.is-active .tab-desc { color: var(--muted); }

.scene-note {
  margin-top: 22px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.85;
}

.scene-quote {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 2px solid var(--accent-bright);
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.8;
}

.scene-note b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
}

.scene-replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}

.scene-replay:hover,
.scene-replay:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.scene-stage {
  position: relative;
  min-height: 460px;
  padding: 24px 24px 0;
  border: 1px solid #cfd8e2;
  border-radius: 18px;
  background:
    linear-gradient(#e4eaf1 1px, transparent 1px) 0 0 / 100% 34px,
    #e8eef4;
  overflow: hidden;
}

.scene-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 30%);
  pointer-events: none;
}

.target-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 300px;
  padding: 24px 28px 76px;
  border: 1px solid #d6dee7;
  border-radius: 14px;
  background: var(--site-white);
  box-shadow: 0 18px 44px -28px rgba(24, 38, 52, 0.32);
  overflow: hidden;
}

.target-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf0f4;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.target-head b { color: var(--ink); font-weight: 600; letter-spacing: 0; font-size: 12px; }
.target-head .target-spacer { flex: 1; }

.target-body {
  padding-top: 20px;
  color: #252a31;
  font-size: 14px;
  line-height: 1.85;
}

.target-body .doc-title {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.target-body p { margin: 0 0 12px; }
.target-body ul { margin: 0 0 12px; padding-left: 18px; }
.target-body li { margin: 0 0 7px; }
.target-body li::marker { color: var(--accent); }
.target-body strong { font-weight: 650; }

.target-body .cursor {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: caret 1s steps(2, end) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.target-body .insert-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 11px;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-row { display: flex; }
.chat-row.out { justify-content: flex-end; }

.chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f1f4f7;
  color: #2b3037;
  font-size: 13.5px;
  line-height: 1.75;
}

.chat-row.out .chat-bubble {
  background: var(--accent-soft);
  color: #15384d;
}

.chat-row.out .chat-bubble.is-new {
  animation: bubble-in 0.55s var(--ease) both;
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.chat-meta {
  margin-top: 5px;
  color: var(--faint);
  font-size: 10px;
  text-align: right;
}

/* overlay positioning inside the stage */
.scene-stage .overlay-demo {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  width: calc(100% - 40px);
  transform: translateX(-50%);
}

.scene-stage .overlay-demo.is-hidden {
  opacity: 0;
  transform: translate(-50%, 8px);
}

/* ------------------------- keyword section ------------------------------- */

.keyword-layout,
.revise-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 48px;
  align-items: start;
}

.keyword-copy h3,
.revise-copy h3 {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.keyword-copy p,
.revise-copy p {
  max-width: 32em;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.keyword-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.keyword-step {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.keyword-step b { color: var(--ink); font-weight: 650; }

.keyword-stage,
.revise-stage {
  position: relative;
  min-height: 560px;
  padding: 28px;
  border: 1px solid #cfd8e2;
  border-radius: 18px;
  background: #e8eef4;
  overflow: hidden;
}

.keyword-stage::before,
.revise-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#e2e9f0 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, #e2e9f0 1px, transparent 1px) 0 0 / 34px 100%;
  opacity: 0.55;
  pointer-events: none;
}

.keyword-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 330px;
  padding: 24px 26px 90px;
  border: 1px solid #d6dee7;
  border-radius: 14px;
  background: var(--site-white);
  box-shadow: 0 18px 44px -30px rgba(24, 38, 52, 0.32);
}

.keyword-sheet .target-body { font-size: 14.5px; }

.keyword-sheet mark {
  background: var(--accent-soft);
  color: #15384d;
  border-radius: 3px;
  padding: 0 2px;
  box-shadow: inset 0 -1px 0 var(--accent-bright);
}

.keyword-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 0;
}

.keyword-doc {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  border: 1px solid #d6dee7;
  border-radius: 12px;
  background: #f4f6f9;
  box-shadow: 0 18px 44px -32px rgba(24, 38, 52, 0.32);
}

.keyword-doc-page {
  padding: 20px 24px 18px;
  background: var(--site-white);
  color: #252a31;
  font-size: 13.5px;
  line-height: 1.85;
}

.keyword-doc-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.keyword-doc mark {
  background: var(--accent-soft);
  color: #15384d;
  border-radius: 3px;
  padding: 0 2px;
  box-shadow: inset 0 -1px 0 var(--accent-bright);
}

.keyword-doc .insert-note {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.keyword-stage .term-demo {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  z-index: 4;
  width: 100%;
  max-width: 460px;
  transform: none;
  animation: term-in 0.7s var(--ease) 0.1s both;
}

@keyframes term-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.keyword-stage .overlay-demo {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 3;
  width: 100%;
  transform: none;
}

.keyword-stage .overlay-demo .draft-shell {
  width: min(464px, calc(100% - 10px));
}

.keyword-stage .overlay-demo .draft {
  background: rgba(24, 24, 26, 0.94);
}

/* --------------------------- revise section ------------------------------ */

.revise-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.revise-stage .revise-demo {
  position: relative;
  z-index: 2;
  animation: revise-in 0.7s var(--ease) 0.1s both;
}

@keyframes revise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.revise-demo-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  transform: translateX(-50%);
  color: var(--faint);
  font-size: 11.5px;
  white-space: nowrap;
}

.revise-demo-hint b { color: var(--accent); font-weight: 650; }

/* ----------------------------- closing ----------------------------------- */

.closing {
  padding: 96px 0;
  background: var(--ink);
  color: #f3f6f9;
}

.closing .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
}

.closing .eyebrow { color: #9aa6b3; }
.closing .eyebrow::before { background: var(--accent-bright); }

.closing h2 {
  margin-top: 18px;
  max-width: 16em;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 620;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.closing h2 em { font-style: normal; color: var(--accent-bright); }

.closing-side {
  max-width: 360px;
  padding-bottom: 4px;
}

.closing-side p {
  color: #aeb9c4;
  font-size: 12.5px;
  line-height: 1.8;
}

.closing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
}

.closing-actions .site-btn {
  white-space: nowrap;
}

.closing-link {
  color: #cbd6e1;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}

.closing-link:hover,
.closing-link:focus-visible {
  color: #fff;
  border-color: #fff;
}

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

.site-foot {
  padding: 26px 0;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #7d8895;
  font-size: 11px;
}

.site-foot .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-foot .foot-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7d1db;
}

.site-foot img { width: 20px; height: 20px; border-radius: 6px; }
.site-foot b { font-weight: 600; }

/* ------------------------------ reveal ----------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in { opacity: 1; transform: none; }

.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }

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

@media (max-width: 1180px) {
  .window-stage { padding: 20px; }
}

@media (max-width: 1000px) {
  .app-window { height: 720px; }
  .app-window .sidebar { width: 212px; }
  .app-window .main-inner { padding: 24px 24px 36px; }
  .app-window .search { width: 220px; }
  .app-window .history-text { font-size: 14.5px; }

  .scene-stage { min-height: 440px; padding: 20px 20px 0; }
  .target-sheet { padding: 22px 22px 78px; min-height: 280px; }
  .keyword-stage { min-height: 480px; padding: 20px; }
  .keyword-stage .term-demo { left: 50%; right: auto; top: 18px; }
  .revise-stage { min-height: 470px; padding: 18px; }
}

@media (max-width: 860px) {
  .site-head .wrap { height: 58px; gap: 18px; }
  .site-nav { display: none; }
  .site-platform { display: none; }
  .head-download { margin-left: auto; }

  .hero { padding: 54px 0 38px; }
  .hero h1 { font-size: clamp(40px, 8.5vw, 58px); }
  .hero-lede { font-size: 15px; }
  .hero-actions { flex-wrap: wrap; gap: 14px; }

  .window-stage { padding: 12px; border-radius: 16px; }
  .overlay-hero { min-height: calc(100vh - 58px); padding: 24px 0; }
  .overlay-stage { width: 100%; gap: 20px; grid-template-columns: 1fr; }
  .ambient-app { height: 360px; width: 100%; padding: 0; }
  .doc-window-bar { height: 34px; padding: 0 12px; }
  .doc-page { margin: 8px; padding: 20px 18px; }
  .hero-left { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; min-height: 0; padding: 0; }
  .hero-brand { font-size: 32px; gap: 12px; }
  .hero-brand img { width: 64px; height: 64px; border-radius: 16px; }
  .hero-brand-copy { gap: 16px; }
  .hero-left-download { align-items: flex-start; gap: 4px; }
  .hero-left-download .site-btn { height: 46px; padding: 0 17px; font-size: 14px; }
  .doc-download-note { display: none; }
  .doc-title-hero { font-size: clamp(34px, 6vw, 46px); }
  .overlay-hero-demo { width: 100%; margin-top: 16px; }
  .app-window { height: auto; min-height: 0; }
  .app-window .sidebar { display: none; }
  .app-window .titlebar { height: 44px; padding: 0 12px; gap: 10px; }
  .app-window .brand-mark { width: 24px; height: 24px; }
  .app-window .brand-name { font-size: 13px; }
  .app-window .main { overflow: visible; }
  .app-window .main-inner { padding: 20px 18px 24px; }
  .app-window .page-head { align-items: flex-start; }
  .app-window .page-head h1 { font-size: 22px; }
  .app-window .search { width: 190px; }
  .app-window .search input,
  .app-window .search-value { height: 34px; font-size: 12.5px; }
  .app-window .history-card { padding: 11px 12px 10px; }
  .app-window .history-text { font-size: 14px; }
  .app-window .card-actions { display: none; }
  .window-caption { font-size: 11.5px; }

  .section { padding: 64px 0; }
  .section-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 32px; }
  .section-kicker { padding-top: 0; }
  .section-head h2 { font-size: clamp(28px, 5.6vw, 38px); }
  .section-head .section-lede { grid-column: 1; margin-top: 0; }

  .scene-layout,
  .keyword-layout,
  .revise-layout { grid-template-columns: 1fr; gap: 32px; }

  .scene-tabs { border-top: 1px solid var(--line); }
  .scene-tab { padding: 16px 0 16px 14px; }
  .scene-tab:hover { background: transparent; }
  .scene-tab.is-active { padding-left: 14px; background: transparent; }
  .scene-tab.is-active::before { transform: scaleY(1); }

  .scene-stage { min-height: 420px; }
  .target-sheet { min-height: 270px; padding-bottom: 84px; }

  .keyword-stage { min-height: 460px; }
  .keyword-stage .term-demo { position: relative; top: auto; left: auto; right: auto; width: 100%; transform: none; }
  .keyword-stage .overlay-demo { position: relative; left: auto; bottom: auto; transform: none; width: 100%; margin-top: 18px; }
  .keyword-stage { display: flex; flex-direction: column; gap: 18px; }
  .keyword-sheet { min-height: 220px; padding-bottom: 32px; }

  .revise-stage { min-height: 0; padding: 18px 14px 44px; }
  .revise-demo-hint { bottom: 14px; }

  .closing { padding: 64px 0; }
  .closing .wrap { grid-template-columns: 1fr; gap: 28px; }
  .closing-side { max-width: none; min-width: 0; }

  .site-foot .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding-top: 42px; }
  .hero h1 { font-size: 40px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .site-btn { width: 100%; }
  .hero-keys { flex-wrap: wrap; font-size: 10.5px; }

  .window-stage { padding: 8px; }
  .overlay-hero { min-height: calc(100vh - 58px); padding: 18px 0; }
  .overlay-stage { width: 100%; gap: 18px; grid-template-columns: 1fr; }
  .ambient-app { height: 320px; width: 100%; padding: 0; border-radius: 10px; }
  .doc-window-bar { height: 30px; padding: 0 10px; gap: 8px; }
  .doc-dots i { width: 7px; height: 7px; }
  .doc-filename { font-size: 9.5px; }
  .doc-page { margin: 6px; padding: 16px 14px; }
  .hero-left { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; min-height: 0; padding: 0; }
  .hero-brand { font-size: 28px; gap: 10px; }
  .hero-brand img { width: 56px; height: 56px; border-radius: 14px; }
  .hero-brand-copy { gap: 14px; }
  .hero-left-download .site-btn { height: 41px; padding: 0 13px; font-size: 13px; }
  .doc-title-hero { font-size: 34px; }
  .overlay-hero-demo { width: 100%; margin-top: 12px; }
  .app-window .titlebar { padding: 0 10px; }
  .app-window .brand-name { font-size: 12.5px; }
  .app-window .main-inner { padding: 16px 12px 20px; }
  .app-window .page-head { flex-direction: column; gap: 12px; }
  .app-window .page-actions { width: 100%; }
  .app-window .search { width: 100%; }
  .app-window .history-text { font-size: 13px; line-height: 1.55; }
  .app-window .app-pill { font-size: 11.5px; }
  .app-window .card-meta { font-size: 10px; }
  .app-window .chips { display: none; }
  .app-window .history-card:nth-child(3) { display: none; }
  .window-caption { padding: 0 8px; line-height: 1.7; }

  .section { padding: 52px 0; }
  .section-head h2 { font-size: 28px; }

  .scene-stage { min-height: 380px; padding: 12px 12px 0; }
  .target-sheet { min-height: 250px; padding: 16px 16px 78px; }
  .target-body { font-size: 12.5px; }
  .target-body .doc-title { font-size: 15px; }
  .target-head { font-size: 9px; padding-bottom: 12px; }
  .target-head b { font-size: 11px; }

  .overlay-demo .draft-shell { width: calc(100% - 8px); }
  .overlay-demo .draft { max-height: 120px; padding: 7px 10px 8px; }
  .overlay-demo .draft-line { font-size: 11.5px; line-height: 19px; }
  /* The capsule keeps its own proportional scale (see app-ui.css `--bar-scale`);
     only the waveform-slot ratio is preserved, so no per-part overrides here. */
  .overlay-demo .bar { max-width: 100%; }

  .keyword-stage { min-height: 0; padding: 12px; }
  .term-demo { padding: 12px 13px; border-radius: 16px; }
  .term-demo .term-kind-hint { display: none; }
  .keyword-sheet { min-height: 180px; padding: 16px; }

  .revise-stage { padding: 12px 4px 40px; }
  .revise-demo { padding: 9px 10px 7px; border-radius: 16px; }
  .revise-demo .revise-text { font-size: 12.5px; min-height: 110px; }
  .revise-demo .revise-foot { flex-wrap: wrap; gap: 8px; }
  .revise-demo .revise-hint { flex-basis: 100%; order: 2; }
  .revise-demo .revise-actions { margin-left: auto; }
  .revise-demo .btn { height: 30px; padding: 0 11px; }
  .revise-demo .voice-icon-btn { width: 34px; }
  .revise-demo .revise-original { font-size: 10px; }

  .closing h2 { font-size: 30px; }
  .closing-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
