/* ============================================================
   Twinkle.By — концепт 2026 «Blush Editorial»
   Дизайн-система: токены → reset → layout → components → utilities
   Современный стек: @layer, container/fluid type, color-mix(),
   popover, <dialog>, scroll-driven animations, view transitions.
   ============================================================ */

@layer reset, base, layout, components, utilities;

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --bg: #fbf7f9;
  --surface: #ffffff;
  --surface-2: #f6ebf1;
  --ink: #1d1319;
  --ink-2: #6f5b66;
  --ink-3: #a3929b;
  --line: #ecdde5;

  --pink: #ff2d92;        /* неон вывески */
  --pink-deep: #d61a7b;   /* текст/кнопки, AA-контраст на белом */
  --pink-soft: #ffd9ea;
  --pink-tint: #fff0f6;
  --pink-glow: rgba(255, 45, 146, 0.35);

  --night: #180d14;
  --night-2: #241420;
  --night-line: rgba(255, 255, 255, 0.1);
  --night-ink-2: rgba(255, 255, 255, 0.72);

  --font-display: "Unbounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-accent: "Playfair Display", Georgia, "Times New Roman", serif;

  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(29, 19, 25, 0.05), 0 4px 14px rgba(29, 19, 25, 0.04);
  --shadow-lg: 0 24px 60px -24px rgba(214, 26, 123, 0.28);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --topbar-h: 64px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.5s;
}

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 24px); overflow-x: clip; }
  body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
  ul[class], ol[class] { padding: 0; list-style: none; }
  img, video, svg { display: block; max-width: 100%; }
  img { height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  summary { cursor: pointer; }
  :focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }
  @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; }
  }
}

/* ---------- Base ---------- */
@layer base {
  body {
    font: 400 1rem/1.65 var(--font-text);
    color: var(--ink);
    background: var(--bg);
    padding-top: calc(var(--topbar-h) + 20px);
    isolation: isolate;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
  }
  /* лёгкое «зерно» вместо тяжёлого фонового PNG */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
  }
  p { text-wrap: pretty; }
  strong, b { font-weight: 700; }
  ::selection { background: var(--pink-soft); color: var(--ink); }

  @view-transition { navigation: auto; }
}

/* ---------- Layout ---------- */
@layer layout {
  .container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }
  .container--narrow { width: min(860px, 100% - var(--gutter) * 2); }

  main { overflow-x: clip; }
  .section { padding-block: clamp(56px, 8vw, 112px); }
  .section--tight { padding-block: clamp(32px, 5vw, 64px); }
  .section--flush-top { padding-top: 0; }

  .section__head { display: grid; gap: 14px; max-width: 780px; margin-bottom: clamp(28px, 4vw, 52px); }
  .section__head--center { margin-inline: auto; text-align: center; justify-items: center; }
  .section__head--split { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
  .section__head--split > .btn { margin-bottom: 6px; }
  @media (max-width: 720px) {
    .section__head--split { grid-template-columns: 1fr; }
    .section__head--split > .btn { justify-self: start; }
  }
}

/* ---------- Typography ---------- */
@layer components {
  .h1 {
    font: 600 clamp(2rem, 1rem + 3.7vw, 3.8rem)/1.04 var(--font-display);
    letter-spacing: -0.02em;
    text-wrap: balance;
  }
  .h2 {
    font: 600 clamp(1.6rem, 1rem + 2.4vw, 2.85rem)/1.1 var(--font-display);
    letter-spacing: -0.015em;
    text-wrap: balance;
  }
  .h3 { font: 600 1.1rem/1.3 var(--font-display); letter-spacing: -0.01em; }
  .h1 em, .h2 em, .accent {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 400;
    font-size: 1.12em;
    color: var(--pink-deep);
    letter-spacing: 0;
  }
  .lead { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.22rem); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font: 700 0.7rem/1 var(--font-display);
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--pink-deep);
  }
  .eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
  .muted { color: var(--ink-2); }
  .small { font-size: 0.875rem; }
}

/* ---------- Components ---------- */
@layer components {
  /* Skip link + scroll progress */
  .skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-weight: 700; transition: top 0.2s; }
  .skip-link:focus { top: 12px; }

  .progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 70; background: linear-gradient(90deg, var(--pink), #ff8ac2); transform-origin: 0 50%; scale: 0 1; }
  @supports (animation-timeline: scroll()) {
    .progress { animation: progress-grow linear both; animation-timeline: scroll(root); }
  }
  @keyframes progress-grow { from { scale: 0 1; } to { scale: 1 1; } }

  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 24px; border-radius: var(--r-pill);
    font: 700 0.95rem/1 var(--font-text); letter-spacing: 0.01em;
    border: 1px solid transparent; white-space: nowrap;
    transition: translate 0.2s var(--ease), box-shadow 0.3s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
  }
  .btn svg { width: 18px; height: 18px; }
  .btn--primary { background: var(--pink-deep); color: #fff; box-shadow: 0 12px 28px -12px var(--pink-glow); }
  .btn--primary:hover { background: var(--pink); translate: 0 -2px; box-shadow: 0 18px 34px -12px var(--pink-glow); }
  .btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
  .btn--ghost:hover { border-color: var(--ink-3); translate: 0 -2px; }
  .btn--light { background: #fff; color: var(--ink); }
  .btn--light:hover { background: var(--pink-soft); translate: 0 -2px; }
  .btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
  .btn--outline-light:hover { border-color: #fff; translate: 0 -2px; }
  .btn--sm { padding: 10px 16px; font-size: 0.85rem; }
  .btn--lg { padding: 18px 30px; font-size: 1.05rem; }
  .btn--block { width: 100%; }

  .chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--r-pill);
    background: color-mix(in oklab, #fff 82%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em; color: var(--ink);
    white-space: nowrap;
  }
  .chip--pink { background: var(--pink-tint); border-color: var(--pink-soft); color: var(--pink-deep); }
  .chip--dark { background: rgba(255, 255, 255, 0.1); border-color: var(--night-line); color: #fff; }

  /* Topbar */
  .topbar { position: fixed; inset: 12px 0 auto 0; z-index: 60; pointer-events: none; }
  .topbar__inner {
    pointer-events: auto;
    display: flex; align-items: center; gap: 24px;
    height: var(--topbar-h); padding: 0 10px 0 22px;
    border-radius: var(--r-pill);
    background: color-mix(in oklab, #fff 72%, transparent);
    backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid color-mix(in oklab, #fff 55%, var(--line));
    box-shadow: 0 10px 30px -18px rgba(29, 19, 25, 0.25);
    transition: background-color 0.3s, box-shadow 0.3s;
  }
  /* при прокрутке (десктоп и планшет) шапка прижимается к верху сплошной полосой на всю ширину, без зазора */
  @media (min-width: 761px) {
    .topbar { transition: top 0.25s var(--ease); }
    .topbar::before {
      content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
      background: color-mix(in oklab, #fff 92%, transparent);
      backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
      border-bottom: 1px solid var(--line); box-shadow: 0 14px 40px -18px rgba(29, 19, 25, 0.25);
      transition: opacity 0.25s var(--ease);
    }
    .topbar__inner { position: relative; transition: background-color 0.25s, box-shadow 0.25s, border-color 0.25s, border-radius 0.25s; }
    .is-scrolled .topbar { top: 0; }
    .is-scrolled .topbar::before { opacity: 1; }
    .is-scrolled .topbar__inner { background: transparent; border-color: transparent; box-shadow: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  }

  .logo { display: inline-flex; align-items: baseline; font: 700 1.15rem/1 var(--font-display); letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
  .logo__tld { color: var(--pink-deep); }
  .logo__star { width: 16px; height: 16px; fill: var(--pink); margin: 0 1px; filter: drop-shadow(0 0 6px var(--pink-glow)); }
  .logo--light { color: #fff; }

  .topbar__nav { display: flex; gap: 4px; margin-inline: auto; }
  .topbar__nav a { padding: 8px 12px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.9rem; color: var(--ink-2); transition: background-color 0.2s, color 0.2s; }
  .topbar__nav a:hover { background: var(--pink-tint); color: var(--pink-deep); }
  .topbar__actions { display: flex; align-items: center; gap: 10px; }
  .topbar__phone { font-weight: 700; font-size: 0.9rem; color: var(--ink); padding: 8px 10px; }
  .topbar__phone:hover { color: var(--pink-deep); }

  .burger { display: none; width: 44px; height: 44px; border-radius: 50%; place-items: center; position: relative; }
  .burger span, .burger span::before, .burger span::after { content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: absolute; left: 12px; transition: translate 0.2s; }
  .burger span { top: 21px; }
  .burger span::before { left: 0; translate: 0 -6px; }
  .burger span::after { left: 0; translate: 0 6px; }

  @media (max-width: 1199px) { .topbar__phone { display: none; } }
  @media (max-width: 1100px) { .topbar__nav a { padding: 8px 9px; font-size: 0.86rem; } }
  @media (max-width: 1023px) {
    .topbar__nav { display: none; }
    .burger { display: grid; }
  }
  /* телефон: шапка во всю ширину без скругления, только логотип и меню справа (кнопка записи — в нижнем доке) */
  @media (max-width: 760px) {
    .topbar { inset: 0 0 auto 0; }
    .topbar__inner {
      width: 100%; height: 56px; padding: 0 8px 0 var(--gutter); gap: 8px;
      border-radius: 0; border-width: 0 0 1px 0; box-shadow: none;
    }
    .topbar__actions { margin-left: auto; }
    .topbar__actions .btn { display: none; }
    body { padding-top: 72px; }
    html { scroll-padding-top: 72px; }
    .menu { padding-top: 88px; }
  }

  /* Mobile menu (native popover) */
  .menu {
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: calc(var(--topbar-h) + 32px) var(--gutter) 40px; border: 0;
    background: var(--bg); color: var(--ink);
    display: none; flex-direction: column; gap: 6px;
    opacity: 0; translate: 0 -8px; transition: opacity 0.25s var(--ease), translate 0.25s var(--ease), display 0.25s allow-discrete, overlay 0.25s allow-discrete;
  }
  .menu:popover-open { display: flex; opacity: 1; translate: 0 0; }
  @starting-style { .menu:popover-open { opacity: 0; translate: 0 -8px; } }
  .menu::backdrop { background: transparent; }
  .menu a:not(.btn) { font: 600 clamp(1.5rem, 6vw, 2rem)/1.2 var(--font-display); letter-spacing: -0.01em; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .menu__actions { display: grid; gap: 10px; margin-top: auto; padding-top: 24px; }
  .menu__close { position: absolute; top: 22px; right: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 1.4rem; line-height: 1; }
  .menu__eyebrow { margin-bottom: 8px; }

  /* Hero */
  .hero {
    display: grid; grid-template-columns: 1.12fr 0.88fr; gap: clamp(24px, 5vw, 72px); align-items: center;
    padding-block: clamp(20px, 4vw, 48px) clamp(40px, 6vw, 72px);
    min-height: min(720px, calc(100svh - var(--topbar-h) - 40px));
  }
  .hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: 0.8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 22px; box-shadow: var(--shadow-sm); }
  .hero__eyebrow .logo__star { width: 14px; height: 14px; }
  .hero__title { margin-bottom: 20px; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
  .facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.9rem; font-weight: 600; }
  .facts li { display: inline-flex; align-items: center; gap: 8px; }
  .facts li::before { content: "✦"; color: var(--pink); font-size: 0.8em; }

  .hero__media { position: relative; isolation: isolate; display: grid; place-items: center; }
  .hero__media::before { content: ""; position: absolute; inset: 8% -6% -8% -6%; z-index: -1; background: radial-gradient(closest-side, rgba(255, 45, 146, 0.3), transparent 72%); filter: blur(28px); }
  .hero__video {
    height: clamp(400px, 60vh, 540px); width: auto; max-width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
    border-radius: 34px; border: 6px solid #fff; background: var(--pink-soft);
    box-shadow: 0 40px 80px -30px rgba(29, 19, 25, 0.35), 0 0 0 1px var(--line);
  }
  .hero__float {
    position: absolute; display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 16px; background: color-mix(in oklab, #fff 85%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 0.82rem; font-weight: 700;
    animation: float 6s ease-in-out infinite;
  }
  .hero__float--tl { top: 8%; left: 0; }
  .hero__float--br { bottom: 10%; right: 0; animation-delay: -3s; }
  .hero__float .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px var(--pink-soft); }
  @keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

  /* телефоны: две кнопки в одну строку, делят ширину пополам */
  @media (max-width: 760px) {
    .hero__actions, .cta-band__actions { flex-wrap: nowrap; gap: 10px; width: 100%; }
    .hero__actions .btn, .cta-band__actions .btn { flex: 1 1 0; min-width: 0; padding: 15px 12px; font-size: clamp(0.8rem, 3.6vw, 0.95rem); }
  }
  @media (max-width: 400px) {
    .hero__actions .btn svg { display: none; }
  }
  @media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: 0; }
    .hero__media { padding-inline: 12%; }
    .hero__video { height: auto; width: min(100%, 280px); }
    .hero__float--tl { left: 0; top: 4%; }
    .hero__float--br { right: 0; bottom: 6%; }
  }

  /* Marquee */
  .marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding: 14px 0; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .marquee__track { display: flex; width: max-content; gap: 0; animation: marquee 38s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
  .marquee__list { display: flex; gap: 0; }
  .marquee__list li { display: inline-flex; align-items: center; gap: 22px; padding-right: 22px; font: 600 0.8rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
  .marquee__list li::after { content: "✦"; color: var(--pink); font-size: 0.9em; }
  @keyframes marquee { to { translate: -50% 0; } }
  @media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; flex-wrap: wrap; width: auto; } .marquee__list[aria-hidden] { display: none; } }

  /* Bento (принципы) */
  .bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
  .bento__item {
    grid-column: span 4; position: relative; overflow: clip;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: clamp(20px, 3vw, 30px); display: grid; align-content: start; gap: 12px; min-height: 220px;
    transition: translate var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  }
  .bento__item:hover { translate: 0 -4px; box-shadow: var(--shadow-lg); }
  .bento__item--wide { grid-column: span 7; }
  .bento__item--media { grid-column: span 5; padding: 0; min-height: 280px; max-height: 380px; }
  .bento__item--media img { width: 100%; height: 100%; object-fit: cover; }
  .bento__item--media figcaption { position: absolute; left: 16px; bottom: 16px; }
  .bento__item--pink { background: var(--pink-tint); border-color: var(--pink-soft); }
  .bento__item--night { background: var(--night); color: #fff; border-color: transparent; }
  .bento__item--night p { color: var(--night-ink-2); }
  .bento__num { font: 600 2.4rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1.5px var(--pink); letter-spacing: -0.02em; }
  .bento__item--night .bento__num { -webkit-text-stroke-color: var(--pink); }
  .bento__item h3 { font: 600 1.15rem/1.25 var(--font-display); }
  .bento__item p { color: var(--ink-2); }
  @media (max-width: 900px) {
    .bento__item, .bento__item--wide, .bento__item--media { grid-column: span 6; }
  }
  @media (max-width: 600px) {
    .bento__item, .bento__item--wide, .bento__item--media { grid-column: span 12; min-height: 0; }
    .bento__item--media { min-height: 240px; }
  }

  /* Directions */
  .dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .dir-card {
    position: relative; display: grid; grid-template-rows: auto 1fr; overflow: clip;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    transition: translate var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color 0.3s;
  }
  .dir-card:hover { translate: 0 -5px; box-shadow: var(--shadow-lg); border-color: var(--pink-soft); }
  .dir-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--pink-soft); }
  .dir-card__media img { width: 100%; height: 100%; object-fit: cover; transition: scale 1s var(--ease); }
  .dir-card:hover .dir-card__media img { scale: 1.06; }
  .dir-card__tags { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
  .dir-card__body { padding: 20px 22px 24px; display: grid; gap: 10px; align-content: start; }
  .dir-card__title { font: 600 1.1rem/1.25 var(--font-display); }
  .dir-card__title a::after { content: ""; position: absolute; inset: 0; }
  .dir-card__text { color: var(--ink-2); font-size: 0.95rem; }
  .dir-card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--pink-deep); font-weight: 700; font-size: 0.9rem; }
  .dir-card__more svg { width: 16px; height: 16px; transition: translate 0.3s var(--ease); }
  .dir-card:hover .dir-card__more svg { translate: 3px -3px; }
  @media (max-width: 1000px) { .dirs { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 640px) {
    .dirs { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px calc((100% - min(82%, 320px)) / 2) 20px; margin-inline: calc(var(--gutter) * -1); scrollbar-width: none; }
    .dirs::-webkit-scrollbar { display: none; }
    .dir-card { flex: 0 0 min(82%, 320px); scroll-snap-align: center; scroll-snap-stop: always; }
  }
  .dirs__note { margin-top: 24px; padding: 18px 22px; border-radius: var(--r-md); background: var(--pink-tint); border: 1px dashed var(--pink-soft); color: var(--ink-2); font-size: 0.95rem; }

  /* Studio (тёмная неоновая секция) */
  .studio { position: relative; overflow: clip; background: var(--night); color: #fff; }
  .studio::before, .studio::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(60px); }
  .studio::before { width: 60vw; height: 60vw; right: -20vw; bottom: -30vw; background: radial-gradient(closest-side, rgba(255, 45, 146, 0.45), transparent 70%); }
  .studio::after { width: 40vw; height: 40vw; left: -15vw; top: -15vw; background: radial-gradient(closest-side, rgba(176, 79, 216, 0.25), transparent 70%); }
  .studio .container { position: relative; z-index: 1; }
  .studio .eyebrow { color: var(--pink); }
  .studio .lead { color: var(--night-ink-2); }
  .studio__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
  .studio__copy { position: sticky; top: calc(var(--topbar-h) + 32px); display: grid; gap: 22px; }
  .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat { padding: 18px 20px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--night-line); }
  .stat__value { display: block; font: 600 clamp(0.8rem, 0.4rem + 1.6vw, 1.35rem)/1.1 var(--font-display); letter-spacing: -0.01em; }
  @media (max-width: 480px) { .stat { padding: 12px 14px; } }
  .stat__label { display: block; margin-top: 6px; font-size: 0.82rem; color: var(--night-ink-2); }
  .studio__actions { display: flex; flex-wrap: wrap; gap: 12px; }

  .mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 140px; grid-auto-flow: dense; gap: 12px; }
  .mosaic__item { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--night-2); }
  .mosaic__item img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease); }
  .mosaic__item:hover img { scale: 1.04; }
  .mosaic__item--a { grid-column: span 4; grid-row: span 2; }
  .mosaic__item--b { grid-column: span 2; grid-row: span 3; }
  .mosaic__item--c { grid-column: span 2; grid-row: span 1; }
  .mosaic__item--d { grid-column: span 2; grid-row: span 2; }
  .mosaic__item--video { grid-column: span 4; grid-row: span 2; }
  .mosaic__label { position: absolute; left: 12px; bottom: 12px; }
  @media (max-width: 900px) {
    .studio__grid { grid-template-columns: 1fr; }
    .studio__copy { position: static; }
    .mosaic { grid-auto-rows: 110px; }
    .mosaic__item--a { grid-column: span 6; }
    .mosaic__item--b { grid-column: span 3; grid-row: span 2; }
    .mosaic__item--c { grid-column: span 3; grid-row: span 2; }
    .mosaic__item--d { grid-column: span 6; grid-row: span 2; }
    .mosaic__item--video { grid-column: span 6; }
  }

  /* YouTube facade — iframe грузится только по клику */
  .yt { position: relative; width: 100%; height: 100%; background: #000; cursor: pointer; }
  .yt img { opacity: 0.85; }
  .yt__play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(255, 45, 146, 0.25), 0 20px 40px -10px var(--pink-glow); transition: scale 0.3s var(--ease); }
  .yt:hover .yt__play { scale: 1.08; }
  .yt__play svg { width: 26px; height: 26px; margin-left: 3px; }
  .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

  /* Team */
  .team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .trainer {
    display: grid; gap: 14px; align-content: start;
    padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    transition: translate var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  }
  .trainer:hover { translate: 0 -4px; box-shadow: var(--shadow-lg); }
  .trainer__avatar {
    width: 128px; height: 128px; border-radius: 24px; display: grid; place-items: center; object-fit: cover;
    font: 600 1.3rem/1 var(--font-display); color: #fff;
    background: conic-gradient(from 210deg, var(--pink), #ff8ac2, #b04fd8, var(--pink));
    box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--pink-soft), 0 10px 24px -10px var(--pink-glow);
  }
  .trainer__name { font: 600 1.2rem/1.2 var(--font-display); }
  .trainer__role { font-size: 0.85rem; font-weight: 700; color: var(--pink-deep); margin-top: 4px; }
  .trainer__text { color: var(--ink-2); font-size: 0.95rem; }
  .trainer__tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .trainer__tags .chip { background: var(--surface-2); backdrop-filter: none; }
  .trainer__certs { border-top: 1px solid var(--line); padding-top: 12px; }
  .trainer__certs summary { list-style: none; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.9rem; color: var(--ink); }
  .trainer__certs summary::-webkit-details-marker { display: none; }
  .trainer__certs summary::after { content: "+"; font: 400 1.3rem/1 var(--font-display); color: var(--pink-deep); transition: rotate 0.3s var(--ease); }
  .trainer__certs[open] summary::after { rotate: 45deg; }
  .trainer__certs ul { margin-top: 10px; display: grid; gap: 6px; font-size: 0.88rem; color: var(--ink-2); padding-left: 0; }
  .trainer__certs li { display: flex; gap: 8px; }
  .trainer__certs li::before { content: "✓"; color: var(--pink-deep); font-weight: 800; }
  @media (max-width: 1000px) { .team { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { .team { grid-template-columns: 1fr; } }

  /* Prices */
  .plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
  .plan { display: grid; gap: 10px; align-content: start; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: translate var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
  .plan:hover { translate: 0 -3px; box-shadow: var(--shadow-lg); }
  .plan__name { font: 600 1.05rem/1.25 var(--font-display); }
  .plan__meta { font-size: 0.85rem; color: var(--ink-2); }
  .plan__price { font: 600 1.7rem/1 var(--font-display); letter-spacing: -0.02em; margin-top: 6px; }
  .plan__price small { font: 700 0.8rem/1 var(--font-text); color: var(--ink-2); margin-left: 6px; letter-spacing: 0; }
  .plan__note { font-size: 0.85rem; color: var(--ink-2); padding-top: 8px; border-top: 1px dashed var(--line); }
  .plan--trial { background: var(--night); color: #fff; border-color: transparent; position: relative; overflow: clip; }
  .plan--trial::after { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; bottom: -110px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 45, 146, 0.5), transparent 70%); filter: blur(20px); pointer-events: none; }
  .plan--trial .plan__meta, .plan--trial .plan__note { color: var(--night-ink-2); border-color: var(--night-line); }
  .plan--trial .plan__price small { color: var(--night-ink-2); }
  .plan--trial .btn { margin-top: 8px; position: relative; z-index: 1; }
  .plan--skeleton { min-height: 150px; background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%); background-size: 240% 100%; animation: shimmer 1.4s linear infinite; border-color: var(--line); }
  @keyframes shimmer { to { background-position-x: -140%; } }
  .plans__status { grid-column: 1 / -1; padding: 18px 22px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); }
  .plans__status a { color: var(--pink-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
  .plans__status--note { font-size: 0.85rem; padding: 12px 16px; }
  @media (max-width: 640px) {
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .plan__name { font-size: 0.9rem; hyphens: auto; overflow-wrap: break-word; }
    .plan { padding: 16px 14px; gap: 6px; }
    .plan__meta, .plan__note { font-size: 0.78rem; }
    .plan__price { font-size: 1.35rem; }
    .plan--trial { grid-column: 1 / -1; }
  }
  .plans__actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
  .plans__foot { margin-top: 14px; font-size: 0.88rem; color: var(--ink-2); }

  /* Steps */
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step; }
  .step { position: relative; display: grid; gap: 10px; align-content: start; padding: 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .step::before { counter-increment: step; content: "0" counter(step); font: 600 2.2rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1.5px var(--pink); letter-spacing: -0.02em; }
  .step h3 { font: 600 1.1rem/1.3 var(--font-display); }
  .step p { color: var(--ink-2); font-size: 0.95rem; }
  @media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

  .callout { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; margin-top: 16px; padding: 20px 22px; border-radius: var(--r-md); background: var(--pink-tint); border: 1px solid var(--pink-soft); }
  .callout__icon { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: var(--pink-deep); }
  .callout__icon svg { width: 20px; height: 20px; }
  .callout h3 { font: 700 1rem/1.3 var(--font-text); margin-bottom: 4px; }
  .callout p { color: var(--ink-2); font-size: 0.93rem; }

  /* FAQ */
  .faq { border-top: 1px solid var(--line); }
  .faq__item { border-bottom: 1px solid var(--line); }
  .faq__item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font: 700 1.05rem/1.35 var(--font-text); }
  .faq__item summary::-webkit-details-marker { display: none; }
  .faq__item summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 400 1.3rem/1 var(--font-display); color: var(--pink-deep); transition: rotate 0.3s var(--ease), background-color 0.3s; }
  .faq__item[open] summary::after { rotate: 45deg; background: var(--pink-tint); }
  .faq__body { padding: 0 0 24px; color: var(--ink-2); max-width: 68ch; }
  .faq__body a { color: var(--pink-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

  /* Contacts */
  .contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
  .contact__list { display: grid; gap: 16px; margin-block: 24px 28px; }
  .contact__row { position: relative; padding-left: 58px; min-height: 44px; display: grid; align-content: center; gap: 2px; }
  .contact__icon { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--pink-deep); }
  .contact__icon svg { width: 20px; height: 20px; }
  .contact__label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
  .contact__value { font-weight: 700; font-size: 1.05rem; margin: 0; }
  .contact__value a:hover { color: var(--pink-deep); }
  .contact__actions { display: flex; flex-wrap: wrap; gap: 10px; }
  .contact__map { position: relative; display: block; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  .contact__map img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: scale 1s var(--ease); }
  .contact__map:hover img { scale: 1.03; }
  .contact__map-badge { position: absolute; left: 16px; bottom: 16px; }
  @media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }

  /* CTA band */
  .cta-band { position: relative; overflow: clip; border-radius: var(--r-xl); background: var(--night); color: #fff; padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: center; }
  .cta-band::before { content: ""; position: absolute; width: 50%; aspect-ratio: 1; right: -10%; top: -40%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 45, 146, 0.55), transparent 70%); filter: blur(40px); pointer-events: none; }
  .cta-band > * { position: relative; }
  .cta-band .h2 { margin-block: 12px 10px; }
  .cta-band p { color: var(--night-ink-2); max-width: 50ch; }
  .cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-self: end; }
  @media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; } .cta-band__actions { justify-self: start; } }

  /* Footer */
  .footer { border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 64px) 0 calc(28px + env(safe-area-inset-bottom)); background: var(--surface); }
  .footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
  .footer__brand p { margin-top: 12px; color: var(--ink-2); font-size: 0.93rem; max-width: 34ch; }
  .footer h3 { font: 700 0.75rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
  .footer ul { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
  .footer li a { color: var(--ink-2); font-size: 0.95rem; }
  .footer li a:hover { color: var(--pink-deep); }
  .footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-3); }
  @media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; gap: 24px; } }

  /* Mobile dock */
  .dock {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 55;
    display: none; grid-template-columns: 1fr 1fr 1.35fr; gap: 6px; padding: 6px;
    border-radius: var(--r-pill); background: color-mix(in oklab, #fff 88%, transparent);
    backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid var(--line); box-shadow: 0 14px 40px -14px rgba(29, 19, 25, 0.35);
  }
  .dock__item { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 700; color: var(--ink-2); }
  .dock__item svg { width: 20px; height: 20px; }
  .dock__item--primary { background: var(--pink-deep); color: #fff; box-shadow: 0 10px 24px -10px var(--pink-glow); }
  @media (max-width: 760px) {
    .dock { display: grid; }
    body { padding-bottom: 84px; }
  }

  /* Dialog */
  .dialog { border: 0; padding: 0; background: transparent; max-width: min(460px, calc(100% - 32px)); width: 100%; }
  .dialog::backdrop { background: rgba(29, 19, 25, 0.45); backdrop-filter: blur(6px); }
  .dialog[open] { animation: dialog-in 0.3s var(--ease); }
  @keyframes dialog-in { from { opacity: 0; translate: 0 12px; } }
  .dialog__panel { position: relative; padding: 28px; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 30px 80px -30px rgba(29, 19, 25, 0.5); }
  .dialog__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); font-size: 1.3rem; line-height: 1; }
  .dialog__title { font: 600 1.35rem/1.2 var(--font-display); margin-bottom: 8px; padding-right: 40px; }
  .dialog__text { color: var(--ink-2); margin-bottom: 20px; }
  .dialog__list { display: grid; gap: 8px; }
  .dialog__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); transition: background-color 0.2s, border-color 0.2s; }
  .dialog__row:hover { background: var(--pink-tint); border-color: var(--pink-soft); }
  .dialog__row b { display: block; }
  .dialog__row small { color: var(--ink-2); }
  .dialog__row svg { width: 18px; height: 18px; color: var(--pink-deep); flex: none; }

  /* Breadcrumbs (внутренние страницы) */
  .crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 20px; }
  .crumbs a:hover { color: var(--pink-deep); }
  .crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
  .crumbs [aria-current] { color: var(--ink); font-weight: 700; }

  /* Direction page */
  .dir-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(12px, 3vw, 32px) clamp(32px, 5vw, 56px); }
  .dir-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .dir-hero__media { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .dir-hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
  @media (max-width: 800px) { .dir-hero { grid-template-columns: 1fr; } }

  .article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 64px); align-items: start; }
  .article { display: grid; gap: 28px; max-width: 70ch; }
  .article h2 { font: 600 clamp(1.3rem, 1rem + 1.2vw, 1.8rem)/1.2 var(--font-display); letter-spacing: -0.01em; margin-bottom: 10px; }
  .article p { color: var(--ink-2); }
  .article p + p { margin-top: 12px; }
  .article figure { margin-block: 8px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
  .article figcaption { padding: 10px 14px; font-size: 0.82rem; color: var(--ink-3); background: var(--surface); }
  .checklist { display: grid; gap: 10px; }
  .checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
  .checklist li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--pink-tint); color: var(--pink-deep); display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; margin-top: 2px; }
  .timeline { display: grid; gap: 12px; counter-reset: tl; }
  .timeline li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink-2); }
  .timeline li::before { counter-increment: tl; content: counter(tl); width: 40px; height: 40px; border-radius: 12px; background: var(--night); color: #fff; display: grid; place-items: center; font: 600 0.95rem/1 var(--font-display); }
  .aside { position: sticky; top: calc(var(--topbar-h) + 32px); display: grid; gap: 14px; }
  .aside__card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; gap: 14px; }
  .aside__card h3 { font: 600 1rem/1.3 var(--font-display); }
  .aside__list { display: grid; gap: 10px; font-size: 0.92rem; color: var(--ink-2); }
  .aside__list a:hover { color: var(--pink-deep); }
  .aside__list b { color: var(--ink); }
  .aside__links { display: grid; gap: 6px; }
  .aside__links a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-weight: 600; font-size: 0.92rem; }
  .aside__links a:hover { background: var(--pink-tint); color: var(--pink-deep); }
  @media (max-width: 900px) { .article-grid { grid-template-columns: 1fr; } .aside { position: static; } }
}

/* ---------- Utilities ---------- */
@layer utilities {
  .reveal { opacity: 0; translate: 0 22px; transition: opacity 0.8s var(--ease), translate 0.8s var(--ease); transition-delay: var(--delay, 0s); }
  .reveal.is-visible, .no-js .reveal { opacity: 1; translate: 0 0; }
  @media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; translate: 0 0; transition: none; } }
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .text-center { text-align: center; }
  .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
}
