/* ============================================================
   FreeCursiveGenerator.com — Professional CSS
   Elegant Ink theme with proper dark mode and animations
   VERSION: 2026-05-31-v2 (zalgo fix)
   ============================================================ */

:root {
  --ink: #1e1b4b;
  --ink-2: #2a2566;
  --ink-3: #3b338a;
  --gold: #d4a574;
  --gold-2: #b8895a;
  --gold-3: #f0d9b5;
  --cream: #fdfbf7;
  --cream-2: #f5efe4;
  --charcoal: #1a1a2e;
  --muted: #6b6587;
  --line: #e8e0d0;
  --rose: #c98a8a;

  --bg: var(--cream);
  --bg-soft: var(--cream-2);
  --surface: #ffffff;
  --text: var(--charcoal);
  --text-muted: var(--muted);
  --border: var(--line);
  --primary: var(--ink);
  --primary-hover: var(--ink-3);
  --accent: var(--gold);
  --accent-hover: var(--gold-2);

  --shadow-sm: 0 1px 2px rgba(30, 27, 75, .06);
  --shadow: 0 8px 30px rgba(30, 27, 75, .08);
  --shadow-lg: 0 24px 60px -20px rgba(30, 27, 75, .25);

  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* DARK MODE */
[data-theme="dark"] {
  --bg: #0f0d24;
  --bg-soft: #16133a;
  --surface: #1b1842;
  --text: #f0ecdf;
  --text-muted: #9990bc;
  --border: #2d2960;
  --primary: var(--gold);
  --primary-hover: var(--gold-3);
  --accent: var(--gold);
  --accent-hover: var(--gold-3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 8px 30px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .6);
}

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(at 12% 8%, rgba(212, 165, 116, .10) 0, transparent 45%),
    radial-gradient(at 88% 92%, rgba(30, 27, 75, .06) 0, transparent 50%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s, color .3s;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(at 12% 8%, rgba(212, 165, 116, .12) 0, transparent 45%),
    radial-gradient(at 88% 92%, rgba(91, 67, 184, .12) 0, transparent 50%);
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

/* TYPOGRAPHY */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.italic { font-style: italic; font-family: var(--serif); }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.hidden { display: none !important; }

/* TOP NAV */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 100%);
  display: grid;
  place-items: center;
  color: var(--gold-3);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .12);
}
[data-theme="dark"] .brand-mark {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: var(--ink);
}
.brand small {
  display: block;
  font-size: .62rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: -2px;
}
.brand-text { line-height: 1.1; }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links > a, .nav-dd-toggle {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.nav-links > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.nav-links > a:hover::after { transform: scaleX(1); }

/* Dropdown */
.nav-dd { position: relative; }
.nav-dd-menu {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  min-width: 540px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, visibility .2s, transform .2s;
  z-index: 60;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dd-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .88rem;
  color: var(--text);
  transition: background .2s;
}
.nav-dd-menu a:hover { background: var(--bg-soft); color: var(--primary); }
.nav-dd-menu .dd-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-dd-menu strong { display: block; font-weight: 600; font-size: .9rem; }
.nav-dd-menu small {
  display: block;
  color: var(--text-muted);
  font-size: .74rem;
  line-height: 1.3;
}

/* Theme toggle button */
.icon-only {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .2s;
}
.icon-only:hover { background: var(--bg-soft); border-color: var(--accent); }
.icon-only svg { width: 18px; height: 18px; }
.icon-only .moon { display: block; }
.icon-only .sun { display: none; }
[data-theme="dark"] .icon-only .moon { display: none; }
[data-theme="dark"] .icon-only .sun { display: block; }

.nav-cta {
  padding: 9px 18px;
  background: var(--primary);
  color: var(--bg) !important;
  border-radius: var(--r-pill);
  font-size: .85rem;
  font-weight: 600;
  transition: all .25s;
}
[data-theme="dark"] .nav-cta { color: var(--ink) !important; }
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--primary-hover); transform: translateY(-1px); }

.nav-cta-mobile { display: none; }
@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-cta-mobile {
    display: inline-flex;
    padding: 8px 14px;
    background: var(--primary);
    color: var(--bg);
    border-radius: var(--r-pill);
    font-size: .82rem;
    font-weight: 600;
  }
}

/* HERO */
.hero {
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -60px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 165, 116, .18) 0%, transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: -60px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 67, 184, .12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero h1 { margin-bottom: 18px; }
.hero h1 .accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(95deg, var(--ink) 0%, var(--ink-3) 40%, var(--gold-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
}
[data-theme="dark"] .hero h1 .accent {
  background: linear-gradient(95deg, var(--gold-3) 0%, var(--gold) 40%, var(--rose) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -2px;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M0,4 Q50,0 100,4 T200,4' stroke='%23d4a574' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  opacity: .85;
}
.hero p.lead {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 auto 28px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 0 0 18px;
  font-size: .88rem;
  color: var(--text-muted);
}
.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.trust-row svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
.hero-stats {
  display: inline-flex;
  gap: 32px;
  margin-top: 24px;
  padding: 16px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}
.hero-stats > div { text-align: center; }
.hero-stats strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--primary);
  line-height: 1;
}
[data-theme="dark"] .hero-stats strong { color: var(--accent); }
.hero-stats span {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
}

/* GENERATOR */
.generator-wrap {
  padding: 20px 0 60px;
  position: relative;
}
.generator {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

/* Input area */
.gen-input-wrap {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--surface) 100%);
}
.gen-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 12px;
}
.gen-label-left {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.gen-label-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--text-muted);
}

.text-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
#text-input {
  flex: 1;
  min-height: 58px;
  resize: vertical;
  padding: 14px 18px;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--text);
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color .25s, background .25s;
}
#text-input:focus {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
#text-input::placeholder { color: var(--text-muted); font-style: italic; opacity: 0.6; }

.input-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
}
.input-btn:hover {
  background: var(--bg-soft);
  color: var(--primary);
  border-color: var(--accent);
}
.input-btn svg { width: 18px; height: 18px; }

@media (max-width: 600px) {
  .text-input-row { flex-direction: column; }
  .input-actions { flex-direction: row; }
}

/* Example chips */
.gen-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chip {
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .2s;
  font-family: var(--sans);
}
.chip:hover { border-color: var(--accent); color: var(--accent-hover); }

/* Filter bar */
.filter-bar {
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.filter-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
#filter-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.filter-shortcut {
  font-size: .68rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
}

/* Category tabs */
.cat-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: thin;
}
.cat-tab {
  padding: 7px 14px;
  font-size: .82rem;
  font-weight: 500;
  font-family: var(--sans);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.cat-tab:hover { color: var(--text); background: var(--bg-soft); }
.cat-tab.active {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}
[data-theme="dark"] .cat-tab.active { color: var(--ink); }

/* Favorites strip */
.fav-strip, .recent-strip {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, var(--surface)) 0%, var(--surface) 100%);
}
.fav-strip-title, .recent-strip-title {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fav-strip-title svg, .recent-strip-title svg {
  width: 12px;
  height: 12px;
}
.fav-strip-grid, .recent-strip-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.fav-chip, .recent-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: .8rem;
  transition: all .2s;
  flex-shrink: 0;
}
.fav-chip:hover, .recent-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.fav-chip-preview, .recent-chip-preview {
  font-size: 1.05rem;
  color: var(--primary);
  font-family: var(--serif);
}
[data-theme="dark"] .fav-chip-preview, [data-theme="dark"] .recent-chip-preview { color: var(--text); }
.fav-chip-label, .recent-chip-label {
  font-size: .68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* OUTPUT (style rows) */
.gen-output { padding: 0; max-height: 720px; overflow-y: auto; }
.gen-output::-webkit-scrollbar { width: 8px; }
.gen-output::-webkit-scrollbar-track { background: var(--bg-soft); }
.gen-output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.gen-output::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.style-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
  min-height: 88px;
  max-height: 110px;
  overflow: hidden;
  position: relative;
}
.style-row:last-child { border-bottom: none; }
.style-row:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.style-meta { flex-shrink: 0; width: 150px; }
.style-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.2;
}
.style-tag {
  font-size: .68rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 2px;
  font-weight: 600;
}
.style-preview {
  flex: 1;
  min-width: 0;
  font-size: 1.6rem;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: break-word;
  word-break: break-word;
  padding: 4px 0;
  max-height: 90px;
  overflow: hidden;
}

.style-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
}
.icon-btn:hover { color: var(--rose); border-color: var(--rose); }
.icon-btn svg { width: 16px; height: 16px; }
.fav-btn.active { color: var(--rose); border-color: var(--rose); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--sans);
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .2s;
}
[data-theme="dark"] .copy-btn { color: var(--accent); border-color: var(--accent); }
.copy-btn:hover { background: var(--primary); color: var(--bg); }
[data-theme="dark"] .copy-btn:hover { background: var(--accent); color: var(--ink); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.copied { background: var(--accent) !important; border-color: var(--accent); color: var(--ink) !important; }

@media (max-width: 720px) {
  .style-row { flex-wrap: wrap; padding: 16px 20px; gap: 12px; }
  .style-meta { width: 100%; }
  .style-preview { font-size: 1.3rem; width: 100%; }
  .style-actions { margin-left: auto; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state p { margin: 0 0 6px; }

/* SHARE BAR */
.share-bar {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.share-btns { display: flex; gap: 8px; }
.share-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--text);
  transition: all .2s;
}
.share-btn:hover {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
  transform: translateY(-2px);
}
[data-theme="dark"] .share-btn:hover { color: var(--ink); }
.share-btn svg { width: 16px; height: 16px; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--primary);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
}
[data-theme="dark"] .toast { color: var(--ink); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.toast--error { background: var(--rose); color: white; }
.toast svg { width: 16px; height: 16px; color: var(--accent); }
[data-theme="dark"] .toast svg { color: var(--ink); }

/* SECTIONS */
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.sec-head p { font-size: 1.05rem; color: var(--text-muted); }

/* FEATURES */
.features {
  background: var(--primary);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .features { background: var(--ink); }
.features::before, .features::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  background: radial-gradient(circle, rgba(212, 165, 116, .4) 0%, transparent 70%);
}
.features::before { top: -100px; left: -100px; width: 400px; height: 400px; }
.features::after { bottom: -100px; right: -100px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(91, 67, 184, .4) 0%, transparent 70%); }
.features h2 { color: var(--bg); }
[data-theme="dark"] .features h2 { color: var(--gold-3); }
.features .sec-head p { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}
.feat-card {
  padding: 32px 28px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(212, 165, 116, .18);
  border-radius: var(--r);
  backdrop-filter: blur(8px);
  transition: all .3s;
}
.feat-card:hover {
  background: rgba(255, 255, 255, .07);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.feat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  display: grid;
  place-items: center;
  color: var(--ink);
  margin-bottom: 18px;
}
.feat-icon svg { width: 24px; height: 24px; }
.feat-card h3 {
  color: var(--bg);
  font-size: 1.18rem;
  margin-bottom: 8px;
}
[data-theme="dark"] .feat-card h3 { color: var(--gold-3); }
.feat-card p {
  color: color-mix(in srgb, var(--bg) 75%, transparent);
  font-size: .94rem;
  margin: 0;
}

/* STEPS */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 30px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 60px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  opacity: .7;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* USECASES */
.usecases {
  background: var(--bg-soft);
}
.uc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.uc-card {
  background: var(--surface);
  padding: 28px 26px;
  border-radius: var(--r);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transition: all .3s;
}
.uc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.uc-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.uc-card h3 .emoji { font-size: 1.4rem; }
.uc-card p { font-size: .93rem; color: var(--text-muted); margin: 0; }
.uc-card .demo {
  font-family: "Dancing Script", cursive;
  font-size: 1.4rem;
  color: var(--ink-3);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
[data-theme="dark"] .uc-card .demo { color: var(--gold-3); }

/* SEO CONTENT */
.seo-content {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text);
}
[data-theme="dark"] .seo-content { color: color-mix(in srgb, var(--text) 90%, transparent); }
.seo-content h2 { margin-top: 48px; margin-bottom: 18px; }
.seo-content h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-top: 36px;
  margin-bottom: 10px;
  color: var(--text);
}
.seo-content p { margin-bottom: 1.1em; }
.seo-content .lead-p {
  font-size: 1.12rem;
  color: var(--text-muted);
  font-family: var(--serif);
  font-style: italic;
}
.seo-content ul { padding-left: 1.2em; margin-bottom: 1.2em; }
.seo-content li { margin-bottom: .4em; }
.seo-content strong { color: var(--text); font-weight: 700; }

/* TOOLS GRID */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.tool-link {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all .3s;
}
.tool-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tool-link h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tool-link h3 .arrow {
  font-size: 1rem;
  color: var(--accent);
  transition: transform .3s;
}
.tool-link:hover h3 .arrow { transform: translateX(4px); }
.tool-link p { font-size: .86rem; color: var(--text-muted); margin: 0; }
.tool-link .tool-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* FAQ */
.faq-wrap { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color .25s;
}
.faq-item:hover { border-color: var(--accent); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  border: none;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-q .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  transition: transform .3s ease, background .3s;
  color: var(--text);
}
.faq-q .icon svg { width: 12px; height: 12px; }
.faq-item[open] .faq-q .icon {
  transform: rotate(45deg);
  background: var(--accent);
  color: var(--ink);
}
.faq-a {
  padding: 0 24px 22px;
  color: var(--text);
  font-size: .97rem;
  line-height: 1.7;
}
.faq-a p { margin: 0 0 .6em; }
.faq-a p:last-child { margin: 0; }
.faq-a a {
  color: var(--primary);
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
}
[data-theme="dark"] .faq-a a { color: var(--accent); }

/* FOOTER */
.footer {
  background: var(--ink);
  color: rgba(253, 251, 247, .7);
  padding: 64px 0 28px;
  position: relative;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  color: var(--cream);
  font-family: var(--sans);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin-bottom: 18px;
}
.footer .brand { color: var(--cream); margin-bottom: 12px; }
.footer .brand small { color: var(--gold); }
.footer p { font-size: .92rem; line-height: 1.65; margin: 0; }
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links li { margin-bottom: 10px; }
.foot-links a {
  font-size: .92rem;
  color: rgba(253, 251, 247, .7);
  transition: color .2s;
}
.foot-links a:hover { color: var(--gold); }
.foot-bottom {
  border-top: 1px solid rgba(253, 251, 247, .1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .85rem;
  color: rgba(253, 251, 247, .55);
}
.foot-disclaimer {
  font-size: .78rem;
  color: rgba(253, 251, 247, .45);
  margin-top: 18px;
  max-width: 900px;
  line-height: 1.6;
}

/* ANIMATIONS */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.rise { animation: rise .7s cubic-bezier(.22, .8, .36, 1) backwards; }
.rise.d1 { animation-delay: .05s; }
.rise.d2 { animation-delay: .15s; }
.rise.d3 { animation-delay: .25s; }
.rise.d4 { animation-delay: .35s; }
.rise.d5 { animation-delay: .45s; }

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