/* ============================================================
   Юлия Абрамова — по брендбуку (BRANDBOOK.md)
   ============================================================ */

:root{
  /* масштабная единица: пропорции одинаковы на любом экране,
     эталон — 1600×900, где 1u = 16px */
  --u: min(1vw, 1.7778vh);

  --marble:#F4F1EA;
  --cream:#FBF8F2;
  --ink:#12101A;
  --gold:#B08A3E;
  --gold-light:#E8CF8A;
  --sky-top:#8FC4E8;
  --sky-mid:#BFDCF0;
  --sky-low:#E8F1F8;
  --violet:#6B4BA8;
  --violet-deep:#241A3D;
  --night:#0E0A18;

  --display:'Cinzel', serif;
  --serif:'Cormorant Garamond', serif;
  --sans:'Manrope', sans-serif;

  --wrap:calc(94 * var(--u));
  --header-h:calc(6 * var(--u));
  --pad:5vw;
}

*{box-sizing:border-box; margin:0; padding:0;}
/* 1rem = 1u: всё, что задано в rem, тянется вместе с сеткой,
   поэтому пропорции блоков одинаковы и на 13", и на 24" */
html{ background:var(--sky-top); font-size:var(--u); }
body{
  font-family:var(--sans); font-weight:300; color:var(--ink);
  background:transparent; overflow-x:hidden; -webkit-font-smoothing:antialiased;
}
img{display:block; max-width:100%; -webkit-user-drag:none; user-select:none;}
a{color:inherit; text-decoration:none;}
h1,h2{ font-family:var(--display); font-weight:400; letter-spacing:.02em; }
h3{ font-family:var(--display); font-weight:400; letter-spacing:.04em; }

.wrap{
  position:absolute; inset:0;
  width:min(100%, var(--wrap));
  margin:0 auto; left:0; right:0;
}

/* ---------- Непрерывный фон ----------
   Небо держится всю сцену (первый + второй экран),
   темнеет только в самом низу страницы. */
#bg{ position:fixed; inset:0; z-index:-2; overflow:hidden; background:var(--sky-top); }
/* два вуаля поверх сплошного цвета: днём небо светлеет книзу,
   ночью — темнеет по краям. Цвет и вес вуалей ведёт скролл,
   поэтому переход день→ночь непрерывен и не имеет ни одного стыка. */
.bg-veil{ position:absolute; inset:0; pointer-events:none; }
#bgDay{
  background:linear-gradient(180deg,
    rgba(255,255,255,0) 6%,
    rgba(255,255,255,.16) 46%,
    rgba(255,255,255,.34) 82%,
    rgba(255,255,255,.46) 100%);
}
#bgNight{
  opacity:0;
  background:
    radial-gradient(120% 78% at 50% 26%, rgba(150,118,232,.20), transparent 68%),
    linear-gradient(180deg, rgba(0,0,0,.26), rgba(0,0,0,0) 42%, rgba(0,0,0,.34));
}

#progress{
  position:fixed; top:0; left:0; height:4px; width:100%;
  background:linear-gradient(90deg, #E8CF8A, var(--gold) 55%, #8A6A28);
  box-shadow:0 1px 6px rgba(176,138,62,.5);
  transform:scaleX(0); transform-origin:0 50%; z-index:120;
}

/* ============ ХЕДЕР НА ОБЛАКАХ ============ */
#site-header{
  transition:opacity .5s ease;
  position:fixed; top:0; left:0; right:0;
  height:var(--header-h);
  z-index:60;
  pointer-events:none;
}
.header-clouds{
  position:absolute; left:0; right:0; top:0; height:260%;
  pointer-events:none; overflow:hidden;
}
/* гряда собрана из тех же облаков, что на странице; каждое перевёрнуто —
   аккуратные кучевые верхушки смотрят вниз */
.hc{
  position:absolute; aspect-ratio:1244/546;
  /* без переворота: вниз уходит мягкое затухание облака,
     а не рваные гребешки — гряда читается спокойно */
}
.hc-1{ width:calc(46 * var(--u)); left:calc(-12 * var(--u));  bottom:62%;  animation:drift 66s ease-in-out infinite; }
.hc-2{ width:calc(40 * var(--u)); left:calc(12 * var(--u));   bottom:66%;  animation:drift 80s ease-in-out infinite reverse; }
.hc-3{ width:calc(44 * var(--u)); left:calc(32 * var(--u));   bottom:61%;  animation:drift 72s ease-in-out infinite; }
.hc-4{ width:calc(38 * var(--u)); left:calc(52 * var(--u));   bottom:67%;  animation:drift 88s ease-in-out infinite reverse; }
.hc-5{ width:calc(44 * var(--u)); left:calc(68 * var(--u));   bottom:62%;  animation:drift 76s ease-in-out infinite; }
.hc-6{ width:calc(40 * var(--u)); right:calc(-12 * var(--u)); bottom:65%;  animation:drift 92s ease-in-out infinite reverse; }
.hc-7{ width:calc(36 * var(--u)); left:calc(24 * var(--u));   bottom:70%; animation:drift 70s ease-in-out infinite reverse; }
.hc-8{ width:calc(36 * var(--u)); left:calc(60 * var(--u));   bottom:70%; animation:drift 84s ease-in-out infinite; }

.header-inner{
  position:relative; z-index:2; pointer-events:auto;
  height:auto; margin:1.1vh auto 0;
  width:min(96%, var(--wrap));
  padding:.85rem 1.6rem;
  display:flex; align-items:center; justify-content:space-between;
  gap:2rem;
  border-radius:999px;
  background:linear-gradient(150deg, rgba(255,255,255,.6), rgba(255,255,255,.42));
  backdrop-filter:blur(34px) saturate(150%);
  -webkit-backdrop-filter:blur(34px) saturate(150%);
  border:1px solid rgba(255,255,255,.55);
  box-shadow:0 8px 28px rgba(60,80,120,.12), inset 0 1px 0 rgba(255,255,255,.75);
}
.header-name{
  font-family:var(--display); font-size:calc(1.24 * var(--u));
  letter-spacing:.09em; white-space:nowrap;
}
.header-name i{
  font-family:var(--serif); font-style:italic;
  font-size:calc(1.18 * var(--u));
  color:rgba(18,16,26,.82); letter-spacing:.015em;
}
.header-nav{ display:flex; align-items:center; gap:2.2rem; }
.header-nav a{
  font-size:.88rem; letter-spacing:.14em; text-transform:uppercase;
  color:rgba(18,16,26,.72); transition:color .25s ease;
}
.header-nav a:hover{ color:var(--gold); }
.header-nav .nav-cta{
  padding:.8em 1.6em; border-radius:999px;
  color:var(--ink); font-family:var(--display); font-size:.82rem;
  background:linear-gradient(150deg, rgba(255,255,255,.55), rgba(232,207,138,.3));
  border:1px solid rgba(255,255,255,.7);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
  transition:background .3s ease;
}
.header-nav .nav-cta:hover{ background:linear-gradient(150deg, rgba(255,255,255,.7), rgba(232,207,138,.5)); }

/* ============ СЦЕНА ============ */
#stage{ height:100vh; position:relative; }
.stage-viewport{ position:relative; height:100vh; width:100%; }
.clouds{ overflow:visible; }
.pan{ overflow:visible; }
#stage{ overflow:visible; }
.pan{ position:absolute; inset:0; will-change:transform; z-index:6; }

/* дама крупная — сцена больше высоты экрана */
.scene{
  position:absolute;
  left:calc(50% - 22.5 * var(--u));
  top:calc(55% - 22.5 * var(--u));
  width:min(calc(45 * var(--u)), calc(72 * var(--u)));
  aspect-ratio:1/1;
  will-change:transform;
  z-index:3;                /* под знаками: иначе обод их перекрывает */
}

/* обод + знаки вращаются вместе (вращение задаёт GSAP, не CSS) */
.ring{ position:absolute; inset:0; will-change:transform; }  /* строго квадрат: иначе круг станет овалом */
.ring-band{ position:absolute; inset:0; width:100%; height:100%; }
.signs-layer{
  position:absolute; inset:0; z-index:4; pointer-events:none;
}
.sign{
  position:absolute; left:0; top:0;
  width:64px; height:64px;
  will-change:transform;
}

/* дама — собственный слой поверх знаков; размер не связан с кольцом */
.woman-scene{
  position:absolute;
  left:calc(50% - 21.9375 * var(--u)); top:calc(8.4375 * var(--u));
  width:calc(43.875 * var(--u)); aspect-ratio:2/3;
  z-index:5;
  will-change:transform;
}
.woman-wrap{ position:absolute; inset:0; }
.woman{
  position:absolute; inset:0;
  width:100%; height:100%; object-fit:contain;
  filter:drop-shadow(0 20px 44px rgba(60,50,30,.16));
}
.woman-open{ opacity:0; }   /* проявляется в конце перехода — «открывает глаза» */

/* --- облака: два слоя, фигура зажата между ними --- */
.clouds{
  position:absolute; left:0; right:0; bottom:0;
  pointer-events:none; will-change:transform;
}
.clouds-back{ height:calc(34.875 * var(--u)); z-index:1; }
.clouds-front{ height:calc(31.5 * var(--u)); z-index:6; }
.clouds-over{
  position:absolute; left:0; right:0; bottom:0; height:calc(29.25 * var(--u));
  z-index:9; pointer-events:none; opacity:0;
}
.co-1{ width:calc(34 * var(--u)); left:calc(30 * var(--u)); bottom:calc(-9 * var(--u)); animation:drift 64s ease-in-out infinite; }
.co-2{ width:calc(26 * var(--u)); left:calc(54 * var(--u)); bottom:calc(-10.6875 * var(--u)); animation:drift 78s ease-in-out infinite reverse; opacity:.9; scale:-1 1;}
/* гряда, в которую фигура уходит по пояс: закрывает и низ платья, и
   проплешину между фигурой и правым краем */
.co-3{ width:calc(38 * var(--u)); left:calc(-2 * var(--u)); bottom:calc(-7 * var(--u));  animation:drift 70s ease-in-out infinite reverse; }
.co-4{ width:calc(30 * var(--u)); left:calc(20 * var(--u)); bottom:calc(-8 * var(--u));  animation:drift 86s ease-in-out infinite; }
.co-5{ width:calc(26 * var(--u)); left:calc(6 * var(--u));  bottom:calc(-3.5 * var(--u)); animation:drift 58s ease-in-out infinite; scale:-1 1;}
.co-6{ width:calc(30 * var(--u)); left:calc(40 * var(--u)); bottom:calc(-4 * var(--u));  animation:drift 74s ease-in-out infinite reverse; }
.clouds img{ pointer-events:none; }

.cloud{ position:absolute; aspect-ratio:3/2; opacity:.95; }

.cb-1{ width:calc(66 * var(--u)); left:calc(-12 * var(--u));  bottom:calc(-16.875 * var(--u)); animation:drift 52s ease-in-out infinite; opacity:.62;}
.cb-2{ width:calc(40 * var(--u)); left:calc(36 * var(--u));   bottom:calc(-10.125 * var(--u)); animation:drift 68s ease-in-out infinite reverse; opacity:.6;}
.cb-4{ width:calc(46 * var(--u)); left:calc(24 * var(--u));   bottom:calc(-12.375 * var(--u)); animation:drift 80s ease-in-out infinite; opacity:.6;}  /* закрывает проплешину по центру, за лентой */
.cb-3{ width:calc(58 * var(--u)); right:calc(-14 * var(--u)); bottom:calc(-15.75 * var(--u)); animation:drift 60s ease-in-out infinite reverse; opacity:.62; scale:-1 1;}

.cf-1{ width:calc(60 * var(--u)); left:calc(-16 * var(--u));  bottom:calc(-18 * var(--u)); animation:drift 46s ease-in-out infinite; }
.cf-2{ width:calc(38 * var(--u)); left:calc(26 * var(--u));   bottom:calc(-15.1875 * var(--u)); animation:drift 58s ease-in-out infinite reverse; }
.cf-3{ width:calc(56 * var(--u)); right:calc(-14 * var(--u)); bottom:calc(-24.75 * var(--u)); animation:drift 54s ease-in-out infinite reverse; scale:-1 1;}
.cf-4{ width:calc(32 * var(--u)); left:calc(58 * var(--u));   bottom:calc(-22.5 * var(--u)); animation:drift 66s ease-in-out infinite; }
.cf-5{ width:calc(44 * var(--u)); left:calc(8 * var(--u));    bottom:calc(-20.25 * var(--u)); animation:drift 72s ease-in-out infinite reverse; scale:-1 1;}

/* мягкий низ: облака не обрываются линией, а растворяются */
.cf-6{ width:calc(40 * var(--u)); left:calc(22 * var(--u));  bottom:calc(-10.125 * var(--u)); animation:drift 68s ease-in-out infinite; }   /* центр низа */
.cf-7{ width:calc(26 * var(--u)); left:calc(22 * var(--u));  bottom:calc(-3.375 * var(--u));  animation:drift 84s ease-in-out infinite reverse; }  /* прикрывает срез фигуры */

/* передний план: плотные цветные облака — закрывают проплешины,
   прикрывают срез фигуры и частично перекрывают ленту */
.cf-8 { width:calc(58 * var(--u)); right:calc(-18 * var(--u)); bottom:calc(-13.5 * var(--u)); animation:drift 50s ease-in-out infinite reverse; scale:-1 1;}
.cf-9 { width:calc(46 * var(--u)); left:calc(-14 * var(--u));  bottom:calc(-7.875 * var(--u)); animation:drift 62s ease-in-out infinite; }
.cf-10{ width:calc(40 * var(--u)); left:calc(46 * var(--u));   bottom:calc(-13.5 * var(--u)); animation:drift 74s ease-in-out infinite reverse; }
.cf-11{ width:calc(36 * var(--u)); right:calc(2 * var(--u));   bottom:calc(-1.125 * var(--u));  animation:drift 54s ease-in-out infinite; }
.cf-12{ width:calc(52 * var(--u)); left:calc(20 * var(--u));   bottom:calc(-16.875 * var(--u)); animation:drift 58s ease-in-out infinite reverse; }  /* центр, самый низ */
.cf-13{ width:calc(44 * var(--u)); left:calc(34 * var(--u));   bottom:calc(-22.5 * var(--u)); animation:drift 70s ease-in-out infinite; }

/* фоновые — добивают синие просветы по краям */
.cb-5{ width:calc(52 * var(--u)); left:calc(-16 * var(--u));  bottom:calc(-6.75 * var(--u));  animation:drift 90s ease-in-out infinite reverse; opacity:.6;}
.cb-6{ width:calc(48 * var(--u)); right:calc(-12 * var(--u)); bottom:calc(-5.625 * var(--u));  animation:drift 66s ease-in-out infinite; opacity:.55; scale:-1 1;}
.cb-7{ width:calc(56 * var(--u)); left:calc(18 * var(--u));   bottom:calc(-14.625 * var(--u));  animation:drift 76s ease-in-out infinite reverse; }   /* закрывает центр за лентой */

.clouds-front::after{
  content:''; position:absolute; left:0; right:0; bottom:0; height:34%;
  background:linear-gradient(180deg, transparent, rgba(251,248,242,.0) 40%);
}
@keyframes drift{
  0%{ transform:translate3d(0,0,0);} 50%{ transform:translate3d(3.2vw,-1.2vh,0);} 100%{ transform:translate3d(0,0,0);}
}

/* ============ ЖИДКОЕ СТЕКЛО ============ */
.glass{
  position:relative;
  padding:1.9rem;            /* поля одинаковы со всех сторон */
  border-radius:1.62rem;
  background:linear-gradient(150deg, rgba(255,255,255,.78), rgba(255,255,255,.62));
  backdrop-filter:blur(52px) saturate(135%);
  -webkit-backdrop-filter:blur(52px) saturate(135%);
  border:1px solid rgba(255,255,255,.62);
  box-shadow:
    0 10px 34px rgba(60,80,120,.13),
    inset 0 1px 0 rgba(255,255,255,.75),
    inset 0 -1px 0 rgba(255,255,255,.25);
}
/* блик по верхней кромке — как на матовом стекле */
.glass::before{
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:linear-gradient(160deg, rgba(255,255,255,.5), transparent 42%);
  opacity:.7; pointer-events:none;
}
.glass > *{ position:relative; z-index:1; }

/* --- бегущая лента: ячейки строго по рисунку полосы --- */
.zodiac-line{
  position:absolute; left:calc(-20 * var(--u)); right:calc(-20 * var(--u)); top:calc(41.625 * var(--u));
  height:calc(5.625 * var(--u)); z-index:2;
  opacity:0; pointer-events:none; overflow:hidden;
}
.zodiac-track{
  position:absolute; inset:0;
  display:flex; align-items:center;
  height:100%; width:max-content;
  will-change:transform;
}
/* каждая ячейка несёт свой кусок мраморной ленты — поэтому символ
   никогда не «сползает» с белого поля при движении */
.zodiac-cell{
  height:100%;
  display:flex; align-items:center; justify-content:center;
  flex:0 0 auto;
  background-image:url('../assets/img/band-cell.webp');
  background-size:101% 100%;      /* лёгкий нахлёст — иначе между плитками просветы */
  background-position:center;
  background-repeat:no-repeat;
  margin-right:-1px;
}
.zodiac-cell img{ height:46%; width:auto; }

/* ============ ЭКРАН 1 ============ */
.screen-one{ position:absolute; inset:0; z-index:7; }

.hero-title{
  position:absolute; left:50%; top:calc(var(--header-h) + calc(0.84375 * var(--u))); translate:-50% 0;
  width:min(90%,640px); text-align:center;
  font-size:calc(1.9 * var(--u)); line-height:1.4;
  padding:1.1rem 2rem;
}

.t-block{ position:absolute; width:calc(24 * var(--u)); padding:1.75rem 1.85rem; }
.t-block h3{ font-size:calc(1.34 * var(--u)); margin-bottom:.7em; }
.t-block p{ font-family:var(--sans); font-size:1.04rem; line-height:1.72; color:rgba(18,16,26,.7); text-align:justify; text-align-last:left; hyphens:auto; }
.tb-1{ left:calc(-2 * var(--u));  top:calc(10 * var(--u)); }
.tb-2{ right:calc(-2 * var(--u)); top:calc(10 * var(--u)); }
.tb-4{ right:calc(-2 * var(--u)); top:calc(31.5 * var(--u)); }
.tb-3{ left:calc(-2 * var(--u));  top:calc(31.5 * var(--u)); }

.scroll-hint{
  position:absolute; left:50%; bottom:calc(1.96875 * var(--u)); translate:-50% 0;
  font-family:var(--display); font-size:.92rem;
  letter-spacing:.26em; text-transform:uppercase;
  color:var(--ink); opacity:.72; z-index:7;
  text-shadow:0 1px 10px rgba(255,255,255,.85);
}

/* ============ ЭКРАН 2 ============ */
.screen-two{ position:absolute; inset:0; z-index:7; opacity:0; pointer-events:none; }
.screen-two.on{ pointer-events:auto; }
.two-cards{
  position:absolute; top:calc(13 * var(--u)); right:calc(-1.5 * var(--u));
  width:calc(57 * var(--u));
  display:flex; gap:calc(3.5 * var(--u)); align-items:stretch;
}
.two-copy, .two-side{
  flex:1 1 0; min-width:0;
  padding:1.75rem 1.85rem;
  display:flex; flex-direction:column;
}
.two-side h2, .two-copy h2{
  font-size:calc(3.05 * var(--u)); line-height:1.18;
  margin-bottom:.32em;       /* до текста — вдвое меньше, чем до кнопки */
}
.two-side p, .two-copy p{
  font-size:1.06rem; line-height:1.75; color:rgba(18,16,26,.72);
  text-align:justify; text-align-last:left; hyphens:auto;
  margin-bottom:2.4em;       /* воздух до кнопки */
}

/* кнопка — стеклянная пилюля */
.cta{
  display:block; align-self:center;
  margin-top:auto;           /* прижата к низу — кнопки обоих блоков на одной линии */
  padding:1.1em 2.2em;
  border-radius:999px;
  font-family:var(--display); font-size:.84rem; letter-spacing:.16em; text-transform:uppercase;
  color:var(--ink);
  background:linear-gradient(150deg, rgba(255,255,255,.8), rgba(255,255,255,.62));
  backdrop-filter:blur(40px) saturate(135%);
  -webkit-backdrop-filter:blur(40px) saturate(135%);
  border:1px solid rgba(255,255,255,.6);
  box-shadow:
    0 8px 26px rgba(60,80,120,.15),
    inset 0 1px 0 rgba(255,255,255,.8);
  transition:background .35s ease, box-shadow .35s ease, transform .35s ease;
}
.cta:hover{
  background:linear-gradient(150deg, rgba(255,255,255,.62), rgba(232,207,138,.42));
  box-shadow:0 12px 32px rgba(60,80,120,.2), inset 0 1px 0 rgba(255,255,255,.9);
  transform:translateY(-1px);
}

#next-placeholder{ height:calc(33.75 * var(--u)); }

/* адаптив для телефонов и узких планшетов — единый блок ниже, в конце файла */

/* ============================================================
   БЛОК 3 — КОСМОС И КОСТИ
   ============================================================ */
#cosmos{ height:260vh; position:relative; }
.cosmos-viewport{
  position:sticky; top:0; height:100vh; width:100%; overflow:hidden;
}

/* --- фон: туманности и созвездия, никаких планет --- */
/* верх и низ поля растворяются: иначе прямоугольник туманностей
   даёт ровную горизонтальную границу со вторым блоком */
.cosmos-bg, .dice-field{
  -webkit-mask-image:linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image:linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.cosmos-bg{ position:absolute; inset:0; z-index:1; pointer-events:none; }
.neb{
  position:absolute; aspect-ratio:3/2;
  mix-blend-mode:screen; opacity:0;
  will-change:transform, opacity;
}
.neb-1{ width:calc(130 * var(--u)); left:calc(-30 * var(--u)); top:-24vh; }
.neb-2{ width:calc(112 * var(--u)); right:calc(-26 * var(--u)); top:38vh;  }
.neb-3{ width:calc(88 * var(--u));  left:calc(-16 * var(--u)); top:8vh;   }
.neb-4{ width:calc(76 * var(--u));  right:calc(-12 * var(--u)); top:66vh;  }
.neb-5{ width:calc(58 * var(--u));  left:calc(28 * var(--u));  top:34vh;  }
.neb-6{ width:calc(50 * var(--u));  left:calc(4 * var(--u));   top:78vh;  }

.constel{
  position:absolute; width:calc(26 * var(--u)); aspect-ratio:1/1;
  opacity:0; filter:drop-shadow(0 0 10px rgba(232,207,138,.35));
}
.con-1{ left:calc(6 * var(--u));  top:16vh; animation:nebDrift 200s ease-in-out infinite; }
.con-2{ right:calc(8 * var(--u)); top:56vh; width:calc(22 * var(--u)); animation:nebDrift 230s ease-in-out infinite reverse; }

/* --- кости: тот же мрамор с золотом, что кольцо и лента --- */
.dice-field{ position:absolute; inset:0; z-index:3; pointer-events:none; perspective:87rem; }
.die{
  position:absolute; width:calc(16 * var(--u)); aspect-ratio:1/1;
  opacity:0; will-change:transform, opacity;
  filter:drop-shadow(0 24px 40px rgba(10,6,26,.55));
}
.die-n0{ left:calc(3.0 * var(--u)); top:6vh; width:calc(13 * var(--u)); }
.die-n1{ left:calc(52.4 * var(--u)); top:32vh; width:calc(10 * var(--u)); }
.die-n2{ left:calc(21.9 * var(--u)); top:58vh; width:calc(14 * var(--u)); }
.die-n3{ left:calc(71.3 * var(--u)); top:84vh; width:calc(9 * var(--u)); }
.die-n4{ left:calc(40.8 * var(--u)); top:112vh; width:calc(12 * var(--u)); }
.die-n5{ left:calc(10.2 * var(--u)); top:125vh; width:calc(11 * var(--u)); }
.die-n6{ left:calc(59.7 * var(--u)); top:138vh; width:calc(15 * var(--u)); }
.die-n7{ left:calc(29.1 * var(--u)); top:151vh; width:calc(9 * var(--u)); }
.die-n8{ left:calc(78.5 * var(--u)); top:164vh; width:calc(13 * var(--u)); }
.die-n9{ left:calc(48.0 * var(--u)); top:177vh; width:calc(10 * var(--u)); }
.die-n10{ left:calc(17.4 * var(--u)); top:190vh; width:calc(12 * var(--u)); }
.die-n11{ left:calc(66.9 * var(--u)); top:203vh; width:calc(14 * var(--u)); }
.die-n12{ left:calc(36.3 * var(--u)); top:216vh; width:calc(9 * var(--u)); }
.die-n13{ left:calc(5.8 * var(--u)); top:229vh; width:calc(11 * var(--u)); }
.die-n14{ left:calc(55.2 * var(--u)); top:242vh; width:calc(13 * var(--u)); }
.die-n15{ left:calc(24.6 * var(--u)); top:255vh; width:calc(10 * var(--u)); }
.die-n16{ left:calc(74.1 * var(--u)); top:268vh; width:calc(15 * var(--u)); }
.die-n17{ left:calc(43.5 * var(--u)); top:281vh; width:calc(9 * var(--u)); }
.die-n18{ left:calc(13.0 * var(--u)); top:294vh; width:calc(12 * var(--u)); }
.die-n19{ left:calc(62.4 * var(--u)); top:307vh; width:calc(11 * var(--u)); }
.die-n20{ left:calc(31.9 * var(--u)); top:320vh; width:calc(14 * var(--u)); }
.die-n21{ left:calc(81.3 * var(--u)); top:333vh; width:calc(10 * var(--u)); }
.die-n22{ left:calc(50.7 * var(--u)); top:346vh; width:calc(13 * var(--u)); }

/* --- тексты блока --- */
.cosmos-copy{ position:absolute; inset:0; z-index:5; pointer-events:none; }
.cosmos-title, .cosmos-hint-tip{ pointer-events:none; }
.cosmos-title{
  position:absolute; left:50%; top:16vh; translate:-50% 0;
  width:calc(50 * var(--u)); text-align:center;
  font-size:calc(2.75 * var(--u)); line-height:1.32;
  opacity:0;
}
.cosmos-hint-tip{
  position:absolute; left:50%; bottom:8vh; translate:-50% 0;
  font-family:var(--display); font-size:.86rem; letter-spacing:.26em;
  text-transform:uppercase; color:rgba(251,248,242,.55);
  opacity:0;
}
.cosmos-note p{
  font-size:.92rem; line-height:1.8; color:rgba(18,16,26,.72);
  text-align:justify; text-align-last:left; hyphens:auto;
}



/* ночное стекло: на космосе подложка тёмная, текст светлый */
.glass-night{
  background:linear-gradient(150deg, rgba(36,26,61,.72), rgba(14,10,24,.58));
  backdrop-filter:blur(46px) saturate(120%);
  -webkit-backdrop-filter:blur(46px) saturate(120%);
  border:1px solid rgba(232,207,138,.28);
  box-shadow:
    0 16px 44px rgba(4,2,12,.45),
    inset 0 1px 0 rgba(232,207,138,.22);
  color:var(--cream);
}
.glass-night::before{
  background:linear-gradient(160deg, rgba(232,207,138,.12), transparent 45%);
}
.cosmos-title.glass-night{ color:var(--cream); }
.cosmos-note.glass-night p{ color:rgba(251,248,242,.8); }


/* шапка на космосе: облака уходят, плашка становится ночной */
#site-header.is-night .header-clouds{ opacity:0; transition:opacity .6s ease; }
#site-header.is-night .header-inner{
  background:linear-gradient(150deg, rgba(36,26,61,.72), rgba(14,10,24,.6));
  border-color:rgba(232,207,138,.3);
  box-shadow:0 12px 34px rgba(4,2,12,.4), inset 0 1px 0 rgba(232,207,138,.22);
}
#site-header.is-night .header-name{ color:var(--cream); }
#site-header.is-night .header-name i{ color:rgba(251,248,242,.6); }
#site-header.is-night .header-nav a{ color:rgba(251,248,242,.78); }
#site-header.is-night .header-nav .nav-cta{
  color:var(--cream);
  background:linear-gradient(150deg, rgba(232,207,138,.28), rgba(232,207,138,.12));
  border-color:rgba(232,207,138,.5);
}
.header-clouds{ transition:opacity .6s ease; }

/* подсказка при наведении на кость */
.die-hint{
  position:absolute; z-index:9; pointer-events:none;
  width:calc(28 * var(--u)); padding:1.25rem 1.5rem; border-radius:1.25rem;
  opacity:0; transform:translateY(6px);
  transition:opacity .28s ease, transform .28s ease;
  font-size:1.06rem; line-height:1.65; color:rgba(251,248,242,.9);
  background:linear-gradient(150deg, rgba(36,26,61,.86), rgba(14,10,24,.76));
  backdrop-filter:blur(30px) saturate(120%);
  -webkit-backdrop-filter:blur(30px) saturate(120%);
  border:1px solid rgba(232,207,138,.3);
  box-shadow:0 16px 40px rgba(4,2,12,.5);
}
.die-hint.on{ opacity:1; transform:translateY(0); }
.die{ pointer-events:auto; cursor:default; }
.dice-field{ pointer-events:none; }

/* заголовок — в центре поля костей */
.cosmos-title{
  top:50% !important; translate:-50% -50% !important;
}

/* часть костей летит перед надписью, остальные за ней */
.dice-field{ z-index:3; }
.dice-field-front{ z-index:7; }
.cosmos-copy{ z-index:5; }
.die-f1{ left:calc(76 * var(--u)); top:60vh; width:calc(12 * var(--u)); }
.die-f2{ left:calc(27 * var(--u)); top:30vh; width:calc(9 * var(--u));  }
.die-f3{ left:calc(13 * var(--u)); top:20vh; width:calc(8 * var(--u));  }
.die-f4{ left:calc(6 * var(--u));  top:112vh; width:calc(14 * var(--u)); }
.die-f5{ left:calc(86 * var(--u)); top:106vh; width:calc(10 * var(--u)); }
.die-f6{ left:calc(89 * var(--u)); top:146vh; width:calc(11 * var(--u)); }

/* решётка костей: шаг 16vh и золотое сечение по горизонтали —
   соседние кости никогда не перекрываются */
.die-early{ opacity:0; }

/* ============================================================
   БЛОК 4 — ТАРИФЫ НА КАРТАХ ТАРО
   ============================================================ */
#pricing{
  position:relative; min-height:100vh;
  padding:calc(7.875 * var(--u)) calc(6 * var(--u)) calc(9 * var(--u));
}
.pricing-inner{
  position:relative; z-index:2;
  width:min(100%, var(--wrap)); margin:0 auto;
  display:flex; flex-direction:column; align-items:center;
}
.pricing-title, .pricing-sub{ will-change:opacity; }
.pricing-title{
  font-size:calc(3.2 * var(--u));
  padding:1.1rem 2.4rem; border-radius:1.62rem;
}
.pricing-sub{
  margin-top:1.2em;
  font-family:var(--display); font-size:.84rem; letter-spacing:.26em;
  text-transform:uppercase; color:rgba(251,248,242,.55);
}

/* ширину карты задаём сами: она ограничена не колонкой, а высотой экрана.
   Колонки равны карте — тогда тройка стоит ровно по оси заголовка. */
.tarot-grid{
  --card-w: min(calc(29.333 * var(--u)), 36.25vh);
  margin-top:6vh;
  display:grid; grid-template-columns:repeat(3, var(--card-w));
  justify-content:center;
  gap:calc(3 * var(--u));
  width:100%;
}
.tarot-card{
  position:relative; aspect-ratio:5/8;
  perspective:100rem; cursor:pointer;
}
.tarot-inner{
  position:relative; width:100%; height:100%;
  transform-style:preserve-3d;
  transition:transform .9s cubic-bezier(.2,.85,.25,1);
}
.tarot-card.is-flipped .tarot-inner{ transform:rotateY(180deg); }
.tarot-face{
  position:absolute; inset:0;
  /* видимость граней держим на opacity: backface-visibility в связке
     с полупрозрачными слоями гасила лицевую сторону целиком */
  border-radius:.62rem;
  box-shadow:0 calc(1.4 * var(--u)) calc(3.2 * var(--u)) rgba(4,2,12,.5);
}
.tarot-face img{ border-radius:.62rem; }
.tarot-face img{ width:100%; height:100%; object-fit:cover; }
.tarot-front{ transform:rotateY(180deg); }
.tarot-content{
  position:absolute;
  /* безопасная зона внутри золотой рамки: текст никогда не лезет на орнамент */
  left:14%; right:14%; top:13%; bottom:12%;
  display:flex; flex-direction:column; align-items:center;
  text-align:center;
  color:var(--cream);
}
/* цифра в золотой розетке — гравюрное солнце с лучами */
.tarot-number{
  flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;
  width:calc(8.4 * var(--u)); height:calc(8.4 * var(--u));
  margin-bottom:-.35em;
  background:url('../assets/img/number-medallion.webp') center/contain no-repeat;
  font-family:var(--display); font-size:calc(2.6 * var(--u));
  color:var(--gold-light); line-height:1;
  text-shadow:0 0 calc(.9 * var(--u)) rgba(232,207,138,.35);
}
.tarot-label{
  font-family:var(--serif); font-style:italic;
  font-size:calc(1.34 * var(--u));
  margin-top:0; color:rgba(251,248,242,.88);
}
.tarot-bullets{
  list-style:none; margin-top:.85em;
  display:flex; flex-direction:column; gap:.5em;
  font-size:calc(1.14 * var(--u)); line-height:1.42;
  color:rgba(251,248,242,.9);
}
.tarot-bullets li{ position:relative; padding-left:1.2em; text-align:left; }
.tarot-bullets li::before{
  content:'✦'; position:absolute; left:0; top:.12em;
  color:var(--gold); font-size:.72em;
}
.tarot-price{
  position:static; margin-top:auto; translate:none;
  font-family:var(--display); font-size:calc(1.15 * var(--u));
  letter-spacing:.06em; white-space:nowrap;
  background:linear-gradient(100deg, #F2DCA0, #C9A24B 45%, #8A6A28 78%, #E8CF8A);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
}

.tarot-card:hover .tarot-inner{ transform:translateY(-6px); }
.tarot-card.is-flipped:hover .tarot-inner{ transform:rotateY(180deg) translateY(-6px); }



/* ============================================================
   ПЕРЕХОД БЛОК 3 → 4: космос затекает на карты, поверх — чёрный,
   затем серый туман
   ============================================================ */
#pricing{ overflow:visible; }


/* цифра в центральном круге рубашки — тем же гравюрным характером, что знаки */
.back-numeral{
  /* центр пустого круга на рубашке — 50.8% × 48.3%; цифра и подпись
     стоят парой вокруг него, а не у верхней кромки */
  position:absolute; left:50.8%; top:43%; translate:-50% -50%;
  font-family:var(--display); font-weight:400;
  font-size:calc(3.6 * var(--u));
  color:var(--gold-light);
  text-shadow:0 0 18px rgba(232,207,138,.45);
  letter-spacing:.02em;
}
.back-caption{
  position:absolute; left:50.8%; top:50.5%; translate:-50% 0;
  width:46%; text-align:center;
  font-family:var(--serif); font-style:italic;
  font-size:calc(1.02 * var(--u)); line-height:1.45;
  color:rgba(232,207,138,.86);
  bottom:auto;
}

/* ценник — последним в колонке, поэтому не может наехать на список */
.tarot-price{
  position:static; margin-top:auto; padding-top:.9em;
  white-space:nowrap;
  font-family:var(--display); font-size:calc(1.35 * var(--u));
  letter-spacing:.06em;
  background:linear-gradient(100deg, #F2DCA0, #C9A24B 45%, #8A6A28 78%, #E8CF8A);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
}

/* текстовый слой космоса не должен перехватывать мышь — иначе подсказки по костям не срабатывают */
.cosmos-copy{ pointer-events:none !important; }
.cosmos-title, .cosmos-hint-tip{ pointer-events:none !important; }
.die{ pointer-events:auto !important; }
/* второй эшелон рисуется плоско, без перспективы родителя */
.die-late{ transform-style:flat; }

/* без размытия на влёте: замыленная кость читается как «не загрузилась» */
.die{ will-change:transform; }

/* ============================================================
   БЛОК 5 — ГОРЕНИЕ КАРТ, ПЕПЕЛ И ЦИТАТА
   ============================================================ */
/* карта горит: линия огня идёт снизу вверх и съедает полотно,
   от карты не остаётся ничего — только пепел */
.tarot-card{ --burn:0; --bl:118%; }
.tarot-face{
  -webkit-mask-image:linear-gradient(180deg,
    #000 calc(var(--bl) - 7%), rgba(0,0,0,.45) calc(var(--bl) - 2.5%), transparent var(--bl));
          mask-image:linear-gradient(180deg,
    #000 calc(var(--bl) - 7%), rgba(0,0,0,.45) calc(var(--bl) - 2.5%), transparent var(--bl));
}
.tarot-card .tarot-inner{
  filter:
    brightness(calc(1 - var(--burn) * 0.72))
    sepia(calc(var(--burn) * 0.6))
    contrast(calc(1 + var(--burn) * 0.35));
}
.tarot-card::after{
  content:''; position:absolute; inset:-2%;
  border-radius:.75rem; pointer-events:none;
  opacity:var(--burn);
  background:
    radial-gradient(62% 9% at 50% var(--bl), rgba(255,196,96,.95), transparent 70%),
    radial-gradient(34% 7% at 20% calc(var(--bl) + 1%), rgba(255,110,25,.8), transparent 72%),
    radial-gradient(34% 7% at 80% calc(var(--bl) + 1%), rgba(255,140,35,.75), transparent 72%);
  filter:blur(calc(0.5 * var(--u)));
  mix-blend-mode:screen;
}

#quote{ position:relative; height:320vh; }
/* пепел рисуется на общем канвасе поверх страницы: полторы тысячи
   искр — это не DOM-задача */
#ashCanvas{
  position:fixed; inset:0; width:100%; height:100%;
  z-index:1; pointer-events:none; opacity:0;
}
.quote-viewport{
  position:sticky; top:0; height:100vh; width:100%;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.quote-text{
  position:relative; z-index:2;
  width:calc(64 * var(--u)); text-align:center;
  opacity:0; will-change:transform, opacity;
  transform-origin:50% 50%;
}
.quote-words{
  display:block;
  font-family:var(--serif); font-style:italic;
  font-size:calc(3.3 * var(--u)); line-height:1.4;
  /* золото, собранное из золы: тёплые искры на тёмной основе */
  background:linear-gradient(112deg, #7A6438 0%, #E8CF8A 22%, #FFF4CE 34%, #C9A24B 52%, #8A6A28 68%, #F2DCA0 86%, #9A7C3C 100%);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  filter:drop-shadow(0 calc(.2 * var(--u)) calc(.9 * var(--u)) rgba(232,207,138,.28));
}
.quote-words .w{ display:inline-block; }
.quote-text footer{
  margin-top:calc(2 * var(--u));
  font-family:var(--display); font-size:calc(.8 * var(--u));
  letter-spacing:.26em; text-transform:uppercase;
  color:rgba(232,207,138,.6); opacity:0;
}

/* ============ ФУТЕР ============ */
#site-footer{
  position:relative; z-index:2;
  padding:calc(8 * var(--u)) calc(6 * var(--u)) calc(3 * var(--u));
  background:linear-gradient(180deg, transparent, rgba(4,3,10,.9) 40%, #04030A);
}
.footer-inner{
  width:min(100%, var(--wrap)); margin:0 auto;
  display:flex; align-items:center; gap:calc(4 * var(--u));
}
.footer-portrait{
  flex:0 0 auto;
  width:calc(15 * var(--u)); height:calc(15 * var(--u));
  /* оправа — тонкая гравюрная линия, а не блестящий обод */
  border-radius:50%; padding:calc(.5 * var(--u));
  background:transparent;
  border:1px solid rgba(201,162,75,.55);
  box-shadow:
    0 0 0 1px rgba(232,207,138,.14),
    inset 0 0 0 1px rgba(232,207,138,.10);
}
.footer-portrait img{
  width:100%; height:100%; border-radius:50%; object-fit:cover;
  border:1px solid rgba(201,162,75,.30);
  filter:saturate(.82) contrast(1.02);
}
.footer-info h3{ font-size:calc(2.6 * var(--u)); color:var(--cream); }
.footer-role{
  margin-top:.5em; font-family:var(--display);
  font-size:calc(.92 * var(--u)); letter-spacing:.2em; text-transform:uppercase;
  color:var(--gold);
}
.footer-text{
  margin-top:1.1em; max-width:calc(40 * var(--u));
  font-size:calc(1.15 * var(--u)); line-height:1.7; color:rgba(251,248,242,.78);
}
.footer-socials{ display:flex; gap:calc(1.4 * var(--u)); margin-top:1.8em; }
.social-link{
  display:flex; align-items:center; gap:.7em;
  padding:.7em 1.3em; border-radius:999px;
  font-size:calc(1.05 * var(--u)); letter-spacing:.02em;
  color:rgba(251,248,242,.82);
  border:1px solid rgba(201,162,75,.28);
  background:linear-gradient(150deg, rgba(232,207,138,.08), rgba(232,207,138,.02));
  transition:color .25s ease, border-color .25s ease, background .25s ease;
}
.social-link:hover{ border-color:rgba(232,207,138,.6); background:linear-gradient(150deg, rgba(232,207,138,.16), rgba(232,207,138,.05)); }
.social-link img{ width:calc(1.9 * var(--u)); height:calc(1.9 * var(--u)); }
.social-link:hover{ color:var(--gold-light); }
.footer-bottom{
  width:min(100%, var(--wrap)); margin:calc(5 * var(--u)) auto 0;
  padding-top:calc(2 * var(--u));
  border-top:1px solid rgba(232,207,138,.16);
  display:flex; justify-content:space-between; align-items:center;
  font-size:calc(.95 * var(--u)); color:rgba(251,248,242,.5);
}
.footer-nav{ display:flex; gap:calc(2.4 * var(--u)); font-size:calc(.95 * var(--u)); }
.footer-nav a:hover{ color:var(--gold-light); }



/* сцена карт закрепляется, пока идёт горение */
#pricing{ height:300vh; padding:0; }
.pricing-stage{
  position:sticky; top:0; height:100vh;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.pricing-inner{ padding-top:0; }
.tarot-grid{ margin-top:calc(3 * var(--u)); }
.tarot-card{ aspect-ratio:5/8; width:100%; max-height:none; }


/* подстраховка поверх backface: изнанка гасится по классу,
   иначе часть движков всё равно рисует рубашку поверх лица */
.tarot-face{ transition:opacity .25s ease .3s; }
.tarot-card .tarot-front{ opacity:0; }
.tarot-card.is-flipped .tarot-front{ opacity:1; }
.tarot-card.is-flipped .tarot-back{ opacity:0; }

/* лицевая сторона тёмная, поэтому отделяем её от фона свечением */
.tarot-card.is-flipped .tarot-front{
  box-shadow:
    0 calc(1.6 * var(--u)) calc(3.6 * var(--u)) rgba(2,1,8,.65),
    0 0 calc(1.6 * var(--u)) rgba(232,207,138,.28),
    inset 0 0 calc(2.4 * var(--u)) rgba(232,207,138,.1);
}
.tarot-card::before{
  content:''; position:absolute; inset:calc(-0.5 * var(--u));
  border-radius:.88rem; pointer-events:none; z-index:-1;
  background:radial-gradient(60% 55% at 50% 50%, rgba(232,207,138,.14), transparent 72%);
  opacity:0; transition:opacity .5s ease;
}
.tarot-card.is-flipped::before{ opacity:1; }

/* мягкий свет под картами: тёмная лицевая сторона должна читаться */
.pricing-stage::before{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(60% 54% at 50% 56%, rgba(46,36,86,.42), transparent 74%),
    radial-gradient(34% 32% at 50% 60%, rgba(88,72,140,.16), transparent 78%);
}
.pricing-inner{ position:relative; z-index:1; }

/* живой огонь рисуется на канвасе поверх карт */
.fire-canvas{
  position:absolute; inset:0; z-index:3;
  pointer-events:none; opacity:0;
}

/* ============================================================
   ПОДСКАЗКИ: должны читаться поверх любой картинки
   ============================================================ */
.scroll-hint{
  padding:.62em 1.5em; border-radius:999px;
  color:var(--ink); opacity:1;
  background:linear-gradient(150deg, rgba(255,255,255,.72), rgba(255,255,255,.5));
  backdrop-filter:blur(22px) saturate(140%);
  -webkit-backdrop-filter:blur(22px) saturate(140%);
  border:1px solid rgba(255,255,255,.62);
  box-shadow:0 6px 20px rgba(60,80,120,.16), inset 0 1px 0 rgba(255,255,255,.8);
  text-shadow:none;
}
.cosmos-hint-tip{
  padding:.6em 1.4em; border-radius:999px;
  color:rgba(251,248,242,.92);
  background:linear-gradient(150deg, rgba(36,26,61,.7), rgba(14,10,24,.6));
  backdrop-filter:blur(20px) saturate(120%);
  -webkit-backdrop-filter:blur(20px) saturate(120%);
  border:1px solid rgba(232,207,138,.3);
  box-shadow:0 10px 26px rgba(4,2,12,.4);
}

/* ============================================================
   ОКНО ЗАПИСИ
   ============================================================ */
.modal{ position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center; }
.modal[hidden]{ display:none !important; }
.modal-veil{
  position:absolute; inset:0;
  background:rgba(6,4,14,.66);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  opacity:0; transition:opacity .35s ease;
}
.modal.is-open .modal-veil{ opacity:1; }

.modal-card{
  position:relative; z-index:1;
  width:min(92vw, calc(38 * var(--u)));
  max-height:92vh; overflow:auto;
  padding:calc(3 * var(--u)) calc(3.2 * var(--u)) calc(2.6 * var(--u));
  border-radius:calc(1.4 * var(--u));
  color:var(--cream);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(58,42,104,.55), transparent 65%),
    linear-gradient(160deg, rgba(24,18,46,.95), rgba(10,7,20,.97));
  border:1px solid rgba(201,162,75,.42);
  box-shadow:
    0 calc(2 * var(--u)) calc(5 * var(--u)) rgba(2,1,8,.7),
    0 0 calc(2.4 * var(--u)) rgba(232,207,138,.14),
    inset 0 1px 0 rgba(232,207,138,.22);
  opacity:0; transform:translateY(calc(1.4 * var(--u))) scale(.97);
  transition:opacity .38s ease, transform .38s cubic-bezier(.2,.85,.25,1);
}
.modal.is-open .modal-card{ opacity:1; transform:none; }
/* тонкая внутренняя рамка — как ободок на картах */
.modal-card::before{
  content:''; position:absolute; inset:calc(.55 * var(--u));
  border-radius:calc(1 * var(--u));
  border:1px solid rgba(201,162,75,.2);
  pointer-events:none;
}

.modal-x{
  position:absolute; top:calc(1 * var(--u)); right:calc(1.2 * var(--u));
  width:calc(2.4 * var(--u)); height:calc(2.4 * var(--u));
  display:flex; align-items:center; justify-content:center;
  border:0; background:transparent; cursor:pointer;
  color:rgba(232,207,138,.6); font-size:calc(1.6 * var(--u)); line-height:1;
  transition:color .25s ease;
}
.modal-x:hover{ color:var(--gold-light); }

.modal-eyebrow{
  display:block; font-family:var(--display);
  font-size:calc(.72 * var(--u)); letter-spacing:.26em; text-transform:uppercase;
  color:var(--gold);
}
.modal-title{
  margin-top:.4em; font-size:calc(2.6 * var(--u)); line-height:1.15;
  color:var(--cream);
}
.modal-sub{
  margin-top:.7em; font-size:calc(.95 * var(--u)); line-height:1.7;
  color:rgba(251,248,242,.68);
}

.modal-form{ margin-top:calc(1.8 * var(--u)); display:flex; flex-direction:column; gap:calc(1.05 * var(--u)); }
.fld{ display:flex; flex-direction:column; gap:.5em; }
.fld > span{
  font-family:var(--display); font-size:calc(.72 * var(--u));
  letter-spacing:.18em; text-transform:uppercase; color:rgba(232,207,138,.72);
}
.fld > span i{ font-family:var(--serif); font-style:italic; letter-spacing:.02em; text-transform:none; color:rgba(251,248,242,.4); }
.fld input, .fld textarea, .fld select{
  width:100%; font-family:var(--sans); font-size:calc(1 * var(--u));
  color:var(--cream); padding:.85em 1em;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(232,207,138,.22);
  border-radius:calc(.6 * var(--u));
  outline:none; transition:border-color .25s ease, background .25s ease;
}
.fld textarea{ resize:vertical; min-height:calc(5 * var(--u)); line-height:1.6; }
.fld select{ appearance:none; cursor:pointer;
  background-image:linear-gradient(45deg, transparent 50%, rgba(232,207,138,.6) 50%), linear-gradient(135deg, rgba(232,207,138,.6) 50%, transparent 50%);
  background-position:calc(100% - 1.15em) 55%, calc(100% - .8em) 55%;
  background-size:.4em .4em, .4em .4em; background-repeat:no-repeat;
}
.fld select option{ background:#140F26; color:var(--cream); }
.fld input::placeholder, .fld textarea::placeholder{ color:rgba(251,248,242,.3); }
.fld input:focus, .fld textarea:focus, .fld select:focus{
  border-color:rgba(232,207,138,.6); background:rgba(255,255,255,.08);
}
.fld.is-bad input, .fld.is-bad textarea{ border-color:rgba(214,84,64,.75); }
.fld-trap{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }

.modal-send{
  margin-top:calc(.6 * var(--u));
  padding:1.05em 2em; border-radius:999px; cursor:pointer;
  font-family:var(--display); font-size:calc(.82 * var(--u));
  letter-spacing:.18em; text-transform:uppercase; color:var(--ink);
  background:linear-gradient(150deg, #F2DCA0, #C9A24B 60%, #A5813A);
  border:1px solid rgba(232,207,138,.7);
  box-shadow:0 calc(.8 * var(--u)) calc(2 * var(--u)) rgba(2,1,8,.5), inset 0 1px 0 rgba(255,255,255,.5);
  transition:filter .25s ease, transform .25s ease;
}
.modal-send:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.modal-send[disabled]{ filter:grayscale(.5) brightness(.8); cursor:default; transform:none; }

.modal-note{
  min-height:1.4em; font-size:calc(.88 * var(--u)); line-height:1.6;
  color:rgba(251,248,242,.62); text-align:center;
}
.modal-note.is-bad{ color:#E58C7A; }
.modal-note.is-good{ color:var(--gold-light); }

/* состояние «отправлено»: форма уступает место благодарности */
.modal-card.is-sent .modal-form{ display:none; }
.modal-thanks{ display:none; margin-top:calc(1.6 * var(--u)); }
.modal-card.is-sent .modal-thanks{ display:block; }
.modal-thanks p{ font-size:calc(1 * var(--u)); line-height:1.75; color:rgba(251,248,242,.78); }



/* ============================================================
   МОБИЛЬНЫЙ ПОТОК — скрыт на десктопе, часть верстки поверх
   которой всё равно рисует пин, поэтому вынесен в обычный поток
   ============================================================ */
.mobile-intro{ display:none; }
.die-mob-off{ display:none; }
.pricing-sub-mobile{ display:none; }

/* ============================================================
   АДАПТИВ: телефоны и узкие планшеты — один связный блок.
   Ниже 861px масштабная единица --u вырождается (min(1vw,1.78vh)
   на портретном экране даёт единицы шириной в пару пикселей),
   поэтому все размеры здесь заданы в rem/vw/vh напрямую, а не
   пересчитаны из --u.
   ============================================================ */
@media (max-width: 860px){
  html{ font-size:clamp(15px, 4.2vw, 18px); }
  :root{ --header-h:60px; --pad:6vw; }

  /* --- шапка --- */
  .header-inner{ padding:.7rem 1.1rem; width:94%; margin-top:.6rem; }
  .header-name{ font-size:.92rem; }
  .header-name i{ display:none; }
  .header-nav{ gap:.7rem; }
  .header-nav a:not(.nav-cta){ display:none; }
  .header-nav .nav-cta{ padding:.6em 1.1em; font-size:.68rem; }

  /* --- сцена: дама с кольцом на весь экран, без надписей поверх ---
     Пин ведёт только переход (кольцо → лента), поэтому тексты сюда
     не кладём — они идут ниже, в .mobile-intro, обычным потоком. */
  #stage{ height:100dvh; }
  .stage-viewport{ height:100dvh; }
  .scene{
    left:50%; top:23vh; translate:-50% 0;
    width:min(86vw, 350px); height:auto;
  }
  /* фигура шире и ниже, чем была: её нижний край должен уходить
     в облачную гряду, иначе ассет обрывается прямой линией */
  .woman-scene{
    left:50%; top:21vh; translate:-50% 0;
    width:min(76vw, 310px);
  }
  .zodiac-line{ top:58vh; height:11vw; left:-30vw; right:-30vw; }
  .clouds-back{ height:38vh; }
  .clouds-front{ height:40vh; }
  .clouds-over{ height:34vh; }
  /* Облака заданы в масштабной единице, которая на портрете вырождается:
     гряда получалась мелкой и лежала у самого низа, оставляя срез фигуры
     на голом небе. Укрупняем от нижней кромки — дрейф при этом выключаем,
     иначе его кадры перебивают transform. */
  .clouds .cloud, .clouds-over .cloud{
    animation:none !important;
    transform:scale(2.8);
    transform-origin:50% 100%;
  }

  /* исходные надписи первого/второго экрана прячем — их читаемая
     копия лежит в .mobile-intro и скроллится как обычный текст */
  .screen-one, .screen-two{ display:none; }

  .mobile-intro{
    display:flex; flex-direction:column; gap:1.6rem;
    position:relative; z-index:8;
    padding:2.4rem var(--pad) 3rem;
    background:linear-gradient(180deg, var(--sky-low) 0%, var(--sky-low) 60%, transparent 100%);
  }
  .mi-block{ padding:1.3rem 1.35rem; }
  .mi-block h3{ font-size:1.28rem; margin-bottom:.55em; }
  .mi-block h2{ font-size:1.7rem; line-height:1.2; margin-bottom:.4em; }
  .mi-block p{
    font-family:var(--sans); font-size:.98rem; line-height:1.68;
    color:rgba(18,16,26,.72);
  }
  .mi-cta .cta{ margin-top:1.4rem; align-self:stretch; text-align:center; }

  /* --- космос: меньше костей, крупнее текст, подсказка по тапу --- */
  #cosmos{ height:170vh; }
  .cosmos-title{ width:82vw; font-size:1.55rem; line-height:1.34; padding:1rem 1.3rem; }
  .cosmos-hint-tip{ font-size:.66rem; letter-spacing:.2em; bottom:6vh; }
  .die{ width:22vw !important; }
  .die-hint{ width:78vw; padding:1rem 1.2rem; font-size:.92rem; }

  /* --- карты: горизонтальная карусель с прилипанием.
     Во время горения активна только та карта, на которой
     остановился пользователь — см. main.js (updateBurn/spawnFire
     на мобильном берут только активную карту из карусели). --- */
  #pricing{ height:230vh; }
  .pricing-title{ font-size:1.7rem; padding:.9rem 1.5rem; }
  .pricing-sub{ font-size:.66rem; letter-spacing:.18em; }
  .pricing-sub-mobile{ display:block; margin-top:.4em; }
  .pricing-inner{ width:100%; }
  .tarot-grid{
    --card-w:none;
    display:flex; grid-template-columns:none;
    justify-content:flex-start;
    gap:5vw; margin-top:4vh;
    /* полноэкранный бегунок независимо от отступов родителя */
    width:100vw; margin-left:calc(50% - 50vw);
    padding:0 14vw;
    overflow-x:auto; scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .tarot-grid::-webkit-scrollbar{ display:none; }
  .tarot-card{
    flex:0 0 72vw; scroll-snap-align:center;
    max-height:60vh;
  }
  .tarot-number{ width:22vw; height:22vw; font-size:2.1rem; }
  .tarot-label{ font-size:1.05rem; }
  .tarot-bullets{ font-size:.88rem; gap:.4em; }
  .tarot-price{ font-size:1.05rem; }

  /* --- цитата --- */
  #quote{ height:240vh; }
  .quote-text{ width:88vw; }
  .quote-words{ font-size:2.15rem; line-height:1.4; }
  .quote-text footer{ font-size:.72rem; margin-top:1.4rem; }

  /* --- футер --- */
  #site-footer{ padding:3rem var(--pad) 1.6rem; }
  .footer-inner{ flex-direction:column; text-align:center; gap:1.4rem; }
  .footer-portrait{ width:6.5rem; height:6.5rem; }
  .footer-info h3{ font-size:1.5rem; }
  .footer-text{ max-width:none; font-size:.96rem; }
  .footer-socials{ justify-content:center; flex-wrap:wrap; gap:.7rem; }
  .footer-bottom{ flex-direction:column; gap:.8rem; text-align:center; font-size:.8rem; }
  .footer-nav{ gap:1.3rem; font-size:.8rem; }

  /* --- окно записи: разворачиваем в полноэкранный лист --- */
  .modal-card{
    width:100vw; height:100dvh; max-height:none;
    border-radius:0; padding:1.6rem 1.35rem 2rem;
  }
  .modal-eyebrow{ font-size:.7rem; }
  .modal-title{ font-size:1.6rem; }
  .modal-sub{ font-size:.92rem; }
  .modal-x{ width:2.4rem; height:2.4rem; font-size:1.6rem; top:.4rem; right:.5rem; }
  /* 16px — иначе iOS Safari зумит страницу при фокусе на поле */
  .fld input, .fld textarea, .fld select{ font-size:16px; padding:.8em .9em; }
  .fld > span{ font-size:.68rem; }
  .modal-form{ gap:1.1rem; margin-top:1.5rem; }
  .modal-send{ font-size:.78rem; padding:1em 2em; }
  .modal-note{ font-size:.86rem; }
  .modal-thanks p{ font-size:.96rem; }

  /* --- футер: иконки и подписи, тонущие в --u на узком экране --- */
  .footer-role{ font-size:.8rem; }
  .footer-socials{ gap:.6rem; }
  .social-link{ font-size:.86rem; padding:.55em 1em; }
  .social-link img{ width:1.15rem; height:1.15rem; }

  /* цифра и подпись на рубашке карты — тоже мельчали вслед за --u */
  .back-numeral{ font-size:2.4rem; }
  .back-caption{ font-size:.78rem; }

  /* --- нагрузка: меньше размытия, честнее для слабых GPU --- */
  .glass, .glass-night, .header-inner, .cta,
  .die-hint, .modal-veil, .modal-card{
    backdrop-filter:blur(16px) saturate(130%) !important;
    -webkit-backdrop-filter:blur(16px) saturate(130%) !important;
  }
}

/* планшеты и узкие ноутбучные окна: без этого диапазон 861–1100px
   остаётся ничьим — десктопные размеры в нём уже начинают жать */
@media (min-width: 861px) and (max-width: 1100px){
  .t-block{ width:calc(21 * var(--u)); }
  .two-cards{ width:calc(50 * var(--u)); }
  .tarot-grid{ --card-w: min(calc(27 * var(--u)), 34vh); }
}

/* ============================================================
   СНИЖЕННАЯ АНИМАЦИЯ: гасим декоративные бесконечные циклы —
   дрейф облаков, авто-вращение кольца в состоянии покоя, —
   scroll-linked параллакс оставляем: им управляет сам пользователь.
   ============================================================ */
@media (prefers-reduced-motion: reduce){
  .hc, .cloud{ animation:none !important; }
  .cta, .modal-card, .tarot-inner{ transition-duration:.01ms !important; }
}
