/* Fonts */
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../assets/fonts/golos-text-cyrillic.woff2?v=17d048ca05cb") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../assets/fonts/golos-text-latin.woff2?v=9a69d0aa4734") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens */
:root {
  --purple: #4d0095;
  --surface: #0e001b;
  --black: #000;
  --white: #fff;
  --gray: #888;
  --gray-light: #ccc;
  --accent-text: #b875ff;
  --line: #1e1e1e;
  --divider: #333;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

@media (min-width: 960px) {
  .m-only { display: none !important; }
}

/* Brand intro */
.intro-screen {
  min-height: 200svh;
  background: var(--surface);
}
/* Logo stays pinned while the block scrolls, so the fill plays out before the page moves on */
.intro-screen__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
}
/* Logo fills bottom-to-top with page scroll (--p: 0..1, set by script.js) */
.logo { display: inline-grid; }
.logo__layer { grid-area: 1 / 1; display: grid; }
.logo__base { opacity: 0.2; }
.logo__fill { clip-path: inset(calc((1 - var(--p, 0)) * 100%) 0 0 0); }
.brand { display: inline-grid; }
.brand img { grid-area: 1 / 1; }
.brand span {
  grid-area: 1 / 1;
  justify-self: start;
  margin: 358.3px 0 0 0.19px;
  font-size: 50px;
  font-weight: 300;
  white-space: nowrap;
}

/* Page shell */
.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: var(--black);
}
.sidebar {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100svh;
  overflow-y: auto;
  background: var(--surface);
  padding: 96px 32px 32px;
}
.hero {
  grid-column: 2;
  position: relative;
  padding: 120px 80px 96px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
}

/* Profile */
.profile {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile__photo {
  position: relative;
  flex: none;
  width: 204px;
  height: 204px;
  border-radius: 50%;
  overflow: hidden;
}
.profile__photo img { position: absolute; top: -2.89%; left: -16.94%; width: 116.85%; height: 116.85%; }
.profile__info { display: flex; flex-direction: column; gap: 16px; font-size: 22px; color: var(--gray); }
.profile__name { font-size: 40px; font-weight: 700; color: var(--white); }
.profile__divider { width: 100%; height: 1px; margin: 0; border: 0; background: var(--divider); }
.profile__links { display: flex; flex-direction: column; gap: 16px; font-size: 22px; font-weight: 500; color: var(--gray-light); }
.profile__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; }
.profile__links a { transition: color 0.15s, font-weight 0.15s; }
.profile__links a:hover { color: var(--white); font-weight: 800; }

/* Skip link: hidden until keyboard focus */
.skip-link {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  padding: 12px 24px;
  border-radius: 24px;
  background: var(--purple);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 24px;
  background: var(--purple);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  border: 2px solid var(--purple);
  transition: background-color 0.2s, transform 0.2s ease-out;
}
/* The static wrapper owns the hover area so the moving button cannot flicker at its edges */
.magnet { display: inline-block; }
.btn:hover { background: var(--black); }
.magnet:hover .btn { transform: translate(var(--mx, 0), var(--my, 0)); }
.btn:active { opacity: 0.85; }

/* Language switch */
.nav-header { position: absolute; top: 36px; right: 80px; }
.lang { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 8px 24px;
  border: 3px solid var(--line);
  border-radius: 64px;
  background: transparent;
  font-size: 22px;
  font-weight: 400;
  color: var(--gray);
  text-transform: uppercase;
  white-space: nowrap;
}
.lang__item.is-active { border-width: 0; background: var(--purple); font-weight: 700; color: var(--white); }
a.lang__item:hover { border-color: currentColor; }

/* About */
.about { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; width: 100%; }
.about__mark { width: 150.025px; height: 127.675px; }
.about__text { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 893px; }
.about__title { font-size: 64px; font-weight: 800; letter-spacing: -2.5px; line-height: 1; }
.about__lead { font-size: 22px; }
.mark { background: linear-gradient(transparent 26.8%, var(--purple) 26.8%, var(--purple) 90.9%, transparent 90.9%); }

/* Tools list: one static line on desktop, wraps on mobile */
.marquee { width: 100%; min-width: 0; overflow: hidden; }
.marquee__track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee__copy { flex: none; font-size: 22px; color: var(--accent-text); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Projects */
.projects {
  grid-column: 2;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.projects__title { font-size: 40px; font-weight: 700; letter-spacing: -1px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  scroll-margin-top: 24px;
  transition: transform 0.2s ease-out, box-shadow 0.2s, background-color 0.2s;
}
.card:hover {
  transform: translate(var(--mx, 0), var(--my, 0));
  background: #1a0033;
  box-shadow: 0 0 0 2px var(--purple), 0 0 40px rgba(143, 51, 255, 0.45);
}
.card:target {
  background: #1a0033;
  box-shadow: 0 0 0 2px var(--purple), 0 0 40px rgba(143, 51, 255, 0.45);
}
.card__title { font-size: 22px; font-weight: 700; }
.card__text { font-size: 14px; color: var(--gray); }

/* Preview stage: authored at 458x250, scaled to the card width by script.js */
.preview { --stage-width: 458; position: relative; width: 100%; aspect-ratio: 458 / 250; }
.preview { content-visibility: auto; contain-intrinsic-size: auto 250px; }
.stage {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--stage-width) * 1px);
  height: 250px;
  transform: scale(var(--s, 1));
  transform-origin: 0 0;
}
.stage img { width: 100%; height: 100%; object-fit: cover; }
.center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }

/* Desktop + phone mockup */
.shot {
  position: absolute;
  left: 0;
  top: 8.25px;
  width: 376.871px;
  height: 211.577px;
  border-radius: 16px;
  overflow: hidden;
}
.shot--om img { position: absolute; top: 0.01%; left: 0; height: 103.55%; }
.phone {
  position: absolute;
  left: 338.64px;
  top: 28.39px;
  width: 119.635px;
  height: 212.215px;
  display: grid;
  place-items: center;
}
.phone__body {
  width: 92.746px;
  height: 201.561px;
  border: 1px solid var(--black);
  border-radius: 10px;
  background: var(--black);
  overflow: hidden;
  transform: rotate(7.79deg) skewX(-0.12deg);
}
.phone__body--visual img { object-position: 23.8% 50%; }
.notch {
  position: absolute;
  left: 394.63px;
  top: 34.87px;
  width: 32.524px;
  height: 12.195px;
  display: grid;
  place-items: center;
}
.notch::before {
  content: "";
  width: 31.737px;
  height: 7.934px;
  border-radius: 72px;
  background: var(--black);
  transform: rotate(7.85deg);
}

/* Wide artwork (Cherti, Uroki) */
.wide { width: 445.633px; height: 250px; border-radius: 14.26px; overflow: hidden; flex: none; }

/* Animation label */
.anim-label { width: 426px; font-size: 38px; font-weight: 700; line-height: 1.1; text-align: center; }

/* Tilted artwork pairs */
.tilt {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--w);
  height: var(--h);
  display: grid;
  place-items: center;
}
.tilt img {
  width: var(--iw);
  height: var(--ih);
  border-radius: var(--br, 0);
  transform: rotate(var(--r));
}
.yt-1 { --l: -1.81px; --t: -2.88px; --w: 278.494px; --h: 185.413px; --iw: 258.407px; --ih: 145.713px; --r: -9.26deg; }
.yt-2 { --l: 193.87px; --t: 70px; --w: 265.016px; --h: 179.545px; --iw: 244.149px; --ih: 137.673px; --r: 10.42deg; }
.cz-2 { --l: 206px; --t: -1.62px; --w: 252.391px; --h: 252.391px; --iw: 216.773px; --ih: 216.773px; --r: 10.42deg; --br: 8px; }
.cz-1 { --l: 0.82px; --t: -0.14px; --w: 250.135px; --h: 250.135px; --iw: 217.898px; --ih: 217.898px; --r: -9.26deg; --br: 8px; }
.kv-2 { --l: 205.39px; --t: -1.2px; --w: 252.391px; --h: 252.391px; --iw: 216.773px; --ih: 216.773px; --r: 10.42deg; --br: 8px; }
.kv-1 { --l: 0.21px; --t: 0.28px; --w: 250.135px; --h: 250.135px; --iw: 217.898px; --ih: 217.898px; --r: -9.26deg; --br: 8px; }

/* Mascot */
.mascot { overflow: visible; display: block; }
.mascot__1 { position: absolute; left: 0; top: 5.54px; width: 144.667px; height: 238.912px; overflow: hidden; }
.mascot__1 img { position: absolute; top: 0; left: -31.6%; width: 165.15%; height: 100%; object-fit: fill; }
.ms-2 { --l: 62px; --t: -18px; --w: 234.297px; --h: 234.297px; --iw: 200.342px; --ih: 200.342px; --r: -10.79deg; }
.ms-3 { --l: 248px; --t: 26px; --w: 241.212px; --h: 241.212px; --iw: 198.384px; --ih: 198.384px; --r: 14.29deg; }
.mascot .tilt img { object-fit: contain; }

/* Vesla stickers */
.vesla { gap: 12px; }
.vesla img { width: 144.667px; flex: none; object-fit: contain; }
.vesla__1 { height: 141.57px; }
.vesla__2 { height: 162.433px; }
.vesla__3 { height: 129.996px; }

/* GirlsFit logo */
.gf {
  position: absolute;
  top: 0;
  left: 0;
  width: 458px;
  height: 250px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--white);
  overflow: hidden;
}
.gf__logo { position: relative; width: 377.074px; height: 250px; border-radius: 12.066px; overflow: hidden; }
.gf__logo img { position: absolute; left: -9.07%; top: -15.13%; width: 121.55%; height: 129.77%; object-fit: fill; }

/* Mobile layout */
@media (max-width: 959px) {
  .d-only { display: none; }

  .intro-screen { min-height: 200svh; }

  .shell {
    display: flex;
    flex-direction: column;
    gap: 64px;
    max-width: 600px;
    margin-inline: auto;
    padding: 64px 16px;
  }
  .sidebar, .hero { display: contents; }

  .nav-header { position: static; order: 1; display: flex; align-items: center; justify-content: flex-end; width: 100%; }
  .about { order: 2; gap: 32px; }
  .about__mark { width: 100px; height: 85.123px; }
  .about__text { max-width: none; align-items: center; }
  .about__title { font-size: 38px; }
  .mark { background: linear-gradient(transparent 28.6%, var(--purple) 28.6%, var(--purple) 91.8%, transparent 91.8%); }
  .about__lead { font-size: 16px; }

  .profile {
    order: 3;
    align-items: center;
    padding: 32px;
    border-radius: 16px;
    background: var(--surface);
    scroll-margin-top: 16px;
  }
  .profile__photo { width: 136px; height: 136px; }
  .profile__info { align-items: center; width: 100%; font-size: 16px; text-align: center; }
  .profile__name { font-size: 24px; }
  .profile__links {
    display: grid;
    grid-template-rows: auto;
    grid-auto-flow: column;
    justify-content: center;
    gap: 16px 24px;
    font-size: 16px;
    text-align: center;
  }
  .profile__links li { white-space: nowrap; }
  .profile__links .is-start { text-align: left; }

  .marquee { order: 4; }
  .marquee__copy { font-size: 16px; }

  .lang__item { min-height: 44px; border-width: 1px; font-size: 16px; }

  .projects { order: 6; width: 100%; margin-top: 16px; padding: 0; }
  .projects__title { font-size: 38px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
  .grid { grid-template-columns: 1fr; gap: 32px; }
  .card--3 { order: 1; }
  .card--4 { order: 0; }
  .card:nth-child(n + 5) { order: 2; }

  /* Preview stage: 295x168 */
  .preview { --stage-width: 295; aspect-ratio: 295 / 168; }
  .stage { height: 168px; }

  .shot { top: 11.66px; width: 242.601px; height: 136.197px; border-radius: 5px; }
  .phone { left: 217.99px; top: 24.63px; width: 77.012px; height: 136.608px; }
  .phone__body { width: 59.703px; height: 129.75px; }
  .notch { left: 254.03px; top: 28.8px; width: 20.936px; height: 7.85px; }
  .notch::before { width: 20.43px; height: 5.108px; }

  .wide { width: 295px; height: 165.495px; border-radius: 9.44px; }
  .anim-label { width: 263px; font-size: 28px; }

  .yt-1 { --l: -5px; --t: 3.93px; --w: 175.967px; --h: 117.153px; --iw: 163.275px; --ih: 92.069px; }
  .yt-2 { --l: 123.26px; --t: 49.87px; --w: 173.442px; --h: 117.504px; --iw: 159.786px; --ih: 90.101px; }
  .cz-2, .kv-2 { --l: 132.28px; --t: 2.64px; --w: 162.719px; --h: 162.719px; --iw: 139.756px; --ih: 139.756px; --br: 5.158px; }
  .cz-1, .kv-1 { --l: 0px; --t: 3.59px; --w: 161.265px; --h: 161.265px; --iw: 140.481px; --ih: 140.481px; --br: 5.158px; }

  .mascot { display: flex; gap: 8px; overflow: hidden; }
  .mascot__1 { position: relative; top: 0; flex: none; width: 93px; height: 153.586px; }
  .mascot .tilt { position: relative; left: auto; top: auto; flex: none; }
  .ms-2 { --w: 108.762px; --h: 108.762px; --iw: 93px; --ih: 93px; }
  .ms-3 { --w: 113.077px; --h: 113.077px; --iw: 93px; --ih: 93px; }

  .vesla { gap: 8px; }
  .vesla img { width: 93px; }
  .vesla__1 { height: 91.009px; }
  .vesla__2 { height: 104.421px; }
  .vesla__3 { height: 83.569px; }

  .gf { width: 295px; height: 168px; }
  .gf__logo { width: 294px; height: 195px; border-radius: 8.109px; flex: none; }
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--black);
  font-size: 32px;
  line-height: 1;
}
html:has(dialog[open]) { overflow: hidden; }

/* Mobile floating controls */
.fab {
  position: fixed;
  bottom: 16px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background-color 0.2s;
}
.fab.is-visible { opacity: 1; visibility: visible; transform: none; }
.fab--contacts { left: 16px; }
.fab--top {
  right: 16px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--purple);
  border-radius: 50%;
  background: var(--black);
}

/* About popup (mobile) */
.about-dialog {
  width: min(calc(100% - 32px), 440px);
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--white);
  overflow-y: auto;
}
.about-dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.about-dialog .profile { padding: 40px 24px 32px; }
@media (min-width: 960px) and (max-height: 900px) {
  .sidebar { padding-top: 40px; padding-bottom: 24px; }
  .sidebar .profile { gap: 16px; }
  .sidebar .profile__photo { width: 160px; height: 160px; }
  .sidebar .profile__name { font-size: 32px; }
  .sidebar .profile__info { font-size: 18px; gap: 12px; }
  .sidebar .profile__links { font-size: 18px; gap: 8px; }
}
@media (min-width: 960px) {
  .about-dialog { display: none !important; }
}

@media (hover: none) {
  .card:hover, .magnet:hover .btn { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .fab { transition: none; }
  .marquee { overflow: visible; }
  .marquee__track { animation: none; width: auto; }
  .marquee__copy { white-space: normal; }
  .marquee__copy[aria-hidden] { display: none; }
}
.card__video { display: block; width: 100%; height: 100%; object-fit: cover; }
