/* =========================================================================
   polyacom.ru/dr-kirilla — стили сюрприз-лендинга
   Технологии: чистый CSS, custom properties, без сборки.
   ========================================================================= */

/* ---------- 1. Self-hosted шрифты (Unbounded + Golos Text, Cyrillic) ---- */

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/unbounded-400-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/unbounded-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/unbounded-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/unbounded-700-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/unbounded-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/unbounded-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/unbounded-800-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/unbounded-800-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/unbounded-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/golos-text-400-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/golos-text-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/golos-text-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/golos-text-600-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/golos-text-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/golos-text-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 2. Design tokens (design-concept.md §2-3, verbatim) --------- */

:root {
  --bg-base:        #14120F;
  --bg-elevated:    #1E1A15;
  --bg-elevated-2:  #241F19;

  --text-primary:   #F6EFE4;
  --text-secondary: #B7ACA0;
  --text-tertiary:  #8A8175;

  --accent:         #F4732A;
  --accent-hover:   #FF8A47;
  --accent-deep:    #C8501B;

  --line:           rgba(246,239,228,0.12);
  --scrim:          rgba(20,18,15,0.6);

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Golos Text', system-ui, sans-serif;

  --h1: clamp(2.5rem, 7vw + 1rem, 4.5rem);
  --h2: clamp(2rem, 5vw + 1rem, 3rem);
  --h3: clamp(1.375rem, 3vw + 1rem, 1.875rem);
  --body: clamp(1rem, 1.2vw + 0.8rem, 1.125rem);
  --caption: 0.875rem;

  --num-hero: clamp(6rem, 28vw, 11rem);

  --radius-pill: 999px;
  --radius-box: 20px;

  --section-pad-mobile: 56px;
  --section-pad-desktop: 88px;

  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
}

/* ---------- 3. Reset ---------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
}
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; }
p { max-width: 65ch; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 4. Layout primitives ---------------------------------------- */

.section {
  position: relative;
  padding-block: var(--section-pad-mobile);
  padding-inline: 20px;
}
@media (min-width: 768px) {
  .section { padding-block: var(--section-pad-desktop); padding-inline: 48px; }
}
.section__inner {
  max-width: 1100px;
  margin-inline: auto;
}
.section__inner--narrow { max-width: 680px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h2.block-title { font-size: var(--h2); margin-bottom: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--bg-base);
  transition: background 0.25s var(--ease-out), transform 0.2s var(--ease-out);
}
.btn:hover, .btn:focus-visible { background: var(--accent-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--line);
}
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn--small { padding: 8px 16px; font-size: 0.8rem; }

/* generic scroll-reveal utility, IntersectionObserver adds .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* sitewide grain / light-leak overlay — self-contained SVG noise, no external asset dependency */
.site-grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
}
.site-grain.has-photo-texture {
  background-image: var(--grain-photo-url, none);
  background-size: cover;
}

/* honest icon fallback: inline SVG shown by default, swapped for generated PNG if it loads */
.icon-slot { display: inline-flex; align-items: center; justify-content: center; }
.icon-slot img { display: none; }
.icon-slot svg { width: 100%; height: 100%; }

/* ========================================================================
   BLOCK 1 — HERO
   ======================================================================== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-base) 0%, rgba(20,18,15,0.75) 32%, rgba(20,18,15,0.15) 60%, transparent 75%);
}
.hero__number {
  position: absolute;
  top: 6vh; right: 4vw;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--num-hero);
  color: var(--accent);
  opacity: 0.9;
  line-height: 1;
  z-index: 1;
  will-change: transform;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 20px 56px;
  max-width: 640px;
  width: 100%;
  min-width: 0;
}
@media (min-width: 768px) { .hero__content { padding: 0 48px 88px; } }
.hero__title { font-size: var(--h1); margin-bottom: 16px; overflow-wrap: break-word; hyphens: auto; }
.hero__title .line {
  display: block;
  opacity: 0;
  transform: translateY(16px);
  animation: hero-line-in 0.6s var(--ease-out) forwards;
}
.hero__title .line:nth-child(1) { animation-delay: 0.1s; }
.hero__title .line:nth-child(2) { animation-delay: 0.18s; }
.hero__subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(16px);
  animation: hero-line-in 0.6s var(--ease-out) forwards;
  animation-delay: 0.28s;
}
.hero__cta {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-line-in 0.6s var(--ease-out) forwards;
  animation-delay: 0.36s;
}
@keyframes hero-line-in { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .hero__title .line, .hero__subtitle, .hero__cta { opacity: 1; transform: none; animation: none; }
}

/* ========================================================================
   BLOCK 2 — HOOK (editorial manifesto)
   ======================================================================== */
.hook {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent) 85%);
  position: relative;
  text-align: center;
  overflow: hidden;
}
.hook__inner {
  max-width: 760px;
  margin-inline: auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.hook__quote {
  font-size: var(--h1);
  color: var(--bg-base);
  margin-bottom: 24px;
  min-height: 3.2em;
}
.hook__cursor {
  display: inline-block;
  width: 0.06em;
  margin-left: 2px;
  background: var(--bg-base);
  animation: hook-blink 1s steps(1) infinite;
}
@keyframes hook-blink { 50% { opacity: 0; } }
.hook__subtitle {
  color: rgba(20,18,15,0.78);
  font-size: 1.05rem;
  margin: 0 auto 32px;
  max-width: 46ch;
}
.hook .btn { background: var(--bg-base); color: var(--text-primary); }
.hook .btn:hover { background: #26221c; }
@media (prefers-reduced-motion: reduce) {
  .hook__cursor { display: none; }
}

/* ========================================================================
   BLOCK 3 — KASSA (chat scene)
   ======================================================================== */
.kassa { background: var(--bg-base); }
.kassa__doodle {
  position: absolute; inset: 0;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 15% 20%, transparent 14px, var(--text-primary) 15px, var(--text-primary) 16px, transparent 17px),
    radial-gradient(circle at 82% 70%, transparent 20px, var(--text-primary) 21px, var(--text-primary) 22px, transparent 23px);
  pointer-events: none;
}
.kassa__inner { max-width: 480px; margin-inline: auto; position: relative; }
.kassa h2 { font-size: var(--h2); margin-bottom: 28px; text-align: center; }
.chat { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.chat__bubble {
  max-width: 84%;
  padding: 14px 18px;
  border-radius: var(--radius-box);
  font-size: 1rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.chat__bubble.is-visible { opacity: 1; transform: translateY(0); }
.chat__bubble--left {
  align-self: flex-start;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-bottom-left-radius: 6px;
}
.chat__bubble--right {
  align-self: flex-end;
  background: var(--bg-elevated-2);
  color: var(--text-primary);
  border-bottom-right-radius: 6px;
}
.chat__bubble--punch {
  border: 1px solid var(--accent);
  color: var(--text-primary);
}
.chat__bubble--punch.is-shaking { animation: chat-shake 0.3s ease; }
@keyframes chat-shake {
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.kassa__caption { text-align: center; color: var(--accent); font-weight: 600; margin-bottom: 20px; }
.kassa__text { color: var(--text-secondary); text-align: center; margin: 0 auto 28px; }
.kassa__bridge { border-radius: var(--radius-box); width: 100%; max-height: 220px; object-fit: cover; }
@media (prefers-reduced-motion: reduce) {
  .chat__bubble { opacity: 1; transform: none; }
  .chat__bubble--punch.is-shaking { animation: none; }
}

/* ========================================================================
   BLOCK 4 — TWO MODES (split screen)
   ======================================================================== */
.modes { position: relative; }
.modes__title {
  font-size: var(--h2);
  text-align: center;
  padding: var(--section-pad-mobile) 20px 24px;
  background: var(--bg-base);
  max-width: 900px;
  margin-inline: auto;
}
@media (min-width: 768px) { .modes__title { padding: var(--section-pad-desktop) 48px 32px; } }
.modes__halves { display: flex; flex-direction: column; min-height: 90dvh; position: relative; }
.modes__half {
  position: relative;
  flex: 1;
  min-height: 50dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  cursor: pointer;
}
.modes__half img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease-out), filter 0.3s var(--ease-out); }
.modes__half--off img { filter: saturate(0.7) brightness(0.85); }
.modes__half:hover img, .modes__half.is-active img { transform: scale(1.02); }
.modes__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,18,15,0.85), transparent 60%); }
.modes__half--on .modes__scrim { background: linear-gradient(to top, rgba(200,80,27,0.55), transparent 60%); }
.modes__label {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  padding: 24px 24px 4px;
}
.modes__text {
  position: relative; z-index: 1;
  padding: 0 24px 28px;
  max-width: 46ch;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.modes__half:hover .modes__text, .modes__half.is-active .modes__text { opacity: 1; transform: translateY(0); }
.modes__divider { position: absolute; top: 0; bottom: 0; left: 0; right: 0; pointer-events: none; }
@media (min-width: 768px) {
  .modes__halves { flex-direction: row; }
  .modes__half { min-height: 80dvh; }
  .modes__divider { left: 50%; width: 1px; background: var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .modes__text { opacity: 1; transform: none; }
  .modes__half:hover img { transform: none; }
}

/* ========================================================================
   BLOCK 5 — 39 FACETS (bento)
   ======================================================================== */
.facets { background: var(--bg-base); }
.facets__note {
  color: var(--text-tertiary);
  font-size: var(--caption);
  font-style: italic;
  max-width: 60ch;
  margin: 20px auto 0;
  text-align: center;
}
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 28px;
}
@media (min-width: 768px) {
  .bento {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(3, minmax(160px, auto));
  }
  .bento__cell--lg:nth-of-type(1) { grid-column: 1; grid-row: 1 / 3; }
  .bento__cell:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .bento__cell:nth-of-type(3) { grid-column: 3; grid-row: 1; }
  .bento__cell--lg:nth-of-type(4) { grid-column: 1; grid-row: 3; }
  .bento__cell:nth-of-type(5) { grid-column: 2; grid-row: 2 / 4; }
  .bento__cell:nth-of-type(6) { grid-column: 3; grid-row: 2 / 4; }
}
.bento__cell {
  position: relative;
  min-height: 340px;
  border-radius: var(--radius-box);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--bg-elevated);
  background-size: cover;
  background-position: center;
  border: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  opacity: 0;
  transform: translateY(24px);
}
.bento__cell.is-visible { opacity: 1; transform: translateY(0); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out), border-color 0.3s var(--ease-out); }
.bento__cell:hover { border-color: var(--accent); }
.bento__cell--lg { min-height: 340px; }
.bento__cell--bonfire { background-position: center 25%; }
@media (max-width: 767px) { .bento__cell--bonfire { min-height: 340px; } }
.bento__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,18,15,0.85), transparent 55%); }
.bento__cell h3, .bento__cell p { position: relative; z-index: 1; padding-inline: 20px; }
.bento__cell h3 { font-size: 1.15rem; margin-top: auto; }
.bento__cell p { font-size: var(--caption); color: var(--text-secondary); padding-bottom: 20px; margin-top: 4px; }
.bento__cell--icon { align-items: center; justify-content: center; text-align: center; gap: 8px; }
.bento__cell--icon .icon-slot { width: 56px; height: 56px; color: var(--text-secondary); margin-bottom: 8px; }
.bento__cell--icon h3, .bento__cell--icon p { padding-inline: 12px; }
.bento__cell--icon h3 { margin-top: 0; }

/* ========================================================================
   BLOCK 6 — FOREVER DIETING (horizontal scroll-snap strip)
   ======================================================================== */
.dieting { background: var(--bg-base); }
.strip__viewport { position: relative; }
.strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 28px 4px 16px;
  margin: 0 -20px;
  padding-inline: 20px;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .strip { margin: 0; padding-inline: 0; } }
.strip__card {
  scroll-snap-align: start;
  flex: 0 0 78%;
  max-width: 320px;
  background: var(--bg-elevated);
  border-radius: var(--radius-box);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
@media (min-width: 640px) { .strip__card { flex-basis: 320px; } }
@media (min-width: 768px) { .strip__card { flex-basis: 260px; max-width: 260px; } }
.strip__nav {
  display: none;
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated-2);
  border: 1px solid var(--line);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}
.strip__nav:hover { border-color: var(--accent); color: var(--accent); }
.strip__nav:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.strip__nav .chevron { width: 20px; height: 20px; }
.strip__nav--prev { left: -22px; }
.strip__nav--next { right: -22px; }
@media (min-width: 768px) { .strip__nav { display: flex; } }
.strip__card--counter { background: var(--bg-elevated-2); text-align: center; align-items: center; }
.strip__label { color: var(--text-secondary); font-size: var(--caption); margin-bottom: 4px; }
.strip__count {
  font-family: var(--font-display); font-weight: 800; font-size: 3.5rem; color: var(--accent);
  margin-bottom: 16px;
  transition: transform 0.2s var(--ease-spring);
}
.strip__count.is-bouncing { transform: scale(1.25); }
.strip__hint { margin-top: 12px; font-size: var(--caption); color: var(--text-tertiary); min-height: 1.4em; }
.strip__card--photo { padding: 0; overflow: hidden; }
.strip__card--photo img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.strip__quote { color: var(--text-secondary); font-size: 0.95rem; }
.strip__card--verdict { border: 1px solid var(--accent); }
.strip__card--verdict .strip__quote { color: var(--text-primary); }

/* ========================================================================
   BLOCK 7 — GALLERY (masonry)
   ======================================================================== */
.gallery { background: var(--bg-base); }
.masonry {
  columns: 2;
  column-gap: 12px;
  margin-top: 28px;
}
@media (min-width: 768px) { .masonry { columns: 3; column-gap: 16px; } }
@media (min-width: 1100px) { .masonry { columns: 4; } }
.masonry__item {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: var(--radius-box);
  overflow: hidden;
  border: 1px solid transparent;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), border-color 0.25s var(--ease-out);
}
@media (min-width: 768px) { .masonry__item { margin-bottom: 16px; } }
.masonry__item.is-visible { opacity: 1; transform: scale(1); }
.masonry__item:hover, .masonry__item:focus-within { border-color: var(--accent); }
.masonry__item img { width: 100%; height: auto; display: block; }
.masonry__item figcaption { font-size: var(--caption); color: var(--text-tertiary); padding: 8px 4px 0; }

/* ========================================================================
   BLOCK 8 — DICTIONARY (flip cards)
   ======================================================================== */
.dictionary { background: var(--bg-base); }
.flipgrid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}
.flipcard { width: 100%; }
@media (min-width: 768px) { .flipcard { width: calc((100% - 40px) / 3); } }
.flipcard { perspective: 1200px; min-height: 300px; }
.flipcard__inner {
  position: relative;
  width: 100%; height: 100%; min-height: 300px;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-spring);
}
.flipcard.is-flipped .flipcard__inner { transform: rotateY(180deg); }
.flipcard__face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-box);
  background: var(--bg-elevated-2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  outline-offset: 4px;
}
.flipcard__face--front { text-align: center; }
.flipcard__quote { font-family: var(--font-display); font-size: 3rem; color: var(--accent); opacity: 0.3; line-height: 1; }
.flipcard__face--front h3 { font-size: 1.3rem; margin-top: 8px; }
.flipcard__hint { color: var(--text-tertiary); font-size: var(--caption); margin-top: 14px; }
.flipcard__face--back { transform: rotateY(180deg); }
.flipcard__tag { color: var(--accent); font-size: var(--caption); font-style: italic; margin-bottom: 10px; }
.flipcard__face--back p:last-child { color: var(--text-secondary); }
.flipcard__photo {
  margin-top: 14px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: calc(var(--radius-box) - 8px);
  cursor: zoom-in;
}

/* ------------------------------------------------------------------------
   Photo lightbox — full-size preview on click (used by dictionary photos)
   ------------------------------------------------------------------------ */
.photo-lightbox {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 24px;
  cursor: zoom-out;
}
.photo-lightbox.is-open { display: flex; }
.photo-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-box);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.photo-lightbox__close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}

/* ========================================================================
   BLOCK 9 — MEDIA STAR (letterbox)
   ======================================================================== */
.media { background: var(--bg-base); padding-inline: 0; }
.media__frame {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}
@media (min-width: 768px) { .media__frame { aspect-ratio: 16/9; } }
.media__bar {
  position: absolute; left: 0; right: 0; height: 0;
  background: var(--bg-base);
  z-index: 2;
  transform-origin: top;
}
@media (min-width: 768px) {
  .media__bar { height: 12%; transform: scaleY(0); }
  .media__bar--top { top: 0; }
  .media__bar--bottom { bottom: 0; transform-origin: bottom; }
  .media__frame.is-visible .media__bar { transform: scaleY(1); transition: transform 0.8s var(--ease-out); }
}
.media__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,18,15,0.92) 0%, rgba(20,18,15,0.55) 30%, transparent 62%);
  z-index: 2;
  pointer-events: none;
}
.media__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px 20px;
  z-index: 3;
}
@media (min-width: 768px) { .media__caption { padding: 40px 48px; bottom: 13%; } }
.media__caption h2 { font-size: var(--h2); margin-bottom: 8px; }
.media__caption p { color: var(--text-secondary); max-width: 60ch; }
.media__aside {
  max-width: 680px;
  margin: 24px auto 0;
  padding-inline: 20px;
  color: var(--text-tertiary);
}
.media__strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-top: 24px;
  padding: 0 20px 4px;
  scrollbar-width: none;
}
.media__strip::-webkit-scrollbar { display: none; }
.media__strip img {
  scroll-snap-align: start;
  flex: 0 0 88%;
  max-width: 420px;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-box);
}
@media (min-width: 640px) { .media__strip img { flex-basis: 400px; height: 320px; } }
@media (min-width: 768px) { .media__strip { width: fit-content; max-width: 100%; margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) {
  .media__bar { transform: none !important; }
}

/* ========================================================================
   BLOCK 10 — TITLES & ACHIEVEMENTS
   ======================================================================== */
.titles { background: var(--bg-base); }
.titles__featured { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
@media (min-width: 768px) { .titles__featured { grid-template-columns: 1fr 1fr; } }
.tile {
  background: var(--bg-elevated);
  border-radius: var(--radius-box);
  padding: 24px;
}
.tile--featured {
  padding: 24px 24px;
  background: var(--bg-elevated-2);
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.tile--featured .icon-slot { width: 48px; height: 48px; color: var(--accent); margin-bottom: 16px; }
.tile--featured h3 { font-size: 1.3rem; margin-bottom: 8px; }
.tile--featured p { color: var(--text-secondary); }
.tile--photo .tile__photos { display: flex; gap: 8px; margin-bottom: 16px; }
.tile--photo img { border-radius: 12px; width: 50%; height: 120px; object-fit: cover; }
.titles__rest {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}
@media (min-width: 640px) { .titles__rest { grid-template-columns: 1fr 1fr; } }
.titles__rest .tile { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 18px 20px; }
.titles__rest .tile:has(.icon-slot) { flex-direction: row; align-items: flex-start; }
.titles__rest .icon-slot { width: 32px; height: 32px; color: var(--accent); flex-shrink: 0; }
.tile__thumb { width: 100%; max-width: 220px; height: 160px; border-radius: 12px; object-fit: cover; object-position: top center; flex-shrink: 0; }
.titles__rest h3 { font-size: 1rem; margin-bottom: 4px; }
.titles__rest p { color: var(--text-secondary); font-size: 0.92rem; }

/* ========================================================================
   BLOCK 11 — CAT DEFENSE (polaroid collage)
   ======================================================================== */
.cat { background: var(--bg-elevated); }
.cat__text { color: var(--text-secondary); max-width: 60ch; margin: 0 auto 20px; text-align: center; }
.cat h2 { text-align: center; margin-bottom: 20px; }
.polaroids {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 12px;
  margin: 40px auto;
  max-width: 720px;
  padding-top: 8px;
}
.polaroid {
  background: #EFE7D8;
  padding: 10px 10px 32px;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  width: 44%;
  max-width: 220px;
  opacity: 0;
  transform: translateY(-40px) rotate(0deg);
  transition: opacity 0.6s var(--ease-spring), transform 0.6s var(--ease-spring);
}
.polaroid.is-visible { opacity: 1; }
.polaroid--1.is-visible { transform: rotate(-6deg); }
.polaroid--2.is-visible { transform: rotate(3deg) translateY(18px); }
.polaroid--3.is-visible { transform: rotate(-2deg); }
.polaroid--4.is-visible { transform: rotate(5deg) translateY(10px); }
.polaroid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 2px; }
.polaroid figcaption {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: #14120F;
  text-align: center;
  margin-top: 10px;
}
@media (prefers-reduced-motion: reduce) {
  .polaroid { opacity: 1; transform: none !important; }
}

/* ========================================================================
   BLOCK 12 — FAMILY (sticky-stack reveal)
   ======================================================================== */
.family { background: var(--bg-base); }
.family__intro, .family__outro { max-width: 60ch; margin: 0 auto 24px; color: var(--text-secondary); text-align: center; }
.family h2 { text-align: center; }
.stack { position: relative; margin: 32px auto; max-width: 480px; }
.stack__item {
  position: sticky;
  top: 12vh;
  border-radius: var(--radius-box);
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}
.stack__item img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.stack__item--wide img { aspect-ratio: 16/9; }
.stack__item.is-behind { transform: scale(0.92); opacity: 0.5; }
@media (max-width: 767px) {
  .stack__item { position: static; box-shadow: none; }
  .stack__item.is-behind { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stack__item { position: static !important; transform: none !important; opacity: 1 !important; }
}

/* ========================================================================
   BLOCK 13 — INSIDER RIDDLE (centered minimal)
   ======================================================================== */
.riddle {
  min-height: 70dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
}
.riddle__card {
  background: var(--bg-elevated);
  border-radius: var(--radius-box);
  padding: 48px 36px;
  max-width: 420px;
  text-align: center;
  animation: riddle-breathe 4s ease-in-out infinite;
}
.riddle__card h2 { margin-bottom: 16px; }
.riddle__card p { color: var(--text-secondary); margin: 0 auto 8px; }
.riddle__photo {
  margin-top: 14px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: calc(var(--radius-box) - 8px);
}
@keyframes riddle-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}
@media (prefers-reduced-motion: reduce) {
  .riddle__card { animation: none; }
}

/* ========================================================================
   BLOCK 14 — THEN & NOW (before/after slider)
   ======================================================================== */
.thennow { background: var(--bg-base); }
.thennow h2 { text-align: center; margin-bottom: 24px; }
.baslider {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 4/5;
  border-radius: var(--radius-box);
  overflow: hidden;
  touch-action: none;
  cursor: ew-resize;
  --pos: 50%;
}
@media (min-width: 768px) { .baslider { aspect-ratio: 16/9; } }
.baslider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.baslider__before-wrap {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.baslider__before { filter: sepia(0.15); }
.baslider__handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  width: 3px;
  background: var(--text-primary);
  transform: translateX(-50%);
  pointer-events: none;
}
.baslider__handle::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.baslider__handle::before {
  content: '↔';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--bg-base);
  font-size: 1.1rem;
  z-index: 1;
}
.baslider__tag {
  position: absolute; top: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(20,18,15,0.6);
  font-size: var(--caption);
  font-weight: 600;
  z-index: 1;
}
.baslider__tag--before { left: 16px; }
.baslider__tag--after { right: 16px; }
.thennow__text { max-width: 60ch; margin: 24px auto 0; text-align: center; color: var(--text-secondary); }
.thennow__text strong { color: var(--text-primary); font-family: var(--font-display); }

/* ========================================================================
   BLOCK 15 — FINAL EMOTIONAL (full-bleed crossfade)
   ======================================================================== */
.final {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.final__media { position: absolute; inset: 0; }
.final__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final__img--a { animation: final-crossfade-a 12s ease-in-out infinite; }
.final__img--b { animation: final-crossfade-b 12s ease-in-out infinite; }
@keyframes final-crossfade-a { 0%, 45% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes final-crossfade-b { 0%, 45% { opacity: 0; } 55%, 100% { opacity: 1; } }
.final__scrim { position: absolute; inset: 0; background: rgba(20,18,15,0.8); }
.final__content { position: relative; z-index: 1; max-width: 680px; padding: 0 24px; text-align: center; }
.final__content h2 { font-size: var(--h2); margin-bottom: 20px; }
.final__content p { color: var(--text-secondary); margin: 0 auto 16px; }
.final__wish { font-family: var(--font-display); font-size: 1.3rem; color: var(--text-primary) !important; margin-top: 20px !important; }
@media (prefers-reduced-motion: reduce) {
  .final__img--a, .final__img--b { animation: none; }
  .final__img--b { opacity: 0; }
}

/* ========================================================================
   BLOCK 16 — GREETING FORM
   ======================================================================== */
.greeting { background: var(--bg-base); }
.greeting__card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border-radius: var(--radius-box);
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}
.greeting__card h2 { text-align: center; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: var(--caption); color: var(--text-secondary); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-primary);
  resize: vertical;
}
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.greeting__card .btn { width: 100%; justify-content: center; margin-top: 4px; }
.greeting__card .btn:disabled { opacity: 0.6; cursor: default; }
.greeting__hint { text-align: center; color: var(--text-tertiary); font-size: var(--caption); margin-top: 14px; }
.greeting__status { text-align: center; margin-top: 12px; font-size: var(--caption); min-height: 1.2em; color: var(--text-secondary); }
.greeting__status.is-error { color: #e0554f; }
.greeting__receipt { text-align: center; padding: 8px 0; }
.greeting__receipt-title { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 8px; }
.greeting__receipt-text { color: var(--text-secondary); }
.greeting__donate {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  text-align: center;
}
.greeting__donate-label { font-size: var(--caption); color: var(--text-secondary); margin-bottom: 10px; }
.greeting__donate-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.greeting__donate-phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.greeting__donate-hint { font-size: var(--caption); color: var(--text-tertiary); margin-top: 10px; }

/* confetti (one-shot, on successful submit — hook for backend agent) */
.confetti-piece {
  position: fixed;
  top: -10px;
  width: 8px; height: 14px;
  z-index: 90;
  pointer-events: none;
  animation: confetti-fall 1.2s ease-in forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* ========================================================================
   BLOCK 17 — FOOTER
   ======================================================================== */
.footer { border-top: 1px solid var(--line); background: var(--bg-base); }
.footer__inner {
  max-width: 1100px;
  margin-inline: auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; padding: 40px 48px; }
}
.footer__signature { color: var(--text-tertiary); font-size: var(--caption); }
.footer__share { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: transform 0.2s var(--ease-out), color 0.2s, border-color 0.2s;
}
.share-btn:hover, .share-btn:focus-visible { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.footer__copy { color: var(--text-tertiary); font-size: var(--caption); }
.footer__toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 12px);
  background: var(--bg-elevated-2);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: var(--caption);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  z-index: 80;
  border: 1px solid var(--line);
}
.footer__toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- progressive enhancement: scroll-driven animation on hero number,
   only where supported, IntersectionObserver + rAF remains the base layer ---- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero__number {
      animation: hero-number-parallax linear;
      animation-timeline: view();
      animation-range: entry 0% cover 60%;
    }
    @keyframes hero-number-parallax {
      from { transform: translateY(0); }
      to { transform: translateY(60px); }
    }
  }
}
