/* ============================================================
   ПРОБУЖДЕНИЕ! — festival landing
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-soft: #121311;
  --lime: #c7ea2c;
  --lime-dark: #b0ca27;
  --lime-bright: #d8ff2e;
  --orange: #ff5a00;
  --white: #ffffff;
  --ink: #0a0a0a;
  --muted: #868d80;
  --muted-dark: #5d6356;

  --font-display: 'Oswald', system-ui, sans-serif;
  --font-mono: 'Iosevka Charon Mono', ui-monospace, monospace;

  --radius: 28px;
  --radius-lg: 40px;
  /* content column is 1120px at the 1280 reference width (per «ВЕРНЫЕ ОТСТУПЫ
     И РАЗМЕРЫ»): 1176 box minus 2×28 padding */
  --maxw: 1176px;

  /* Design unit: the Figma is drawn at a 1280px frame, but we render wider (e.g.
     1920). --u is the on-screen width of one Figma px, so any design value N is
     applied as calc(N * var(--u)) — 1:1 at 1280, ×1.5 at 1920, scaling linearly
     with viewport width. Element sizes/spacings use this; fonts stay in px for
     now (tuned separately later). */
  --u: 0.078125vw; /* = 100vw / 1280 */
}

* { box-sizing: border-box; }

/* overflow-x: clip kills sideways scroll from decorative bleed (e.g. the program
   emblem overhanging the right edge) without making html a scroll container —
   body's overflow-x alone doesn't cover it since the page scrolls on html. */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  position: relative;
  /* Single full-page background art (bg-full.svg, the design's «фон» frame at
     1280×5164) painted as one layer behind all content — see body::before.
     This base colour fills any area the stretched SVG doesn't cover. */
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Full-page background: one SVG behind every section (z-index:-1), covering the
   whole document. `cover` (zoom-to-fill) scales it uniformly on both axes so it
   fills the viewport width without distorting the glows — the overflow is
   cropped rather than stretched. Anchored to the top so the hero glows stay put;
   the SVG's opaque-black base blends into the black body colour where cropped.
   Replaces the old per-section bg-*.webp slices; sections below are transparent. */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../assets/bg-full.svg") top center / cover no-repeat;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  /* proportional side margins: 80 design-px each side → content = 1120u (87.5vw),
     scaling with the viewport per the 1280 Figma frame (left/top offset = 80). */
  margin: 0;
  padding: 0 calc(80 * var(--u));
}

.section { position: relative; padding: 90px 0; }

/* ---------- Headings ---------- */
.heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 52px);
  line-height: 1.22;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 28px;
}
.heading--dark { color: var(--ink); }
/* Headings shipped as brush-stroke SVG art. */
.heading--art { line-height: 0; }
.heading__art { display: block; height: auto; max-width: 100%; }
/* AWAKE heading: full brush-stroke fill (q_bg.svg) sits behind the artwork so
   "Ты"/"?" read on the dark background. Anchored to the box so it scales with
   the heading on mobile. */
.awake .heading--art {
  display: inline-block;
  width: 480px;
  max-width: 100%;
  /* the brush SVG carries internal padding, so its visible stroke is narrower
     than its box — oversize it so the green fully backs the text (at 107% the
     "?" and "Ты" poked past the stroke onto the dark background). */
  background: url("../assets/q_bg.svg") center / 130% 120% no-repeat;
}
.awake .heading__art { width: 100%; }
/* JOIN heading: the SVG's baked brush doesn't reach "в семью?", so lay the
   real exported brush (family-join.svg) behind the whole heading so the dark
   text reads across the full width. Sized down per the updated mockup (the
   brush hugs the text instead of spanning the container). */
.join .heading--art {
  display: inline-block;
  width: 470px;
  max-width: 100%;
  background: url("../assets/family-join.svg") center / 100% auto no-repeat;
}
.join .heading__art { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 16px 30px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn__arrow { font-size: 20px; transition: transform .2s ease; }
.btn:hover .btn__arrow { transform: translateX(6px); }

.btn--ghost {
  background: var(--white);
  color: var(--ink);
  width: 100%;
  font-size: 20px;
  padding: 30px 30px;
}
.btn--ghost:hover { box-shadow: 0 0 0 4px rgba(255,255,255,.18); transform: translateY(-2px); }

.btn--lime {
  background: var(--lime);
  color: var(--ink);
}
.btn--lime:hover { background: var(--lime-dark); transform: translateY(-2px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  /* frozen at the 1280 design; the hero sits in a fixed 1120 box (see .hero__inner) */
  padding: 80px 0 60px;
  overflow: hidden;
  background: transparent;
}
/* Fixed 1120 centred box like .recap / .tickets__list: side gaps hold at 80 on
   the 1280 frame and grow to 400 at 1920. Overrides the .container padding. */
.hero__inner { position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; padding: 0; }

.badge {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 615 × 91 design-px, frozen at the 1280 design (fixed in the 1120 box) */
  width: 615px;
  max-width: 100%;
  height: 91px;
  box-sizing: border-box;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 33px;
  padding: 0 24px;
  /* gap from the badge down to the wordmark = 32 design-px */
  margin-bottom: 32px;
}
/* White plaque behind the text. The rough torn edge comes from a fractal-noise
   displacement filter (#badge-rough); it sits below the text so the label stays
   crisp. z-index:-1 stays contained by the badge's own stacking context
   (isolation:isolate), so it never slips behind the hero. */
.badge::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--white);
  border-radius: 10px;
  filter: url(#badge-rough);
}

.hero__grid {
  display: grid;
  /* Column widths from the «ВЕРНЫЕ ОТСТУПЫ И РАЗМЕРЫ» frame, scaled by --u: left
     column = wordmark 629, right card 445, 46 gap (629+445+46 = 1120 content).
     `stretch` lets the card fill the row height so its torn bottom lines up with
     the wordmark's bottom, per the design. */
  grid-template-columns: 629px 445px;
  gap: 46px;
  align-items: stretch;
  margin-top: 0;
}

/* Wordmark + emblem SVG: 629 × 331.5 design-px, scaled by --u (height auto,
   aspect-locked). */
.hero__logo-img { display: block; width: 629px; max-width: 100%; height: auto; }

/* Hero card */
.hero__card {
  background: var(--white);
  color: var(--ink);
  padding: 30px 30px 88px;
  font-size: 18px;
  line-height: 1.7;
  /* 445 × 448 design-px (width from the grid column; height explicit here so it
     doesn't stretch to the taller left column), top-aligned with the badge. */
  height: 448px;
  align-self: start;
  /* Exact rounded-top / torn-bottom silhouette traced from Reference.svg,
     normalised to the card box (objectBoundingBox) so it scales with height. */
  clip-path: url(#hero-card-clip);
}
.hero__lead { margin: 0 0 14px; }
.hero__lead strong { font-weight: 700; }
.hero__lineup-title { margin: 0 0 6px; font-weight: 700; }
.hero__lineup { margin: 0; color: #2c2f28; }

/* Full-width CTA below the hero grid. Height 91 design-px; the 74 gap is
   measured to the card bottom — the wordmark column runs 6u taller, so the
   margin off the grid bottom (the wordmark) is 74 − 6 = 68. */
.hero__cta {
  margin-top: 68px;
  height: 91px;
  /* rounded rectangle, not a pill — overrides .btn's 999px radius */
  border-radius: 12px;
  gap: 64px; /* wide gap before the long arrow, per mockup */
}
.btn__arrow--long { display: inline-flex; align-items: center; }
.btn__arrow--long svg { display: block; }

/* ============================================================
   AWAKE
   ============================================================ */
.awake {
  position: relative;
  z-index: 2; /* lifts awake (and its brush strokes) above the program-wrap bg */
  background: transparent;
}
/* Same 1120 centred box: the heading, text and the recap cards inside get side
   gaps of 80 at 1280 and 400 at 1920. Overrides the generic .container padding. */
.awake > .container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
}
.awake__text {
  color: var(--white);
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 43px;
}

.cards {
  position: relative;
  z-index: 2; /* recap cards sit above vec9 */
  /* Fixed-size cards on a row that no longer fits: four 346px cards and three
     41px gaps come to 1507px against the 1120px .recap box, so the row scrolls
     sideways rather than shrinking the cards. space-between has nothing left to
     hand out once the content overflows, hence flex-start. */
  display: flex;
  justify-content: flex-start;
  gap: 41px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  /* A slim but always-present scrollbar: the overlay scrollbars macOS defaults
     to give no hint that the row scrolls at all. */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .45) transparent;
}
/* Fade the trailing edge while cards remain out of view; the class is driven by
   initCardScrollHint, so the fade disappears once the row is scrolled to its
   end. Without it the row ends flush with the last visible card and nothing
   hints that it scrolls. */
.cards.has-more-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent 100%);
}
.cards::-webkit-scrollbar { height: 8px; }
.cards::-webkit-scrollbar-track { background: transparent; }
.cards::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .45); border-radius: 4px; }

/* Collapsed event card: fixed 346 × 426px, 20 padding (→ 306-wide photo). */
.event-card {
  flex: none;
  scroll-snap-align: start;
  width: 346px;
  height: 426px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--ink);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
}
.event-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 18px;
}
.event-card__arrow { display: inline-flex; transition: transform .2s ease; }
.event-card:hover .event-card__arrow { transform: translateX(6px); }
.event-card__text {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  min-height: 140px;
}
.event-card__cover {
  display: block;
  width: 100%;
  /* 306 × 190px (width comes from the 20-padded 346 card) */
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: auto;
}

/* The card row and every .event-detail share one grid cell, so an opened detail
   is painted on top of the row rather than pushed below it. The row stays in
   normal flow and defines the cell height; the details overlay it. .recap is a
   1120px centred box that both the row and the panel fill, so their boxes line
   up exactly — the row itself is wider than that and scrolls inside it. The
   fixed 1120 cap keeps the side gaps at 80 on the 1280 frame and grows them to
   400 at 1920. */
.recap {
  display: grid;
  max-width: 1120px;
  margin: 0 auto;
}
.recap > .cards { grid-area: 1 / 1; }

/* Expanded event card: overlays the grid, title + «Скрыть», text, 4 photos,
   button. It stretches to the cell rather than to the 426px card height, so the
   scrollbar strip under the row is covered too and no sliver peeks out below.
   On open the panel starts scaled down onto
   the clicked card's box and stretches out to this full box — so the card
   itself appears to stretch wide, no backdrop dimming. The animating
   transform/opacity are set inline by initEventCards (FLIP); transform-origin
   must stay top-left for that box math to line up. */
.event-detail {
  grid-area: 1 / 1;
  align-self: stretch;
  z-index: 3; /* above the cards (z-index 2) sharing the cell */
  min-height: 426px;
  background: var(--white);
  color: var(--ink);
  border-radius: 14px;
  padding: 20px;
  transform-origin: top left;
  will-change: transform, opacity;
}
.event-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.event-detail__title {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
}
.event-detail__hide {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--orange);
  cursor: pointer;
}
.event-detail__hide:hover { text-decoration: underline; }
.event-detail__text {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.55;
  min-height: 78px;
}
.event-detail__gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.event-detail__gallery img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
}
.event-detail__all {
  width: calc((100% - 60px) / 4);
  justify-content: space-between;
  padding: 10px 20px;
  font-size: 14px;
  margin-top: 18px;
}

/* ============================================================
   PROGRAM
   ============================================================ */
.program {
  position: relative;
  background: var(--white);
  color: var(--ink);
  padding-top: 170px;
  padding-bottom: 170px;
  /* Exact torn-edge white block traced from Reference.svg (objectBoundingBox);
     the torn gaps reveal the dark page background beneath. */
  clip-path: url(#program-clip);
  /* Round cut-out near the top-right (design x1196.5 y1797.5 r25.5 in a 1280
     frame) — a real hole revealing the dark background, always circular. The
     vertical anchor is a fixed px (not %% of the block's height): on mobile
     the schedule stacks to one column and roughly doubles that height, and a
     percentage would drag the hole down into the schedule text. A fixed
     offset keeps it in the top padding strip at any content height. */
  -webkit-mask: radial-gradient(circle 26px at 93.48% 135px, transparent 25px, #000 26px);
  mask: radial-gradient(circle 26px at 93.48% 135px, transparent 25px, #000 26px);
}
.program > * { position: relative; z-index: 1; }
.program .heading { font-size: clamp(24px, 3.4vw, 40px); }

/* Decoration overlay: viewBox maps the white-block region to the program box
   (preserveAspectRatio none), so it tracks the clip; the extra top/bottom of
   the viewBox lets squiggles spill past the torn edges. */
.program-wrap {
  position: relative;
  z-index: 1; /* below awake so awake's brush strokes overlap the program zone */
  background: transparent;
}
/* Sunrise emblem: aspect-locked, mapped from the decor frame (design bbox
   x1042 y2178 276x175 in the 0/1554/1280/810 viewBox) so it scales without
   stretching. */
.program__emblem-art {
  position: absolute;
  z-index: 2;
  left: 81.41%;
  /* Anchored to the block's bottom edge, not a top: % of its height. The
     schedule stacks to one column on mobile and roughly doubles the block's
     height, and a percentage would leave the emblem stranded over the last
     schedule row instead of sitting at the bottom edge, whatever the height. */
  bottom: 0;
  /* Width scales with the viewport like the rest of the decor, but its
     anchor box (.program-wrap) doesn't grow taller with viewport width —
     it's fixed content height. Left unclamped, the (aspect-locked) emblem
     grows past 1280px until it overflows below into the marquee. Capping at
     276px keeps it at its reference-design size (verified at 1280px). */
  width: min(21.56%, 276px);
  height: auto;
  pointer-events: none;
}
.program__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.chip {
  display: inline-block;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.schedule { list-style: none; margin: 0; padding: 0; }
.schedule__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--ink);
  align-items: start;
}
.schedule__row:first-child { padding-top: 0; }
.schedule__time { font-weight: 700; font-size: 16px; }
.schedule__desc { color: var(--ink); font-size: 16px; line-height: 1.45; text-align: right; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  /* gap before the БИЛЕТЫ strip as padding (not margin) so the marquee's own
     background slice covers it and stays continuous with the program slice */
  padding-top: 55px;
  background: transparent;
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  animation: marquee 18s linear infinite;
  will-change: transform;
}
/* White torn "БИЛЕТЫ" strip (marquee-tickets.svg, per reference). JS tiles
   enough copies to cover the viewport (a fixed 2 copies only holds up on
   screens narrower than one tile, ~1272px) and shifts the track by exactly
   one tile's width via --marquee-tile-w, so the loop never exposes a gap. */
.marquee__img {
  display: block;
  height: 166px;
  width: auto;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--marquee-tile-w, 50%))); }
}

/* ============================================================
   TICKETS
   ============================================================ */
.tickets {
  padding-top: 70px;
  background: transparent;
}
/* Same 1120 centred box as .recap: side gaps hold at 80 on the 1280 frame and
   grow to 400 at 1920 (was a full-width container that only left the 80→120
   container padding). */
.tickets__list { display: flex; flex-direction: column; gap: 80px; max-width: 1120px; margin: 0 auto; }

.ticket {
  position: relative; /* anchors the stretched buy link below */
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  background: var(--white);
  color: var(--ink);
  padding: 34px 38px;
  cursor: pointer; /* whole card is clickable */
  transition: transform .2s ease;
  /* Rounded corners + round cut-outs punched with px-radius masks, so the
     circles never stretch with the card's size (the old objectBoundingBox
     clip-path turned them into ellipses on taller tickets). Notches sit at the
     body/price divider (68.75% width) on the top and bottom edges; plus the
     hole in the top-right corner. */
  border-radius: var(--radius);
  -webkit-mask:
    radial-gradient(circle 20px at 68.75% 0, transparent 19px, #000 20px),
    radial-gradient(circle 20px at 68.75% 100%, transparent 19px, #000 20px),
    radial-gradient(circle 11px at calc(100% - 24px) 27px, transparent 10px, #000 11px);
  -webkit-mask-composite: source-in, source-in, source-in;
  mask:
    radial-gradient(circle 20px at 68.75% 0, transparent 19px, #000 20px),
    radial-gradient(circle 20px at 68.75% 100%, transparent 19px, #000 20px),
    radial-gradient(circle 11px at calc(100% - 24px) 27px, transparent 10px, #000 11px);
  mask-composite: intersect;
}
/* Hover lifts the whole card; the lift lives on the card (not the button) so the
   stretched hit area never shifts out from under the cursor (no flicker). */
.ticket:hover { transform: translateY(-6px); }
.ticket .ticket__buy:hover { transform: none; }
/* Stretched link: the "Купить" button's hit area covers the whole card, so a
   click anywhere on a ticket opens the purchase page (single accessible <a>). */
.ticket__buy::after {
  content: "";
  position: absolute;
  inset: 0;
}

.ticket__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 34px);
  text-transform: uppercase;
  margin: 0 0 16px;
  letter-spacing: .5px;
}
.ticket__title-sub { font-weight: 500; }
/* Opening tagline as its own grey line above the description (per mockup). */
.ticket__lead { margin: 0 0 12px; font-size: 12px; line-height: 1.6; color: #2b2e27; max-width: 560px; }
.ticket__desc { margin: 0; font-size: 12px; line-height: 1.6; color: #2b2e27; max-width: 560px; }
.ticket__desc strong { font-weight: 700; }

.ticket__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.ticket__price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1;
  margin-bottom: 18px;
}
.ticket__quote { margin: 0 0 16px; font-size: 12px; color: #2b2e27; }
.ticket__buy { padding: 12px 26px; font-size: 14px; }

/* ============================================================
   JOIN
   ============================================================ */
.join {
  background: transparent;
}
/* Same 1120 centred box as .recap / .tickets__list: heading, text and form get
   side gaps of 80 on the 1280 frame and 400 at 1920. Overrides the generic
   .container padding for the join section only. */
.join > .container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
}
.join__text {
  color: var(--white);
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 26px;
}

/* Form: full-width white card with a lime border (per updated mockup). */
.form {
  display: flex;
  flex-direction: column;
  gap: 40px;
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--lime);
  border-radius: 24px;
  padding: 40px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.field { display: flex; flex-direction: column; gap: 12px; }
.field__label { font-size: 15px; color: var(--ink); font-weight: 700; }
.field__input {
  background: transparent;
  border: 2px solid var(--lime-dark);
  border-radius: 999px;
  height: 40px;
  padding: 0 20px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: border-color .2s;
}
.field__input::placeholder { color: #a49f9f; }
.field__input:focus { outline: none; border-color: var(--lime); }
.field__input--area {
  border-radius: 20px;
  resize: vertical;
  height: auto;
  min-height: 92px;
  padding: 10px 20px;
}
.form__submit {
  justify-content: space-between;
  height: 40px;
  padding: 0 20px;
  font-size: 15px;
  border-radius: 10px;
}
.form__submit:active { background: var(--lime-bright); }

/* Submit-result row (success / error) shown above the button. */
.form__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 0;
}
.form__status[hidden] { display: none; }
.form__status-text {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.form__status--ok .form__status-text em { font-style: normal; color: var(--orange); }
.form__status--ok .form__status-heart { flex: none; display: block; }
.form__status--error .form__status-text { color: var(--orange); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg);
  padding: 50px 0 60px;
}
.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  /* same 1120 centred box: side gaps 80 at 1280, 400 at 1920 (footer bg stays
     full-width; only the row is capped). Overrides the .container padding. */
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
}
.footer__social { display: flex; align-items: center; gap: 60px; }
.footer__icon { display: inline-flex; color: var(--white); transition: color .2s ease; }
.footer__icon svg { display: block; width: 40px; height: 40px; }
.footer__icon:hover { color: var(--lime); }
.footer__icon--phone { display: none; } /* phone icon is mobile-only (per mockup) */
.footer__collab-wrap { display: inline-flex; }
.footer__collab {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  /* button reset (was an <a>) */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 20px;
  color: var(--white);
}
.footer__collab:hover { color: var(--lime); }

/* Contact-phone modal: a centred popup over a dimmed full-screen backdrop. The
   overlay carries the open state + backdrop and centres the popup; the closed
   state stays in the DOM (visibility:hidden keeps it out of the a11y/tab order)
   so it can fade. .is-open is toggled by initCollabPopup — clicking the backdrop
   closes it, clicking the popup does nothing. */
.collab-overlay {
  position: fixed;
  inset: 0;
  z-index: 900; /* over the site (max z-index 10), under the intro splash (1000) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility 0s linear .18s;
}
.collab-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .18s ease, visibility 0s;
}
.collab-popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 48px;
  background: var(--white);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
  text-align: center;
  transform: scale(.92);
  transition: transform .18s ease;
}
.collab-overlay.is-open .collab-popup { transform: scale(1); }
.collab-popup__label { font-size: 14px; font-weight: 500; color: var(--muted-dark); }
.collab-popup__phone { font-size: 28px; font-weight: 700; color: var(--ink); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Below ~1186px the three 346px cards no longer fit the content row, so they
   stack full-width. (Provisional — phone sizing comes from the mobile frames.) */
@media (max-width: 1199px) {
  .cards { flex-direction: column; align-items: stretch; overflow-x: visible; }
  .event-card { width: 100%; height: auto; }
}

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .program__grid { grid-template-columns: 1fr; gap: 36px; }
  /* extra clearance so the last schedule row never collides with the torn divider */
  .program { padding-bottom: 190px; }
  .ticket {
    grid-template-columns: 1fr;
    gap: 22px;
    /* #ticket-clip marks the seam between the two desktop columns with a
       perforation notch — traced for a wide, short card. Once the columns
       stack there's no seam to mark, and the notch curves stretch into a
       tall black wedge on the much taller single-column card (worse still
       since each ticket's height varies with how long its description is).
       Swap it for a plain rounded corner... */
    clip-path: none;
    border-radius: var(--radius);
    /* ...plus a new pair of notches bitten into the left/right edges,
       marking the seam between price/quote and the button now that they're
       stacked. Anchored from the card's *bottom* edge (not the top): the
       aside block (price + quote + button) is the same height on every
       ticket regardless of how long its description runs, so "91px above
       the bottom" lands in the same gap on all five cards — measured live,
       not guessed. */
    mask-image:
      radial-gradient(circle 12px at left 0px bottom 91px, transparent 11px, #000 12px),
      radial-gradient(circle 12px at right 0px bottom 91px, transparent 11px, #000 12px);
    mask-composite: intersect;
    -webkit-mask-image:
      radial-gradient(circle 12px at left 0px bottom 91px, transparent 11px, #000 12px),
      radial-gradient(circle 12px at right 0px bottom 91px, transparent 11px, #000 12px);
    -webkit-mask-composite: source-in, source-in;
  }
  .ticket__aside { align-items: flex-start; text-align: left; }
  .form__row { grid-template-columns: 1fr; gap: 40px; }
  .event-detail__gallery { grid-template-columns: 1fr; }
  .event-detail__all { width: 100%; }

  /* bump body copy for comfortable reading on phones */
  .awake__text,
  .join__text { font-size: 13.5px; }
  .event-card__text,
  .ticket__desc,
  .schedule__desc { font-size: 13px; }
}
/* ── Mobile layout — 412px design frame. Spacings/sizes scale from the viewport
   via --mu = 100vw/412 (the mobile twin of --u); fonts stay in fixed px. Built
   pixel-exact, section by section, from the mobile Figma frames. ── */
@media (max-width: 600px) {
  :root { --mu: 0.242718vw; } /* = 100vw / 412 */

  .section { padding: 64px 0; }
  .container { padding: 0 calc(24 * var(--mu)); }
  /* .awake/.join zero the generic .container padding so their content can sit in
     a centred 1120 box on desktop — on mobile that leaves the heading, body copy,
     recap cards and form flush against both screen edges. Restore the 24 gutter
     so they line up with the badge, wordmark, program and tickets. */
  .awake > .container,
  .join > .container { padding: 0 calc(24 * var(--mu)); }
  /* same story for the ticket list, which holds its side gaps purely through a
     centred 1120 box — below that width the cards sit flush against both edges,
     with their rounded corners and torn-edge notches cut off by the screen. */
  .tickets__list { padding: 0 calc(24 * var(--mu)); }
  .hero__card { font-size: 16px; }

  /* Sexton date plaque (.badge «01.08.2026 - SEXTON»): 364×54 at 412 — full
     width inside the 24px gutter — sitting 24 below the top. Font/letter-spacing
     kept from the old mobile value until specified. */
  .hero { padding-top: calc(24 * var(--mu)); padding-bottom: 0; }
  .badge {
    width: 100%;
    height: calc(54 * var(--mu));
    font-size: 22px;
    letter-spacing: 1px;
    padding: 0;
    margin-bottom: 0;
  }

  /* ПРОБУЖДЕНИЕ! wordmark (.hero__logo-img): 373×196 at 412, offset 31 from the
     left / 8 from the right — it overhangs the 24 gutter on the right. Height
     stays auto (1.9:1 aspect → ~196). margin-left is 31 − 24(gutter) = 7; sits
     16 below the badge. */
  .hero__logo-img {
    width: calc(373 * var(--mu));
    max-width: none;
    margin-left: calc(7 * var(--mu));
    margin-top: calc(16 * var(--mu));
  }

  /* Festival-description card (.hero__card, torn bottom edge): 364×488 at 412 —
     fills the 24 gutter, 24 below the wordmark via the grid row-gap. Internal
     padding/font stay provisional until specified. */
  /* minmax(0,1fr): the wordmark overhangs its column (373 + 7 > 364), which
     would otherwise blow the 1fr track out to 380 and drag the card with it —
     minmax(0,…) pins the track to the container width so the card stays 364 and
     the wordmark just overflows visually. */
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: calc(24 * var(--mu)); }
  .hero__card { height: calc(488 * var(--mu)); }

  /* «Купить билет» CTA (.hero__cta): full-width inside the 24 gutter, 58 tall,
     24 above (from the card) and 24 below. Font kept provisional until specified. */
  .hero__cta {
    display: flex;
    width: 100%;
    height: calc(58 * var(--mu));
    /* .btn--ghost's 30px vertical padding would force the box to 64; zero it so
       the 58 height holds (content stays centred). */
    padding: 0 calc(30 * var(--mu));
    /* the desktop 64px gap + the long arrow overflow the 364 button and wrap
       «Купить билет» to two lines — shrink the gap and forbid the wrap so the
       label + arrow stay on one line. Gap value provisional. */
    gap: calc(24 * var(--mu));
    white-space: nowrap;
    margin: calc(24 * var(--mu)) 0 0;
    border-radius: calc(12 * var(--mu));
  }

  /* awake section starts 36 below the CTA — the hero's padding-bottom and the
     CTA's margin-bottom are zeroed, so this padding-top is the whole gap. */
  .awake { padding-top: calc(36 * var(--mu)); }

  /* Recap cards: JS moves each detail under its card (wrapped in .event) so it
     expands inline and pushes the page down; any number can be open. Card +
     detail merge into one card that grows to 1108. Transition ~390ms = 1.5× the
     desktop FLIP. */
  .event { display: block; }
  /* card + detail read as one card; square the shared seam when open. The 18
     padding-bottom sets the cover→first-gallery-photo gap. */
  .event.is-open > .event-card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding-bottom: 18px;
  }
  /* «Скрыть» (lifted into the card by JS) sits at the top-right, replacing the
     arrow: collapsed shows the arrow, open shows «Скрыть». */
  .event-card { position: relative; }
  .event-card .event-detail__hide { position: absolute; top: 20px; right: 20px; display: none; }
  .event.is-open .event-card__arrow { display: none; }
  .event.is-open .event-card .event-detail__hide { display: block; }
  /* the open card must not repeat its own title/text/cover — the preview already
     shows them. Drop the detail's head (title + moved-out «Скрыть»), text and
     first photo (= cover); the card just stretches with the remaining photos. */
  .event-detail--inline .event-detail__head,
  .event-detail--inline .event-detail__text { display: none; }
  .event-detail--inline .event-detail__gallery img:first-child { display: none; }
  /* even 18 gaps between every photo */
  .event-detail--inline .event-detail__gallery { gap: 18px; margin-top: 0; }
  .event-detail--inline {
    min-height: 0; /* override the desktop overlay's 426 min so it can collapse */
    overflow: hidden;
    max-height: 0;
    padding: 0 20px; /* top/bottom 0; sides keep the 20 inset, aligned with the cover */
    border-top-left-radius: 0; /* flush seam under the card */
    border-top-right-radius: 0;
    transition:
      max-height 390ms cubic-bezier(.4, 0, .2, 1),
      padding 390ms cubic-bezier(.4, 0, .2, 1);
  }
  /* padding-top stays 0 so the gallery sits 18 below the cover (via the card's
     padding-bottom), not 18 + detail padding. */
  .event-detail--inline.is-open { max-height: calc(1108 * var(--mu)); padding-bottom: 20px; }

  /* footer collapses to three centred icons (VK / Telegram / phone),
     the collaboration button (and its popup) moves out of view — on mobile the
     phone icon dials directly (per the mobile mockup) */
  .footer__row { justify-content: center; }
  .footer__social { flex: 1; justify-content: space-between; gap: 0; }
  .footer__icon--phone { display: inline-flex; }
  .footer__collab-wrap { display: none; }
  /* Torn top/bottom edges via fixed-height mask strips (assets/program-torn-*.svg)
     instead of the objectBoundingBox clip-path, whose teeth stretch to ~176px on
     the tall mobile block. Each strip is pinned to a fixed height (44/40 → the
     teeth keep their shape), the middle stays solid. The desktop round cut-out is
     dropped here. Padding kept generous so the schedule clears the teeth. */
  .program {
    padding-top: 170px;
    padding-bottom: 200px;
    clip-path: none;
    -webkit-mask:
      url("../assets/program-torn-top.svg") top / 100% calc(44 * var(--mu)) no-repeat,
      radial-gradient(circle calc(11 * var(--mu)) at 89% calc(30 * var(--mu)), transparent calc(10 * var(--mu)), #000 calc(11 * var(--mu))) center calc(44 * var(--mu)) / 100% calc(100% - 84 * var(--mu)) no-repeat,
      url("../assets/program-torn-bottom.svg") bottom / 100% calc(40 * var(--mu)) no-repeat;
    mask:
      url("../assets/program-torn-top.svg") top / 100% calc(44 * var(--mu)) no-repeat,
      radial-gradient(circle calc(11 * var(--mu)) at 89% calc(30 * var(--mu)), transparent calc(10 * var(--mu)), #000 calc(11 * var(--mu))) center calc(44 * var(--mu)) / 100% calc(100% - 84 * var(--mu)) no-repeat,
      url("../assets/program-torn-bottom.svg") bottom / 100% calc(40 * var(--mu)) no-repeat;
  }
  /* slow the marquee down on narrow screens */
  .marquee__track { animation-duration: 26s; }
}

/* ============================================================
   INTRO SPLASH
   enter gate → fullscreen video → fade to black → reveal site
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none; /* JS adds .is-active; no-JS visitors skip the intro */
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity .6s ease;
}
.intro.is-active { display: flex; }

.intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0; /* revealed once playback starts */
  transition: opacity .5s ease;
  cursor: pointer;
}
.intro.is-playing .intro__video { opacity: 1; }
.intro.is-playing .intro__enter { display: none; }

/* "enter" gate (shown until the user clicks, so audio is allowed to play) */
.intro__enter {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--lime);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 26px 56px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.intro__enter:hover { background: var(--lime-dark); transform: translateY(-2px); }
.intro__enter-icon { font-size: 28px; line-height: 1; }
.intro__enter-note {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: none;
  opacity: .75;
}

/* skip control */
.intro__skip {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 24px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.intro__skip:hover { background: rgba(0, 0, 0, .7); border-color: #fff; }

/* ending: video fades to black, then the black overlay fades out to the site */
.intro.is-ending .intro__video { opacity: 0; }
.intro.is-hiding { opacity: 0; }

body.intro-lock { overflow: hidden; }
