/* Beauty Base — сайт getbeautybase.com
   Палітра Dark Cherry, як у додатку й бренд-кіті. Назва — Jost (лише латиниця), тексти — Manrope (є кирилиця). */

:root {
  --night: #2A0814;
  --night-deep: #1C0510;
  --cherry: #4A0E24;
  --cherry-light: #5E1430;
  --raspberry: #E20942;
  --brush: #FF1450;
  --powder: #F7EFF2;
  --powder-deep: #EEDDE4;
  --ink: #2A0814;
  --muted: #D9AFC0;
  --muted-ink: #7A4A5C;
  --success: #6FD7A0;
  --radius: 18px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand: "Jost", "Futura", "Manrope", sans-serif;
  --day: 0; /* 0…1 — скільки дня минуло (задає JS) */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--powder);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: inherit; }
img, svg { display: block; }

/* ---------- Шапка ---------- */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px max(20px, env(safe-area-inset-left));
  transition: background .4s, color .4s, backdrop-filter .4s;
}
.top.solid { background: rgba(42, 8, 20, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top.light { color: var(--ink); }
.top.light.solid { background: rgba(247, 239, 242, .8); }
.wordmark { font-family: var(--brand); letter-spacing: .32em; font-size: 13px; text-decoration: none; }
.top-right { display: flex; gap: 10px; align-items: center; }
.lang { display: flex; border: 1px solid currentColor; border-radius: 999px; overflow: hidden; opacity: .85; }
.lang button {
  font: 600 12px var(--font); color: inherit; background: none; border: 0;
  padding: 6px 11px; cursor: pointer; letter-spacing: .06em;
}
.lang button[aria-pressed="true"] { background: var(--raspberry); color: #fff; }
.pill {
  font: 700 13px var(--font); text-decoration: none; color: #fff; background: var(--raspberry);
  padding: 9px 16px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Ніч: перший екран ---------- */

.hero {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: 110px 20px 60px; position: relative; overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 38%, rgba(226, 9, 66, .18), transparent 70%),
    linear-gradient(var(--night), var(--night-deep));
}
.hero-inner { max-width: 760px; }
.mark { width: min(46vw, 230px); height: auto; margin: 0 auto 28px; overflow: visible; }
.mark .letters { fill: none; stroke: var(--powder); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 760; stroke-dashoffset: 760; animation: write 2.2s .2s cubic-bezier(.65, 0, .35, 1) forwards; }
.mark .brush { fill: var(--brush); filter: drop-shadow(0 0 14px rgba(255, 20, 80, .55)); }
.mark .brush-reveal { stroke-dasharray: 70; stroke-dashoffset: 70; animation: write .9s 2.1s cubic-bezier(.3, 0, .2, 1) forwards; }
@keyframes write { to { stroke-dashoffset: 0; } }

.eyebrow { font-family: var(--brand); letter-spacing: .42em; font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.hero h1 {
  font-size: clamp(40px, 8vw, 84px); line-height: 1.02; letter-spacing: -.03em; margin: 0;
  opacity: 0; transform: translateY(18px); animation: rise 1s 2.4s ease-out forwards;
}
.hero h1 em { font-style: normal; color: var(--brush); }
.hero p.lead {
  font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); max-width: 560px; margin: 22px auto 0;
  opacity: 0; animation: rise 1s 2.7s ease-out forwards;
}
.hero .actions { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  opacity: 0; animation: rise 1s 3s ease-out forwards; }
.btn {
  font: 700 16px var(--font); text-decoration: none; padding: 15px 26px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 10px; transition: transform .2s, box-shadow .2s;
}
.btn.primary { background: var(--raspberry); color: #fff; box-shadow: 0 10px 30px rgba(226, 9, 66, .35); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(226, 9, 66, .45); }
.btn.ghost { color: inherit; border: 1.5px solid rgba(247, 239, 242, .35); }
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: 12px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase;
  opacity: 0; animation: rise 1s 3.4s forwards;
}
.scroll-hint::after { content: ""; display: block; width: 1px; height: 38px; margin: 10px auto 0;
  background: linear-gradient(var(--brush), transparent); animation: drip 1.8s infinite; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- День ---------- */

.day {
  position: relative; padding: 40px 0 0;
  /* ніч → ранок → день: фон світлішає з годинами */
  background: linear-gradient(var(--night-deep), var(--night) 18%, #3A0A1C 55%, var(--cherry) 100%);
}
.day-intro { text-align: center; padding: 60px 20px 30px; max-width: 720px; margin: 0 auto; }
.day-intro h2 { font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 0; }
.day-intro p { color: var(--muted); font-size: 18px; margin: 16px 0 0; }

.day-grid {
  display: grid; grid-template-columns: 120px 1fr; gap: 0 28px;
  max-width: 1080px; margin: 0 auto; padding: 0 24px 80px;
}
.rail { position: sticky; top: 90px; height: calc(100svh - 140px); align-self: start; }
.rail-line { position: absolute; left: 58px; top: 10px; bottom: 10px; width: 2px; background: rgba(247, 239, 242, .12); border-radius: 2px; }
.rail-fill { position: absolute; left: 58px; top: 10px; width: 2px; border-radius: 2px;
  height: calc((100% - 20px) * var(--day)); background: linear-gradient(var(--brush), var(--raspberry));
  box-shadow: 0 0 12px rgba(255, 20, 80, .6); }
.rail-now { position: absolute; left: 52px; top: calc(10px + (100% - 20px) * var(--day) - 7px); width: 14px; height: 14px;
  border-radius: 50%; background: var(--brush); box-shadow: 0 0 0 6px rgba(255, 20, 80, .18); }
.rail-hours { position: absolute; inset: 10px auto 10px 0; display: flex; flex-direction: column; justify-content: space-between;
  font: 600 13px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.rail-hours span { transition: color .3s; }
.rail-hours span.passed { color: var(--powder); }

.hour {
  min-height: 92svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px;
  align-items: center; padding: 40px 0;
}
.hour .time { font: 700 14px var(--font); color: var(--brush); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.hour h3 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.02em; margin: 10px 0 14px; }
.hour p { color: var(--muted); font-size: 17px; margin: 0; max-width: 420px; }
.hour .text { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.hour.in .text { opacity: 1; transform: none; }

/* ---------- Картки «як у додатку» ---------- */

.stage { position: relative; min-height: 340px; display: grid; align-content: center; gap: 12px; }
.card {
  background: var(--cherry); border: 1px solid rgba(255, 255, 255, .06); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  opacity: 0; transition: transform 1s cubic-bezier(.2, .9, .2, 1), opacity .8s;
}
/* звідки «прилітає» картка — задається data-from */
.card[data-from="left"] { transform: translate(-60vw, 40px) rotate(-8deg); }
.card[data-from="right"] { transform: translate(60vw, -30px) rotate(9deg); }
.card[data-from="top"] { transform: translate(0, -45vh) rotate(-4deg); }
.card[data-from="bottom"] { transform: translate(0, 45vh) rotate(5deg); }
.card[data-from="scale"] { transform: scale(.6); }
.hour.in .card { opacity: 1; transform: none; }
.hour.in .card:nth-child(2) { transition-delay: .12s; }
.hour.in .card:nth-child(3) { transition-delay: .24s; }
.hour.in .card:nth-child(4) { transition-delay: .36s; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.c-title { font-weight: 700; font-size: 16px; }
.c-sub { color: var(--muted); font-size: 13px; }
.c-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.badge { font: 700 11px var(--font); padding: 4px 9px; border-radius: 999px; background: rgba(255, 20, 80, .16); color: var(--brush); white-space: nowrap; }
.badge.ok { background: rgba(111, 215, 160, .15); color: var(--success); }
.badge.warn { background: rgba(232, 176, 74, .16); color: #E8B04A; }
.appt { border-left: 3px solid var(--brush); }
.mini-btn { margin-top: 12px; text-align: center; font-weight: 700; font-size: 14px; background: var(--raspberry); color: #fff; border-radius: 12px; padding: 10px; }

.price { font-variant-numeric: tabular-nums; font-weight: 700; }
.strike { color: var(--muted); text-decoration: line-through; font-weight: 500; margin-right: 6px; }
.note { margin-top: 10px; font-size: 13px; color: var(--powder); background: rgba(0, 0, 0, .18); border-radius: 10px; padding: 8px 10px; }

.refs { display: flex; gap: 8px; margin-top: 10px; }
.ref { width: 64px; height: 80px; border-radius: 10px; }
.ref.a { background: linear-gradient(160deg, #F1DDC0, #C99A6B 60%, #8A5A3A); }
.ref.b { background: linear-gradient(160deg, #F6E9DA, #D9B48A 55%, #A07450); }
.ref.c { background: linear-gradient(160deg, #EADCCF, #BC8E6C 60%, #6E4632); }

.tones { display: flex; gap: 6px; margin-bottom: 10px; }
.tone { flex: 1; text-align: center; font: 700 12px var(--font); padding: 7px 0; border-radius: 9px; background: rgba(0, 0, 0, .18); color: var(--brush); }
.tone.on { background: var(--brush); color: #fff; }
.bubble { background: #2B7FFF; color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 13px; font-size: 14px; margin-left: 30px; }
.channels { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.chip { font: 600 12px var(--font); padding: 6px 10px; border-radius: 9px; background: rgba(0, 0, 0, .2); }

.check { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.check i { width: 18px; height: 18px; border-radius: 50%; background: var(--brush); display: inline-grid; place-items: center; font-style: normal; font-size: 11px; color: #fff; flex: none; }
.toggle { width: 36px; height: 22px; border-radius: 11px; background: var(--success); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 90px; margin-top: 12px; }
.bars span { flex: 1; border-radius: 6px 6px 2px 2px; background: rgba(255, 20, 80, .35); transform-origin: bottom; transform: scaleY(0); transition: transform 1s cubic-bezier(.2, .9, .2, 1); }
.bars span.hi { background: var(--brush); }
.hour.in .bars span { transform: scaleY(1); }
.hour.in .bars span:nth-child(2) { transition-delay: .1s; } .hour.in .bars span:nth-child(3) { transition-delay: .2s; }
.hour.in .bars span:nth-child(4) { transition-delay: .3s; } .hour.in .bars span:nth-child(5) { transition-delay: .4s; }
.big-num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- Телефон: день гортається в iPhone ---------- */

.platform { display: inline-block; font: 600 13px var(--font); letter-spacing: .04em; color: var(--powder);
  border: 1px solid rgba(247, 239, 242, .25); border-radius: 999px; padding: 6px 14px; margin: -6px 0 22px; }

.theater { position: relative; height: calc(var(--n) * 100svh); }
.theater-sticky {
  position: sticky; top: 0; height: 100svh; display: grid;
  grid-template-columns: minmax(0, 1fr) auto; gap: 60px; align-items: center;
  max-width: 1080px; margin: 0 auto; padding: 80px 24px 30px;
}
.captions { position: relative; min-height: 260px; }
.cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; pointer-events: none; }
.cap.on { opacity: 1; transform: none; pointer-events: auto; }
.cap .time { font: 700 14px var(--font); color: var(--brush); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.cap h3 { font-size: clamp(24px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.02em; margin: 10px 0 14px; }
.cap p { color: var(--muted); font-size: 17px; margin: 0; max-width: 440px; }

.phone {
  --pw: min(330px, calc((100svh - 140px) * .48));
  width: var(--pw); aspect-ratio: 9 / 19.2; border-radius: calc(var(--pw) * .16);
  background: #0E0307; padding: calc(var(--pw) * .035);
  box-shadow: 0 0 0 2px #3A0A1C, 0 40px 90px rgba(0, 0, 0, .55), 0 0 80px rgba(226, 9, 66, .18);
}
.phone-screen {
  position: relative; height: 100%; border-radius: calc(var(--pw) * .13); overflow: hidden;
  background: linear-gradient(#2A0814, #250712); display: flex; flex-direction: column;
  font-size: calc(var(--pw) * .041);
}
.status { display: flex; justify-content: space-between; align-items: center; padding: 1.1em 1.6em .4em;
  font-weight: 700; font-size: .95em; font-variant-numeric: tabular-nums; }
.island { width: 30%; height: 1.9em; background: #000; border-radius: 1em; }
.bars-icons { font-size: .7em; letter-spacing: .1em; opacity: .9; }
.app-head { display: flex; justify-content: space-between; align-items: center; padding: .6em 1.2em .3em; }
.app-title { font-weight: 800; font-size: 1.6em; letter-spacing: -.02em; }
.app-dot { width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--cherry); box-shadow: inset 0 0 0 2px var(--cherry-light); }
.app-progress { margin: .4em 1.2em .6em; height: 3px; border-radius: 3px; background: rgba(247, 239, 242, .1); overflow: hidden; }
.app-progress span { display: block; height: 100%; width: calc(var(--day) * 100%); background: linear-gradient(90deg, var(--raspberry), var(--brush)); }
.scrs { position: relative; flex: 1; overflow: hidden; }
.scr { position: absolute; inset: 0; padding: 1em 1em .2em; opacity: 0; transition: opacity .45s; }
.scr.on { opacity: 1; }
.scr-inner { display: grid; gap: .75em; transform: translateY(calc((.5 - var(--local, 0)) * 1.2em)); transition: transform .2s linear; }
.tabbar { display: flex; justify-content: space-around; padding: .8em 1em 1.4em; border-top: 1px solid rgba(247, 239, 242, .06); }
.tabbar i { width: 1.4em; height: 1.4em; border-radius: .4em; background: rgba(247, 239, 242, .14); }
.tabbar i:first-child { background: var(--brush); }

/* картки всередині телефона — менші й «прилітають», коли екран активний */
.phone .card { padding: .9em 1em; border-radius: 1em; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); font-size: 1em; }
.phone .c-title { font-size: 1.05em; } .phone .c-sub, .phone .c-time { font-size: .85em; }
.phone .card[data-from="left"] { transform: translateX(-120%) rotate(-6deg); }
.phone .card[data-from="right"] { transform: translateX(120%) rotate(6deg); }
.phone .card[data-from="top"] { transform: translateY(-140%); }
.phone .card[data-from="bottom"] { transform: translateY(160%); }
.phone .scr.on .card { opacity: 1; transform: none; }
.phone .scr.on .card:nth-child(2) { transition-delay: .12s; }
.phone .scr.on .card:nth-child(3) { transition-delay: .24s; }
.phone .note, .phone .mini-btn { font-size: .85em; }
.phone .bubble { font-size: .9em; margin-left: 1.5em; }
.phone .ref { width: 3.6em; height: 4.5em; }
.phone .tone, .phone .chip, .phone .badge { font-size: .72em; }
.phone .check { font-size: .9em; padding: .35em 0; }
.phone .big-num { font-size: 2em; }
.phone .bars { height: 5em; }
.phone .bars span { transform: scaleY(0); }
.phone .scr.on .bars span { transform: scaleY(1); }

/* ---------- Пудра: день закрито ---------- */

.close {
  background: linear-gradient(var(--cherry), var(--powder) 22%, var(--powder));
  color: var(--ink); padding: 160px 24px 100px; text-align: center;
}
.close h2 { font-size: clamp(40px, 8vw, 88px); line-height: 1; letter-spacing: -.035em; margin: 0; }
.close h2 em { font-style: normal; color: var(--raspberry); }
.close p { color: var(--muted-ink); font-size: 19px; max-width: 560px; margin: 22px auto 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 640px; margin: 44px auto 0; }
.stat { background: #fff; border-radius: var(--radius); padding: 18px 10px; box-shadow: 0 10px 30px rgba(74, 14, 36, .08); }
.stat b { display: block; font-size: 30px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted-ink); }
.close .actions { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.close .btn.ghost { border-color: rgba(42, 8, 20, .25); }
.soon { margin-top: 18px; font-size: 14px; color: var(--muted-ink); }

/* ---------- Підвал ---------- */

.foot { background: var(--powder-deep); color: var(--ink); padding: 40px 24px calc(40px + env(safe-area-inset-bottom)); }
.foot-inner { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--raspberry); }
.foot small { color: var(--muted-ink); }

/* ---------- Сторінки політики, умов, підтримки ---------- */

.doc-page { background: var(--powder); color: var(--ink); }
.doc { max-width: 760px; margin: 0 auto; padding: 120px 24px 80px; }
.doc h1 { font-size: clamp(32px, 6vw, 54px); letter-spacing: -.03em; line-height: 1.05; margin: 0 0 8px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -.01em; }
.doc p, .doc li { font-size: 17px; color: #3B1A27; }
.doc ul { padding-left: 22px; }
.doc .meta { color: var(--muted-ink); margin-bottom: 30px; }
.doc a { color: var(--raspberry); }
.doc .card-light { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 30px rgba(74, 14, 36, .08); margin: 18px 0; }
[data-lang-block] { display: none; }
html[lang="uk"] [data-lang-block="uk"], html[lang="en"] [data-lang-block="en"] { display: block; }

/* ---------- Телефон ---------- */

@media (max-width: 820px) {
  .theater-sticky { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 14px;
    padding: 64px 16px 16px; align-items: start; justify-items: center; }
  .phone { --pw: min(260px, calc((100svh - 300px) * .48)); order: -1; }
  .captions { width: 100%; min-height: 190px; text-align: center; }
  .cap { justify-content: flex-start; align-items: center; }
  .cap h3 { font-size: 22px; margin: 6px 0 8px; }
  .cap p { font-size: 14px; }
  .day-grid { grid-template-columns: 46px 1fr; gap: 0 14px; padding: 0 16px 60px; }
  .rail-line, .rail-fill { left: 38px; }
  .rail-now { left: 32px; }
  .rail-hours { font-size: 10px; }
  .hour { grid-template-columns: minmax(0, 1fr); min-height: auto; gap: 22px; padding: 70px 0; }
  .stage { min-height: 0; }
  .card[data-from="left"], .card[data-from="right"] { transform: translate(0, 60px) scale(.92); }
  .top .pill { display: none; }
  .hero { display: flex; flex-direction: column; justify-content: center; }
  .scroll-hint { position: static; transform: none; margin-top: 40px; }
  .stats { gap: 8px; }
  .stat b { font-size: 24px; }
}

/* «Зменшити рух» — без польотів і малювання */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; }
  .card, .hour .text { opacity: 1 !important; transform: none !important; }
  .scr-inner { transform: none !important; }
  .bars span { transform: none !important; }
}
