/* =========================================================
   NameToon Studio — Risograph Print Studio Aesthetic
   Palette: Cream · Ink Black · Electric Coral · School
   Bus Yellow · Riso Cyan
   Fonts: Lilita One (display) · Boogaloo (UI) · Courier Prime (body)
   ========================================================= */

/* ── RESET & BASE ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:       #F5EDD6;
  --ink:         #0D0D0D;
  --coral:       #FF4B3E;
  --yellow:      #FFD10A;
  --cyan:        #00B2C8;
  --mint:        #8EFFC1;
  --lavender:    #C9B8FF;

  --cream-dark:  #EDE0BE;
  --ink-soft:    #2A2A2A;
  --ink-ghost:   #6B6152;

  --font-display: 'Lilita One', cursive;
  --font-ui:      'Boogaloo', cursive;
  --font-body:    'Courier Prime', monospace;

  --shadow-hard:  4px 4px 0 var(--ink);
  --shadow-hard-lg: 6px 6px 0 var(--ink);
  --shadow-coral: 4px 4px 0 var(--coral);
  --shadow-cyan:  4px 4px 0 var(--cyan);
  --border:       2px solid var(--ink);
  --border-thick: 3px solid var(--ink);

  --radius-sm:   4px;
  --radius-md:   10px;
  --radius-pill: 999px;

  --transition: 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4' fill='%230D0D0D'/%3E%3C/svg%3E") 12 12, auto;
}

/* ── GRAIN OVERLAY ────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  animation: grain-shift 0.5s steps(1) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-3%, -4%); }
  20%  { transform: translate(5%, 2%); }
  30%  { transform: translate(-2%, 6%); }
  40%  { transform: translate(4%, -3%); }
  50%  { transform: translate(-5%, 1%); }
  60%  { transform: translate(2%, 5%); }
  70%  { transform: translate(-4%, -2%); }
  80%  { transform: translate(3%, 4%); }
  90%  { transform: translate(-1%, -5%); }
  100% { transform: translate(4%, 2%); }
}

/* ── HALFTONE BG ──────────────────────────────────────── */
.halftone-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle, var(--ink) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.035;
}

/* ── HEADER ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--cream);
  border-bottom: var(--border-thick);
  overflow: hidden;
}

.header-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Misregistered stripes — riso feel */
.header-stripe {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  mix-blend-mode: multiply;
  opacity: 0.6;
}
.header-stripe--cyan  { background: var(--cyan);  transform: translateX(-2px); }
.header-stripe--coral { background: var(--coral); transform: translateX(2px); bottom: -2px; }

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-badge {
  width: 40px;
  height: 40px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
  transform: rotate(-3deg);
  box-shadow: var(--shadow-coral);
  transition: transform var(--transition);
}
.logo-lockup:hover .logo-badge { transform: rotate(3deg); }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo-sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--ink-ghost);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.site-nav a {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--ease-out);
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: width var(--transition);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { width: 100%; }

.nav-cta {
  font-family: var(--font-ui);
  font-size: 1rem;
  background: var(--ink);
  color: var(--yellow);
  border: var(--border-thick);
  border-color: var(--ink);
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform var(--transition), box-shadow var(--transition);
  letter-spacing: 0.02em;
}
.nav-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.nav-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  min-height: calc(100vh - 68px);
}

.hero-content { position: relative; z-index: 2; }

/* Hero tag */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  background: var(--cream-dark);
  border: var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 2rem;
  animation: fade-in-up 0.6s var(--ease-out) 0.1s both;
}
.tag-dot {
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: 50%;
  animation: tag-pulse 2s ease-in-out infinite;
}
@keyframes tag-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* Hero headline */
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.headline-line {
  display: block;
  overflow: hidden;
}

.headline-word {
  display: inline-block;
  animation: word-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.line-1 { animation: fade-in-up 0.7s var(--ease-out) 0.2s both; }
.word--name   { color: var(--coral); animation-delay: 0.35s; margin-right: 0.25em; }
.word--into   { animation-delay: 0.45s; margin-right: 0.25em; }
.word--a      { animation-delay: 0.5s; margin-right: 0.25em; }
.word--cartoon {
  color: var(--ink);
  background: var(--yellow);
  padding: 0 0.15em;
  border: 2px solid var(--ink);
  display: inline-block;
  transform: rotate(-1.5deg);
  position: relative;
  top: -2px;
  animation-delay: 0.6s;
}

@keyframes word-in {
  from { transform: translateY(120%) rotate(4deg); opacity: 0; }
  to   { transform: translateY(0) rotate(0); opacity: 1; }
}
@keyframes fade-in-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  animation: fade-in-up 0.7s var(--ease-out) 0.75s both;
}

/* Name input zone */
.name-input-zone {
  animation: fade-in-up 0.7s var(--ease-out) 0.9s both;
}

.input-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 0.5rem;
}

.input-wrapper {
  display: flex;
  gap: 0;
  border: var(--border-thick);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-hard-lg);
  background: white;
}

.name-input {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
  padding: 0.8rem 1.2rem;
  text-transform: uppercase;
  caret-color: var(--coral);
}
.name-input::placeholder {
  color: #C5B99A;
  letter-spacing: 0.08em;
}

.generate-btn {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  background: var(--coral);
  color: white;
  border: none;
  border-left: var(--border-thick);
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background var(--ease-out), gap var(--transition);
  white-space: nowrap;
}
.generate-btn:hover { background: #E63D31; gap: 0.8rem; }
.btn-icon { font-size: 1.2rem; }

.input-hint {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--ink-ghost);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ── PREVIEW STAGE ────────────────────────────────────── */
.preview-stage {
  position: relative;
  z-index: 2;
  animation: fade-in-up 0.7s var(--ease-out) 0.4s both;
}

.stage-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stage-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--ink-ghost);
}

.stage-canvas {
  background: white;
  border: var(--border-thick);
  border-radius: var(--radius-md);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-hard-lg);
}

/* Riso registration marks on canvas corners */
.stage-canvas::before,
.stage-canvas::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--cyan);
  opacity: 0.3;
  border-radius: 50%;
  z-index: 1;
}
.stage-canvas::before { top: 12px; left: 12px; }
.stage-canvas::after  { bottom: 12px; right: 12px; }

.letter-parade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 2rem;
  flex-wrap: wrap;
  min-height: 220px;
}

.empty-state {
  text-align: center;
  color: var(--ink-ghost);
}
.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.5;
}
.empty-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: italic;
}

/* Letter tiles */
.letter-tile {
  width: 56px;
  height: 72px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  cursor: default;
  position: relative;
  transition: transform var(--transition);
  animation: letter-pop 0.5s cubic-bezier(0.34, 1.7, 0.64, 1) both;
  user-select: none;
}
.letter-tile:hover { transform: translateY(-8px) rotate(var(--wobble, -3deg)) scale(1.1); }

/* Distinct colors per tile cycling */
.letter-tile:nth-child(1)  { background: var(--coral);   color: white;         --wobble: -4deg; box-shadow: 3px 3px 0 #8B1A12; }
.letter-tile:nth-child(2)  { background: var(--yellow);  color: var(--ink);    --wobble:  3deg; box-shadow: 3px 3px 0 #997E00; }
.letter-tile:nth-child(3)  { background: var(--cyan);    color: white;         --wobble: -2deg; box-shadow: 3px 3px 0 #006A78; }
.letter-tile:nth-child(4)  { background: var(--mint);    color: var(--ink);    --wobble:  4deg; box-shadow: 3px 3px 0 #2A8B5C; }
.letter-tile:nth-child(5)  { background: var(--lavender);color: var(--ink);    --wobble: -3deg; box-shadow: 3px 3px 0 #6B5A9E; }
.letter-tile:nth-child(6)  { background: var(--ink);     color: var(--yellow); --wobble:  2deg; box-shadow: 3px 3px 0 #555; }
.letter-tile:nth-child(7)  { background: var(--coral);   color: white;         --wobble: -4deg; box-shadow: 3px 3px 0 #8B1A12; }
.letter-tile:nth-child(8)  { background: var(--cyan);    color: white;         --wobble:  3deg; box-shadow: 3px 3px 0 #006A78; }
.letter-tile:nth-child(9)  { background: var(--yellow);  color: var(--ink);    --wobble: -2deg; box-shadow: 3px 3px 0 #997E00; }
.letter-tile:nth-child(10) { background: var(--mint);    color: var(--ink);    --wobble:  4deg; box-shadow: 3px 3px 0 #2A8B5C; }
.letter-tile:nth-child(11) { background: var(--lavender);color: var(--ink);    --wobble: -3deg; box-shadow: 3px 3px 0 #6B5A9E; }
.letter-tile:nth-child(12) { background: var(--coral);   color: white;         --wobble:  2deg; box-shadow: 3px 3px 0 #8B1A12; }

/* Staggered pop-in for each tile */
.letter-tile:nth-child(1)  { animation-delay: 0.00s; }
.letter-tile:nth-child(2)  { animation-delay: 0.06s; }
.letter-tile:nth-child(3)  { animation-delay: 0.12s; }
.letter-tile:nth-child(4)  { animation-delay: 0.18s; }
.letter-tile:nth-child(5)  { animation-delay: 0.24s; }
.letter-tile:nth-child(6)  { animation-delay: 0.30s; }
.letter-tile:nth-child(7)  { animation-delay: 0.36s; }
.letter-tile:nth-child(8)  { animation-delay: 0.42s; }
.letter-tile:nth-child(9)  { animation-delay: 0.48s; }
.letter-tile:nth-child(10) { animation-delay: 0.54s; }
.letter-tile:nth-child(11) { animation-delay: 0.60s; }
.letter-tile:nth-child(12) { animation-delay: 0.66s; }

@keyframes letter-pop {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(var(--wobble, 3deg)); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Style variants on letter tiles */
.style-retro  .letter-tile { border-radius: 2px; font-family: var(--font-body); font-weight: 700; letter-spacing: 0.05em; filter: contrast(1.1); }
.style-bubble .letter-tile { border-radius: 50%; width: 64px; height: 64px; font-size: 2rem; border-width: 3px; }
.style-sketch .letter-tile { border-style: dashed; border-radius: 0; transform: rotate(calc(var(--wobble, 0deg) * 0.5)); filter: contrast(1.2); }

/* Floating stars on letter tiles */
.letter-tile::after {
  content: '✦';
  position: absolute;
  top: -8px;
  right: -5px;
  font-size: 0.7rem;
  color: var(--yellow);
  -webkit-text-stroke: 1px var(--ink);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.letter-tile:hover::after { opacity: 1; animation: star-spin 0.6s ease; }
@keyframes star-spin {
  from { transform: rotate(0deg) scale(0); }
  to   { transform: rotate(180deg) scale(1); }
}

/* Style control pills */
.stage-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.style-pill {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  background: var(--cream);
  color: var(--ink-soft);
  border: var(--border);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.style-pill:hover { background: var(--cream-dark); transform: translateY(-1px); }
.style-pill.active {
  background: var(--ink);
  color: var(--yellow);
  box-shadow: var(--shadow-coral);
}

/* ── HERO BLOBS ───────────────────────────────────────── */
.hero-blob {
  position: absolute;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}
.blob-1 {
  width: 320px; height: 280px;
  background: var(--cyan);
  opacity: 0.18;
  top: -60px; right: -80px;
  animation: blob-drift 8s ease-in-out infinite;
}
.blob-2 {
  width: 200px; height: 220px;
  background: var(--coral);
  opacity: 0.15;
  bottom: 80px; left: -60px;
  animation: blob-drift 10s ease-in-out 2s infinite reverse;
}
.blob-3 {
  width: 160px; height: 140px;
  background: var(--yellow);
  opacity: 0.25;
  bottom: -30px; right: 40%;
  animation: blob-drift 12s ease-in-out 4s infinite;
}
@keyframes blob-drift {
  0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: translate(0, 0) scale(1); }
  33%  { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; transform: translate(10px, -15px) scale(1.05); }
  66%  { border-radius: 30% 70% 30% 70% / 50% 60% 40% 50%; transform: translate(-8px, 10px) scale(0.97); }
}

/* ── STYLES SECTION ───────────────────────────────────── */
.styles-section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

/* Section header pattern */
.section-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.section-number {
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--cream-dark);
  -webkit-text-stroke: 2px var(--ink);
  letter-spacing: -0.03em;
  opacity: 0.6;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-rule {
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--ink) 0, var(--ink) 8px, transparent 8px, transparent 14px);
  flex: 1;
}

/* Styles grid */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.style-card {
  border: var(--border-thick);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: white;
  box-shadow: var(--shadow-hard);
  transition: transform var(--transition), box-shadow var(--transition);
}
.style-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--ink);
}

.card-preview {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-bottom: var(--border);
  position: relative;
  overflow: hidden;
}

.card-preview--toon  { background: linear-gradient(135deg, var(--coral) 0%, #FF8178 100%); }
.card-preview--retro { background: linear-gradient(135deg, var(--cream-dark) 0%, #C8B890 100%); }
.card-preview--bubble { background: linear-gradient(135deg, var(--cyan) 0%, #00D8F0 100%); }
.card-preview--sketch { background: #F0EAD6; }

/* Halftone overlay on retro */
.card-preview--retro::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--ink) 1.5px, transparent 1.5px);
  background-size: 8px 8px;
  opacity: 0.2;
}

/* Sketch crosshatch */
.card-preview--sketch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, var(--ink) 0, var(--ink) 0.5px, transparent 0, transparent 50%);
  background-size: 8px 8px;
  opacity: 0.06;
}

.preview-letters {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.pl {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: white;
  -webkit-text-stroke: 1.5px var(--ink);
  line-height: 1;
}
.card-preview--retro .pl  { color: var(--ink); -webkit-text-stroke: 0; font-family: var(--font-body); font-weight: 700; font-size: 1.3rem; }
.card-preview--sketch .pl { color: var(--ink); -webkit-text-stroke: 0; font-family: var(--font-body); font-style: italic; font-size: 1.4rem; }

.card-meta {
  padding: 1rem 1.1rem 1.2rem;
}

.card-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.4rem;
}
.card-badge--new { background: var(--mint); }

.card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.card-desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-ghost);
  line-height: 1.55;
}

.card-select-ring {
  position: absolute;
  inset: -4px;
  border-radius: 13px;
  border: 3px solid transparent;
  pointer-events: none;
  transition: border-color var(--transition);
}
.style-card:hover .card-select-ring,
.style-card.selected .card-select-ring { border-color: var(--coral); }

/* ── HOW SECTION ──────────────────────────────────────── */
.how-section {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--cream);
  padding: 6rem 0;
  overflow: hidden;
}

.how-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.how-section .section-number { color: #1C1C1C; -webkit-text-stroke-color: #555; }
.how-section .section-title { color: var(--cream); }
.how-section .section-rule { background: repeating-linear-gradient(90deg, #555 0, #555 8px, transparent 8px, transparent 14px); }

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid #2A2A2A;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.step-item.visible { opacity: 1; transform: translateX(0); }

.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--coral);
  letter-spacing: -0.03em;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.step-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #999;
  line-height: 1.6;
}

/* Step arts */
.step-art {
  min-width: 180px;
  display: flex;
  justify-content: center;
}

.step-input-mock {
  background: #1A1A1A;
  border: 2px solid #444;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--coral);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
}
.blink {
  color: var(--yellow);
  animation: blink-cursor 1s step-end infinite;
}
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.step-style-pills {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}
.ssp {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: #777;
  background: #1A1A1A;
  border: 1.5px solid #444;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
}
.ssp--active {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
}

.step-dl-icon {
  text-align: center;
}
.dl-arrow {
  font-size: 2.5rem;
  color: var(--cyan);
  font-family: var(--font-display);
  animation: dl-bounce 1.5s ease-in-out infinite;
}
@keyframes dl-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.dl-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: #666;
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
}

/* Rotated decorative text */
.rotated-deco {
  position: absolute;
  bottom: -2rem;
  right: -3rem;
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 10rem);
  color: transparent;
  -webkit-text-stroke: 1px #2A2A2A;
  letter-spacing: -0.04em;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
  opacity: 0.5;
}

/* ── GALLERY ──────────────────────────────────────────── */
.gallery-section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
  overflow: hidden;
}

.gallery-section .section-header {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
  margin-bottom: 3rem;
}

.gallery-marquee-wrapper {
  overflow: hidden;
  position: relative;
}
.gallery-marquee-wrapper::before,
.gallery-marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
}
.gallery-marquee-wrapper::before { left: 0; background: linear-gradient(90deg, var(--cream), transparent); }
.gallery-marquee-wrapper::after  { right: 0; background: linear-gradient(-90deg, var(--cream), transparent); }

.marquee-track {
  display: flex;
  gap: 1.25rem;
  animation: marquee-scroll 28s linear infinite;
  width: max-content;
  padding: 0.5rem 0;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.gallery-card {
  width: 200px;
  height: 200px;
  border: var(--border-thick);
  border-radius: var(--radius-md);
  background: white;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition);
  position: relative;
}
.gallery-card:hover { transform: translateY(-6px) rotate(1deg); }

.gallery-card-letters {
  display: flex;
  gap: 3px;
}
.gallery-card-letter {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: white;
  -webkit-text-stroke: 1.5px var(--ink);
  line-height: 1;
}
.gallery-card-name {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-ghost);
}

/* Gallery card color themes */
.gc-theme-1 { background: linear-gradient(135deg, var(--coral), #FF8178); }
.gc-theme-2 { background: linear-gradient(135deg, var(--cyan), #00D8F0); }
.gc-theme-3 { background: linear-gradient(135deg, var(--yellow), #FFE56A); }
.gc-theme-4 { background: linear-gradient(135deg, var(--mint), #5AFFD4); }
.gc-theme-5 { background: linear-gradient(135deg, var(--lavender), #E0D8FF); }
.gc-theme-6 { background: linear-gradient(135deg, var(--ink), #3A3A3A); }

/* ── CTA SECTION ──────────────────────────────────────── */
.cta-section {
  position: relative;
  z-index: 1;
  background: var(--yellow);
  border-top: var(--border-thick);
  border-bottom: var(--border-thick);
  overflow: hidden;
  padding: 6rem 2rem;
}

.cta-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.cta-blob {
  position: absolute;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.cta-blob-1 { width: 300px; height: 280px; background: var(--coral); opacity: 0.3; top: -60px; left: -80px; animation: blob-drift 9s ease-in-out infinite; }
.cta-blob-2 { width: 250px; height: 220px; background: var(--cyan);  opacity: 0.3; bottom: -50px; right: -60px; animation: blob-drift 11s ease-in-out 3s infinite reverse; }

.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.cta-sub {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  font-style: italic;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--yellow);
  background: var(--ink);
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-md);
  border: var(--border-thick);
  box-shadow: var(--shadow-hard-lg);
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 3rem;
}
.cta-btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}
.cta-btn-arrow { font-size: 1.4rem; }

.cta-names {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cta-names span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  opacity: 0.25;
  letter-spacing: 0.05em;
  transition: opacity 0.2s ease;
}
.cta-names span:hover { opacity: 1; }

/* ── FOOTER ───────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  border-top: var(--border-thick);
  padding: 2.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--yellow);
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #666;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--ease-out);
}
.footer-links a:hover { color: var(--cream); }

.footer-copy {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #555;
  font-style: italic;
}

/* ── SCROLL ANIMATIONS ────────────────────────────────── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-reveal-delay-1 { transition-delay: 0.1s; }
.scroll-reveal-delay-2 { transition-delay: 0.2s; }
.scroll-reveal-delay-3 { transition-delay: 0.3s; }
.scroll-reveal-delay-4 { transition-delay: 0.4s; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 3rem;
    min-height: auto;
  }
  .styles-grid { grid-template-columns: repeat(2, 1fr); }
  .step-item { grid-template-columns: 60px 1fr; }
  .step-art { display: none; }
}

@media (max-width: 600px) {
  .site-nav a { display: none; }
  .styles-grid { grid-template-columns: 1fr; }
  .section-header { grid-template-columns: auto 1fr; }
  .section-rule { display: none; }
  .hero-headline { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── DOWNLOAD TOAST ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--yellow);
  box-shadow: var(--shadow-hard-lg);
  transform: translateY(200%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
}
.toast.show { transform: translateY(0); }
.toast--error { border-color: var(--coral); color: var(--coral); }
.toast--success { border-color: var(--mint); color: var(--mint); }

/* ── GENERATED IMAGE ──────────────────────────────────── */
.generated-result {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.generated-img {
  max-width: 100%;
  max-height: 260px;
  border-radius: var(--radius-md);
  object-fit: contain;
  animation: letter-pop 0.5s cubic-bezier(0.34, 1.7, 0.64, 1) both;
}
.stage-canvas.generating { opacity: 0.7; }

/* ── LOADING SPINNER ──────────────────────────────────── */
.gen-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}
.gen-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--cream-dark);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gen-loading-text {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--ink-soft);
}
.gen-loading-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-ghost);
  font-style: italic;
}

/* ── POST-GENERATE ACTIONS ────────────────────────────── */
.post-gen-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.action-btn {
  font-family: var(--font-ui);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  border: var(--border-thick);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-hard);
}
.action-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.action-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.action-btn--download { background: var(--ink); color: var(--yellow); }
.action-btn--animate  { background: var(--coral); color: white; }
.action-btn--book     { background: var(--teal);  color: white; }
.action-btn.disabled  { background: var(--cream-dark); color: var(--ink-ghost); cursor: not-allowed; box-shadow: none; }
.action-btn.disabled:hover { transform: none; box-shadow: none; }
.action-icon { font-size: 1rem; }

.story-usage-badge {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--ink-ghost);
  font-style: italic;
  margin-left: auto;
}

/* ── MODAL ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,13,13,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1.5rem;
  animation: fade-in-up 0.3s var(--ease-out) both;
}
.modal-box {
  background: var(--cream);
  border: var(--border-thick);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hard-lg);
  max-width: 640px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: background var(--ease-out);
}
.modal-close:hover { background: var(--cream-dark); }
.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.modal-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-ghost);
  margin-bottom: 2rem;
}
.modal-paths {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
}
.modal-path {
  background: white;
  border: var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}
.path-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.modal-path h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.modal-path p {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-ghost);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.path-btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  background: var(--ink);
  color: var(--yellow);
  border: var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 3px 3px 0 var(--coral);
}
.path-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--coral); }
.path-btn--upload { background: var(--cyan); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.modal-divider {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-ghost);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── VIDEO RESULT ─────────────────────────────────────── */
.video-result { margin-top: 1.5rem; text-align: center; }
.result-video {
  width: 100%;
  max-height: 320px;
  border: var(--border-thick);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hard);
  margin-bottom: 1rem;
  background: var(--ink);
}
.job-queued {
  background: var(--cream-dark);
  border: var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}
.queue-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.job-queued p { font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-soft); }
.job-queued code { background: var(--cream); padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.8rem; }
.queue-sub { color: var(--ink-ghost); font-style: italic; font-size: 0.75rem; margin-top: 0.5rem; }
.modal-error {
  background: #FFF0EE;
  border: 2px solid var(--coral);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--coral);
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .modal-paths { grid-template-columns: 1fr; }
  .modal-divider { display: none; }
  .post-gen-actions { flex-direction: column; }
  .story-usage-badge { margin-left: 0; }
}

/* ── Photo upload zone ─────────────────────────────────── */
.photo-upload-zone {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.photo-upload-label { cursor: pointer; }
.photo-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 2px dashed var(--ink-ghost);
  border-radius: var(--radius-md);
  background: var(--cream);
  transition: border-color 0.2s, background 0.2s;
}
.photo-preview:hover { border-color: var(--ink); background: #f5f0e8; }
.photo-preview.has-photo {
  border-style: solid;
  border-color: var(--mint);
  padding: 0.25rem;
}
.photo-preview.has-photo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.photo-upload-icon {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1;
}
.photo-upload-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.photo-optional { opacity: 0.6; }
.photo-clear-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--coral);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  text-decoration: underline;
}

.photo-upload-step-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.photo-optional { display: none; }

/* ── Usage meter ───────────────────────────────────────── */
.usage-meter {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.usage-meter-bar {
  height: 4px;
  background: var(--cream);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--ink-ghost);
}
.usage-meter-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--mint);
  transition: width 0.4s ease, background 0.3s;
  width: 100%;
}
.usage-meter-fill.warn { background: #f5a623; }
.usage-meter-fill.danger { background: var(--coral); }
.usage-meter-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.usage-meter-label.danger { color: var(--coral); font-weight: 700; }

/* ── Waitlist form ───────────────────────────────────────── */
.waitlist-badge {
  display: inline-block;
  background: var(--teal);
  color: white;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.waitlist-hint {
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 10px;
}
.waitlist-success {
  text-align: center;
  padding: 20px 0 8px;
}
.success-icon {
  font-size: 2rem;
  color: var(--teal);
  font-weight: 900;
  line-height: 1;
}
.success-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  margin: 8px 0 4px;
}
.success-sub {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
