
/* =====================================================================
   ROUND 3: Julia in the hero, brush before/after, more hands-on moments
   ===================================================================== */

[data-sc-progress] { background: var(--acc); height: 3px; z-index: 60; }

/* ------------------------------------------------------------ hero: Julia between the planes
   Behind her: the lipstick card. In front: the palette and the tools. */
.hero__julia { position: absolute; z-index: 3; right: 3%; bottom: 0; height: 92svh; aspect-ratio: 2 / 3;
  transform: translate3d(calc(var(--mx, 0) * 6px), calc(var(--hp, 0) * -12vh), 0); }
.hero__julia img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; max-width: none; display: block;
  filter: drop-shadow(-24px 10px 40px rgb(80 60 40 / 0.18));
  animation: juliaRise 1500ms cubic-bezier(0.2, 0.75, 0.1, 1) 250ms both; }
@keyframes juliaRise { from { opacity: 0; transform: translateY(6%); } to { opacity: 1; transform: none; } }
.hero__cards { z-index: 4; }
.hero__copy { z-index: 5; }
@media (min-width: 861px) {
  .hcard--a { right: 1.5%; top: 7%; z-index: 0; }
  .hero__cards .hcard--a { z-index: 0; }
  .hcard--b { right: 33%; top: 57%; --w: min(15vw, 230px); }
  .hcard--c { right: 2.5%; top: 60%; --w: min(13vw, 200px); }
  /* the lipstick card sits behind her: it lives in its own lower layer */
  .hero__back { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
}

/* ------------------------------------------------------------ pains: "це про мене" */
.pains__list li { position: relative; padding-right: 150px; transition: background-color 300ms; }
.me {
  position: absolute; right: 0; top: 26px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 1px solid rgb(28 25 22 / 0.28); border-radius: var(--r); background: transparent; cursor: pointer;
  font: 600 0.82rem var(--sc-font-text); color: var(--text); transition: background-color 200ms, color 200ms, border-color 200ms, transform 120ms;
}
.me::before { content: ""; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; transition: background-color 200ms, box-shadow 200ms; }
.me:hover { border-color: var(--text); }
.me:active { transform: scale(0.96); }
.me[aria-pressed="true"] { background: var(--acc); color: var(--on-acc); border-color: var(--acc-edge); }
.me[aria-pressed="true"]::before { background: var(--on-acc); box-shadow: inset 0 0 0 3px var(--acc); }
.pains__list li.is-me h3 { color: var(--acc); }
.pull-wrap { margin-top: clamp(56px, 8vw, 120px); }
.me-count { min-height: 1.4em; font-family: var(--sc-font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.pull-wrap .pull { margin-top: 10px; transition: transform 600ms cubic-bezier(0.2, 0.75, 0.1, 1), letter-spacing 600ms; transform-origin: 0 50%; }
.pull.is-lit { transform: scale(1.04); }

/* ------------------------------------------------------------ brush before / after */
.brush { margin-top: clamp(80px, 10vw, 150px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.brush__text { display: grid; gap: 16px; align-content: start; }
.brush__text > p { color: var(--soft); line-height: 1.55; max-width: 40ch; }
.brush__how { font-weight: 700; color: var(--text) !important; }
.brush__thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 6px; }
.brush__thumb { padding: 0; border: 2px solid transparent; border-radius: var(--r); background: none; cursor: pointer; overflow: hidden; aspect-ratio: 3 / 4; transition: border-color 200ms, transform 160ms; }
.brush__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.85); transition: filter 200ms; max-width: none; }
.brush__thumb:hover { transform: translateY(-2px); }
.brush__thumb:hover img, .brush__thumb[aria-selected="true"] img { filter: none; }
.brush__thumb[aria-selected="true"] { border-color: var(--acc); }
.brush__controls { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--acc-edge); background: var(--acc); color: var(--on-acc); font: 700 0.92rem var(--sc-font-text); cursor: pointer; transition: background-color 160ms, transform 120ms; }
.chip:hover { background: var(--acc-hover); }
.chip:active { transform: scale(0.97); }
.chip--quiet { background: transparent; color: var(--text); border-color: rgb(28 25 22 / 0.3); }
.chip--quiet:hover { background: rgb(28 25 22 / 0.05); }
.brush__stage { position: relative; aspect-ratio: 3 / 4; max-height: 82svh; border-radius: var(--r); overflow: hidden; background: #E2DBD0; justify-self: center; width: min(100%, 560px);
  box-shadow: 0 30px 60px -34px rgb(60 44 28 / 0.55); touch-action: none; user-select: none; -webkit-user-select: none; }
.brush__after, .brush__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.brush__canvas { transition: opacity 700ms var(--sc-ease-out); }
.brush__canvas.is-clear { opacity: 0; }
.brush__before-src { display: none; }
.brush__tag { position: absolute; top: 12px; padding: 4px 9px; border-radius: 2px; background: rgb(246 243 238 / 0.92); font-family: var(--sc-font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); transition: opacity 400ms, background-color 400ms, color 400ms; }
.brush__tag--before { left: 12px; }
.brush__tag--after { right: 12px; opacity: 0.55; }
.brush.is-done .brush__tag--after { opacity: 1; background: var(--acc); color: var(--on-acc); }
.brush.is-done .brush__tag--before { opacity: 0.55; }
.brush__cursor { position: absolute; left: 0; top: 0; width: 56px; height: 56px; pointer-events: none; opacity: 0; transition: opacity 200ms; z-index: 3;
  transform: translate3d(var(--cx, 0px), var(--cy, 0px), 0) translate(-6px, -50px) rotate(var(--ca, 0deg)); filter: drop-shadow(2px 6px 6px rgb(0 0 0 / 0.25)); }
.brush__cursor svg { width: 100%; height: 100%; }
.brush__stage.is-hover .brush__cursor, .brush__stage.is-demo .brush__cursor { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .brush__stage { cursor: none; } }

/* ------------------------------------------------------------ the week fills as lessons pass */
.week { position: sticky; top: 14px; z-index: 5; margin: 0 0 8px; padding: 12px 14px; border-radius: var(--r); background: rgb(246 243 238 / 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); display: flex; align-items: center; gap: 18px; }
.week__bar { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week__bar span { display: grid; gap: 6px; }
.week__bar i { display: block; height: 4px; border-radius: 2px; background: rgb(28 25 22 / 0.12); overflow: hidden; position: relative; }
.week__bar i::after { content: ""; position: absolute; inset: 0; background: var(--acc); transform: scaleX(0); transform-origin: 0 50%; transition: transform 700ms cubic-bezier(0.2, 0.75, 0.1, 1); }
.week__bar span.is-on i::after { transform: none; }
.week__bar b { font-family: var(--sc-font-mono); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.week__bar span.is-on b { color: var(--text); }
.week__label { font-family: var(--sc-font-mono); font-size: 0.74rem; white-space: nowrap; color: var(--acc); }

/* lesson cards lift a little under the pointer */
@media (hover: hover) and (pointer: fine) {
  .lesson__img img { transition: scale 900ms cubic-bezier(0.2, 0.75, 0.1, 1); }
  .lesson:hover .lesson__img img { scale: 1.05; }
  .bag__items label:hover span { transform: translateY(-2px); }
}
.bag__items span { transition: background-color 160ms, border-color 160ms, color 160ms, transform 200ms; }
.bag__items input:checked + span { animation: chipPop 360ms cubic-bezier(0.2, 0.9, 0.2, 1.3); }
@keyframes chipPop { 40% { transform: scale(1.06); } }

/* ------------------------------------------------------------ brands marquee */
.marquee { margin-top: clamp(40px, 5vw, 64px); overflow: hidden; border-block: 1px solid var(--line-strong); padding-block: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 42px; width: max-content; animation: marquee 38s linear infinite; }
.marquee__track span { font-family: var(--sc-font-display); font-weight: 300; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.4rem); letter-spacing: -0.03em; white-space: nowrap; color: var(--text); }
.marquee__track span:nth-child(3n) { font-weight: 600; color: var(--acc); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ Julia: two photographs */
.julia__photos { position: relative; position: sticky; top: 28px; padding-bottom: 18%; }
.julia__photos .julia__photo { position: static; }
.julia__photo2 { position: absolute; right: -8%; bottom: 0; width: 46%; margin: 0; border: 6px solid var(--white); border-radius: var(--r); box-shadow: 0 24px 40px -24px rgb(60 44 28 / 0.55); rotate: 3deg; }
.julia__photo2 .frame__img { aspect-ratio: 4 / 5; }
.julia__photo2 .frame__img img { object-position: 50% 12%; }

/* ------------------------------------------------------------ smoother FAQ */
details[open] p { animation: faqIn 380ms var(--sc-ease-out); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  .hero__julia img, .marquee__track, .bag__items input:checked + span, details[open] p { animation: none !important; }
  .hero__julia { transform: none !important; }
  .marquee__track { flex-wrap: wrap; width: auto; gap: 10px 24px; }
  .marquee__track span:nth-child(n + 12) { display: none; }
}

@media (max-width: 860px) {
  .hero__julia { right: -14vw; height: 50svh; z-index: 3; }
  .hero__copy { padding-top: 4svh; }
  .hero__cards { z-index: 6; }
  .hcard--a { --w: 27vw; left: 3vw; bottom: 4svh; }
  .hcard--b { --w: 30vw; left: 26vw; bottom: 2svh; }
  .hcard--c { display: none; }
  .pains__list li { padding-right: 0; padding-top: 70px; }
  .me { top: 22px; right: auto; left: 0; }
  .brush { grid-template-columns: 1fr; }
  .brush__stage { order: -1; width: 100%; max-height: none; }
  .brush__thumbs { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .week { top: 8px; padding: 10px; gap: 10px; }
  .week__bar b { display: none; }
  .julia__photos { position: relative; top: 0; padding-bottom: 14%; margin-right: 6%; }
}
@media (max-width: 860px) and (max-height: 720px) {
  .hero__julia { height: 40svh; }
  .hcard--a { bottom: -12svh; }
  .hcard--b { bottom: -14svh; }
}

@media (max-width: 860px) { .hero__back { position: absolute; inset: 0; z-index: 6; pointer-events: none; } }

/* fixes: Julia never shows her bottom edge; phone cards clear the line under the button */
.hero__julia { bottom: -10svh; height: 100svh; transform: translate3d(calc(var(--mx, 0) * 6px), calc(var(--hp, 0) * -8vh), 0); }
@media (max-width: 860px) {
  .hero__julia { height: 54svh; bottom: -6svh; }
  .hcard--a { bottom: -6svh; }
  .hcard--b { bottom: -9svh; }
}
/* the source photo cuts her hair at its left edge: dissolve that edge instead of showing a straight cut */
.hero__julia img { -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%); mask-image: linear-gradient(90deg, transparent 0%, #000 16%); }
@media (max-width: 860px) {
  .hero__julia { height: 44svh; bottom: -8svh; right: -10vw; }
}
@media (max-width: 860px) and (max-height: 720px) {
  .hero__julia { height: 36svh; bottom: -8svh; }
}

@media (max-width: 860px) and (max-height: 720px) { .hero__today span { display: none; } }
