/* ============================================================================
   TikTok Profile Picture Downloader — vibrant gradient styles.
   Display typeface: Funnel Display (SIL Open Font License 1.1)
   Lucide icons: ISC License
   ============================================================================ */

@font-face {
  font-family: 'Funnel Display';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/assets/fonts/funnel-display.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  /* === Palette: 60-30-10 — neutrals 60%, ink 30%, accent 10% ===
     Scheme is analogous (pink → magenta → purple). One cool color avoided.
     5-token palette: 1 light, 1 surface, 1 dark text, 1 muted text, 1 accent. */

  /* Surfaces (the 60%) */
  --bg:           #FFFAFC;       /* near-white, warm-tinted */
  --bg-soft:      #FAF1F4;       /* slightly deeper for hover surfaces */
  --surface:      #FFFFFF;       /* card surface */
  --surface-tint: #FFF6F9;       /* tinted-white for hover state */

  /* Ink (the 30%) */
  --ink:          #0B0B14;
  --ink-soft:     #1F1F2E;
  --ink-mute:     #6B6B7E;
  --ink-faint:    #B6B6C5;
  --rule:         #F0E6EC;
  --rule-soft:    #F8EDF2;

  /* Accent (the 10%) — analogous hot palette */
  --pink:         #FE2C55;       /* primary brand */
  --magenta:      #C026D3;       /* gradient mid-stop, NOT for solid fills */
  --purple:       #7C3AED;       /* secondary accent (deep end of gradient) */
  --accent-deep:  #B0234A;       /* pressed/visited state */

  /* Brand gradient — single, analogous (pink → magenta → purple) */
  --grad-hot:  linear-gradient(135deg, #FE2C55 0%, #C026D3 55%, #7C3AED 100%);

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 40px;
  --s-6: 64px;
  --s-7: 96px;
  --s-8: 144px;

  /* Containers */
  --col-wide:  1200px;
  --col-page:  1080px;
  --col-prose: 720px;
  --col-tool:  640px;

  /* Radius */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Effects */
  --ring-pink: 0 0 0 4px rgba(254, 44, 85, 0.18);
  --shadow-card: 0 6px 24px rgba(126, 22, 80, 0.06), 0 1px 2px rgba(20, 8, 30, 0.04);
  --shadow-lift: 0 12px 32px rgba(126, 22, 80, 0.12), 0 2px 6px rgba(20, 8, 30, 0.05);
  --shadow-glow: 0 16px 48px rgba(254, 44, 85, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Funnel Display', -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "ss01" 1, "cv11" 1;
  overflow-x: hidden;
}

/* === Mesh gradient backdrop — fixed, animated === */
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
  border-radius: 50%;
  will-change: transform;
}
body::before {
  top: -180px; right: -120px;
  width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(254, 44, 85, 0.18) 0%, transparent 65%);
  animation: drift1 18s ease-in-out infinite alternate;
}
body::after {
  bottom: -200px; left: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.14) 0%, transparent 65%);
  animation: drift2 22s ease-in-out infinite alternate;
}

@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-90px, 70px) scale(1.15); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, -50px) scale(1.1); }
}

/* Two-blob mesh only — analogous scheme keeps the page calm */

body > * { position: relative; z-index: 1; }

a { color: var(--pink); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--purple); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

button { font: inherit; cursor: pointer; }

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

:focus-visible {
  outline: 0;
  box-shadow: var(--ring-pink);
  border-radius: 8px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ----- Typography ----- */

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: inherit; }

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-feature-settings: "ss01" 1;
}
h1 em {
  font-style: normal;
  font-weight: 800;
  background: var(--grad-hot);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: hueShift 8s ease-in-out infinite alternate;
}
@keyframes hueShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

h2 {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.15;
}
h2 em {
  font-style: normal;
  font-weight: 800;
  color: var(--pink);
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
h3 em {
  font-style: normal;
  font-weight: 700;
  color: var(--pink);
}

p { margin: 0; }

.lede {
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(254, 44, 85, 0.1);
  color: var(--pink);
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.15);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(254, 44, 85, 0.05); }
}

.dropcap, .pull, blockquote { all: unset; display: block; }
.pull, blockquote {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: var(--s-3) 0;
}

/* ----- Layout ----- */

.container {
  width: 100%;
  max-width: var(--col-page);
  margin-inline: auto;
  padding-inline: var(--s-3);
}
.container-prose { max-width: var(--col-prose); }
.container-tool  { max-width: var(--col-tool); }

.section { padding-block: var(--s-6); }
.section.is-surface {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--s-4); }
  .section { padding-block: var(--s-7); }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 252, 0.7);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--rule);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.015em;
}
.brand { transition: opacity 0.18s ease; }
.brand:hover { opacity: 0.78; }
.brand em { font-style: normal; color: var(--ink-mute); font-weight: 400; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--pink);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.875rem;
  box-shadow: 0 4px 14px rgba(254, 44, 85, 0.4);
}
.masthead-rule { display: none; }
.nav {
  display: none;
  align-items: center;
  gap: var(--s-2);
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: background 0.18s ease, color 0.18s ease;
}
.nav a:hover { background: rgba(254, 44, 85, 0.08); color: var(--pink); }
.nav .edition {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--pink);
  color: #fff;
}
@media (min-width: 768px) { .nav { display: inline-flex; } }

/* ----- Hero (asymmetric split) ----- */

.hero {
  position: relative;
  padding-block: var(--s-6) var(--s-5);
  overflow: visible;
}
.hero .container { max-width: var(--col-wide); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: center;
  text-align: left;
}
@media (min-width: 960px) {
  .hero { padding-block: var(--s-7) var(--s-6); }
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--s-6);
  }
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.hero-main .byline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  width: max-content;
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(254, 44, 85, 0.08);
}
.hero-main .byline em {
  font-style: normal;
  color: var(--pink);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.byline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.18);
  animation: pulse 2s ease-in-out infinite;
  flex: 0 0 auto;
}

.hero h1 {
  max-width: 18ch;
  text-wrap: balance;
  margin: 0;
}
.hero h1 em {
  font-style: normal;
  font-weight: 800;
  background: var(--grad-hot);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: hueShift 8s ease-in-out infinite alternate;
}
.hero h1 .accent {
  background: var(--grad-hot);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.hero-main .lede {
  max-width: 52ch;
  margin: 0;
  font-size: 1.125rem;
}

.hero-main .form { margin: var(--s-2) 0 0; max-width: var(--col-tool); }
.hero-main .trust-strip {
  justify-content: center;
  margin: var(--s-2) 0 0;
}

@media (min-width: 600px) {
  .hero-main .trust-strip { justify-content: flex-start; }
}

/* === Mockup column (single inline SVG) === */

.hero-mockup {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: var(--s-3) auto 0;
}
.mockup-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
}
.mockup-svg .m-spark { transform-box: fill-box; transform-origin: center; }
.mockup-svg .m-spark-1 { animation: twinkle 3s ease-in-out infinite; }
.mockup-svg .m-spark-2 { animation: twinkle 3.4s ease-in-out infinite 0.8s; }
.mockup-svg .m-spark-3 { animation: twinkle 2.6s ease-in-out infinite 1.6s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.15); }
}

@media (min-width: 960px) {
  .hero-mockup { max-width: none; margin: 0; }
}

/* Stagger reveal */
@keyframes riseFade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero-main > *,
.hero-mockup {
  animation: riseFade 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-main .byline      { animation-delay: 80ms; }
.hero-main h1           { animation-delay: 160ms; }
.hero-main .lede        { animation-delay: 280ms; }
.hero-main .form        { animation-delay: 360ms; }
.hero-main .trust-strip { animation-delay: 460ms; }
.hero-mockup            { animation-delay: 540ms; }

/* ----- Form (the centerpiece) ----- */

.form-zone {
  margin: var(--s-5) auto 0;
  max-width: var(--col-tool);
}
.form-zone-label { display: none; }

.form { margin: 0 auto; }
.input-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: 6px;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.input-row::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--r-md) + 2px);
  background: var(--grad-hot);
  background-size: 200% 200%;
  z-index: -1;
  opacity: 0.7;
  filter: blur(0px);
  animation: gradShift 6s ease infinite;
  transition: opacity 0.18s ease, filter 0.18s ease;
}
.input-row:focus-within::before {
  opacity: 1;
  filter: blur(2px);
  inset: -3px;
}
@keyframes gradShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (min-width: 600px) {
  .input-row {
    flex-direction: row;
    border-radius: var(--r-pill);
  }
  .input-row::before { border-radius: calc(var(--r-pill) + 2px); }
}

.input-row input[type="text"] {
  flex: 1;
      border-radius: 100px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 22px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  min-height: 52px;
}
.input-row input[type="text"]::placeholder { color: var(--ink-faint); }

.input-row button[type="submit"] {
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  padding: 0 28px;
  min-height: 52px;
  background: var(--grad-hot);
  background-size: 200% 100%;
  color: #fff;
  border: 0;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-position 0.4s ease;
  box-shadow: 0 6px 20px rgba(254, 44, 85, 0.4);
}
@media (min-width: 600px) {
  .input-row button[type="submit"] { border-radius: var(--r-pill); }
}
.input-row button[type="submit"]::after {
  content: "→";
  display: inline-block;
  transition: transform 0.18s ease;
}
.input-row button[type="submit"]:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}
.input-row button[type="submit"]:hover::after { transform: translateX(4px); }
.input-row button[type="submit"]:active { transform: translateY(0); }
.input-row button[type="submit"]:disabled { opacity: 0.55; cursor: progress; }

/* Paste-from-clipboard button — mobile-first: full-width on small, pill on ≥600 */
.paste-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  color: var(--ink-soft);
  border-radius: var(--r-sm);
  display: inline-grid;
  place-items: center;
  line-height: 0;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  position: relative;
}
.paste-btn:hover {
  background: var(--surface-tint);
  color: var(--pink);
  border-color: rgba(254, 44, 85, 0.35);
}
.paste-btn:active { transform: translateY(1px); }
.paste-btn svg { width: 20px; height: 20px; pointer-events: none; }
.paste-btn.is-pasted {
  background: var(--pink);
  color: #fff;
  border-color: transparent;
}
.paste-btn[hidden] { display: none; }
@media (min-width: 600px) {
  .paste-btn {
    width: 44px;
    border-radius: var(--r-pill);
    margin-left: 4px;
  }
}

.helper-text {
  margin-top: var(--s-3);
  font-size: 0.875rem;
  color: var(--ink-mute);
  text-align: center;
}
.helper-text code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--ink-soft);
}

.error {
  margin: var(--s-3) auto 0;
  max-width: var(--col-tool);
  color: var(--pink);
  font-weight: 600;
  text-align: center;
}

/* ----- Result card (selectors used by app.js — keep) ----- */

.result {
  position: relative;
  margin: var(--s-5) auto 0;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-4);
  text-align: center;
  box-shadow: var(--shadow-card);
  animation: revealCard 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* Result card halo: solid border instead of gradient bloom */
.result { border: 1px solid var(--rule); }

@keyframes revealCard {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.avatar-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto var(--s-3);
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px rgba(254, 44, 85, 0.4), var(--shadow-lift);
}
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }

.result h2 {
  margin-bottom: 4px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.result code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875rem;
  color: var(--ink-mute);
}
.result .stats {
  margin: 8px 0 var(--s-3);
  font-size: 0.875rem;
  color: var(--ink-mute);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
@media (min-width: 480px) {
  .actions { flex-direction: row; justify-content: center; }
}

.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
  padding: 12px 22px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  min-height: 46px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: var(--pink);
  color: var(--pink);
}
.btn-primary {
  background: var(--grad-hot);
  background-size: 200% 100%;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(254, 44, 85, 0.35);
}
.btn-primary:hover {
  color: #fff;
  background-position: 100% 0;
  box-shadow: var(--shadow-glow);
  border-color: transparent;
}

.private-note { margin-top: var(--s-3); color: var(--ink-mute); font-size: 0.875rem; }
.expiry-note  { margin-top: var(--s-3); color: var(--ink-faint); font-size: 0.75rem; }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -3px;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Trust strip ----- */

.trust-strip {
  list-style: none;
  margin: var(--s-5) auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: center;
  max-width: var(--col-tool);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--rule);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.pill svg { width: 16px; height: 16px; color: var(--pink); }

/* ----- Intro ----- */

.intro .container-prose { display: grid; gap: var(--s-3); }
.intro h2 { max-width: 22ch; }
.intro p { font-size: 1.125rem; line-height: 1.6; color: var(--ink-soft); }

/* ----- How-to (3 steps) ----- */

.how-to .container { text-align: center; }
.how-to .eyebrow { margin-inline: auto; }
.how-to h2 { max-width: 22ch; margin: 0 auto; }
.steps-grid {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  text-align: left;
}
@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
}
.step {
  position: relative;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}
@media (hover: hover) {
  .step:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(254, 44, 85, 0.3);
  }
}
.step-num {
  display: inline-block;
  font-family: inherit;
  font-style: normal;
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--pink);
  margin-bottom: var(--s-2);
  position: static;
  text-shadow: none;
  opacity: 1;
  pointer-events: auto;
}
.step-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(254, 44, 85, 0.10);
  color: var(--pink);
  display: grid;
  place-items: center;
  margin-bottom: var(--s-3);
}
.step-icon svg { width: 24px; height: 24px; }
.step h3 { margin-bottom: 6px; font-size: 1.125rem; }
.step h3 em { font-weight: 700; color: var(--pink); font-style: normal; }
.step p { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.step code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-soft);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--ink-soft);
}

/* ----- Features grid ----- */

.features .container { text-align: center; }
.features .eyebrow { margin-inline: auto; }
.features h2 { max-width: 24ch; margin: 0 auto; }
.features-grid {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  text-align: left;
}
@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  position: relative;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  overflow: hidden;
}
@media (hover: hover) {
  .feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(254, 44, 85, 0.3);
  }
}
.feature-num {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(254, 44, 85, 0.10);
  color: var(--pink);
  display: grid;
  place-items: center;
  margin-bottom: var(--s-3);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 6px; font-size: 1.125rem; }
.feature h3 em { font-weight: 700; color: var(--pink); font-style: normal; }
.feature p { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }

/* ----- Why-use ----- */

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  margin-top: var(--s-5);
  align-items: start;
}
@media (min-width: 900px) {
  .why-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}
.why-prose p { font-size: 1rem; line-height: 1.6; color: var(--ink-soft); }
.why-prose p + p { margin-top: var(--s-3); }
.why-prose blockquote {
  display: block;
  margin: var(--s-4) 0;
  padding: var(--s-3) 0 var(--s-3) var(--s-4);
  border-left: 3px solid var(--pink);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.why-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: var(--s-2);
}
.why-list li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  padding: 14px 16px 14px 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.18s ease, background 0.18s ease;
}
@media (hover: hover) {
  .why-list li:hover { border-color: rgba(254, 44, 85, 0.4); background: var(--surface-tint); }
}
.why-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background-color: var(--pink);
  background-image: url("data:image/svg+xml;utf8,<svg 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'><path d='M20 6 9 17l-5-5'/></svg>");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: 1px;
}
.why-list svg { display: none; }
.why-list li > span { flex: 1; }

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

.use-cases .container { text-align: center; }
.use-cases .eyebrow { margin-inline: auto; }
.use-cases h2 { max-width: 22ch; margin: 0 auto; }
.uses-grid {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  text-align: left;
}
@media (min-width: 768px) {
  .uses-grid { grid-template-columns: repeat(2, 1fr); }
}
.use-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
@media (hover: hover) {
  .use-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(254, 44, 85, 0.3);
  }
}
.use-icon {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  background: rgba(254, 44, 85, 0.10);
  color: var(--pink);
  border-radius: var(--r-md);
}
.use-icon svg { width: 24px; height: 24px; }
.use-card h3 { margin-bottom: 4px; font-size: 1.125rem; }
.use-card p { color: var(--ink-soft); font-size: 0.875rem; line-height: 1.5; }

/* ----- FAQ ----- */

.faq .container-prose { max-width: var(--col-prose); }
.faq h2 { text-align: center; margin: 0 auto; max-width: 18ch; }
.faq .eyebrow { display: flex; margin: 0 auto var(--s-3); width: max-content; }
.faq-list {
  margin-top: var(--s-5);
  display: grid;
  gap: 12px;
  counter-reset: faqcounter;
}
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 18px 22px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.faq-list details[open] {
  border-color: rgba(254, 44, 85, 0.4);
  box-shadow: 0 8px 24px rgba(254, 44, 85, 0.08);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary > span:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.faq-list summary > span:first-child::before {
  counter-increment: faqcounter;
  content: counter(faqcounter, decimal-leading-zero);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--pink);
  flex: 0 0 auto;
  font-feature-settings: "tnum" 1;
}
.faq-list summary svg {
  width: 20px; height: 20px;
  flex: 0 0 20px;
  color: var(--ink-mute);
  transition: transform 0.18s ease, color 0.18s ease;
}
.faq-list details[open] summary svg { transform: rotate(180deg); color: var(--pink); }
.faq-answer {
  margin-top: var(--s-3);
  padding-left: 38px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

/* ----- CTA strip ----- */

.cta-strip {
  text-align: center;
  padding-block: var(--s-7);
  background: var(--grad-hot);
  background-size: 200% 100%;
  animation: gradShift 12s ease infinite;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.22) 0%, transparent 40%);
  pointer-events: none;
}
.cta-strip .container { max-width: var(--col-prose); position: relative; }
.cta-strip h2 {
  color: #fff;
  margin-bottom: var(--s-2);
  font-size: clamp(2rem, 4vw, 3rem);
  text-wrap: balance;
}
.cta-strip h2 em {
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  font-style: normal;
  font-weight: 800;
  position: relative;
  display: inline-block;
}
.cta-strip h2 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.05em;
  height: 0.18em;
  background: rgba(255,255,255,0.4);
  border-radius: 4px;
}
.cta-strip p {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: var(--s-4);
  font-size: 1.125rem;
  font-weight: 600;
}
.cta-strip .btn-primary {
  background: #fff;
  color: var(--pink);
  border: 0;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  font-weight: 700;
}
.cta-strip .btn-primary:hover {
  background: #fff;
  color: var(--magenta);
  box-shadow: 0 18px 48px rgba(0,0,0,0.24);
  transform: translateY(-2px);
}

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

.site-footer {
  padding-block: var(--s-4);
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  align-items: center;
  text-align: center;
}
.site-footer .disclaimer {
  color: var(--ink-mute);
  font-size: 0.875rem;
}
.site-footer nav { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.site-footer nav a {
  color: var(--ink-mute);
  font-size: 0.875rem;
  font-weight: 600;
}
.site-footer nav a:hover { color: var(--pink); }
@media (min-width: 768px) {
  .site-footer .container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ----- Static pages (About, Contact) ----- */

.page-static main { min-height: calc(100vh - 220px); }

.page-hero {
  padding-block: var(--s-6) var(--s-4);
  text-align: center;
}
@media (min-width: 768px) {
  .page-hero { padding-block: var(--s-7) var(--s-5); }
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 auto var(--s-3);
  max-width: 18ch;
  text-wrap: balance;
}
.page-hero h1 em {
  font-style: normal;
  font-weight: 800;
  background: var(--grad-hot);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.page-hero .lede { max-width: 56ch; margin: 0 auto; }

.page-prose h2 {
  font-size: 1.5rem;
  margin-top: var(--s-5);
  margin-bottom: var(--s-2);
}
.page-prose h2:first-child { margin-top: 0; }
.page-prose p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
}

/* ----- Contact form ----- */

.contact-form {
  display: grid;
  gap: var(--s-3);
  max-width: 560px;
  margin: 0 auto;
}
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.field input,
.field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field input:focus,
.field textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.12);
}
.field input.is-invalid,
.field textarea.is-invalid {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 4px rgba(176, 35, 74, 0.12);
}
.contact-form #cf-submit {
  justify-self: start;
  min-height: 48px;
  padding: 12px 26px;
}
.contact-hint {
  font-size: 0.875rem;
  color: var(--ink-mute);
}

.contact-success {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--s-5) var(--s-4);
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
  animation: revealCard 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.contact-success h2 {
  font-size: 1.5rem;
  margin: var(--s-3) 0 var(--s-2);
}
.contact-success p {
  color: var(--ink-soft);
  margin: 0 auto var(--s-2);
  max-width: 44ch;
}
.contact-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  display: grid;
  place-items: center;
}

/* ----- Reduced motion ----- */

@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;
  }
}
