/* ==========================================================================
   Amplify AI — site stylesheet (v2 redesign)

   Structure and layout grammar follow the modular hairline-grid pattern:
   a centred container, sections stacked as cells separated by horizontal
   rules, generous 100px vertical rhythm, and a contained painted panel as
   the hero with a full-bleed cinematic closer at the bottom.

   Colour, type and voice stay Amplify's: the cream ground, the copper
   accent, the dark-roast browns, and Georgia for display.
   ========================================================================== */

:root {
  /* ---- Brand palette (unchanged from the original site) ---- */
  --bg: #f5efe6;
  --bg-panel: #fff8f0;
  --bg-card: #ece5d9;
  --bg-card-hover: #e4dccf;
  --bg-dark: #3d2b1f;
  --bg-deep: #241811;

  --text: #2c1810;
  --text-secondary: #7a6555;
  --text-muted: #a8977f;

  --accent: #c47a3a;
  --accent-light: #e8a060;
  --accent-bg: rgba(196, 122, 58, 0.08);
  --accent-border: rgba(196, 122, 58, 0.28);

  /* ---- Grid rules. The hairline is the backbone of the layout: it must
          read clearly on cream without turning into a hard black line. ---- */
  --rule: #e3d9ca;
  --rule-strong: #d8ccb8;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-mono: 'SF Mono', 'Fira Code', ui-monospace, 'Courier New', monospace;

  --container: 1200px;
  --gutter: 48px;
  --section-y: 100px;

  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Skip link — keyboard users land here first. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

/* The signature module: a centred column. Sections stack inside it and the
   horizontal rules between them carry the grid; there are deliberately no
   vertical edge rules — they read as stray lines on narrow devices. */
.shell {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  background: transparent;
}

.shell--panel { background: var(--bg-panel); }
.shell--flush { padding-inline: 0; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: 64px; }
.section + .section,
.band + .section,
.section + .band { border-top: 1px solid var(--rule); }

.stack { display: flex; flex-direction: column; gap: 48px; }

/* ==========================================================================
   Type scale
   ========================================================================== */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.06;
  margin: 0;
  font-size: clamp(38px, 5.4vw, 68px);
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  font-size: clamp(30px, 3.6vw, 46px);
}

.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
  font-size: clamp(21px, 2vw, 26px);
}

/* Two-tone statement: the claim lands in full contrast, the elaboration
   recedes. One block of text carrying two levels of emphasis. */
.statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.1vw, 40px);
  line-height: 1.24;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--text-muted);
  max-width: 22ch;
}
.statement strong { color: var(--text); font-weight: 700; }
.statement--wide { max-width: 30ch; }

.lede {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
  max-width: 62ch;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--bg-dark);
  color: #fff8f0;
  border-color: var(--bg-dark);
}
.btn--primary:hover { background: var(--text); transform: translateY(-1px); }

.btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--accent:hover { background: #b06d33; transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.55); border-color: var(--text-muted); }

.btn--onDark {
  background: #fff8f0;
  color: var(--text);
  border-color: #fff8f0;
}
.btn--onDark:hover { background: #fff; transform: translateY(-1px); }

.btn--quietDark {
  background: rgba(255, 248, 240, 0.08);
  color: #f0e4d6;
  border-color: rgba(255, 248, 240, 0.22);
}
.btn--quietDark:hover { background: rgba(255, 248, 240, 0.16); }

.btn--lg { padding: 14px 24px; font-size: 15px; }

/* Pill badge used above the two cinematic headlines. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(255, 248, 240, 0.1);
  border: 1px solid rgba(255, 248, 240, 0.2);
  color: #f0e4d6;
  backdrop-filter: blur(6px);
}
.pill--light {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
}
.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(232, 160, 96, 0.25);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 239, 230, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.nav__mark { width: 26px; height: 26px; }
.nav__word {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Tab bar: the same Home / Docs / Pricing / Updates set the site has always
   had, styled as the original segmented pills. */
.nav__tabs { display: flex; align-items: center; gap: 4px; }
.nav__tab {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}
.nav__tab:hover { color: var(--text); background: rgba(60, 43, 31, 0.04); }
.nav__tab[aria-current='page'] { color: var(--text); background: rgba(60, 43, 31, 0.06); }

[hidden] { display: none !important; }

.nav__actions { display: flex; align-items: center; gap: 10px; }

.nav__toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav__mobile {
  display: none;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  padding: 10px var(--gutter) 18px;
}
.nav__mobile[data-open='true'] { display: block; }
.nav__mobile a {
  display: block;
  padding: 11px 2px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--rule);
}
.nav__mobile a:last-of-type { border-bottom: 0; }

/* ==========================================================================
   Hero — a contained painted panel, not a full-bleed band
   The painting is framed with rounded corners and inset from the viewport at
   every width above mobile, then goes edge-to-edge on phones where the inset
   would only cost readable width. width:calc() carries the inset below the
   1200px container, where max-width alone leaves margin:auto at zero.
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: var(--container);
  width: calc(100% - 32px);
  margin: 14px auto 0;
  border-radius: 18px;
  background: var(--bg-deep);
}

/* The painting sits behind a dark warm wash so the headline stays legible
   and the sunset reads a notch dimmer than the source, as briefed. */
.hero__art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 12, 8, 0.5) 0%, rgba(20, 12, 8, 0.32) 40%, rgba(20, 12, 8, 0.4) 70%, rgba(20, 12, 8, 0.82) 100%),
    url('../img/hero-cosmos-v2.jpg') center / cover no-repeat,
    var(--bg-deep);
}

.hero__inner {
  position: relative;
  margin-inline: auto;
  padding: 44px var(--gutter) 40px;
  text-align: center;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.024em;
  color: #fdf6ee;
  margin: 14px auto 0;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, #e8a060 0%, #f4c79a 46%, #e8a060 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__sub {
  margin: 10px auto 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(253, 246, 238, 0.74);
}

.hero__actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 0.5 alpha measured ~4.0:1 median against the hero photo — under the 4.5:1
   AA floor that applies below 18.66px. Matched to .hero__sub's alpha, which
   clears it across the whole band. */
.hero__note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: rgba(253, 246, 238, 0.72);
}

/* The floating product card sits half in the hero, half over the fold —
   the same trick the reference uses to pull the eye downward. */
.hero__stage { margin: 24px auto 0; max-width: 760px; transform: translateY(1px); }

/* ==========================================================================
   Product mock — a faithful, static rendering of the in-page widget
   ========================================================================== */

.mock {
  background: #1f1c1a;
  border: 1px solid rgba(255, 248, 240, 0.14);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -2px 60px rgba(0, 0, 0, 0.45), 0 24px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-align: left;
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: #2a2523;
  border-bottom: 1px solid rgba(255, 248, 240, 0.09);
}
.mock__dot { width: 10px; height: 10px; border-radius: 50%; }
.mock__label {
  margin-left: 6px;
  font-size: 12px;
  color: rgba(253, 246, 238, 0.45);
  font-weight: 500;
}

.mock__body { padding: 26px 22px 30px; }

.mock__prompt {
  background: #16130f;
  border: 1px solid rgba(255, 248, 240, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: rgba(253, 246, 238, 0.62);
  font-family: var(--font-mono);
}
.mock__caret {
  display: inline-block;
  width: 1.5px;
  height: 15px;
  background: var(--accent-light);
  vertical-align: -3px;
  margin-left: 2px;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* The widget card, matching the shipped extension styling. */
.widget {
  margin: 16px 0 0 auto;
  max-width: 330px;
  background: linear-gradient(145deg, #2d2d2d 0%, #252525 100%);
  border: 1px solid rgba(169, 104, 58, 0.3);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  padding: 16px;
  font-size: 12.5px;
}
.widget__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.widget__mark {
  width: 20px; height: 20px;
  border-radius: 5px;
  background: rgba(169, 104, 58, 0.12);
  border: 1px solid rgba(169, 104, 58, 0.25);
}
.widget__name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #cf9a6c;
}
.widget__msg { color: #a9a29b; line-height: 1.5; margin: 0 0 12px; }
.widget__msg b { color: #e8e4df; font-weight: 600; }

.widget__scores {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 12px;
}
.widget__score { flex: 1; text-align: center; }
.widget__score span {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #6f6862;
  font-weight: 600;
  margin-bottom: 3px;
}
.widget__score b { font-family: var(--font-display); font-size: 21px; }
.widget__score--now b { color: #8f8a84; }
.widget__score--next b { color: #f4ede5; }
.widget__arrow { color: #6f6862; }

.widget__cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #b5744a 0%, #a9683a 100%);
  border: 1px solid #c08858;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   Compatibility band — the row of surfaces Amplify runs inside
   ========================================================================== */

.band { padding-block: 30px; }
.band__label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 18px;
}
.band__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 40px;
}
.band__item {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.7vw, 21px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  transition: color var(--transition);
}
.band__item:hover { color: var(--text-secondary); }

/* ==========================================================================
   Split module — copy on one side, a canvas on the other
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.split > * { min-width: 0; }
.split__copy { padding: var(--section-y) var(--gutter); }
.split__canvas {
  padding: var(--section-y) var(--gutter);
  border-left: 1px solid var(--rule);
  background:
    radial-gradient(circle at center, rgba(196, 122, 58, 0.16) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}
.split--flip .split__canvas { border-left: 0; border-right: 1px solid var(--rule); order: -1; }

/* Numbered step list with hairline separators. */
.steps { margin: 34px 0 0; padding: 0; list-style: none; }
.steps li {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps__num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.steps__title { font-weight: 650; font-size: 15.5px; margin: 0 0 3px; }
.steps__body { margin: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.55; }

/* ==========================================================================
   Technique cells — a bordered grid, no drop shadows
   ========================================================================== */

.cells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.cell {
  padding: 28px 26px 30px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: transparent;
  transition: background var(--transition);
}
.cell:hover { background: var(--bg-panel); }
.cell__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  margin-bottom: 14px;
}
.cell__title { font-size: 15.5px; font-weight: 650; margin: 0 0 7px; }
.cell__body { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.cell__example {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border-left: 2px solid var(--accent-border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ==========================================================================
   Before / after comparison
   ========================================================================== */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); }
.compare__col { padding: 26px; }
.compare__col + .compare__col { border-left: 1px solid var(--rule); background: var(--bg-panel); }
.compare__tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 5px;
  margin-bottom: 14px;
}
.compare__tag--before { background: var(--bg-card); color: var(--text-muted); }
.compare__tag--after { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-border); }
.compare__text {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.compare__text b { color: var(--text); font-weight: 600; }

/* ==========================================================================
   Plans
   ========================================================================== */

.plans { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); }
.plan { padding: 32px 30px; }
.plan + .plan { border-left: 1px solid var(--rule); background: var(--bg-panel); }
.plan__name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.plan__price { display: flex; align-items: baseline; gap: 5px; margin-bottom: 4px; }
.plan__price b { font-family: var(--font-display); font-size: 42px; font-weight: 700; letter-spacing: -0.02em; }
.plan__price span { font-size: 14px; color: var(--text-secondary); }
.plan__alt { margin: 0 0 22px; font-size: 13px; color: var(--text-muted); }
.plan__list { list-style: none; margin: 0 0 26px; padding: 0; }
.plan__list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid var(--rule);
}
.plan__list li:last-child { border-bottom: 0; }
.plan__check { color: var(--accent); flex-shrink: 0; font-weight: 700; }

/* ==========================================================================
   Closing cinematic bookend
   ========================================================================== */

.closer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-deep);
  border-top: 1px solid var(--rule);
  text-align: center;
}
.closer__art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 12, 8, 0.58) 0%, rgba(20, 12, 8, 0.4) 45%, rgba(20, 12, 8, 0.62) 100%),
    url('../img/closer-marble.jpg') center / cover no-repeat,
    var(--bg-deep);
}
.closer__inner {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  padding: 108px var(--gutter);
}
.closer__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fdf6ee;
  margin: 20px auto 0;
  max-width: 15ch;
}
.closer__sub {
  margin: 18px auto 30px;
  max-width: 46ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(253, 246, 238, 0.68);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { border-top: 1px solid var(--rule); }
.footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 64px var(--gutter) 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}
.footer__tagline { margin: 12px 0 18px; font-size: 14px; color: var(--text-secondary); max-width: 30ch; }
.footer__heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.footer__col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--accent); }
.footer__social {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--transition), border-color var(--transition);
}
.footer__social:hover { color: var(--accent); border-color: var(--accent-border); }
.footer__bottom {
  margin-top: 48px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Reveal-on-scroll. Defaults to visible so the content is never trapped
   behind JS that failed to run — the observer only adds motion.
   ========================================================================== */

[data-reveal] { opacity: 1; }
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  :root { --gutter: 28px; --section-y: 68px; }
  .split, .cells, .plans, .compare { grid-template-columns: 1fr; }
  .split__canvas { border-left: 0; border-top: 1px solid var(--rule); }
  .split--flip .split__canvas { border-right: 0; order: 0; border-top: 1px solid var(--rule); }
  .compare__col + .compare__col { border-left: 0; border-top: 1px solid var(--rule); }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--rule); }
  .cell { border-right: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; --section-y: 56px; }
  .nav__tabs { display: none; }
  .nav__toggle { display: inline-flex; }
  /* Sign in stays in the bar on every size; only the tabs fold away. */
  .nav__actions { gap: 6px; }
  .nav__actions .btn { padding: 9px 12px; font-size: 13px; }
  .hero { width: 100%; margin: 0; border-radius: 0; }
  .hero__inner { padding-top: 40px; }
  .hero__stage { margin-top: 22px; }
  .widget { margin-inline: auto; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { justify-content: flex-start; }
}

/* Below ~336px the logo + Sign in + Install + hamburger no longer fit, which
   clipped the hamburger and made the whole page scroll sideways. Hits 320px
   handsets, the 280px Fold cover screen, and 400% desktop zoom (WCAG 1.4.10).
   Install folds away here — the hero's "Add to Chrome" carries that action. */
@media (max-width: 360px) {
  .nav__actions .btn--primary { display: none; }
}

@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;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Technique deck — cards that stack over one another as you scroll
   Each card is sticky at the same offset, so the next one slides up and
   covers it. A small stagger keeps the edges of covered cards visible like
   a fanned deck; JS adds the scale-back on the covered ones.
   ========================================================================== */

.deck-wrap { padding-bottom: 14vh; }

.deck { display: flex; flex-direction: column; gap: 0; }

.deck__card {
  position: sticky;
  top: calc(64px + 28px + (var(--i, 0) * 10px));
  margin-bottom: 26vh;
  min-height: 300px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 36px;
  align-items: start;
  padding: 34px 38px;
  background: var(--bg-panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 -10px 34px rgba(60, 43, 31, 0.1), 0 18px 46px rgba(60, 43, 31, 0.1);
  transform-origin: 50% 0;
  transform: scale(calc(1 - var(--cover, 0) * 0.06));
  filter: brightness(calc(1 - var(--cover, 0) * 0.18));
  will-change: transform;
}
.deck__card:last-child { margin-bottom: 0; }

.deck__meta { min-width: 0; }
.deck__num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
}
.deck__title { font-family: var(--font-display); font-size: clamp(22px, 2.3vw, 30px); font-weight: 700; letter-spacing: -0.015em; margin: 12px 0 10px; line-height: 1.15; }
.deck__body { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-secondary); max-width: 36ch; }

.deck__example {
  align-self: stretch;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #2d2118 0%, #1f1610 100%);
  border: 1px solid rgba(255, 248, 240, 0.08);
  color: #e0d5c8;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  position: relative;
}
.deck__tag {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
}

/* ==========================================================================
   Compare slider — the drag-to-reveal before/after from the original site,
   recoloured to the copper palette (no red/green).
   ========================================================================== */

.cmp {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  box-shadow: 0 16px 48px rgba(60, 43, 31, 0.12);
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

/* After pane: in flow, sets the height */
.cmp__pane--after { position: relative; z-index: 1; width: 100%; }
.cmp__pane--after .cmp__inner {
  background: linear-gradient(135deg, #2d2118 0%, #1e1510 100%);
  color: #e4e4e7;
  padding: 30px 28px;
  min-height: 320px;
}

/* Before pane: overlaid, clipped by its width */
.cmp__pane--before {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 50%;
  z-index: 2;
  overflow: hidden;
}
.cmp__pane--before .cmp__inner {
  background: var(--bg-card);
  padding: 30px 28px;
  /* Pinned to the slider's full width so the text never reflows mid-drag */
  width: 820px;
  max-width: calc(100vw - (var(--gutter) * 2) - 2px);
  height: 100%;
}

.cmp__label {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 11px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.cmp__label--before { background: rgba(60, 43, 31, 0.07); color: var(--text-muted); }
.cmp__label--after { background: rgba(232, 160, 96, 0.14); color: var(--accent-light); border: 1px solid rgba(232, 160, 96, 0.22); }

.cmp__content { padding: 16px; border-radius: var(--radius); margin-bottom: 20px; min-height: 100px; }
.cmp__pane--before .cmp__content { background: rgba(60, 43, 31, 0.045); }
.cmp__pane--after .cmp__content { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); }

.cmp__content code { font-family: var(--font-mono); font-size: 13px; line-height: 1.62; white-space: pre-wrap; }
.cmp__pane--before .cmp__content code { color: var(--text-secondary); }
.cmp__pane--after .cmp__content code { color: #d6cdc2; }

.cmp__result-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cmp__pane--after .cmp__result-label { color: #8f867c; }
.cmp__track { height: 6px; background: rgba(60, 43, 31, 0.07); border-radius: 3px; margin-bottom: 8px; overflow: hidden; }
.cmp__pane--after .cmp__track { background: rgba(255, 255, 255, 0.07); }
.cmp__bar { height: 100%; border-radius: 3px; width: 0; transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1); }
.cmp__bar--before { background: var(--text-muted); }
.cmp__bar--after { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.cmp__score { font-size: 12px; font-weight: 600; }
.cmp__score--before { color: var(--text-muted); }
.cmp__score--after { color: var(--accent-light); }

.cmp__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: ew-resize;
  transform: translateX(-50%);
  outline: none;
}
.cmp__line { flex: 1; width: 2px; background: var(--accent); opacity: 0.85; }
.cmp__knob {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 2px 12px rgba(196, 122, 58, 0.45);
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cmp__handle:hover .cmp__knob,
.cmp__handle:focus-visible .cmp__knob,
.cmp__handle.is-dragging .cmp__knob {
  transform: scale(1.12);
  box-shadow: 0 4px 20px rgba(196, 122, 58, 0.55), 0 0 0 4px rgba(196, 122, 58, 0.18);
}

@media (max-width: 1000px) {
  .deck__card { grid-template-columns: 1fr; gap: 20px; padding: 26px 24px; min-height: 0; margin-bottom: 18vh; }
}
@media (max-width: 720px) {
  .cmp__pane--after .cmp__inner, .cmp__pane--before .cmp__inner { padding: 22px 18px; }
  .cmp__content code { font-size: 12px; }
  .cmp__knob { width: 34px; height: 34px; }
  .deck__card { top: calc(64px + 16px + (var(--i, 0) * 8px)); }
}
@media (prefers-reduced-motion: reduce) {
  .deck__card { position: relative; top: auto; margin-bottom: 20px; transform: none; filter: none; }
}

/* ==========================================================================
   Hero demo — the interactive Personalize & Amplify flow
   Reuses the widget styling so the demo matches the shipped extension.
   ========================================================================== */

.demo {
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 248, 240, 0.06);
}
.hero__stage { transform: none; }

.demo__hint {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(253, 246, 238, 0.55);
}

/* The composed prompt runs 650-820 characters. Left unbounded it grows the
   box by ~600px as it types and shoves the score reveal and the reset button
   clean off a phone screen — the visitor answers four questions and never
   sees the payoff. Cap it and let the box scroll internally instead, which
   is how a real chat composer behaves anyway. */
.mock__prompt {
  white-space: pre-wrap;
  max-height: 34vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.demo__widget { max-width: 340px; }
.demo__view[hidden] { display: none; }

/* The CTA is a real button now */
.widget__cta { cursor: pointer; font-family: inherit; transition: filter 0.15s, transform 0.15s; }
.widget__cta:hover { filter: brightness(1.07); transform: translateY(-1px); }
.widget__cta:active { transform: scale(0.98); }

.demo__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.demo__step {
  font-size: 11px;
  font-weight: 700;
  color: #9a948e;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}
.demo__progress { height: 3px; background: rgba(255, 255, 255, 0.07); border-radius: 2px; margin-bottom: 14px; overflow: hidden; }
.demo__progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #a9683a, #cf9a6c);
  border-radius: 2px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo__question { font-size: 13.5px; font-weight: 600; color: #e8e4df; margin: 0 0 10px; line-height: 1.4; }
.demo__options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.demo__opt {
  text-align: left;
  padding: 9px 12px;
  border-radius: 9px;
  background: linear-gradient(180deg, #3c3c3c 0%, #313131 100%);
  border: 1px solid #4e4e4e;
  color: #e4e4e7;
  font: 500 11.5px/1.35 var(--font);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.demo__opt:hover { background: linear-gradient(180deg, #474747 0%, #3a3a3a 100%); border-color: #626262; transform: translateY(-1px); }
.demo__opt.is-selected {
  background: linear-gradient(180deg, #4a4a4a 0%, #383838 100%);
  border-color: #a9683a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(169, 104, 58, 0.35);
}

.demo__back,
.demo__again {
  margin-top: 12px;
  background: linear-gradient(180deg, #3c3c3c 0%, #313131 100%);
  border: 1px solid #4e4e4e;
  border-radius: 8px;
  color: #d0d0d0;
  font: 600 11.5px var(--font);
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.demo__again { display: block; width: 100%; padding: 9px; }
.demo__back:hover,
.demo__again:hover { color: #fff; border-color: #626262; background: linear-gradient(180deg, #474747 0%, #3a3a3a 100%); }

.demo__generating { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px; }
.demo__dots { display: flex; gap: 6px; }
.demo__dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #cf9a6c;
  animation: demo-bounce 1.4s ease-in-out infinite;
}
.demo__dots span:nth-child(2) { animation-delay: 0.16s; }
.demo__dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes demo-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
  40% { transform: scale(1); opacity: 1; }
}
.demo__gen-text { font-size: 12.5px; color: #a9a29b; margin: 0; font-weight: 500; }

@media (max-width: 720px) {
  .demo__hint { display: none; }
  .demo__widget { margin-inline: auto; }
}
