/* ============================================
   INTRO — display face (Fontfabric demo weights, converted to woff2).
   The CAPS cut draws lowercase as capitals, so it is used for headings and
   buttons only; body copy keeps the system sans.
   ============================================ */
@font-face {
  font-family: 'Rubik';
  src: url('fonts/rubik-medium.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Intro';
  src: url('fonts/intro-cond-black.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Intro';
  src: url('fonts/intro-cond-light.woff2') format('woff2');
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   WELLNESS NAVIGATOR — main one-page site
   Warm Sand & Stone palette · Apple Glass aesthetic
   To revert to original, see _original_backup/styles.css
   ============================================ */

/* Intro (Fontfabric) — the Canva "Intro" family, full Cyrillic.
   Loaded via CDN so every page that links styles.css gets it. */
@import url('https://fonts.cdnfonts.com/css/intro-2');

:root {
  /* chocolate-base dark palette — main bg is rich dark chocolate */
  --bg-0: #1C100A;     /* deepest cocoa */
  --bg-1: #2A1810;     /* chocolate */
  --bg-2: #3A2418;     /* milk-chocolate */
  --bg-3: #4D3322;     /* warm mocha */

  /* whites + silver — main text + secondary readouts */
  --text-1: #FFFFFF;          /* pure white headlines */
  --text-2: #E0D6CE;          /* silvery-warm body text */
  --text-3: #A89B92;          /* dimmed cocoa-silver for hints */

  /* softened rose / lilac accent set — gentler, more tender palette */
  --pink-bright: #FF8FB4;     /* soft rose (primary) */
  --pink-deep:   #E77BA6;     /* muted mauve-rose */
  --purple:      #C79BE0;     /* soft lilac */
  --red:         #FF9DAF;     /* soft coral (was punchy red) */
  --silver:      #D8D2CB;     /* metallic silver mid-tone */

  /* legacy aliases so existing rules keep working — point to the new palette */
  --terracotta: var(--pink-bright);
  --honey:      var(--purple);
  --olive:      var(--pink-deep);
  --rust:       var(--red);
  --berry:      var(--pink-deep);
  --clay:       var(--pink-bright);

  /* signature gradient: lilac → soft rose → blush coral — gentler "juice" */
  --juice-grad: linear-gradient(118deg, #C79BE0 0%, #FF8FB4 50%, #FF9DAF 100%);

  --accent: var(--pink-bright);
  --accent-rgb: 255, 143, 180;     /* matches --pink-bright */

  /* glass surfaces tuned for chocolate bg — warm-white translucent overlay */
  --glass-bg: rgba(255, 235, 240, 0.06);
  --glass-bg-strong: rgba(255, 235, 240, 0.13);
  --glass-border: rgba(255, 220, 230, 0.18);
  --glass-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 220, 230, 0.1);
  --glass-shadow-strong: 0 22px 54px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 220, 230, 0.14);

  --ease: cubic-bezier(0.4, 0.0, 0.15, 1);
  --max-w: 1240px;
  --section-pad: clamp(18px, 2.6vw, 36px);

  /* display font — Intro (Fontfabric, commercial). Russo One is the free
     Google-Fonts fallback with full Cyrillic support and the same heavy
     geometric vibe; users with Intro installed locally see Intro. */
  /* Intro — все заголовки, кнопки и плитки; основной текст идёт на Rubik
     (задан на body ниже) */
  --font-btn: 'Intro', 'Russo One', 'Bebas Neue', sans-serif;
  --font-display: 'Intro', 'Russo One', 'Bowlby One', 'Bebas Neue', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
html, body { min-height: 100%; }
/* kill any horizontal scroll (full-bleed 100vw rows, decorative orbs, etc.)
   — clip on BOTH html and body is what reliably holds on mobile browsers.
   overscroll-behavior-x: none also kills the iOS Safari elastic side-bounce
   (the "site slides left/right when you drag it" feel), and width:100% keeps
   the root pinned to the visual viewport instead of a stray 100vw child. */
html, body {
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  overscroll-behavior-x: none;
}
body {
  /* Body copy runs on Rubik Medium; headings and buttons keep the display
     face via var(--font-display). */
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(226, 91, 42, 0.28); }

.hidden { display: none !important; }

/* ============================================
   BACK-TO-TOP FLOATING BUTTON
   ============================================ */
.to-top {
  position: fixed;
  right: clamp(16px, 2.4vw, 28px);
  bottom: clamp(16px, 2.4vw, 28px);
  z-index: 90;
  width: 44px; height: 44px;
  border-radius: 50%;
  /* no pill background — just the arrow with a soft glow */
  background: none;
  color: rgba(255, 235, 220, 0.55);
  display: flex; align-items: center; justify-content: center;
  box-shadow: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition:
    opacity .35s var(--ease),
    transform .45s var(--ease),
    color .25s ease;
}
.to-top.is-visible {
  opacity: 0.7;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover {
  opacity: 1;
  color: var(--pink-bright);
  transform: translateY(-2px);
}
.to-top svg {
  width: 24px; height: 24px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

/* ============================================
   AMBIENT BACKGROUND — moody photo + chocolate overlay + pink/purple glow
   ============================================ */
.ambient {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  /* solid chocolate while photo loads */
  background-color: var(--bg-1);
}
/* hero photo (bottom) — desaturated, dark, blurred slightly */
.ambient::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 0;
  background:
    url('https://images.unsplash.com/photo-1518611012118-696072aa579a?w=1920&q=60&auto=format&fit=crop')
    center / cover no-repeat;
  filter: brightness(0.32) saturate(0.55) blur(2px) hue-rotate(310deg);
  transform: scale(1.04);
}
/* dark chocolate + pink/purple glow overlay (above photo, below orbs) */
.ambient::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(at 12% 0%, rgba(155, 63, 204, 0.42), transparent 48%),
    radial-gradient(at 88% 100%, rgba(255, 143, 180, 0.38), transparent 52%),
    radial-gradient(at 50% 50%, rgba(28, 16, 10, 0.45), rgba(28, 16, 10, 0.72) 70%),
    linear-gradient(160deg, rgba(28, 16, 10, 0.45), rgba(42, 24, 16, 0.35) 55%, rgba(58, 36, 24, 0.55));
  pointer-events: none;
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.65; mix-blend-mode: screen; z-index: 2; }
.orb-1 { width: 360px; height: 360px; top: -110px; left: -90px;   background: radial-gradient(circle, var(--purple),      transparent 70%); animation: float 22s ease-in-out infinite; }
.orb-2 { width: 400px; height: 400px; bottom: -130px; right: -110px; background: radial-gradient(circle, var(--pink-bright), transparent 70%); animation: float2 26s ease-in-out infinite; }
.orb-3 { width: 260px; height: 260px; top: 45%; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, var(--pink-deep), transparent 70%); opacity: 0.35; }
.noise { z-index: 3; }
@keyframes float  { 0%,100% { transform: translate(0,0); } 50% { transform: translate(36px,-24px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-36px,24px); } }
.noise {
  position: absolute; inset: 0; opacity: 0.03; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================================
   STICKY NAV
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  /* extra bottom padding gives the gradient room to fade smoothly into
     the page content below */
  padding: 12px clamp(20px, 4vw, 48px) 28px;
  /* lighter overall transparency — content behind shows through a bit,
     still readable thanks to the heavy backdrop blur below */
  background: linear-gradient(
    to bottom,
    rgba(17, 10, 4, 0.60) 0%,
    rgba(17, 10, 4, 0.45) 80%,
    rgba(17, 10, 4, 0) 100%
  );
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  /* tight bottom fade so the soft-edge stays but doesn't reveal what's above */
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  border-bottom: none;
  /* hidden by default — slides in from the top once the user scrolls past
     the hero puzzle */
  transform: translateY(-100%);
  transition:
    transform 1.1s cubic-bezier(0.22, 0.9, 0.3, 1),
    padding .3s var(--ease);
}
.nav.is-visible { transform: translateY(0); }
.nav.is-scrolled { padding: 10px clamp(20px, 4vw, 48px) 24px; }
/* The bottom-fade mask above clips every descendant to the bar's own box,
   so the burger menu — a child of .nav — was cut off and only the sliver
   overlapping the bar showed (a black stripe). Drop the mask while the menu
   is open; the panel covers that edge anyway. */
.nav.is-menu-open {
  -webkit-mask-image: none;
          mask-image: none;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px; font-weight: 600;
  transition: transform .25s var(--ease);
}
.nav-logo:hover { transform: translateY(-1px); }
.nav-logo:hover .nav-logo-mark { animation: jack 0.7s var(--ease) infinite; }
.nav-logo-mark {
  width: 38px; height: 38px;
  /* subtle pink glow around the strokes — no solid background */
  filter: drop-shadow(0 2px 6px rgba(255, 143, 180, 0.35));
  transition: transform .35s var(--ease);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* figure does a tiny jumping-jack bounce on hover — head + frame nudge up/down */
@keyframes jack {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-3px) scale(1.06); }
}
.nav-logo-text {
  font-family: var(--font-btn);   /* same family as nav menu items */
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  /* two-layer bg: moving white shine on top + steady pink/magenta below.
     Both clipped to the letters. */
  background:
    /* moving pink shine on top, over bright-white letters below */
    linear-gradient(105deg,
      rgba(255, 143, 180, 0) 30%,
      rgba(255, 143, 180, 0.60) 50%,
      rgba(255, 143, 180, 0) 70%) no-repeat,
    linear-gradient(110deg, #ffffff 0%, #ffffff 100%);
  background-size: 250% 100%, 100% 100%;
  background-position: -150% 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  filter: none;
  /* ONE shine sweep every 4 s — sweep takes ~1.4 s, then ~2.6 s pause */
  animation: logo-shine 4s linear infinite;
}
@keyframes logo-shine {
  0%   { background-position: -150% 0, 0 0; }
  35%  { background-position:  250% 0, 0 0; }
  100% { background-position:  250% 0, 0 0; }
}
.nav-links { display: flex; gap: clamp(12px, 1.8vw, 22px); align-items: baseline; }
.nav-links a {
  font-family: var(--font-btn);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color .25s ease, transform .28s var(--ease), font-weight .2s ease, text-shadow .3s ease;
  position: relative;
  padding: 4px 0;
  display: inline-block;
  transform-origin: center bottom;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .25s var(--ease);
}
.nav-links a:hover { color: var(--text-1); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active {
  color: #FFF6E8;
  font-weight: 700;
  transform: scale(1.12);
  /* мягкое тёплое свечение в цвет акцента — активный пункт буквально «горит» */
  text-shadow:
    0 0 10px rgba(255, 168, 150, 0.65),
    0 0 22px rgba(255, 168, 150, 0.35),
    0 0 40px rgba(255, 210, 150, 0.18);
}
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text-1); border-radius: 2px; transition: transform .25s; opacity: 0.85; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  font-family: var(--font-btn);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px;
  font-weight: 500; font-size: 14px; letter-spacing: 0.02em;
  transition: transform .2s var(--ease), box-shadow .25s ease, background .25s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-primary {
  /* liquid-glass gloss over the coloured juice gradient: a bright top
     sheen + specular rim so it reads as the same material as the glass CTAs */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0) 44%),
    var(--juice-grad);
  color: white;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -6px 14px rgba(0,0,0,0.14),
    0 10px 28px rgba(255, 168, 150, 0.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -6px 14px rgba(0,0,0,0.14),
    0 16px 36px rgba(255, 168, 150, 0.6);
}
.btn-ghost {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-1);
}
.btn-ghost:hover { background: rgba(255, 220, 180, 0.18); transform: translateY(-1px); }

/* ============================================
   HERO = PUZZLE  — 4 quadrants + centre circle
   Each piece is a link → smooth-scroll to its section.
   ============================================ */
.hero-puzzle {
  position: relative;
  width: 100%;
  height: 100vh;
  margin-top: 0;
  padding-top: 0;               /* nav is hidden on the hero — no clearance needed */
  box-sizing: border-box;
}
.puzzle {
  position: relative;
  width: 100%;
  height: 100%;
  /* shared geometry — puzzle now spans edge to edge of the viewport */
  --d: clamp(340px, 46vw, 600px);              /* centre circle */
  --gap: 4px;                                   /* hairline join between pieces */
  /* the centre circle overhangs the tile cut-out by 2px so its edge always
     covers the seam — kills the thin background sliver where the mask edge
     and the circle edge anti-alias differently */
  --overlap: 2px;
  --cut: calc(var(--d) / 2 - var(--overlap));
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--gap);
  padding: 0;                                   /* pieces touch the viewport edges */
}
.eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 10px;
}
.ring {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(255, 168, 150, 0.25);
  border-top-color: var(--terracotta);
  border-right-color: var(--honey);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-3d-loader, .nav-3d-loader {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-3); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: opacity .4s ease;
}
.hero-3d-loader.hidden, .nav-3d-loader.hidden { opacity: 0; pointer-events: none; }

/* === puzzle pieces === */
.piece {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  background:
    radial-gradient(ellipse at 28% 16%, rgba(var(--accent-rgb), 0.55), transparent 72%),
    radial-gradient(ellipse at 78% 82%, rgba(var(--accent-rgb), 0.28), transparent 65%),
    var(--glass-bg-strong);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-strong);
  transition: transform .45s var(--ease), box-shadow .35s ease, filter .35s ease;
  text-decoration: none; color: inherit;
}
/* shine band — soft-edged strip with mask-faded sides so its boundaries
   are invisible. Wider strip + radial-like fade = no visible "rectangle". */
.piece::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 80%;
  z-index: 3;
  border-radius: inherit;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.0) 30%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.0) 70%,
    transparent 100%);
  /* extra mask so the LEFT and RIGHT edges of the strip itself fade out
     to fully transparent — no perceivable boundary */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  will-change: transform;
}
/* on hover: ONE faster sweep every 4 s — band crosses in ~1.4 s, then a
   2.6 s pause off-screen before the next pass. */
.piece:hover::after {
  opacity: 1;
  animation: piece-shine 4s linear infinite;
}
@keyframes piece-shine {
  0%   { transform: translateX(-110%); }
  35%  { transform: translateX( 200%); }
  100% { transform: translateX( 200%); }
}
.piece:hover { transform: translateY(-3px); box-shadow: 0 28px 60px rgba(0,0,0,0.5); }
.piece:hover::after { opacity: 1; }

.piece-about    { --accent: var(--terracotta); --accent-rgb: 255, 168, 150;   grid-area: 1 / 1; }
.piece-cases    { --accent: var(--berry);      --accent-rgb: 255, 143, 180;  grid-area: 2 / 2; }
.piece-workouts { --accent: var(--olive);      --accent-rgb: 191, 212, 31;  grid-area: 2 / 1; }
.piece-contact  { --accent: var(--honey);      --accent-rgb: 255, 210, 150;   grid-area: 1 / 2; }
.piece-model    { --accent: var(--rust);       --accent-rgb: 255, 45, 45; }

/* photo backgrounds on the four quadrant pieces — Apple-glass treatment.
   Layer order (bottom → top):
     ::before  = local photo, lightly blurred (the "scene" behind glass)
     element bg = translucent warm tint (the frosted glass surface)
     inset/borders = subtle highlight + accent vignette + outer shadow
     .piece-face = the title text, on top */
.piece-about,
.piece-cases,
.piece-workouts,
.piece-contact {
  /* frosted glass surface — translucent warm-white over the photo */
  background:
    linear-gradient(160deg,
      rgba(255, 235, 240, 0.16) 0%,
      rgba(255, 235, 240, 0.06) 60%,
      rgba(255, 235, 240, 0.12) 100%) !important;
  backdrop-filter: blur(6px) saturate(135%);
  -webkit-backdrop-filter: blur(6px) saturate(135%);
  border: none;
  box-shadow:
    /* outer depth */
    0 18px 40px rgba(0, 0, 0, 0.45),
    /* soft accent vignette so each piece keeps its colour identity */
    inset 0 0 110px rgba(var(--accent-rgb), 0.22),
    /* bottom darkening so the title text is always readable */
    inset 0 -50px 80px rgba(0, 0, 0, 0.4);
}
.piece-about::before,
.piece-cases::before,
.piece-workouts::before,
.piece-contact::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* lighter blur so the photo reads through the glass surface, with a
     deeper dimming so the title text + accent glow stay dominant */
  filter: blur(2px) brightness(0.4) saturate(0.85);
  transform: scale(1.06);
}
.piece-about::before    { background-image: url('Photos/obomne.JPG'); }
.piece-cases::before    { background-image: url('Photos/keys.jpg');   }
.piece-workouts::before { background-image: url('Photos/treni.PNG');  }
.piece-contact::before  {
  background-image: url('https://images.unsplash.com/photo-1573497019418-b400bb3ab074?w=900&q=70&auto=format&fit=crop');
}

/* keep titles above all glass + photo layers.
   NOTE: absolute + inset, not relative — this selector outranks the base
   .piece-face rule, and with `position: relative` the label box collapsed
   to its own content height at the top of the tile. Any vertical alignment
   set on .piece-face (top labels up, bottom labels down) then had no room
   to work, and .piece-num anchored to that short box instead of the tile
   corner. */
.piece-about > .piece-face,
.piece-cases > .piece-face,
.piece-workouts > .piece-face,
.piece-contact > .piece-face {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* circular bites — each quadrant gets a bite at the centre meeting point */
.piece-about    { -webkit-mask: radial-gradient(circle at calc(100% + var(--gap) / 2) calc(100% + var(--gap) / 2), transparent var(--cut), #000 var(--cut)); mask: radial-gradient(circle at calc(100% + var(--gap) / 2) calc(100% + var(--gap) / 2), transparent var(--cut), #000 var(--cut)); }
.piece-cases    { -webkit-mask: radial-gradient(circle at calc(0% - var(--gap) / 2) calc(0% - var(--gap) / 2), transparent var(--cut), #000 var(--cut)); mask: radial-gradient(circle at calc(0% - var(--gap) / 2) calc(0% - var(--gap) / 2), transparent var(--cut), #000 var(--cut)); }
.piece-workouts { -webkit-mask: radial-gradient(circle at calc(100% + var(--gap) / 2) calc(0% - var(--gap) / 2), transparent var(--cut), #000 var(--cut)); mask: radial-gradient(circle at calc(100% + var(--gap) / 2) calc(0% - var(--gap) / 2), transparent var(--cut), #000 var(--cut)); }
.piece-contact  { -webkit-mask: radial-gradient(circle at calc(0% - var(--gap) / 2) calc(100% + var(--gap) / 2), transparent var(--cut), #000 var(--cut)); mask: radial-gradient(circle at calc(0% - var(--gap) / 2) calc(100% + var(--gap) / 2), transparent var(--cut), #000 var(--cut)); }

/* centre 3D preview — solid chocolate disk, fully opaque so the ambient
   photo behind the puzzle doesn't bleed through. */
.piece-model {
  position: absolute;
  width: var(--d);
  height: var(--d);
  top: calc(50% - var(--d) / 2);
  left: calc(50% - var(--d) / 2);
  border-radius: 50%;
  border: none;
  /* opaque chocolate base (so the ambient photo isn't visible through it)
     + Apple-glass highlights on top: bright top arc, accent inner glows,
     light rim, deep outer shadow */
  background:
    /* glass top arc — soft white sheen at the top, like light catching glass */
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(circle at 30% 26%, rgba(255, 143, 180, 0.18), transparent 55%),
    radial-gradient(circle at 70% 78%, rgba(155, 63, 204, 0.14), transparent 60%),
    var(--bg-1) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow:
    /* deep outer cushion */
    0 22px 60px rgba(0, 0, 0, 0.6),
    /* subtle inner accent glow */
    inset 0 -30px 60px rgba(155, 63, 204, 0.18),
    inset 0 30px 50px rgba(255, 143, 180, 0.1);
  filter: none;
  z-index: 2;
  cursor: pointer;
  overflow: visible;
}
.piece-model::after { display: none; }
.piece-model:hover { transform: translateY(-2px); box-shadow: none; }

/* ===== full 3D carousel — lives inside #navigator section ===== */
/* Tighten the navigator section: the header + model takes nearly the full
   viewport, so we don't need extra vertical centring whitespace above. */
.section.navigator {
  justify-content: flex-start;
  /* Anchor scroll lands the section's TOP at viewport y=0 — html's
     scroll-padding-top:64 is cancelled by scroll-margin-top:-64. Above
     viewport is the previous section, completely cut off. */
  scroll-margin-top: -64px;
  /* small breathing room above the heading; nav (64px tall) sits over
     this area, so the visible offset from nav bottom to heading is just
     the extra above 64. Keep that gap minimal. */
  padding-top: clamp(72px, 6vw, 84px);
  gap: clamp(6px, 0.9vw, 14px);
  /* section covers the whole viewport so cases below can't peek in */
  min-height: 100vh;
}
.section.navigator .section-head { margin-bottom: clamp(8px, 1.2vw, 16px); }
.nav-3d-wrap {
  position: relative;
  display: grid;
  /* 3 columns: [left text] [centred model] [right text] */
  grid-template-columns: minmax(200px, 1fr) minmax(360px, 2fr) minmax(200px, 1fr);
  /* НЕ анимируем ширину колонок: пока трек «едет», холст модели
     пересоздаётся каждый кадр (ResizeObserver → setSize), кадры проседают и
     модель на секунду пропадает. Размер меняется мгновенно, плавным остаётся
     только полёт камеры к зоне. */
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  max-width: 100%;
}
/* model lives in the centre column regardless of DOM order */
/* Idle: the side columns hold nothing (panel and workout card are hidden),
   so they collapse and the model takes the freed width — that is what closed
   the empty gap under it. Picking a zone restores the three-column balance.
   Desktop only: on phones the wrap is a single column, and forcing three
   here squeezed the model to zero width. */
@media (min-width: 901px) {
  .nav-3d-wrap:not(.zone-active) {
    grid-template-columns: minmax(0, 0.45fr) minmax(360px, 3.1fr) minmax(0, 0.45fr);
  }
}
.nav-3d-wrap .nav-3d { order: 2; }
.nav-3d-wrap .nav-3d-left  { order: 1; text-align: right; }
.nav-3d-wrap .nav-3d-right { order: 3; text-align: left; }
/* Alternating layout: each marker click flips which side shows the zone
   description and which shows the workout — the model stays centred. */
.nav-3d-wrap.is-flipped .nav-3d-left  { order: 3; text-align: left; }
.nav-3d-wrap.is-flipped .nav-3d-right { order: 1; text-align: right; }
@media (max-width: 900px) {
  .nav-3d-wrap { grid-template-columns: 1fr; }
  .nav-3d-wrap .nav-3d-left,
  .nav-3d-wrap .nav-3d-right { text-align: left; order: unset; }
  .nav-3d-wrap .nav-3d { order: unset; }
  /* Stacked in one column the mirror flip has nothing to mirror — it only
     throws the zone's name and description below the bullets and the video
     card, i.e. far off-screen. Pin the reading order: model → what the zone
     is → what to do about it. (Needs the .is-flipped specificity to win.) */
  .nav-3d-wrap.is-flipped .nav-3d,
  .nav-3d-wrap.is-flipped .nav-3d-left,
  .nav-3d-wrap.is-flipped .nav-3d-right { order: 0; text-align: left; }
  .nav-3d-wrap.is-flipped .nav-3d-left { order: 1; }
  .nav-3d-wrap.is-flipped .nav-3d-right { order: 2; }
  /* the portrait model box is 4:5 — at full width it alone is taller than
     the screen, pushing the text out of view. Shorter box on phones. */
  .nav-3d { max-width: min(62vh, 500px); }
  .nav-3d.focused { max-width: min(46vh, 380px); }
  /* One clean column, top-aligned: model → zone name+description → problems →
     training card at the very bottom. The desktop layout centres each panel and
     pads it 22px all round; stacked on a phone that centring + fat padding threw
     the description far above the bullets ("текст улетел"). Here the pieces flow
     with even, comfortable spacing instead. */
  .nav-3d-wrap { grid-template-columns: 1fr; align-items: start;
                 gap: clamp(18px, 5vw, 34px); }
  .nav-3d-zone { padding: 0 6px; }
  .nav-3d-zone .eyebrow { margin-bottom: 10px; }
  .nav-3d-zone h3 { margin: 0 0 12px; }
  .nav-3d-zone p { margin-bottom: 0; }
  /* right panel: problems, then the training card pinned to the bottom */
  .nav-3d-right { display: flex; flex-direction: column; }
  .zone-bullets { margin: 0 0 4px; }
  .zone-preview { margin-top: 18px; }
}
/* SVG overlay that draws a dashed link between active marker and panel */
.zone-line {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}
.zone-line line {
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-dasharray: 6 5;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity .35s ease;
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.45));
}
.nav-3d-wrap.zone-active .zone-line line {
  opacity: 0.85;
  animation: zone-line-dash 1.4s linear infinite;
}
@keyframes zone-line-dash {
  to { stroke-dashoffset: -22; }
}
.nav-3d {
  position: relative;
  width: 100%;
  /* Portrait box — taller than wide so the standing body fits nicely.
     Idle it runs large so the space between the model and the workout card
     isn't left empty; the moment a zone is picked it shrinks back to the
     size the focused view is composed around (see .nav-3d.focused). */
  max-width: min(70vh, 600px);
  /* без transition — см. комментарий про пересоздание холста выше */
  aspect-ratio: 4 / 5;
  justify-self: center;
  background: none;
  border: none;
  box-shadow: none;
  overflow: visible;
  cursor: grab;
}
.nav-3d:active { cursor: grabbing; }
/* zone picked (by the user or the auto-tour) → back to the compact size */
.nav-3d.focused { max-width: min(62vh, 520px); }
.nav-3d .model3d {
  position: absolute; inset: 0;
  overflow: visible;
  /* let a horizontal swipe rotate the model while a vertical swipe still
     scrolls the page (without this, touch is hijacked by page scroll and the
     model can't be dragged on phones) */
  touch-action: pan-y;
}
.nav-3d .model3d canvas { display: block; width: 100% !important; height: 100% !important; background: transparent; touch-action: pan-y; }

.nav-3d .layer-arrow {
  position: absolute;
  /* lowered to the bottom — near the model's feet, close to it on both sides */
  bottom: 8%;
  width: 38px; height: 38px; border-radius: 50%;
  background: none;
  backdrop-filter: none;
  border: none;
  font-size: 24px; color: var(--text-1);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 6;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-3d .layer-arrow:hover {
  transform: scale(1.14);
}
.nav-3d .layer-arrow-left  { left: 10%; }
.nav-3d .layer-arrow-right { right: 10%; }
.nav-3d.swap-loading .layer-arrow { opacity: 0.4; pointer-events: none; }
.nav-3d.swap-loading .hero-3d-loader { opacity: 1; }
.nav-3d.focused .layer-arrow { opacity: 0; pointer-events: none; }

.model-unfocus {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-1); font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  z-index: 6;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, background .2s ease, transform .2s ease;
}
.nav-3d.focused .model-unfocus { opacity: 1; pointer-events: auto; }
.model-unfocus:hover { background: rgba(255, 220, 180, 0.22); transform: scale(1.06); }

.nav-3d .marker-3d {
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
  will-change: left, top, opacity;
}
/* opacity = facing-side fade (set per-frame in JS via --facing) so markers
   hide as the body rotates them out of view */
.nav-3d.model-ready .marker-3d {
  opacity: var(--facing, 1);
}
.nav-3d.model-ready.cycling .marker-3d {
  opacity: 0; pointer-events: none;
  transition: opacity .14s ease;
}
.nav-3d.focused .marker-3d:not(.active) { opacity: 0; pointer-events: none; }
/* the currently-clicked marker stays fully visible even while the model
   is rotating into focus */
.nav-3d.focused .marker-3d.active { opacity: 1; }

/* zone highlight removed — markers are minimalist now, no big pulsing ring */
.zone-highlight { display: none; }

.nav-3d-zone {
  padding: 22px;
  /* transparent — text sits directly on the page background, like the model */
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}
.nav-3d-zone h3 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px;   /* толще — как заголовки блоков сайта */
  margin: 6px 0 12px;
}
.nav-3d-zone p { color: var(--text-2); margin-bottom: 14px; }

/* Panel starts blank — children fade in only on first flash. Prevents
   empty whitespace from popping in before the auto-tour boots. */
#zonePanel .eyebrow:empty,
#zonePanel h3:empty,
#zonePanel p:empty { display: none; }

/* Auto-tour flash — re-animates the text whenever showZoneInfo() is called.
   Each child slides up + fades in with a small stagger so the panel feels
   alive without being noisy. */
.nav-3d-zone.is-flashing .eyebrow,
.nav-3d-zone.is-flashing h3,
.nav-3d-zone.is-flashing p,
.nav-3d-zone.is-flashing .zone-bullets,
.nav-3d-zone.is-flashing .zone-preview {
  animation: zonePanelFade .55s cubic-bezier(.2,.7,.2,1) both;
}
.nav-3d-zone.is-flashing h3            { animation-delay: 60ms; }
.nav-3d-zone.is-flashing p             { animation-delay: 120ms; }
.nav-3d-zone.is-flashing .zone-bullets { animation-delay: 180ms; }
.nav-3d-zone.is-flashing .zone-preview { animation-delay: 240ms; }
@keyframes zonePanelFade {
  0%   { opacity: 0; transform: translateY(10px); filter: blur(2px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

.zone-bullets {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.zone-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 13px; color: var(--text-2); line-height: 1.45;
}
.zone-bullets li::before {
  content: '▸';
  position: absolute; left: 0; top: 0;
  color: var(--accent);
}

/* mini video preview inside the zone panel */
.zone-preview {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  padding: 10px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
  text-decoration: none;
  color: inherit;
  align-items: center;
}
.zone-preview:hover {
  background: rgba(255, 220, 180, 0.14);
  border-color: rgba(255, 220, 180, 0.32);
  transform: translateY(-1px);
}
.zone-preview-thumb {
  position: relative;
  flex-shrink: 0;
  width: 86px; height: 56px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 168, 150, 0.45), rgba(255, 143, 180, 0.35)),
    var(--bg-3);
  display: flex; align-items: center; justify-content: center;
}
.zone-preview-thumb .play {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 239, 208, 0.95);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--bg-1);
}
.zone-preview-thumb .dur {
  position: absolute; bottom: 4px; right: 4px;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.55); color: var(--text-1);
  font-size: 10px; letter-spacing: 0.04em;
}
.zone-preview-meta {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.zone-preview-meta .eyebrow { font-size: 9px; margin-bottom: 0; }
.zone-preview-meta h4 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 14px;   /* толще — как заголовки блоков сайта */
  line-height: 1.2;
  color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zone-preview-link {
  font-size: 11px; color: var(--accent);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-top: 2px;
}

/* piece face — the cover label */
.piece-face {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  gap: 6px;
  padding: clamp(16px, 3vw, 36px);
  text-align: center;
}
/* The bottom pair's bite is at their TOP inner corner, so their labels sit
   at the bottom edge — the centre circle is large enough that a vertically
   centred label runs straight under it. */
.piece-workouts .piece-face,
.piece-cases .piece-face {
  justify-content: flex-end;
  padding-bottom: clamp(18px, 2vw, 30px);     /* sits low, level with the corner number */
}
.piece-title {
  font-family: var(--font-btn);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 34px);
  line-height: 1.1;
  color: var(--text-1);
}

/* the centre model face sits behind the 3D canvas — the canvas covers it */
.piece-model .model3d {
  position: absolute; inset: 0;
  overflow: visible;
}
.piece-model .model3d canvas { display: block; width: 100% !important; height: 100% !important; background: transparent; }
.piece-model .model-face { padding: 14px; gap: 2px; pointer-events: none; }
.piece-model .model-face .piece-title { font-size: clamp(14px, 1.4vw, 18px); }
.piece-model .model-face .piece-eyebrow { font-size: 9px; }
/* push the centre label to the bottom so the model breathes */
.piece-model .model-face { justify-content: flex-end; }

/* ============================================
   SECTIONS — shared
   ============================================ */
.section {
  padding: var(--section-pad) clamp(20px, 5vw, 60px);
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
/* Only the 3D-navigator still claims a full viewport — the model and its
   side panels need the real estate. About used to as well (it carried the
   photo plus the certificates strip); now that it holds just the clip and
   two buttons, a forced screen-height left a large empty band under them,
   so it sizes to its content like the rest. */
.section.navigator {
  min-height: calc(100vh - 64px);
  justify-content: center;
}
.section > * { flex-shrink: 0; }
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(18px, 2.4vw, 28px) auto;
  text-align: center;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.15;
  margin-bottom: 8px;
  color: #FFFFFF;
}
.section-sub { color: var(--text-2); font-size: 13px; }

/* заголовки, которые набираются капсом (Intro рисует строчные заглавными,
   но text-transform нужен для корректной ширины и переносов) */
.section-head h2.is-caps {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.section-head .eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;            /* smaller "01 — обо мне" badge */
  letter-spacing: 0.26em;     /* tighter look with generous tracking */
  color: rgba(168, 155, 146, 0.65);
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.about-photo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  aspect-ratio: 1;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-badge {
  position: absolute; bottom: 12px; left: 12px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(10px);
  font-size: 10px; letter-spacing: 0.06em; font-weight: 500;
}
.about-text p { margin-bottom: 10px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.about-text p:first-of-type { color: var(--text-1); font-size: 15px; font-weight: 500; }
.about-text .btn { margin-top: 10px; }

/* About section: the certificate strip used to anchor its bottom edge, so
   the block was spread apart (space-between + a growing grid). With the
   certificates moved to their own section further down, that same rule just
   left a hole between the text and the next section — the content is now
   kept together and centred. */
.section.about {
  justify-content: center;
  /* the clip + two buttons don't need a screen of their own */
  min-height: auto;
  padding-top: clamp(30px, 5vw, 60px);
  padding-bottom: clamp(30px, 5vw, 60px);
}
.section.about .section-head { margin-bottom: clamp(12px, 1.6vw, 18px); }
.section.about .about-grid {
  flex-grow: 0;
  align-self: center;
  align-items: center;
  margin-bottom: 0;
}

/* inline certificates strip inside about section */
.about-certs {
  padding-top: clamp(14px, 2vw, 24px);
  border-top: 1px solid var(--glass-border);
}
.about-certs-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap; gap: 6px;
}
.about-certs-head .eyebrow { margin-bottom: 0; }
.about-certs-hint {
  font-size: 11px; color: var(--text-3);
  letter-spacing: 0.04em;
}
.certs-pills {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.certs-pills li {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  font-size: 12px;
  transition: background .2s ease, border-color .2s ease;
}
.certs-pills li:hover {
  background: rgba(255, 220, 180, 0.16);
  border-color: rgba(255, 220, 180, 0.3);
}
.certs-pills strong {
  font-family: var(--font-display); font-weight: 500;
  color: var(--text-1);
}
.certs-pills span {
  color: var(--accent);
  font-size: 11px; letter-spacing: 0.06em;
}

/* ============================================
   CERTIFICATES
   ============================================ */
.certs-marquee {
  /* break out of the section's horizontal padding so the running line
     spans the whole viewport, like the cases / workouts carousels */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: 0;
  overflow: hidden;
  padding: 4px 0;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.certs-track {
  display: flex; align-items: center; gap: 18px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(12px, 1.1vw, 15px);
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.certs-track i { font-style: normal; color: var(--accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* clickable cert chips — hover pauses the running line so the user can
   actually aim at one, and clicking opens the certificate modal */
.certs-marquee:hover .certs-track,
.certs-marquee:focus-within .certs-track { animation-play-state: paused; }
.cert-chip {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.cert-chip:hover,
.cert-chip:focus-visible {
  color: var(--accent);
  background: rgba(var(--accent-rgb, 196, 90, 58), 0.10);
  outline: none;
}

/* ============================================
   CERTIFICATE QUICK-VIEW MODAL
   ============================================ */
.cert-modal {
  position: fixed; inset: 0; z-index: 260;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(40px, 8vh, 110px) 16px 32px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.cert-modal.is-open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .25s ease, visibility 0s linear 0s;
}
.cert-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(40, 22, 18, 0.45);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}
.cert-modal-card {
  position: relative;
  width: min(560px, 100%);
  padding: clamp(22px, 3.2vw, 30px) clamp(22px, 3.2vw, 32px) 26px;
  border-radius: 24px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(14px) scale(.97);
  opacity: 0;
  transition: transform .35s cubic-bezier(.2,.85,.25,1.1), opacity .25s ease;
  --accent: var(--clay, #c45a3a);
  --accent-rgb: 196, 90, 58;
}
.cert-modal.is-open .cert-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.cert-modal-close {
  position: absolute; top: 10px; right: 12px;
  width: 34px; height: 34px; border-radius: 999px;
  background: transparent; color: var(--text-2);
  font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s ease, background .2s ease;
}
.cert-modal-close:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, .08);
}
.cert-modal .eyebrow { font-size: 11px; }
.cert-modal h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.15;
  margin: 0;
  color: var(--text-1);
}
.cert-modal-issuer {
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--text-3); margin: 0;
}
.cert-modal-image {
  margin-top: 6px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.10), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--glass-border);
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
}
.cert-modal-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
}
/* pager under the scan: ‹  n / N  › */
.cert-modal-nav-row {
  display: flex; align-items: center; justify-content: center;
  gap: 18px;
  margin-top: 12px;
}
.cert-modal-nav {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 0;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.cert-modal-nav:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.06); }
.cert-modal-count {
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--text-3); min-width: 54px; text-align: center;
}
.cert-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}
.cert-placeholder .cert-seal {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 4px;
}
.cert-placeholder strong {
  font-family: var(--font-display); font-weight: 500;
  font-size: 15px; color: var(--text-1);
  letter-spacing: 0.04em;
}
.cert-placeholder em {
  font-style: normal;
  font-size: 12px; color: var(--text-3);
  letter-spacing: 0.04em;
}
.cert-placeholder .cert-note {
  margin-top: 6px;
  font-size: 11px; color: var(--text-3);
  opacity: 0.75;
}
body.cert-modal-open { overflow: hidden; }
.certs-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.cert-card {
  padding: 16px 18px; border-radius: 18px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform .25s var(--ease), box-shadow .25s ease, border-color .25s ease;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--glass-shadow-strong); }
.cert-card header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cert-card strong { font-family: var(--font-display); font-weight: 500; font-size: 16px; color: var(--text-1); }
.cert-card header span { font-size: 12px; color: var(--text-3); }
.cert-card p { font-size: 14px; color: var(--text-2); }

/* markers on 3D — anchored by JS via left/top inline styles */
.marker {
  position: absolute;
  left: 0; top: 0;            /* позицию задаёт transform из script.js */
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  will-change: transform;
  display: flex; align-items: center; justify-content: center;
  z-index: 4;
  cursor: pointer;
  background: transparent; border: 0; padding: 0;
}
/* Outer halo — a slim animated ring that breathes around the core.
   Uses the marker pseudo so dot stays a tiny crisp center. */
.marker::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle,
              rgba(255, 143, 180, 0.35) 0%,
              rgba(255, 143, 180, 0.18) 38%,
              rgba(255, 143, 180, 0)    72%);
  filter: blur(0.5px);
  animation: markerHalo 2.6s ease-in-out infinite;
  pointer-events: none;
}
.marker::after {
  content: '';
  position: absolute; inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 0 4px rgba(255, 255, 255, 0.35);
  background: transparent;
  transition: transform .28s cubic-bezier(.2,.9,.25,1.1),
              border-color .25s ease,
              box-shadow .25s ease;
  pointer-events: none;
}
/* The actual dot — small jewel-like core with a vertical gradient and a
   tiny glossy highlight to read as a "lens" sitting on the body. */
.marker .dot {
  position: relative; z-index: 2;
  width: 8px; height: 8px; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.0) 38%),
    linear-gradient(160deg, #ffb0cb 0%, #ff8fb4 45%, #d98fb4 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 8px rgba(255, 143, 180, 0.55);
  transition: transform .28s cubic-bezier(.2,.9,.25,1.1),
              box-shadow .25s ease;
}
.marker:hover::after {
  transform: scale(1.25);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 0 5px rgba(255, 255, 255, 0.55),
    0 0 12px rgba(255, 143, 180, 0.55);
}
.marker:hover .dot {
  transform: scale(1.25);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 10px rgba(255, 143, 180, 0.95),
    0 0 18px rgba(255, 122, 176, 0.55);
}
.marker.active::before {
  animation: none;
  background: radial-gradient(circle,
              rgba(255, 143, 180, 0.55) 0%,
              rgba(255, 143, 180, 0.22) 40%,
              rgba(255, 143, 180, 0)    72%);
}
.marker.active::after {
  transform: scale(1.35);
  border-color: var(--pink-bright);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 0 6px rgba(255, 122, 176, 0.6),
    0 0 16px rgba(255, 143, 180, 0.9);
}
.marker.active .dot {
  transform: scale(1.45);
  background:
    radial-gradient(circle at 35% 30%,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.0) 50%),
    #ffffff;
  box-shadow:
    0 0 0 1px var(--pink-bright),
    0 0 12px rgba(255, 143, 180, 0.95);
}
.marker .pulse { display: none; }

@keyframes markerHalo {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50%      { transform: scale(1.15); opacity: 1; }
}
.marker-3d {
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
  will-change: left, top, opacity;
}
.nav-3d.ready .marker-3d { opacity: 1; pointer-events: auto; }
.nav-3d.ready.cycling .marker-3d { opacity: 0; pointer-events: none; transition: opacity .14s ease; }

/* ============================================
   CASES
   ============================================ */
/* Cases — full-bleed horizontal strip. Cards stay compact (before/after
   ribbon style); the track breaks out of the section so neighbouring cards
   bleed off both edges of the viewport. */
.section.cases {
  /* clip only horizontally — an expanded card can spill vertically without
     getting cropped by the section bounds */
  overflow-x: clip;
  overflow-y: visible;
  justify-content: flex-start;
  /* title pulled up close to the nav; the bigger margin-bottom below pushes
     the carousel back down to its current vertical spot */
  padding-top: clamp(6px, 0.8vw, 14px);
  gap: 0;
  /* break the 1240px max-width cap so the cases strip can stretch from
     edge to edge of the page; the section-head inside still has its own
     720px constraint for readability */
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.section.cases .section-head {
  /* space between title block and carousel — keeps the carousel at its
     previous vertical position while the title sits higher on the page */
  margin-bottom: clamp(40px, 5vw, 80px);
  padding-left: clamp(20px, 5vw, 60px);
  padding-right: clamp(20px, 5vw, 60px);
}
/* push the arrows lower — extra breathing room under the cards */
.section.cases .cases-nav {
  margin-top: clamp(40px, 4.5vw, 70px);
}
.cases-track {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  /* no side padding — track now runs from one viewport edge to the other,
     so the cards line stretches the full width of the page */
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  /* cards are wide enough to read the before/after without opening the zoom */
  grid-auto-columns: clamp(260px, 22vw, 350px);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  /* scroll-snap removed — its "mandatory" mode fights the silent recenter
     teleport, so the carousel would bounce back after a couple of laps.
     Smooth scroll is also disabled here; arrow buttons use behavior:'smooth'
     in JS explicitly, while the silent teleport stays instant. */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cases-track::-webkit-scrollbar { display: none; }
.case-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  padding: 14px;
  border-radius: 18px;
  /* LIQUID BUTTON material — same as the site buttons: dark glass interior
     with a pink caustic, a flowing pink border ring (::before) and a soft
     bloom (::after). --lb-angle / lb-flow are defined in styles-pro.css. */
  background:
    radial-gradient(125% 150% at 50% 120%, rgba(var(--accent-rgb, 255,143,180), 0.26), transparent 58%),
    linear-gradient(180deg, rgba(26,14,19,0.86), rgba(15,9,12,0.90));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 12px 30px rgba(0,0,0,0.38),
    0 0 26px rgba(var(--accent-rgb, 255,143,180), 0.14);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .3s var(--ease), box-shadow .3s ease;
}
.case-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 1.6px; pointer-events: none; z-index: 4;
  background: conic-gradient(from var(--lb-angle),
    rgba(var(--accent-rgb, 255,143,180),0.28) 0deg,
    rgba(var(--accent-rgb, 255,143,180),0.28) 42deg,
    #FFC2D8 74deg, #FF8FB4 90deg, #FFC2D8 106deg,
    rgba(var(--accent-rgb, 255,143,180),0.28) 150deg,
    rgba(var(--accent-rgb, 255,143,180),0.28) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: lb-flow 4.5s linear infinite;
}
.case-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  z-index: -1; pointer-events: none;
  background: conic-gradient(from var(--lb-angle),
    transparent 0deg, transparent 46deg,
    rgba(var(--accent-rgb, 255,143,180),0.80) 90deg,
    transparent 140deg, transparent 360deg);
  filter: blur(18px); opacity: 0.70;
  animation: lb-flow 4.5s linear infinite;
}
/* keep the photos / text above the ring + bloom */
.case-card > * { position: relative; z-index: 1; }
.case-card { cursor: zoom-in; }
.case-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 20px 42px rgba(0,0,0,0.46),
    0 0 40px rgba(var(--accent-rgb, 255,143,180), 0.30);
}
.case-card:hover::before, .case-card:hover::after { animation-duration: 1.8s; }
.case-card:hover::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .case-card::before, .case-card::after { animation: none; }
}

/* The original card stays in flow but goes invisible while the floating
   clone is visible — keeps the carousel's layout unchanged. */
.case-card.is-source-hidden { visibility: hidden; }
body.case-zoom-open { overflow: hidden; }

/* Floating clone that overlays the page so it can grow past the track's
   horizontal/vertical clip boundaries. */
.case-card-floating {
  position: fixed;
  z-index: 200;
  cursor: zoom-out;
  transform-origin: center;
  transition: top .35s cubic-bezier(.2,.85,.25,1.1),
              left .35s cubic-bezier(.2,.85,.25,1.1),
              width .35s cubic-bezier(.2,.85,.25,1.1),
              height .35s cubic-bezier(.2,.85,.25,1.1),
              box-shadow .25s ease,
              border-color .25s ease;
  box-shadow: var(--glass-shadow-strong);
  border-color: rgba(255, 255, 255, 0.55) !important;
}
/* ---- zoomed state: the photo gets the room, the caption gets what's left --
   In the carousel the card is caption-first (small 4:3 preview + quote).
   Opened, that reads backwards — the result photo is the whole point, so
   .case-img drops its fixed ratio and stretches into all free height. */
.case-card-floating .case-img {
  aspect-ratio: auto;
  flex: 1 1 auto;
  min-height: 0;          /* let it actually shrink/grow inside the flex column */
  border-radius: 14px;
}
.case-card-floating .case-text { flex: 0 0 auto; gap: 8px; }
.case-card-floating .case-quote {
  font-size: 14px;
  line-height: 1.45;
  flex-grow: 0;
  /* long quotes must not push the photo back down */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-card-floating h3 { font-size: 16px; }
.case-card-floating .case-stats li { font-size: 11px; padding: 5px 10px; }
/* дo/после labels scale up with the photo */
.case-card-floating .case-img--photo .case-img-ba span b {
  font-size: 11px;
  padding: 5px 14px;
}
/* dim + blur the page behind the opened card so the eye goes to the photo */
body.case-zoom-open::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 150;                       /* under .case-card-floating (200) */
  background: rgba(20, 12, 10, 0.6);
  backdrop-filter: blur(8px) saturate(115%);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
  animation: case-scrim-in .3s ease both;
  pointer-events: none;               /* the document click-handler closes */
}
@keyframes case-scrim-in { from { opacity: 0 } to { opacity: 1 } }
.case-img {
  /* portrait frame: the processed before/after composites are tall (≈1:2),
     so a landscape box left them letterboxed and tiny */
  aspect-ratio: 2/3;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 168, 150, 0.28), rgba(255, 210, 150, 0.28)),
    var(--bg-2);
  position: relative; overflow: hidden;
}
.case-img-ba { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.case-img-ba span {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-2); font-weight: 500;
}
.case-img-ba span:first-child { border-right: 1px dashed rgba(255, 220, 180, 0.25); }
.case-text { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.case-card h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 14px;
}
.case-quote {
  font-size: 12px;
  color: var(--text-2); font-style: italic;
  line-height: 1.4;
  flex-grow: 1;
}
/* плашки-пилюли с цифрами («−2 см талия» и т.д.) убраны из карточек */
.case-stats { display: none !important; }
.case-stats li {
  padding: 4px 8px; border-radius: 999px;
  background: rgba(255, 168, 150, 0.18);
  color: var(--clay);
  font-size: 10px; font-weight: 600;
}

/* cases-nav: arrows + counter centred below the carousel */
.cases-nav {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-top: 18px;
}
/* bare arrows — no plate, no rim: just the glyph on the page */
.cases-arrow {
  width: 44px; height: 44px; border-radius: 50%;
  background: none;
  border: none;
  color: var(--text-1); font-size: 22px;
  opacity: 0.75;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s ease, transform .2s ease;
}
.cases-arrow:hover { opacity: 1; transform: scale(1.12); background: none; }
.cases-arrow:disabled { opacity: 0.35; pointer-events: none; }
.cases-counter {
  font-family: var(--font-btn);
  font-size: 13px; color: var(--text-3);
  letter-spacing: 0.08em;
  min-width: 60px; text-align: center;
}
.cases-counter span#caseCurrent { color: var(--accent); }

/* ============================================
   WORKOUTS
   ============================================ */
.workouts-tabs {
  display: flex; gap: 10px; justify-content: center; margin-bottom: 22px;
  flex-wrap: wrap;
}
.tab {
  padding: 12px 22px; border-radius: 999px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: all .25s ease;
}
.tab:hover { color: var(--text-1); }
.tab.is-active { background: var(--juice-grad); color: white; border-color: transparent; }
/* horizontal-scroll carousel (mirrors .cases-track) — auto-scrolls slowly,
   pauses on hover, infinite wrap via JS */
.workouts-grid {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 18vw, 280px);
  gap: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.workouts-grid::-webkit-scrollbar { display: none; }
.section.workouts {
  /* let the carousel breathe edge-to-edge while the header keeps its
     own readable padding below */
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  overflow-x: clip;
}
.section.workouts .section-head,
.section.workouts .workouts-tabs,
.section.workouts .workouts-cta {
  padding-left: clamp(20px, 5vw, 60px);
  padding-right: clamp(20px, 5vw, 60px);
}
.video-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--glass-shadow-strong); }
.video-card { position: relative; }
.video-thumb {
  aspect-ratio: 16/9;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--bg-3);            /* fallback while photo loads */
}
.video-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease);
}
.video-card:hover .video-thumb img { transform: scale(1.05); }
/* dark vignette so the level badge + duration stay readable on bright photos */
.video-thumb::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 28%, transparent 60%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}

/* difficulty badge — top-left, sits ABOVE the dark vignette */
.badge-level {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  padding: 3px 8px; border-radius: 999px;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.level-beginner { background: rgba(155, 184, 20, 0.85); color: #1a2200; }
.level-medium   { background: rgba(244, 163, 0, 0.85);  color: #2a1c00; }
.level-advanced { background: rgba(220, 47, 47, 0.85);  color: #fff5f5; }

/* duration — bottom-right */
.video-thumb .dur {
  position: absolute; bottom: 8px; right: 8px; z-index: 3;
  padding: 3px 7px; border-radius: 5px;
  background: rgba(0, 0, 0, 0.6); color: #fff;
  font-size: 10px; letter-spacing: 0.04em; font-weight: 500;
  backdrop-filter: blur(6px);
}

/* lock — only on locked cards, top-right */
.video-thumb .lock {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.video-card.locked .video-thumb { filter: brightness(0.7) saturate(0.8); }
.video-card.locked::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

/* card text block under the thumb */
.video-info {
  padding: 10px 12px 12px;
}
.video-info h3 {
  /* video title («Главный секрет отёков») runs on Rubik, not the Intro display face */
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 500;
  font-size: 13px; line-height: 1.25;
  margin-bottom: 3px;
}
.video-meta {
  font-size: 11px; color: var(--text-3);
  letter-spacing: 0.01em;
}

.workouts-cta {
  text-align: center;
  padding: 22px 24px;
  border-radius: 22px;
  background: var(--juice-grad);
  color: white;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 18px 44px rgba(255, 168, 150, 0.4);
}
.workouts-cta p { font-size: 16px; opacity: 0.95; }
.workouts-cta .btn-primary {
  background: var(--bg-0); color: var(--text-1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.workouts-cta .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45); }

/* ============================================
   SOCIALS
   ============================================ */
.socials-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  max-width: 880px; margin: 0 auto;
}
.social-card {
  padding: 26px 22px; border-radius: 22px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .25s var(--ease), box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.social-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glass-shadow-strong);
  background: rgba(255, 220, 180, 0.16);
  border-color: rgba(255, 220, 180, 0.32);
}
.social-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--juice-grad); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  margin-bottom: 6px;
}
.social-name { font-family: var(--font-display); font-weight: 500; font-size: 17px; }
.social-meta { font-size: 12px; color: var(--text-3); }

/* ============================================
   CONTACT
   ============================================ */
/* contact merged with socials — form on the left, icons on the right */
.contact-mini {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(200px, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.contact-form {
  display: flex; flex-direction: column; gap: 10px;
}
.contact-row { display: flex; gap: 10px; }
.contact-row > * { flex: 1 1 0; min-width: 0; }
.contact-form input {
  padding: 11px 14px; border-radius: 12px;
  background: rgba(255, 230, 200, 0.08);
  border: 1px solid var(--glass-border);
  font-family: inherit; font-size: 13px; color: var(--text-1);
  transition: border-color .2s ease, background .2s ease;
  width: 100%;
}
.contact-form input::placeholder { color: var(--text-3); }
.contact-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 230, 200, 0.16);
}
.contact-form .btn { margin-top: 2px; align-self: flex-start; }
.contact-thanks { color: var(--olive); font-weight: 500; font-size: 13px; }

.contact-icons {
  display: flex;
  gap: 12px;
  padding-left: clamp(16px, 2vw, 28px);
  border-left: 1px solid var(--glass-border);
}
.ico-tile {
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 16px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-1);
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.ico-tile:hover {
  background: rgba(255, 220, 180, 0.18);
  border-color: rgba(255, 220, 180, 0.32);
  transform: translateY(-3px);
}
.ico-tile .ico {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--juice-grad); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600;
  font-size: 13px;
}
.ico-tile .ico-name {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

/* Compact contact section — heading, form fields, and social tiles all
   scaled down ~4×: section was eating a full viewport before, now it sits
   as a tight band so the page doesn't grow extra scroll at the bottom. */
.section.contact { padding-top: clamp(10px, 1.4vw, 20px); padding-bottom: clamp(10px, 1.4vw, 20px); }
.section.contact .section-head { margin-bottom: 10px; }
.section.contact .section-head h2 {
  font-size: clamp(16px, 1.6vw, 20px);
  margin-bottom: 3px;
}
.section.contact .section-head .eyebrow { font-size: 8px; margin-bottom: 2px; }
.section.contact .section-sub { font-size: 11px; }
.section.contact .contact-mini {
  max-width: 720px;
  gap: clamp(14px, 2vw, 28px);
  align-items: center;
}
.section.contact .contact-form { gap: 6px; }
.section.contact .contact-form input {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 10px;
}
.section.contact .contact-form .btn {
  padding: 8px 18px;
  font-size: 12px;
}
.section.contact .contact-thanks { font-size: 11px; }
.section.contact .contact-icons {
  gap: 8px;
  padding-left: clamp(10px, 1.4vw, 18px);
}
.section.contact .ico-tile {
  padding: 8px 6px;
  gap: 4px;
  border-radius: 12px;
}
.section.contact .ico-tile .ico {
  width: 26px; height: 26px;
  border-radius: 8px;
  font-size: 11px;
}
.section.contact .ico-tile .ico-name { font-size: 9px; }

@media (max-width: 720px) {
  .contact-mini { grid-template-columns: 1fr; gap: 24px; }
  .contact-icons { padding-left: 0; border-left: none; border-top: 1px solid var(--glass-border); padding-top: 16px; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 22px clamp(20px, 5vw, 60px);
  margin-top: 30px;
  background: rgba(0, 0, 0, 0.3);
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3);
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { transition: color .2s ease; }
.footer-links a:hover { color: var(--accent); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  /* Menu panel: kept in the layout (display:flex) and hidden by opacity +
     visibility instead of display:none — display can't be transitioned, and
     without that the panel snapped open. */
  .nav-links {
    display: flex; position: fixed; top: 60px; left: 0; right: 0;
    /* pink-plum glass to match the logo header (was near-solid black) */
    background:
      radial-gradient(130% 90% at 50% 0%, rgba(255, 143, 180, 0.30), transparent 62%),
      linear-gradient(180deg, rgba(58, 28, 46, 0.90), rgba(36, 20, 32, 0.93));
    backdrop-filter: blur(22px) saturate(175%);
    -webkit-backdrop-filter: blur(22px) saturate(175%);
    flex-direction: column; padding: 20px; gap: 14px;
    border-bottom: 1px solid var(--glass-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    pointer-events: none;
    transition:
      opacity .28s ease,
      transform .42s cubic-bezier(.22, 1, .36, 1),
      visibility 0s linear .42s;      /* прячем только после ухода анимации */
  }
  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition:
      opacity .3s ease,
      transform .5s cubic-bezier(.22, 1, .36, 1),
      visibility 0s;
  }
  /* пункты подтягиваются один за другим — меню «раскрывается», а не появляется */
  .nav-links a {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .3s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
  }
  .nav-links.is-open a { opacity: 1; transform: translateY(0); }
  .nav-links.is-open a:nth-child(1) { transition-delay: .06s; }
  .nav-links.is-open a:nth-child(2) { transition-delay: .11s; }
  .nav-links.is-open a:nth-child(3) { transition-delay: .16s; }
  .nav-links.is-open a:nth-child(4) { transition-delay: .21s; }
  .nav-links.is-open a:nth-child(5) { transition-delay: .26s; }
  .nav-links.is-open a:nth-child(6) { transition-delay: .31s; }

  .nav-burger { display: flex; }
  /* три полоски складываются в крестик */
  .nav-burger span { transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; }
  .nav.is-menu-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav.is-menu-open .nav-burger span:nth-child(2) { opacity: 0; transform: scaleX(.4); }
  .nav.is-menu-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  @media (prefers-reduced-motion: reduce) {
    .nav-links, .nav-links a, .nav-burger span { transition: none; }
  }
  /* full-screen puzzle on phones/tablets — fills the viewport so the tiles
     stretch tall (no empty gap below). dvh accounts for the mobile browser UI. */
  .hero-puzzle { height: 100vh; height: 100dvh; min-height: 100dvh; }
  /* --gap: 0 closes the hairline seams between the four tiles on phones */
  .puzzle { height: 100%; --d: clamp(250px, 62vw, 340px); --gap: 0px; }
  .piece-title { font-size: clamp(16px, 5vw, 24px); }
  /* labels centred within each tile (the centre circle sits between the tile
     centres, so they don't overlap it) */
  .piece-about .piece-face,
  .piece-contact .piece-face,
  .piece-workouts .piece-face,
  .piece-cases .piece-face { justify-content: center; padding-top: 0; padding-bottom: 0; }
  /* the play icon alone is clear enough on phones — drop the text label so it
     never overlaps the tile titles */
  .piece-model-cta-text { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; margin: 0 auto; }
  .nav-3d-wrap { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  /* the marker→panel dashed line only makes sense in the desktop 3-column
     layout; on stacked mobile it stretches across the screen onto the label,
     so hide it — the glowing marker + the zone label below are enough */
  .zone-line { display: none !important; }
}
@media (max-width: 560px) {
  .hero-title { font-size: 30px; }
  .section-head h2 { font-size: 24px; }
  .btn { padding: 12px 22px; font-size: 13px; }
  .nav { padding: 10px 16px; }
}

/* ---------------------------------------------------------------------------
   AUTHORITATIVE mobile overrides for the 3D navigator.
   The tightening rules earlier in the file sit BEFORE the base .nav-3d /
   .nav-3d-zone declarations, so at equal specificity the later base rules win
   and the fat 22px padding + tall model box came back — leaving a big empty gap
   between the zone description and its problem bullets. Re-declaring them here,
   at the very end of the file, guarantees they win. Model on top, then the zone
   name + description, then the problems right underneath — no flying gap.
--------------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* Top-align the section on phones. With `justify-content: center` (desktop),
     selecting a zone fills the stacked text panel below the model, the column
     grows taller, and the whole thing re-centres UPWARD — so the title jumps
     when the model zooms in. Anchoring to the top keeps the title put; the
     panel just extends downward. */
  .section.navigator { justify-content: flex-start; }
  .nav-3d-wrap { grid-template-columns: 1fr; align-items: start;
                 gap: 14px; }
  /* keep the model box from being a giant half-empty area on phones */
  .nav-3d { max-width: min(58vh, 440px); }
  .nav-3d.focused { max-width: min(42vh, 340px); }
  .nav-3d-zone { padding: 0 4px; }
  .nav-3d-zone .eyebrow { margin-bottom: 8px; }
  .nav-3d-zone h3 { margin: 0 0 10px; }
  .nav-3d-zone p { margin-bottom: 0; }
  .nav-3d-right { display: flex; flex-direction: column; }
  .zone-bullets { margin: 0 0 4px; }
  .zone-preview { margin-top: 16px; }
  /* prompt that fills the empty space under the model until a zone is picked;
     it invites the tap and gently floats. When a zone is active the panel text
     appears above it, so the hint just reads as "tap another point". */
  .nav-3d-hint {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    max-width: 300px; margin: clamp(18px, 6vw, 40px) auto 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.55); font-size: 13px; line-height: 1.45;
    animation: navHintFloat 2.6s ease-in-out infinite;
  }
  .nav-3d-hint-ico { font-size: 26px; filter: saturate(0) brightness(1.6); }
  .nav-3d-wrap.zone-active .nav-3d-hint { opacity: 0; transition: opacity .4s ease; }
}
@keyframes navHintFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
/* desktop keeps the 3-column layout — no empty space, so no hint */
@media (min-width: 901px) { .nav-3d-hint { display: none; } }

/* reduced-motion users get static decor */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
