/* Wedding Design Tokens — Artem & Daria, 21 August 2026
   Палитра из брендбука Roma & Riko Wedding Studio (PDF) */

:root {
  /* Base — кремово-молочные */
  --cream: #F5F1E8;          /* Cannoli Cream Pantone 11-4302 */
  --ivory: #FCFAF3;
  --champagne: #E8DEC8;
  --linen: #EFE8D9;
  --paper: #FBF8F0;

  /* Accent — бордо/винные */
  --andorra: #6E2A2A;        /* Pantone Andorra 19-1327 */
  --red-mineral: #5B1B1B;    /* Pantone Red Mineral 19-1627 */
  --cabernet: #3E1414;       /* deep wine */
  --burgundy-soft: #8B3A3A;

  /* Accent — зелёные (стебли, листва) */
  --commander: #4F5A47;      /* Pantone Commander Green 19-0425 */
  --sage: #6B7563;
  --olive: #6B6E4A;

  /* Neutral */
  --ink: #1A1816;            /* почти чёрный */
  --black: #0E0E0E;
  --slate: #2B2825;
  --muted: #8A8478;
  --rule: #C9BFA8;           /* линии-разделители */

  /* Typography */
  --font-display: 'Italiana', 'Didot', 'Bodoni MT', serif;       /* высокий условный serif для шапок */
  --font-serif:   'Cormorant Garamond', 'EB Garamond', serif;    /* основной serif */
  --font-script:  'Pinyon Script', 'Petit Formal Script', cursive;
  --font-sans:    'Inter', 'Helvetica Neue', system-ui, sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --space-7: 8rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 760px;
  --container-reading: 620px;

  /* Misc */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-serif); color: var(--ink); background: var(--cream); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* Selection */
::selection { background: var(--andorra); color: var(--ivory); }

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

/* === MOBILE FIXES для immersive вариантов ===
   600vh sticky на маленьком экране = 70 свайпов до конца сцены.
   Урезаем длину sticky-stages, делаем подписи компактнее. */
@media (max-width: 720px) {
  /* Сократить высоту sticky-stage для всех immersive вариантов */
  .immersion,            /* 06 garden walk */
  .tunnel,               /* 07 anfilada */
  .toc-sticky-host,      /* 10 genesis toc */
  .map-stage,            /* 09 map */
  .birth,                /* 10 genesis birth */
  .tree-stage,           /* 11 tree */
  .cosmos-stage,         /* 12 cosmos */
  .rivers-stage,         /* 13 rivers */
  .const-stage,          /* 14 constellation */
  .aurora-stage,         /* 15 aurora */
  .moon-stage            /* 16 moonrise */
  { height: 350vh !important; }

  /* Genesis "birth" stage особенно длинный */
  .birth { height: 400vh !important; }

  /* Уменьшить caption на мобиле */
  .stage-caption,
  .scene-text-inner,
  .room-content-inner,
  .overlay-card {
    width: min(92vw, 540px) !important;
  }
  .caption-card { padding: .8rem .8rem !important; }
  .caption-text { font-size: 1rem !important; line-height: 1.3 !important; }
  .caption-eyebrow { font-size: .55rem !important; letter-spacing: .35em !important; }
  .progress-label { font-size: .5rem !important; }

  /* Гарантировать что rail/HUD не перекрывают контент на узких экранах */
  .rail, .door-rail, .zoom-progress, .progress {
    transform: translateY(-50%) scale(.85);
  }

  /* Letter envelope — уменьшить и убрать промахи */
  .envelope { width: min(90vw, 380px) !important; }

  /* Cosmos: stars не вылетают за экран */
  .star.daria, .star.artem { width: 50px !important; height: 50px !important; }

  /* Tree pills — компактные */
  .name-pill { padding: .5rem 1rem !important; }
  .name-pill .name { font-size: .9rem !important; }
  .name-pill .role { font-size: .5rem !important; }

  /* Genesis big name — уменьшить чтобы влезало */
  .big-name { font-size: clamp(3.5rem, 18vw, 8rem) !important; }

  /* Книжный разворот на мобиле — стек */
  .spread { aspect-ratio: auto !important; }

  /* Map paper — увеличить чтобы карта была читаемой */
  .map-paper { width: 280% !important; }

  /* Tree fruit smaller */
  .fruit-monogram { width: clamp(100px, 22vw, 160px) !important; font-size: 2.4rem !important; }

  /* Light mono в Aurora — уменьшить */
  .light-mono-script { font-size: clamp(3.5rem, 18vw, 7rem) !important; }

  /* Final hero на мобиле — компактнее */
  .final-hero .h-names { font-size: clamp(2rem, 8vw, 3.5rem) !important; }
}

/* Фикс для скроллбаров — на мобиле горизонтальный быть не должен */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; }
}
