* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---- Accessibility utilities ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 12px 20px;
  background: var(--ink-900);
  color: var(--paper-0);
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 9999;
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Global focus indicator for keyboard users */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

body {
  margin: 0;
  background: var(--bg-page);
  background-image: var(--paper-grain);
  color: var(--text-body);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }

body, p, span, a, button, h1, h2, h3, h4, li, div {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--tint-coral); }

@media (min-width: 768px)  { :root { --gutter: var(--space-6); } }
@media (min-width: 1100px) { :root { --gutter: var(--space-7); } }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%       { transform: translateY(-7px) rotate(4deg); }
}
.bob { display: inline-block; animation: bob 1s var(--ease-soft) infinite; }
@media (prefers-reduced-motion: reduce) { .bob { animation: none; } }

/* ---- Layout ---- */
.app { background: var(--bg-page); min-height: 100vh; }

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
  box-sizing: border-box;
}
.section-inner--elevated { position: relative; z-index: 1; }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 250, 243, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--paper-3);
}
.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.nav-logo-text {
  font-family: var(--font-display);
  font-weight: var(--fw-extra);
  font-size: var(--text-2xl);
  color: var(--text-strong);
  line-height: 1;
}
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-text-links { display: flex; align-items: center; gap: 4px; }
.nav-text-links a {
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: var(--text-sm);
  color: var(--text-body);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  transition: background var(--dur-base) var(--ease-soft);
}
.nav-text-links a:hover { background: var(--paper-2); }
.nav-cta { text-decoration: none; margin-left: 6px; }
@media (max-width: 680px) { .nav-text-links { display: none !important; } }

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
}
.hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(64px, 10vw, 120px);
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.hero-content { max-width: 42rem; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-extra);
  font-size: clamp(3.2rem, 10vw, 6rem);
  line-height: 0.96;
  letter-spacing: var(--ls-tight);
  color: var(--text-strong);
  white-space: pre-line;
}
.hero-sub {
  margin: 24px 0 36px;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: var(--lh-normal);
  color: var(--text-muted);
  max-width: 30rem;
}
.hero-cta-link { text-decoration: none; }
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  pointer-events: none;
}
.hero-scroll-label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-scroll-arrow { animation: bob 1.4s var(--ease-soft) infinite; }

/* ---- Tool section ---- */
.tool-section {
  border-top: 1.5px solid var(--paper-3);
  padding: clamp(48px, 7vw, 88px) 0;
  scroll-margin-top: 64px;
}
.tool-card-wrap { padding: 6px 10px 14px 6px; }
.tool-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tool-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-extra);
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  color: var(--text-strong);
}
.tool-refiners {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--paper-3);
}
.tool-result-area {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1.5px solid var(--paper-3);
}
.tool-gollage {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px dashed var(--paper-3);
}
.tool-gollage-header { text-align: center; margin-bottom: 18px; }
.tool-gollage-label {
  font-family: var(--font-hand);
  font-size: var(--text-xl);
  color: var(--text-muted);
}

/* ---- Mood grid ---- */
.mood-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .mood-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }

/* ---- MoodChip ---- */
.mood-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  padding: 16px 18px;
  min-width: 0;
  background: var(--surface-raised);
  border: 1.5px solid var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease-soft),
              box-shadow var(--dur-base) var(--ease-soft),
              background var(--dur-base) var(--ease-soft),
              border-color var(--dur-base) var(--ease-soft);
}
.mood-chip:hover { transform: translateY(-2px); }
.mood-chip--active { border: 2.5px solid var(--ink-900); box-shadow: var(--shadow-note); transform: rotate(-1deg); }
.mood-chip--active:hover { transform: rotate(-1deg); }
.mood-chip--active.mood-chip--sage   { background: var(--tint-sage); }
.mood-chip--active.mood-chip--blush  { background: var(--tint-blush); }
.mood-chip--active.mood-chip--lilac  { background: var(--tint-lilac); }
.mood-chip--active.mood-chip--ochre  { background: var(--tint-ochre); }
.mood-chip--active.mood-chip--blue   { background: var(--tint-blue); }
.mood-chip--active.mood-chip--coral  { background: var(--tint-coral); }
.mood-label { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--text-xl); color: var(--text-strong); line-height: 1; }
.mood-sub { font-family: var(--font-body); font-size: var(--text-xs); color: var(--text-muted); }

/* ---- PillRow ---- */
.pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill-row-label { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-faint); }
.pill-row-options { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-btn {
  font: inherit;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-body);
  background: var(--surface-raised);
  border: 1.5px solid var(--paper-3);
  transition: all var(--dur-base) var(--ease-soft);
}
.pill-btn--active { font-weight: var(--fw-bold); color: var(--text-on-accent); background: var(--brand-primary); border-color: var(--brand-primary); }

/* ---- Curating ---- */
.curating { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.curating-title { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--text-xl); color: var(--text-strong); }
.curating-sub { font-family: var(--font-hand); font-size: var(--text-md); color: var(--text-muted); }

/* ---- Result ---- */
.result { display: flex; gap: clamp(18px, 3vw, 30px); align-items: flex-start; flex-wrap: wrap; }
.result-poster { padding-top: 8px; }
.result-info { flex: 1 1 280px; min-width: 260px; }
.result-badge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.result-meta-label { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-faint); letter-spacing: var(--ls-wide); }
.result-title { margin: 0 0 6px; font-family: var(--font-display); font-weight: var(--fw-extra); font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.05; color: var(--text-strong); }
.result-genre { font-family: var(--font-body); font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 14px; }
.result-curator-note {
  position: relative;
  background: var(--surface-raised);
  border: var(--stroke-ink);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 14px;
}
.result-curator-note-inner { display: flex; gap: 10px; }
.result-curator-icon { flex-shrink: 0; margin-top: 2px; }
.result-curator-text { margin: 0; font-family: var(--font-hand); font-size: var(--text-lg); line-height: var(--lh-snug); color: var(--text-body); }
.result-meta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.result-where-label { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-faint); letter-spacing: var(--ls-wide); text-transform: uppercase; }
.result-criteria { font-family: var(--font-hand); font-size: var(--text-sm); color: var(--text-faint); }
.result-where-none { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); opacity: 0.7; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- PosterThumb ---- */
.poster-thumb { position: relative; flex-shrink: 0; }
.poster-washi {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 64px;
  height: 22px;
  background: var(--tint-coral);
  border: 1px solid rgba(201, 98, 74, 0.4);
  opacity: 0.85;
  z-index: 2;
}
.poster-frame { background: var(--surface-raised); padding: 10px 10px 12px; border: var(--stroke-ink); border-radius: 4px; box-shadow: var(--shadow-note); }
.poster-image { position: relative; aspect-ratio: 2 / 3; border-radius: 2px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.poster-grain { position: absolute; inset: 0; background-image: var(--paper-grain); opacity: 0.5; mix-blend-mode: overlay; }
.poster-vignette { position: absolute; inset: 0; box-shadow: inset 0 -60px 60px -20px rgba(0, 0, 0, 0.5); }
.poster-caption { position: relative; padding: 14px 12px; }
.poster-genre { font-family: var(--font-mono); font-size: 9px; letter-spacing: var(--ls-stamp); text-transform: uppercase; color: rgba(255, 255, 255, 0.72); margin-bottom: 6px; }
.poster-title { font-family: var(--font-display); font-weight: var(--fw-extra); line-height: 1.05; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); }
.poster-image--photo { aspect-ratio: 2 / 3; width: 100%; object-fit: cover; display: block; border-radius: 2px; }

/* ---- PlatformBadge ---- */
.platform-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-weight: var(--fw-bold); font-size: var(--text-xs); color: var(--text-body); background: var(--paper-2); border: 1.5px solid var(--ink-900); border-radius: var(--radius-pill); padding: 4px 12px; }
.platform-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-accent); flex-shrink: 0; }

/* ---- Problem section ---- */
.section-problem {
  background: var(--surface-sunken);
  border-top: 1.5px solid var(--paper-3);
  border-bottom: 1.5px solid var(--paper-3);
  padding: clamp(64px, 9vw, 116px) 0;
  position: relative;
  overflow: hidden;
}
.problem-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 38px; max-width: 60rem; margin-left: auto; margin-right: auto; }
.stat-card { text-align: center; }
.stat-big { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--text-3xl); color: var(--text-strong); line-height: 1; margin: 8px 0 6px; }
.stat-small { font-family: var(--font-body); font-size: var(--text-sm); color: var(--text-muted); }

/* ---- How section ---- */
.section-how { padding: clamp(64px, 9vw, 116px) 0; scroll-margin-top: 64px; }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 40px; list-style: none; padding: 0; }
.step-card { position: relative; }
.step-num { position: absolute; top: 18px; right: 20px; font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--text-4xl); color: var(--paper-3); line-height: 1; }
.step-eyebrow { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--ls-stamp); text-transform: uppercase; color: var(--brand-accent); margin: 14px 0 4px; }
.step-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--text-2xl); color: var(--text-strong); }
.step-body { margin: 0; font-size: var(--text-md); line-height: var(--lh-normal); color: var(--text-muted); }

/* ---- Why section ---- */
.section-why {
  background: var(--surface-sunken);
  border-top: 1.5px solid var(--paper-3);
  border-bottom: 1.5px solid var(--paper-3);
  padding: clamp(64px, 9vw, 116px) 0;
  scroll-margin-top: 64px;
}
.why-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 40px; align-items: stretch; }
.why-col { display: flex; flex-direction: column; }
.why-col > * { flex: 1; }
.why-col--muted { opacity: 0.92; }
.why-col-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 14px; }
.why-col--muted .why-col-header { border-bottom: 1px solid var(--paper-3); }
.why-col--featured .why-col-header { border-bottom: 1.5px solid var(--ink-900); }
.why-col-name { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--text-xl); }
.why-col--muted .why-col-name { color: var(--text-muted); }
.why-col--featured .why-col-name { color: var(--text-strong); }
.why-rows { display: flex; flex-direction: column; gap: 14px; }
.why-row-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; font-weight: normal; }
.why-row-value { font-family: var(--font-body); font-size: var(--text-md); margin: 0; }
.why-col--muted .why-row-value { font-weight: var(--fw-regular); color: var(--text-muted); }
.why-col--featured .why-row-value { font-weight: var(--fw-bold); color: var(--text-strong); }

/* ---- Showcase section ---- */
.section-showcase { padding: clamp(64px, 9vw, 116px) 0; scroll-margin-top: 64px; position: relative; overflow: hidden; }
.showcase-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.showcase-row { display: flex; gap: clamp(14px, 3vw, 34px); justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.showcase-card { width: min(280px, 80vw); }
.showcase-card:nth-child(1) { transform: rotate(-3deg); }
.showcase-card:nth-child(2) { transform: rotate(1.5deg); }
.showcase-card:nth-child(3) { transform: rotate(-1.5deg); }

/* ---- SectionHead ---- */
.section-head--center { text-align: center; max-width: 46rem; margin: 0 auto; }
.section-head-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-head-eyebrow-text { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--ls-stamp); text-transform: uppercase; color: var(--brand-accent); }
.section-head-title { margin: 0; font-family: var(--font-display); font-weight: var(--fw-extra); font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); color: var(--text-strong); }
.section-head-sub { margin: 14px 0 0; max-width: 34rem; font-size: var(--text-lg); line-height: var(--lh-normal); color: var(--text-muted); }
.section-head--center .section-head-sub { margin-left: auto; margin-right: auto; }

/* ---- GollageCard ---- */
.gollage-card-wrap { position: relative; width: 100%; max-width: 360px; margin: 0 auto; }
.gollage-card { background: var(--surface-raised); border: var(--border-w-bold) solid var(--ink-900); border-radius: var(--radius-doodle); box-shadow: var(--shadow-note); padding: 16px; transform: rotate(-1.5deg); }
.gollage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gollage-date { font-family: var(--font-mono); font-size: 9px; color: var(--text-faint); letter-spacing: var(--ls-wide); }
.gollage-placeholder { position: relative; aspect-ratio: 4 / 5; border-radius: 6px; border: 2px dashed var(--ink-300); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; }
.gollage-placeholder-label { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-muted); }
.gollage-placeholder-sub { font-family: var(--font-hand); font-size: var(--text-sm); color: var(--text-faint); }
.gollage-caption { margin-top: 14px; }
.gollage-title { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--text-xl); color: var(--text-strong); line-height: 1.1; }
.gollage-sub { font-family: var(--font-body); font-size: var(--text-xs); color: var(--text-muted); margin-top: 3px; }
.gollage-kw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gollage-watermark { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--paper-3); }
.gollage-brand { font-family: var(--font-display); font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--text-muted); }
.gollage-url { font-family: var(--font-mono); font-size: 9px; color: var(--text-faint); margin-left: auto; }
.gollage-share { display: flex; justify-content: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.gollage-share-btn { font: inherit; cursor: pointer; font-family: var(--font-body); font-weight: var(--fw-bold); font-size: var(--text-xs); color: var(--text-body); background: var(--surface-raised); border: 1.5px solid var(--ink-900); border-radius: var(--radius-pill); padding: 8px 16px; transition: background var(--dur-base) var(--ease-soft); }
.gollage-share-btn:hover { background: var(--paper-2); }

/* ---- Footer ---- */
.footer { background: var(--surface-sunken); border-top: 1.5px solid var(--paper-3); padding: clamp(56px, 10vw, 110px) 0 56px; text-align: center; position: relative; overflow: hidden; }
.footer-title { margin: 18px 0 0; font-family: var(--font-display); font-weight: var(--fw-extra); font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1; letter-spacing: var(--ls-tight); color: var(--text-strong); }
.footer-sub { margin: 16px auto 28px; max-width: 26rem; font-size: var(--text-lg); color: var(--text-muted); line-height: var(--lh-normal); }
.footer-cta-link { text-decoration: none; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px dashed var(--paper-3); display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--text-xl); color: var(--text-strong); }
.footer-tagline { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-faint); letter-spacing: var(--ls-wide); }
.footer-copyright { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-faint); letter-spacing: var(--ls-wide); }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; background: var(--ink-900); color: var(--paper-0); font-family: var(--font-body); font-weight: var(--fw-bold); font-size: var(--text-sm); padding: 12px 20px; border-radius: var(--radius-pill); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; }
