/* WriteProMax marketing site. Lato, indigo→violet brand gradient, light + dark. */

:root {
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #ffffff;
  --bg-soft: #f6f6fb;
  --surface: #ffffff;
  --border: #e4e4ee;
  --text: #15151d;
  --muted: #5c5c6f;
  --accent: #4f46e5;
  --accent-2: #8b5cf6;
  --accent-text: #4338ca;
  --accent-soft: #eef0ff;
  --selection: #c9d0ff;
  --ok: #22a45d;
  --toast-bg: #1f2328;
  --toast-text: #f6f8fa;
  --shadow-sm: 0 1px 2px rgba(21, 21, 29, 0.06);
  --shadow: 0 1px 2px rgba(21, 21, 29, 0.05), 0 12px 32px rgba(21, 21, 29, 0.08);
  --shadow-lg: 0 2px 6px rgba(21, 21, 29, 0.06), 0 30px 60px -12px rgba(49, 46, 129, 0.25);
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e14;
    --bg-soft: #12131b;
    --surface: #171823;
    --border: #262839;
    --text: #ececf4;
    --muted: #a3a4b8;
    --accent: #818cf8;
    --accent-2: #b794f6;
    --accent-text: #a5b4fc;
    --accent-soft: #1d1f35;
    --selection: #373d8c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 60px -12px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; }

h1, h2 { font-weight: 900; letter-spacing: -0.025em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.3; }

code {
  font-family: var(--font);
  font-size: 0.92em;
  font-weight: 700;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85em;
  padding: 0.1em 0.45em;
  font: 700 0.8em/1.5 var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 3px;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.keys { display: inline-flex; gap: 0.2em; vertical-align: 0.05em; white-space: nowrap; }
.keys-large kbd { font-size: 1.15rem; min-width: 2.4em; padding: 0.2em 0.6em; border-radius: 10px; }

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

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.container-narrow { --container: 780px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.8em 1.45em;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -6px rgba(79, 70, 229, 0.6); }
.button:active { transform: translateY(0); }

.button-small { padding: 0.6em 1.1em; font-size: 0.92rem; }

.button-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.button-ghost:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.button-ghost strong { color: var(--accent-text); font-weight: 900; }

.button-light { background: #fff; color: #3730a3; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.35); }
.button-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); box-shadow: none; }
.button-outline-light:hover { background: rgba(255, 255, 255, 0.1); box-shadow: none; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.nav { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { border-radius: 8px; }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 104px) 0 clamp(64px, 9vw, 112px);
  background:
    radial-gradient(640px 360px at 85% 8%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 70%),
    radial-gradient(560px 340px at 5% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }

.lead { margin-top: 22px; font-size: clamp(1.08rem, 1.6vw, 1.24rem); color: var(--muted); max-width: 34em; }
.lead kbd, .hero-note kbd { font-size: 0.78em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); }

/* ---------- Demo ---------- */
/* A mock browser with one tab per app. script.js plays each tab in turn. */

.demo {
  position: relative;
  margin-bottom: 64px; /* room for the floating shortcut keys */

  --tabbar: #ebebf3;
  --mail-blue: #0b57d0;
  --mail-on-blue: #fff;
  --wa-bar: #f0f2f5;
  --wa-wall: #efeae2;
  --wa-bubble: #fff;
  --wa-field: #fff;
  --wa-green: #00a884;
  --li-backdrop: #e9e5df;
  --li-blue: #0a66c2;
  --li-on-blue: #fff;
  --slack-green: #007a5a;
}
@media (prefers-color-scheme: dark) {
  .demo {
    --tabbar: #0d0e14;
    --mail-blue: #a8c7fa;
    --mail-on-blue: #062e6f;
    --wa-bar: #202c33;
    --wa-wall: #0b141a;
    --wa-bubble: #202c33;
    --wa-field: #2a3942;
    --li-backdrop: #0a0b10;
    --li-blue: #71b7fb;
    --li-on-blue: #0b1b2b;
  }
}
.demo::before {
  content: "";
  position: absolute;
  inset: 8% -4% -6% 6%;
  z-index: -1;
  border-radius: var(--radius-lg);
  background: var(--gradient);
  opacity: 0.18;
  filter: blur(40px);
}

.demo-window {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}
.demo-window svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Tab strip */
.demo-tabbar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 8px 10px 0 18px;
  background: var(--tabbar);
}
.demo-dots { display: flex; gap: 8px; align-self: center; }
.demo-dots span { width: 13px; height: 13px; border-radius: 50%; }
.demo-dots span:nth-child(1) { background: #ff605c; }
.demo-dots span:nth-child(2) { background: #ffbd44; }
.demo-dots span:nth-child(3) { background: #00ca4e; }

.demo-tabs { position: relative; display: flex; flex: 1; min-width: 0; }
.demo-tab {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 8px 0 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.3s ease;
}
.demo-tab:hover,
.demo-tab.is-active { color: var(--text); }
.demo-tab + .demo-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 1px;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
  transition: opacity 0.3s ease;
}
.demo-tab.is-active::before,
.demo-tab.is-active + .demo-tab::before { opacity: 0; }
.demo-window .demo-favicon { width: 15px; height: 15px; stroke-width: 2.2; }
.demo-tab-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 10px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 10px), transparent);
}

/* The active tab's shape slides to whichever tab is active (--active is its index, of four). */
.demo-tab-shape {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25%;
  height: 36px;
  border-radius: 10px 10px 0 0;
  background: var(--surface);
  transform: translateX(calc(var(--active, 0) * 100%));
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.demo-tab-shape::before,
.demo-tab-shape::after { content: ""; position: absolute; bottom: 0; width: 10px; height: 10px; }
.demo-tab-shape::before { right: 100%; background: radial-gradient(circle at 0 0, transparent 9.5px, var(--surface) 10px); }
.demo-tab-shape::after { left: 100%; background: radial-gradient(circle at 100% 0, transparent 9.5px, var(--surface) 10px); }

/* Toolbar */
.demo-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.demo-nav:nth-child(2) { opacity: 0.4; }
.demo-url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tabbar);
  font-size: 0.8rem;
}
.demo-window .demo-url svg { width: 12px; height: 12px; stroke-width: 2.4; }
.demo-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--gradient);
  transform-origin: left;
  opacity: 0;
}

/* Pages: the active one slides in, the others wait off to the side they sit on in the tab strip. */
.demo-viewport { position: relative; height: 300px; overflow: hidden; }
.demo-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  opacity: 0;
  visibility: hidden;
  transform: translateX(32px);
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.55s;
}
.demo-scene.is-before { transform: translateX(-32px); }
.demo-scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.35s ease 0.1s, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s, visibility 0s;
}

.demo-main { position: relative; flex: 1; min-height: 0; }
.demo-icons { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.demo-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
}
.demo-who { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.demo-who strong { font-size: 0.9rem; }
.demo-who small { color: var(--muted); font-size: 0.74rem; }

/* Editor, shared by every page */
.demo-editor { position: relative; font-size: 1rem; line-height: 1.6; }
.demo-editor[data-placeholder]:has(.demo-text:empty)::before {
  content: attr(data-placeholder);
  position: absolute;
  top: 0;
  left: 4px;
  color: var(--muted);
  pointer-events: none;
}
.demo-text { border-radius: 4px; transition: background-color 0.25s ease; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.demo-instruction { color: var(--accent-text); font-weight: 700; }
.demo-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

.demo.is-selected .demo-text { background: var(--selection); }
.demo.is-selected .demo-caret,
.demo.is-loading .demo-caret { visibility: hidden; }
.demo.is-done .demo-text { animation: flash 1.2s ease-out; }

/* Gmail */
.mail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: color-mix(in srgb, var(--mail-blue) 8%, var(--surface));
  font-size: 0.86rem;
  font-weight: 700;
}
.mail-field { display: flex; gap: 12px; margin: 0 16px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.mail-field span { width: 54px; color: var(--muted); }
.scene-mail .demo-main { padding: 14px 16px; }
.mail-foot { display: flex; align-items: center; gap: 18px; padding: 8px 16px 14px; }
.mail-send { padding: 7px 20px; border-radius: 999px; background: var(--mail-blue); color: var(--mail-on-blue); font-size: 0.85rem; font-weight: 700; }

/* WhatsApp */
.wa-head { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--wa-bar); }
.wa-thread {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 16px;
  background: var(--wa-wall);
}
.wa-msg {
  max-width: 78%;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--wa-bubble);
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.wa-msg:first-child { border-top-left-radius: 0; }
.wa-msg time { margin-left: 10px; color: var(--muted); font-size: 0.68rem; }
.wa-compose { display: flex; align-items: flex-end; gap: 10px; padding: 8px 12px; background: var(--wa-bar); color: var(--muted); }
.wa-compose > svg { margin-bottom: 11px; }
.wa-field { flex: 1; min-width: 0; padding: 8px 14px; border-radius: 20px; background: var(--wa-field); color: var(--text); }
.wa-field .demo-editor { font-size: 0.95rem; line-height: 1.5; }
.wa-send { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--wa-green); color: #fff; }

/* LinkedIn */
.scene-li { padding: 14px; background: var(--li-backdrop); }
.li-card { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.li-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 4px; }
.scene-li .demo-main { padding: 8px 14px; }
.li-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 12px; border-top: 1px solid var(--border); }
.li-post {
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--li-blue);
  color: var(--li-on-blue);
  font-size: 0.85rem;
  font-weight: 700;
  transition: opacity 0.2s ease;
}
.li-card:has(.demo-text:empty) .li-post { opacity: 0.4; }

/* Slack */
.slack-head { display: flex; align-items: baseline; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.slack-head strong { font-size: 0.95rem; }
.slack-head small { color: var(--muted); font-size: 0.75rem; }
.slack-thread { padding: 14px 16px; }
.slack-msg { display: flex; gap: 10px; font-size: 0.9rem; line-height: 1.45; }
.slack-msg .demo-avatar { border-radius: 8px; }
.slack-msg small { margin-left: 8px; color: var(--muted); font-size: 0.72rem; }
.slack-compose { margin: 0 14px 14px; border: 1px solid color-mix(in srgb, var(--muted) 40%, var(--border)); border-radius: 10px; }
.slack-compose .demo-editor { margin: 10px 12px 4px; font-size: 0.95rem; line-height: 1.5; }
.slack-tools { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 12px; }
.slack-send {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  border-radius: 6px;
  background: var(--slack-green);
  color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.slack-compose:has(.demo-text:empty) .slack-send { background: transparent; color: var(--muted); }

/* Floating shortcut keys under the window */
.demo-keys {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.demo-keys kbd { font-size: 0.95rem; min-width: 2.3em; transition: transform 0.12s ease, border-bottom-width 0.12s ease; }
.demo.is-pressing .demo-keys {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow);
}
.demo.is-pressing .demo-keys kbd { transform: translateY(2px); border-bottom-width: 1px; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* Mirrors the extension's real toast (WriteFlow-CromExt content/ui/toast.ts). */
.demo-toast {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  border-radius: 3px;
  border-left: 3px solid #8b949e;
  background: var(--toast-bg);
  color: var(--toast-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s ease-out, transform 0.14s ease-out;
}
.demo.is-loading .demo-toast,
.demo.is-done .demo-toast { opacity: 1; transform: none; }
.demo.is-done .demo-toast { border-left-color: #2da44e; }

.demo-spinner {
  flex: none;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(246, 248, 250, 0.3);
  border-top-color: #f6f8fa;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.demo.is-done .demo-spinner { display: none; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flash { from { background: color-mix(in srgb, var(--ok) 28%, transparent); } to { background: transparent; } }

/* ---------- Strip ---------- */

.strip { padding: 34px 0; border-block: 1px solid var(--border); background: var(--bg-soft); }
.strip .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; }
.strip-title { font-weight: 700; color: var(--muted); font-size: 0.95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chips li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}
.chips-accent li { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); box-shadow: none; }

/* Clickable instruction chips (use cases, playground) */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 700 0.86rem/1.3 var(--font);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.chip:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-1px); }
.chip:active { transform: none; }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }

.section-head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 60px); text-align: center; }
.kicker { margin-bottom: 12px; color: var(--accent-text); font-weight: 900; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
.section-lead { margin-top: 18px; color: var(--muted); font-size: 1.12rem; }
.section-lead strong { color: var(--text); }
.section p a:not(.button) { color: var(--accent-text); font-weight: 700; text-underline-offset: 3px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.step p { color: var(--muted); }
.step-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 900;
}
.step-visual {
  display: grid;
  place-items: center;
  margin-top: auto;
  min-height: 84px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  font-weight: 700;
}
.step-visual-select span { background: var(--selection); border-radius: 4px; padding: 2px 4px; }
.step-visual-done span { background: color-mix(in srgb, var(--ok) 18%, transparent); border-radius: 4px; padding: 2px 4px; }

/* Demo video: poster + play button until it's started, then native controls. */
.video {
  position: relative;
  max-width: 960px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #5b50e8;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.video-play {
  position: absolute;
  left: 50%;
  top: 64%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 8px 8px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #312e81;
  font: 900 1.02rem/1 var(--font);
  white-space: nowrap;
  box-shadow: 0 14px 34px -10px rgba(20, 16, 70, 0.55);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.25s ease;
}
.video-play:hover { transform: translate(-50%, -50%) scale(1.04); }
.video-play-time { margin-left: 4px; color: #6366f1; font-weight: 700; }
.video-play-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  animation: video-pulse 2.2s ease-out infinite;
}
.video-play-icon svg { width: 18px; height: 18px; margin-left: 2px; fill: currentColor; }
.video.is-playing .video-play { opacity: 0; pointer-events: none; }
@keyframes video-pulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.45); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(99, 102, 241, 0); }
}

/* Instruction examples */
.examples { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.example {
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.example-label { color: var(--muted); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.example-input { margin: 6px 0 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-soft); border: 1px solid var(--border); }
.example-input mark { background: none; color: var(--accent-text); font-weight: 900; }
.example-output { margin-top: 6px; padding: 12px 14px 12px 16px; border-radius: var(--radius-sm); border-left: 3px solid var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); font-weight: 700; }

.instruction-ideas { margin-top: 32px; color: var(--muted); font-weight: 700; text-align: center; }

.callout {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  background: var(--accent-soft);
  text-align: center;
}

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.feature h3 { margin: 16px 0 8px; }
.feature p { color: var(--muted); font-size: 0.97rem; }
.feature kbd { font-size: 0.72em; }

.icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Use cases */
.use-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.use-case {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.use-case:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.use-case-head { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.use-case-before { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-soft); font-size: 0.95rem; }
.use-case-before mark { background: none; color: var(--accent-text); font-weight: 900; }
.use-case-after {
  padding: 10px 12px 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--ok);
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
  font-size: 0.95rem;
  font-weight: 700;
  white-space: pre-line;
}
.use-case-try { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.use-case-try .chip { padding: 5px 11px; font-size: 0.8rem; }

/* Setup */
.setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.setup-steps { display: grid; gap: 14px; }
.setup-step {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.setup-step .step-number { flex: none; margin: 0; }
.setup-step h3 { margin: 5px 0 4px; }
.setup-step p { color: var(--muted); font-size: 0.97rem; }
.setup-step kbd { font-size: 0.75em; }
.setup-store { margin-top: 12px; }

.setup-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(32px, 5vw, 48px); }
.setup-notes li {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.95rem;
}
.setup-notes strong { display: block; margin-bottom: 4px; color: var(--text); }

/* Settings mock: mirrors the extension's settings page (square-ish, 3 px corners). */
.setup-visual { position: relative; }
.setup-visual::before {
  content: "";
  position: absolute;
  inset: 10% -4% -6% 8%;
  z-index: -1;
  border-radius: var(--radius-lg);
  background: var(--gradient);
  opacity: 0.16;
  filter: blur(40px);
}
.settings {
  --s-ok: #1a7f37;
  --s-error: #cf222e;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  .settings { --s-ok: #3fb950; --s-error: #f85149; }
}
.settings-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 900; }
.settings-brand img { border-radius: 6px; }
.settings-section { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-section.settings-row { flex-direction: row; }
.settings-heading { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.settings-status { display: inline-flex; align-items: center; gap: 6px; color: var(--s-ok); font-size: 12px; font-weight: 700; transition: color 0.2s ease; }
.settings-status::before { content: ""; width: 8px; height: 8px; border-radius: 1px; background: currentColor; }
.settings-label { font-size: 13px; font-weight: 700; }
.settings-field { display: flex; gap: 8px; }
.settings-input,
.settings-select {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  white-space: nowrap;
}
.settings-input { letter-spacing: 0.04em; transition: border-color 0.2s ease; }
.settings-select { display: flex; justify-content: space-between; }
.settings-select::after { content: "▾"; color: var(--muted); }
.settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.settings-primary { align-self: flex-start; min-width: 104px; border-color: var(--accent); background: var(--accent); color: var(--bg); }
.settings-help { color: var(--muted); font-size: 12.5px; }
.settings-model { display: grid; gap: 8px; transition: opacity 0.35s ease, transform 0.35s ease; }
.settings .keys kbd { font-size: 12px; border-radius: 3px; }

.setup-visual[data-state="empty"] .settings-status,
.setup-visual[data-state="typing"] .settings-status,
.setup-visual[data-state="pressing"] .settings-status { color: var(--s-error); }
.setup-visual[data-state="testing"] .settings-status { color: var(--muted); }
.setup-visual[data-state="empty"] .settings-input { color: var(--muted); }
.setup-visual[data-state="typing"] .settings-input { border-color: var(--accent); }
.setup-visual[data-state="pressing"] .settings-primary { transform: scale(0.95); filter: brightness(0.9); }
.setup-visual:is([data-state="empty"], [data-state="typing"], [data-state="pressing"], [data-state="testing"]) .settings-model { opacity: 0; transform: translateY(-4px); }

/* Playground */
.playground {
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.playground ::selection { background: var(--selection); }
.playground-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.playground-bar-label { color: var(--muted); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.playground-ideas { display: flex; flex: 1 1 420px; flex-wrap: wrap; gap: 8px; }
.playground-reset { margin-left: auto; }

.playground-fields { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 18px; }
.pg-field { display: flex; flex-direction: column; gap: 8px; }
.pg-field-email { grid-row: span 2; }
.pg-label { font-size: 0.92rem; font-weight: 700; }
.pg-label span {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.72rem;
  vertical-align: 1px;
}
.pg-field textarea,
.pg-field input,
.pg-rich {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pg-field textarea { flex: 1; min-height: 200px; resize: vertical; }
.pg-rich { flex: 1; min-height: 110px; }
.pg-field textarea:focus,
.pg-field input:focus,
.pg-rich:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }

.playground-status {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.92rem;
}
.playground-status[data-tone="warn"] { border-left-color: #d29922; color: var(--text); }
.playground-status[data-tone="ok"] { border-left-color: var(--ok); color: var(--text); }

/* Privacy */
.privacy { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.privacy > div { position: sticky; top: 110px; }
.privacy .section-lead { margin-top: 16px; }
.checklist { display: grid; gap: 14px; }
.checklist li {
  position: relative;
  padding: 18px 20px 18px 58px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.checklist li strong { display: block; color: var(--text); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 20px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.faq summary {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* Round button behind the arrow */
.faq summary::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
}
/* Chevron centered on the button: points down when closed, flips up when open */
.faq summary::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 33px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::before { transform: translateY(1px) rotate(225deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); }
.faq kbd { font-size: 0.75em; }

/* CTA */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(44px, 7vw, 72px) clamp(24px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px 220px at 90% 0%, rgba(255, 255, 255, 0.22), transparent 70%),
    var(--gradient);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta img { border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); outline: 2px solid rgba(255, 255, 255, 0.4); }
.cta p { color: rgba(255, 255, 255, 0.88); font-size: 1.1rem; max-width: 34em; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.cta-note { font-size: 0.95rem !important; }
.cta kbd { color: #312e81; background: #fff; border-color: rgba(255, 255, 255, 0.7); font-size: 0.78em; }

/* Footer */
.site-footer { padding: 36px 0 44px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer-inner > p { color: var(--muted); font-size: 0.92rem; }
.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-links a { color: var(--muted); font-weight: 700; font-size: 0.92rem; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-inner > .footer-credit { flex-basis: 100%; }
.footer-credit a { color: var(--text); font-weight: 700; text-underline-offset: 3px; }
.footer-credit a:hover { color: var(--accent-text); }

/* ---------- Legal pages (privacy.html) ---------- */

.nav-back { margin-left: auto; }
.legal-page { padding: clamp(48px, 8vw, 88px) 0 clamp(64px, 9vw, 112px); }
.legal-head { margin-bottom: 36px; }
.legal-head h1 { font-size: clamp(2.3rem, 4.8vw, 3.3rem); }
.legal-updated { margin-top: 14px; color: var(--muted); font-size: 0.92rem; font-weight: 700; }
.legal-summary { margin-bottom: 20px; }

.legal h2 {
  margin: 40px 0 14px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.legal h3 { margin: 24px 0 8px; }
.legal p,
.legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal ul { display: grid; gap: 8px; padding-left: 1.3em; list-style: disc; }
.legal li::marker { color: var(--accent); }
.legal a { color: var(--accent-text); font-weight: 700; text-underline-offset: 3px; }
.footer-links a[aria-current="page"] { color: var(--text); }

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

@media (max-width: 1100px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.9rem; }
}

@media (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .use-cases { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .button { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .demo { max-width: 560px; width: 100%; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .examples { grid-template-columns: 1fr; }
  .privacy { grid-template-columns: 1fr; }
  .privacy > div { position: static; }
  .setup { grid-template-columns: 1fr; }
  .setup-visual { width: 100%; max-width: 480px; margin-inline: auto; }
  .setup-notes { grid-template-columns: 1fr; }
  .playground-fields { grid-template-columns: 1fr; }
  .pg-field-email { grid-row: auto; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .use-cases { grid-template-columns: 1fr; }
  .video-play { gap: 8px; padding: 5px 14px 5px 5px; font-size: 0.85rem; }
  .video-play-icon { width: 32px; height: 32px; }
  .video-play-icon svg { width: 14px; height: 14px; }
  .setup-step { padding: 18px; }
  .playground-reset { margin-left: 0; }
  .demo-viewport { height: 320px; }
  .demo-tabbar { gap: 12px; padding-left: 14px; }
  .demo-dots { gap: 6px; }
  .demo-dots span { width: 11px; height: 11px; }
  .demo-nav { display: none; }
  .footer-links { margin-left: 0; }
}

@media (max-width: 440px) {
  .demo-tab { justify-content: center; padding: 0; }
  .demo-tab-title { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .demo-scene, .demo-scene.is-active { transition-delay: 0s !important; }
}
