/* Шрифты (локальные копии Google Fonts) */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/CormorantGaramond-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/CormorantGaramond-500-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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/CormorantGaramond-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/CormorantGaramond-500-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: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/Manrope-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/Manrope-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: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/Manrope-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/Manrope-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: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/Manrope-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/Manrope-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: 'Oswald';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/Oswald-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/Oswald-500-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: 'Oswald';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/Oswald-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/Oswald-500-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: 'Oswald';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/Oswald-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/Oswald-500-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;
}

  :root {
    color-scheme: dark;
    --night: #120E1F;
    --night-2: #1C1630;
    --cream: #F7EDE0;
    --cream-muted: #C9BBAE;
    --gold: #F0B54A;
    --coral: #F07A5A;
    --line: rgba(247, 237, 224, .18);
    --radius: 22px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --display: "Oswald", "Arial Narrow", sans-serif;
    --fairy: "Cormorant Garamond", Georgia, serif;
  }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body {
    margin: 0; background: var(--night); color: var(--cream);
    font: 400 16px/1.6 "Manrope", system-ui, sans-serif;
    overflow-x: hidden;
  }
  img { display: block; max-width: 100%; }

  .skip {
    position: absolute; left: 16px; top: -100px; z-index: 50;
    padding: 12px 16px; border-radius: 12px; background: var(--cream); color: var(--night);
  }
  .skip:focus { top: 16px; }

  .logo { display: block; height: auto; }

  /* ================= Scroll-scrub ================= */
  .scrub { height: 300vh; position: relative; }
  .stage {
    position: sticky; top: 0; height: 100vh; height: 100dvh;
    overflow: hidden; isolation: isolate;
  }
  .scene { position: absolute; inset: 0; overflow: hidden; will-change: clip-path; }
  .scene img {
    width: 100%; height: 100%; object-fit: cover;
    transform-origin: 50% 60%; will-change: transform;
  }
  .scene[data-i="1"] { clip-path: circle(0% at 50% 100%); }

  /* затемнение для читаемости текста */
  .shade {
    position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(180deg, rgba(18,14,31,.55) 0%, rgba(18,14,31,0) 28%, rgba(18,14,31,0) 42%, rgba(18,14,31,.6) 68%, rgba(18,14,31,.92) 100%),
      radial-gradient(120% 80% at 50% 50%, transparent 55%, rgba(18,14,31,.45));
  }
  .grain {
    position: absolute; inset: -50%; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  .topbar {
    position: absolute; z-index: 5; inset: 0 0 auto 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 16px;
  }
  .topbar .logo { width: clamp(96px, 11vw, 132px); }
  .btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
    padding: 10px 20px; border-radius: 999px;
    font: 600 15px/1 "Manrope", sans-serif; text-decoration: none; color: var(--night);
    background: var(--gold);
    transition: background .2s var(--ease), transform .2s var(--ease);
    touch-action: manipulation;
  }
  .btn:hover { background: #F6C66A; }
  .btn:active { transform: scale(.97); }
  .btn:focus-visible, .card:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
  .btn svg { width: 18px; height: 18px; }
  .btn.ghost {
    color: var(--cream); background: rgba(18,14,31,.35);
    border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .btn.ghost:hover { background: rgba(18,14,31,.6); }

  /* ---- Hero ---- */
  .hero {
    position: absolute; z-index: 4; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 96px 16px 120px; text-align: center;
    will-change: transform, opacity;
  }
  .badge {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px;
    padding: 7px 16px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(18,14,31,.35);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    font-size: 14px; font-weight: 500;
  }
  .badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 2.2s var(--ease) infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(240,181,74,.18); } }

  h1 { margin: 0; line-height: .9; text-shadow: 0 4px 40px rgba(18,14,31,.45); }
  h1 .fairy {
    display: block; font: italic 600 clamp(40px, 7vw, 92px)/1 var(--fairy);
    color: var(--cream); letter-spacing: .01em; margin-bottom: -.08em;
    text-shadow: 0 2px 24px rgba(18,14,31,.7);
  }
  h1 .big {
    display: block; font: 700 clamp(112px, 26vw, 340px)/.86 var(--display);
    text-transform: uppercase; letter-spacing: .02em;
  }
  .lead {
    margin: 22px auto 0; max-width: 34ch;
    font-size: clamp(16px, 1.8vw, 20px); color: var(--cream);
    text-shadow: 0 2px 16px rgba(18,14,31,.6);
  }

  /* ---- Chapter captions ---- */
  .cap {
    position: absolute; z-index: 4;
    left: clamp(16px, 5vw, 72px); right: 16px; bottom: clamp(88px, 14vh, 140px);
    max-width: 560px; opacity: 0; will-change: transform, opacity;
    text-shadow: 0 2px 18px rgba(18,14,31,.8);
  }
  .cap .num { font: 500 15px/1 var(--display); letter-spacing: .2em; color: var(--gold); }
  .cap h2 { margin: 12px 0 10px; font: 600 clamp(36px, 5.5vw, 72px)/1 var(--display); text-transform: uppercase; }
  .cap h2 em { font: italic 600 1.05em/1 var(--fairy); text-transform: none; color: var(--gold); }
  .cap p { margin: 0; max-width: 42ch; font-size: clamp(15px, 1.5vw, 18px); color: var(--cream-muted); }

  .meter {
    position: absolute; z-index: 5; left: clamp(16px, 5vw, 72px); right: clamp(16px, 5vw, 72px);
    bottom: max(28px, env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 16px;
    font: 500 13px/1 var(--display); letter-spacing: .18em; color: var(--cream-muted);
  }
  .meter .track { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
  .meter .fill { height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }
  .meter .scroll { display: inline-flex; align-items: center; gap: 8px; }
  .meter .scroll svg { width: 14px; height: 14px; animation: nudge 1.8s var(--ease) infinite; }
  @keyframes nudge { 50% { transform: translateY(4px); } }

  /* ================= Tours ================= */
  .tours {
    position: relative; padding: clamp(72px, 12vw, 140px) clamp(16px, 4vw, 48px) clamp(64px, 10vw, 120px);
    background:
      radial-gradient(60% 50% at 85% 0%, rgba(240,122,90,.14), transparent 70%),
      radial-gradient(50% 40% at 10% 20%, rgba(240,181,74,.10), transparent 70%),
      var(--night);
  }
  .tours-head { max-width: 1200px; margin: 0 auto clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
  .eyebrow { margin: 0 0 12px; font: 500 14px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
  .tours h2 { margin: 0; font: 600 clamp(40px, 6vw, 80px)/.95 var(--display); text-transform: uppercase; }
  .tours h2 em { font: italic 600 1.05em/1 var(--fairy); text-transform: none; color: var(--gold); }
  .tours-head p { margin: 0; max-width: 40ch; color: var(--cream-muted); }

  .about { max-width: 48ch; color: var(--cream-muted); }
  .about p { margin: 0 0 12px; }
  .about p:last-child { margin: 0; }
  .facts {
    max-width: 1200px; margin: 0 auto clamp(32px, 5vw, 56px); padding: 0; list-style: none;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  }
  .facts li { display: flex; flex-direction: column; gap: 4px; padding: 20px 0; }
  .facts li + li { padding-left: clamp(16px, 3vw, 32px); border-left: 1px solid var(--line); }
  .facts b { font: 600 clamp(24px, 3vw, 36px)/1.1 var(--display); text-transform: uppercase; color: var(--gold); }
  .facts span { font-size: 15px; color: var(--cream-muted); }
  .tag { display: inline-flex; align-items: center; gap: 6px; }
  .tag svg { width: 14px; height: 14px; }

  .cards {
    max-width: 1200px; margin: 0 auto; padding: 0; list-style: none;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px);
  }
  .cards li { opacity: 0; transform: translateY(48px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .cards li.in { opacity: 1; transform: none; }
  .cards li:nth-child(2) { transition-delay: .08s; }
  .cards li:nth-child(3) { transition-delay: .16s; }

  .card {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end;
    aspect-ratio: 3 / 4; padding: clamp(20px, 2.4vw, 28px);
    border-radius: var(--radius); overflow: hidden; isolation: isolate;
    color: var(--cream); text-decoration: none;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
  }
  .card img {
    position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s var(--ease);
  }
  .card::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(18,14,31,0) 35%, rgba(18,14,31,.92) 100%);
  }
  .card:hover img { transform: scale(1.06); }
  .tag {
    position: absolute; top: 20px; left: 20px;
    padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: rgba(18,14,31,.45); border: 1px solid var(--line);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .card h3 { margin: 0; font: 600 clamp(26px, 2.6vw, 34px)/1.05 var(--display); text-transform: uppercase; }
  .card p { margin: 10px 0 20px; color: var(--cream-muted); font-size: 15px; line-height: 1.5; }
  .card .go {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 48px; padding: 0 8px 0 20px; border-radius: 999px;
    background: var(--cream); color: var(--night); font-weight: 600; font-size: 15px;
    transition: background .2s var(--ease);
  }
  .card .go span:last-child {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--night); color: var(--cream); transition: transform .3s var(--ease);
  }
  .card .go svg { width: 16px; height: 16px; }
  .card:hover .go { background: var(--gold); }
  .card:hover .go span:last-child { transform: rotate(-45deg); }
  .card.is-disabled { cursor: default; }
  .card.is-disabled img { filter: saturate(.6); }
  .card.is-disabled h3 { margin-bottom: 20px; }
  .card.is-disabled .go { background: rgba(247,237,224,.16); color: var(--cream-muted); border: 1px solid var(--line); }
  .card.is-disabled .go span:last-child { background: transparent; color: var(--cream-muted); }
  .card.is-disabled:hover img { transform: none; }
  .card.is-disabled:hover .go { background: rgba(247,237,224,.16); }
  .card.is-disabled:hover .go span:last-child { transform: none; }

  .bookmark {
    display: flex; align-items: center; gap: 16px;
    max-width: 1200px; margin: 0 auto clamp(40px, 6vw, 72px); padding: 20px 24px;
    width: calc(100% - 2 * clamp(16px, 4vw, 48px));
    border: 1px solid rgba(240,181,74,.35); border-radius: var(--radius);
    background: rgba(240,181,74,.07);
  }
  .bookmark svg { flex: none; width: 28px; height: 28px; color: var(--gold); }
  .bookmark p { margin: 0; font-size: 16px; line-height: 1.5; }
  .bookmark .keys { display: block; margin-top: 4px; font-size: 14px; color: var(--cream-muted); }
  .bookmark kbd {
    display: inline-block; min-width: 1.6em; padding: 1px 6px; text-align: center;
    border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
    font: 600 13px/1.4 "Manrope", sans-serif; color: var(--cream);
  }
  @media (hover: none) { .bookmark .keys { display: none; } }

  footer {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
    max-width: 1200px; margin: 0 auto;
    padding: 32px clamp(16px, 4vw, 48px) calc(32px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); font-size: 14px; color: var(--cream-muted);
  }
  footer .logo { width: 96px; }
  footer a { color: var(--cream); }

  /* ================= Mobile ================= */
  @media (max-width: 767px) {
    .scrub { height: 270vh; }
    .topbar .btn span { display: none; }
    .topbar .btn { padding: 10px 14px; }
    .hero { padding-bottom: 96px; }
    .cards { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }
    .facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
    .card { aspect-ratio: 4 / 5; }
    .meter .scroll { display: none; }
  }

  /* ================= Reduced motion ================= */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .scrub { height: auto; }
    .stage { position: relative; height: 100dvh; }
    .scene[data-i]:not([data-i="0"]), .cap, .meter { display: none; }
    .cards li { opacity: 1; transform: none; transition: none; }
    .card img, .badge i, .meter svg { transition: none; animation: none; }
  }
