/* ==========================================================================
   Mojca Berkopec — Portfolio
   ========================================================================== */

:root {
  --cobalt: #1A0DAB;
  --fog: #F3F3F1;
  --cream: #FFF8DD;
  --night: #120B38;
  --vermilion: #E0482B;
  --ink: #16131F;
  --ink-soft: #5C5870;
  --teal: #1E6B5F;
  --coral: #EE6A45;
  --sky: #5B8ED6;
  --line: rgba(22, 19, 31, .12);

  --bg: var(--fog);
  --fg: var(--ink);
  --accent: var(--cobalt);

  --f-mega: "Anton", "Impact", sans-serif;
  --f-wide: "Lexend Exa", "Helvetica Neue", Arial, sans-serif;
  --f-swash: "Pinyon Script", cursive;
  --f-body: "Inter", system-ui, sans-serif;

  --pad: clamp(16px, 4vw, 64px);
  --max: 1480px;
  --r-img: 6px;
  --r-card: 18px;
  --shadow: 0 30px 60px -24px rgba(18, 11, 56, .28);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* section colour themes (body bg tweens between them via JS) */
[data-bg="fog"]   { --bg: var(--fog);   --fg: var(--ink);   --accent: var(--cobalt); }
[data-bg="cream"] { --bg: var(--cream); --fg: var(--ink);   --accent: var(--cobalt); }
[data-bg="night"] { --bg: var(--night); --fg: var(--cream); --accent: var(--cream); }
[data-bg="cobalt"] { --bg: var(--cobalt); --fg: var(--cream); --accent: var(--cream); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--vermilion); color: var(--cream); }
:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 3px; border-radius: 4px; }

section { position: relative; background: var(--bg); color: var(--fg); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: var(--fog); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 8px; }

/* ---------- type helpers ---------- */
.mega {
  font: 400 clamp(5rem, 20vw, 24rem)/.82 var(--f-mega);
  text-transform: uppercase;
  letter-spacing: .005em;
  color: var(--accent);
}
.label {
  font: 400 .75rem/1.4 var(--f-wide);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: .8;
  display: inline-flex; align-items: center; gap: .6em;
}
.swash {
  font-family: var(--f-swash);
  font-size: 1.9em;
  line-height: 0;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent);
  margin-right: -.05em;
  vertical-align: -.12em;
}
.section-title, .project__title {
  font: 400 clamp(1.9rem, 5vw, 4.8rem)/1.05 var(--f-wide);
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--accent);
}
.inline-arrow { width: 2.6em; height: auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: inline-block; }

.draw { fill: none; stroke: var(--vermilion); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* split text masks */
.split-line, .split-char-wrap { display: inline-block; overflow: hidden; vertical-align: top; }
.split-char { display: inline-block; will-change: transform; }

/* ---------- global layers ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 120; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .09;
  animation: grain 1s steps(8) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 12% { transform: translate(-3%, 2%); } 25% { transform: translate(2%, -4%); }
  37% { transform: translate(-4%, -1%); } 50% { transform: translate(3%, 3%); } 62% { transform: translate(-1%, 4%); }
  75% { transform: translate(4%, -2%); } 87% { transform: translate(-2%, -3%); } 100% { transform: translate(0, 0); }
}

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 110; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--vermilion); transform-origin: 0 50%; transform: scaleX(0); }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 130; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--vermilion);
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s;
  opacity: 0;
}
.cursor.is-on { opacity: 1; }
.cursor.is-big { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.cursor__label { font: 500 .62rem/1 var(--f-wide); letter-spacing: .12em; text-transform: uppercase; color: var(--cream); opacity: 0; transition: opacity .2s; }
.cursor.is-big .cursor__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 150; background: var(--fog); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; justify-content: flex-end; align-items: center;
  padding: 18px var(--pad);
  color: var(--cobalt);
  mix-blend-mode: normal;
  transition: transform .5s var(--ease), color .4s;
}
.nav.is-hidden { transform: translateY(-110%); }
.nav.on-dark { color: var(--cream); }
.nav__links { display: flex; align-items: center; gap: 22px; font: 400 .75rem/1 var(--f-wide); letter-spacing: .14em; text-transform: uppercase; }
.nav__links > a:not(.pill) { text-decoration: none; position: relative; }
.nav__links > a:not(.pill)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav__links > a:not(.pill):hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- pills (flat, static) ---------- */
.pill {
  display: inline-flex; align-items: center; height: 44px; padding: 0 22px;
  border-radius: 999px; text-decoration: none; overflow: hidden; position: relative;
  font: 500 .75rem/1 var(--f-wide); letter-spacing: .14em; text-transform: uppercase;
  border: 1.5px solid currentColor;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.pill span { position: relative; display: block; transition: transform .45s var(--ease); }
.pill span::after { content: attr(data-text); position: absolute; left: 0; top: 320%; white-space: nowrap; }
.pill:hover span { transform: translateY(-320%); }
.pill--ink { background: var(--cobalt); color: var(--fog); border-color: var(--cobalt); height: 38px; padding: 0 18px; }
.nav.on-dark .pill--ink { background: var(--cream); color: var(--night); border-color: var(--cream); }
.pill--ink:hover { background: var(--vermilion); border-color: var(--vermilion); color: var(--fog); }
.pill--cream { background: var(--cream); color: var(--night); border-color: var(--cream); height: 58px; padding: 0 32px; font-size: .85rem; }
.pill--cream:hover { background: var(--vermilion); border-color: var(--vermilion); color: var(--cream); }
.pill--outline { color: var(--cream); height: 58px; padding: 0 32px; font-size: .85rem; }
.pill--outline:hover { background: var(--cream); color: var(--night); }

/* ==========================================================================
   01 HERO
   ========================================================================== */
.hero {
  min-height: 100svh;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto 1fr;
  align-content: start;
  overflow: hidden;
  /* little Mojca's height — title: top 19svh, height 17.6vw → her head starts ~30% up into the letters */
  --kid-h: clamp(260px, calc(81svh - 12.3vw), 76svh);
}
/* fine film grain over the first screen's background, so the paper texture matches little Mojca's photo */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .1;
  -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); /* no hard edge into the next section */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
/* her illustration stickers floating around the first screen (placed by script.js) */
.hero__icons { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
/* "website made with Claude Code" badge, top-left, slowly spinning */
.madewith {
  position: absolute; z-index: 4; left: var(--pad); top: clamp(14px, 2.4vw, 28px);
  width: clamp(84px, 7.5vw, 116px); aspect-ratio: 1; display: grid; place-items: center; color: var(--cobalt);
}
.madewith svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: madewith-spin 30s linear infinite; }
.madewith text { font: 400 9.4px var(--f-wide); letter-spacing: .12em; fill: currentColor; }
.madewith__star { font-size: clamp(1rem, 1.4vw, 1.4rem); line-height: 1; }
@keyframes madewith-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .madewith svg { animation: none; } }

/* all stickers in one muted cobalt tone, quieter than the title and the photo */
.hero__icons img {
  position: absolute; height: auto; opacity: .22;
  filter: grayscale(1) brightness(.55) sepia(1) hue-rotate(195deg) saturate(6); mix-blend-mode: multiply;
}

/* hand-drawn marker highlight: a wobbly, slightly tilted stroke behind each line of the text */
.marker {
  color: inherit;
  padding: .05em .25em; margin: 0 -.15em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'><path d='M7 12 C 30 6, 62 10, 96 7 S 160 3, 192 9 C 199 12, 197 16, 199 20 C 197 26, 200 31, 193 35 C 160 33, 120 38, 82 34 S 22 38, 9 35 C 1 33, 4 27, 2 22 C 0 17, 3 14, 7 12 Z' fill='%235B8ED6' fill-opacity='.42'/><path d='M14 14 C 70 10, 130 13, 186 11' stroke='%235B8ED6' stroke-opacity='.2' stroke-width='5' fill='none' stroke-linecap='round'/><path d='M10 31 C 70 33, 128 28, 190 31' stroke='%235B8ED6' stroke-opacity='.22' stroke-width='4' fill='none' stroke-linecap='round'/></svg>") center / 100% 100% no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* PORTFOLIO spans exactly from the left edge (swash M) to the right edge (intro text) */
.hero__mega {
  grid-column: 1 / -1; grid-row: 2;
  font: 400 clamp(5rem, 22vw, 32rem)/.8 var(--f-mega);
  color: var(--cobalt);
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 19svh;
  position: relative; z-index: 1;
}
/* script.js nudges the margins so the ink of P / O lines up with the M of the name and the paragraph edge */
.hero__word { display: flex; justify-content: space-between; }
.hero__word > span { display: inline-block; will-change: transform; }

/* cutout of little Mojca: centred, sitting on the bottom edge, head over the title (like the PDF cover) */
.hero__kid {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: 0; margin: 0 auto;   /* centred without transforms (GSAP animates transforms) */
  height: var(--kid-h);
  width: calc(var(--kid-h) * 574 / 676);
  transform-origin: 50% 100%;
}
.hero__kid > img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: contrast(1.04) saturate(.92); }


.hero__name {
  grid-column: 1; grid-row: 3; align-self: start; margin-top: 28px;
  font: 400 clamp(1.35rem, 2.8vw, 2.6rem)/1.1 var(--f-wide);
  max-width: calc(50vw - var(--kid-h) * .425 - var(--pad) - 28px);   /* stays clear of little Mojca */
  text-transform: uppercase; color: var(--cobalt); letter-spacing: .04em;
  position: relative; z-index: 3;
}
.hero__intro {
  grid-column: 2; grid-row: 3; justify-self: end; align-self: start;
  /* never wider than the free space beside little Mojca (her half-width = --kid-h × .425) */
  max-width: min(30ch, calc(50vw - var(--kid-h) * .425 - var(--pad) - 28px));
  margin-top: 28px; position: relative; z-index: 3;
  font: 400 clamp(1rem, 1.3vw, 1.25rem)/1.65 var(--f-wide); color: var(--cobalt); text-align: justify;
  -webkit-hyphens: auto; hyphens: auto;   /* keeps the justified lines even in narrow columns */
}

/* ---------- first screen on night blue (same world as the Instagram page): cream type, vermilion accents ---------- */
.hero[data-bg="cobalt"] .hero__mega { color: var(--cream); }
.hero[data-bg="cobalt"] .hero__name { color: var(--cream); }
/* blue stays the main colour; the bottom deepens into the Instagram-page navy so little Mojca sits on it */
.hero[data-bg="cobalt"] { background-image: linear-gradient(180deg, transparent 45%, var(--night) 100%); }
/* the name gets a short vermilion rule above it as the warm accent (vermilion text on blue vibrates) */
.hero[data-bg="cobalt"] .hero__name::before { content: ""; display: block; width: 2.2em; height: 4px; margin-bottom: .45em; background: var(--vermilion); border-radius: 2px; }
.hero[data-bg="cobalt"] .hero__intro { color: var(--cream); }
.hero[data-bg="cobalt"] .madewith { color: var(--cream); }
.hero[data-bg="cobalt"] .madewith__star { color: var(--vermilion); }
/* stickers as faint cream line drawings */
.hero[data-bg="cobalt"] .hero__icons img { opacity: .16; filter: grayscale(1) brightness(2.4) sepia(.35); mix-blend-mode: screen; }
/* light grain instead of dark, so it shows on the dark background */
.hero[data-bg="cobalt"]::before {
  opacity: .14;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
/* marker in vermilion on the dark screen */
.hero[data-bg="cobalt"] .marker {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'><path d='M7 12 C 30 6, 62 10, 96 7 S 160 3, 192 9 C 199 12, 197 16, 199 20 C 197 26, 200 31, 193 35 C 160 33, 120 38, 82 34 S 22 38, 9 35 C 1 33, 4 27, 2 22 C 0 17, 3 14, 7 12 Z' fill='%23E0482B' fill-opacity='.85'/></svg>");
}


/* ==========================================================================
   02 WORK INTRO
   ========================================================================== */
.workintro {
  display: grid; align-content: center; gap: clamp(18px, 2.4vw, 32px);
  padding: clamp(110px, 14vw, 200px) var(--pad) clamp(20px, 4vw, 60px); max-width: var(--max); margin: 0 auto;
}
.workintro__title {
  font: 400 clamp(3rem, 9vw, 9.5rem)/1.06 var(--f-mega); text-transform: uppercase; color: var(--cobalt);
  max-width: 14ch;
}
.workintro__text {
  font: 400 clamp(1.15rem, 1.9vw, 1.75rem)/1.6 var(--f-wide); color: var(--cobalt);
  max-width: 34ch; margin-left: auto;
}
.workintro__text b { font-weight: 500; }
/* highlighted phrases that jump to their section */
.textlink { text-decoration: none; }
.textlink:hover .marker { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.workintro .word { display: inline-block; }
/* ==========================================================================
   PROJECT shared
   ========================================================================== */
.project { padding: clamp(80px, 10vw, 160px) 0 clamp(60px, 8vw, 120px); }
.project__head { padding: 0 var(--pad); max-width: var(--max); margin: 0 auto clamp(40px, 6vw, 90px); display: grid; gap: 14px; }
.project__no { font: 400 .8rem/1 var(--f-wide); color: var(--vermilion); letter-spacing: .14em; }
.project__meta { font: 400 .75rem/1.5 var(--f-wide); letter-spacing: .14em; text-transform: uppercase; color: var(--fg); opacity: .7; }
.project__line { max-width: 52ch; color: var(--fg); }

.credit {
  position: absolute; right: 10px; bottom: 8px; z-index: 2;
  font: 400 .6rem/1.2 var(--f-wide); letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: rgba(18, 11, 56, .55); padding: 4px 8px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ---------- merch: real product photos as scattered polaroids, with film grain ---------- */
.merch { padding: 0 var(--pad); max-width: 1640px; margin: 0 auto; }
.merch__stage { position: relative; aspect-ratio: 2 / 1; }
.merch__item {
  position: absolute; left: var(--l); top: var(--t); width: var(--w, 17%);   /* tilt (--r) is applied by script.js */
  display: block; text-align: left; cursor: pointer;
  background: #fbfaf6; padding: 8px 8px 0; border-radius: 3px; box-shadow: var(--shadow);
  transition: box-shadow .5s var(--ease);
  will-change: transform;
}
.merch__photo { position: relative; display: block; overflow: hidden; }
.merch__item img { width: 100%; aspect-ratio: var(--ar, 4 / 5); object-fit: cover; display: block; filter: contrast(1.04) saturate(.95); }
/* film grain over the photo (and a faint one over the paper frame) */
.merch__photo::after, .merch__item::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
.merch__photo::after { opacity: .22; mix-blend-mode: overlay; }
.merch__item::before { opacity: .06; border-radius: inherit; z-index: 1; }
.merch__cap { display: block; padding: 10px 2px 12px; font: 400 .72rem/1.2 var(--f-wide); letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); }
.merch__item:hover { box-shadow: 0 40px 70px -26px rgba(18, 11, 56, .4); z-index: 2; }

/* ---------- evolution ---------- */
.evolution { padding: clamp(40px, 6vw, 80px) 0 0; }
.evolution > .label { padding: 0 var(--pad); color: var(--cobalt); }
.evolution__track {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 28px);
  overflow-x: auto; padding: 28px var(--pad) 18px; scrollbar-width: none; cursor: grab;
}
.evolution__track::-webkit-scrollbar { display: none; }
.evolution__track figure { flex: 0 0 auto; height: clamp(240px, 32vw, 420px); }
.evolution__track img { height: 100%; width: auto; border-radius: 3px; box-shadow: var(--shadow); }
.evolution__track figcaption { font: 400 .65rem/1 var(--f-wide); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 10px; }
.evolution__arrow { flex: 0 0 auto; width: 80px; }

/* ==========================================================================
   05b APP
   ========================================================================== */
.screens { height: 260vh; }
.screens__pin { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; }
.phones { display: flex; gap: clamp(18px, 3vw, 48px); align-items: center; }
.phone {
  position: relative; width: clamp(150px, 16vw, 250px); aspect-ratio: 9 / 19.5;
  background: #0d0b14; border-radius: 34px; padding: 9px;
  box-shadow: var(--shadow), inset 0 0 0 2px #2a2733;
}
.phone--mid { translate: 0 -6%; }
.phone::before { content: ""; position: absolute; top: 15px; left: 50%; translate: -50% 0; width: 32%; height: 16px; background: #0d0b14; border-radius: 999px; z-index: 3; }
.phone__screen { width: 100%; height: 100%; border-radius: 26px; overflow: hidden; background: #f3eadb; }
.phone__scroll { will-change: transform; }
.phone__scroll img { width: 100%; height: auto; display: block; }
.phone__tap {
  position: absolute; left: 50%; top: 70%; width: 26px; height: 26px; margin: -13px; border-radius: 50%;
  background: rgba(224, 72, 43, .8); box-shadow: 0 0 0 6px rgba(224, 72, 43, .25); z-index: 4; opacity: 0;
}


/* ==========================================================================
   05c SOCIAL
   ========================================================================== */
.project__head--social { margin-bottom: 0; }
.project--social { padding-bottom: 0; }
/* the moving collage sits at the end of the section and fades into the cream app section below */
.feed { margin-top: clamp(80px, 10vw, 150px); position: relative; height: 100svh; overflow: hidden; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 2vw, 28px); padding: 0 var(--pad); }
.feed__col { display: flex; flex-direction: column; gap: clamp(10px, 2vw, 28px); will-change: transform; }
.feed__col img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.feed__title {
  position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; z-index: 2;
  color: var(--cream); pointer-events: none; text-shadow: 0 10px 60px rgba(18, 11, 56, .7);
}
.feed::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(to bottom, var(--night) 0%, rgba(18, 11, 56, 0) 22%, rgba(255, 248, 221, 0) 70%, var(--cream) 100%),
    radial-gradient(ellipse at center, rgba(18, 11, 56, .35), rgba(18, 11, 56, .1) 70%);
}

.ig {
  display: flex; gap: clamp(18px, 2.4vw, 36px); justify-content: center; align-items: flex-start;
  padding: clamp(60px, 8vw, 120px) var(--pad) 0; flex-wrap: wrap;
}
.ig { --igw: clamp(180px, 18vw, 290px); }
.igphone { width: var(--igw); }
.igphone--feature { translate: 0 -40px; }
/* the app phone: full-screen app screens (9:20), no Instagram header —
   narrower, so it ends up the same height as the Instagram phones */
.igphone--app { width: calc(var(--igw) * .7); }
.igphone--app .igphone__frame { border-radius: 30px; position: relative; }
.igphone--app .igphone__frame::before { content: ""; position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 30%; height: 14px; background: #0d0b14; border-radius: 999px; z-index: 3; }
.igphone--app .igphone__media { aspect-ratio: 9 / 20; background: #f3eadb; }
.igphone--app .igphone__track img { object-position: top; }
.igphone--app .igphone__foot { padding: 10px 12px 12px; }
.igphone--app .igphone__dots { margin-right: auto; }
.igphone__frame {
  background: #fff; color: #111; border-radius: 30px; overflow: hidden;
  border: 8px solid #0d0b14; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.igphone__head { display: flex; align-items: center; gap: 9px; padding: 22px 12px 10px; font: 600 .72rem/1 var(--f-body); }
.igphone__head i { width: 24px; height: 24px; border-radius: 50%; background: conic-gradient(var(--vermilion), var(--coral), var(--cobalt), var(--vermilion)); padding: 2px; }
.igphone__head span { margin-left: auto; opacity: .6; }
.igphone__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #eee; touch-action: pan-y; }
.igphone__media > img, .igphone__media > video { width: 100%; height: 100%; object-fit: cover; }
.igphone__track { display: flex; height: 100%; will-change: transform; cursor: grab; }
.igphone__track.is-dragging { cursor: grabbing; }
.igphone__track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.igphone__nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: #111; font-size: 1.1rem; line-height: 1; display: grid; place-items: center;
  opacity: 0; transition: opacity .3s;
}
.igphone__media:hover .igphone__nav, .igphone__nav:focus-visible { opacity: 1; }
.igphone__nav--prev { left: 8px; } .igphone__nav--next { right: 8px; }
.igphone__foot { display: flex; align-items: center; padding: 10px 12px 16px; gap: 8px; font-size: .85rem; flex-wrap: nowrap; }
.igphone__icons { letter-spacing: .3em; white-space: nowrap; }
.igphone__dots { display: flex; gap: 3px; margin-left: auto; flex-wrap: nowrap; }
.igphone__dots i { width: 5px; height: 5px; border-radius: 50%; background: #c9c9c9; transition: background .3s; }
.igphone__dots i.is-on { background: var(--cobalt); }
.igphone__cap { margin-top: 16px; color: var(--cream); display: block; text-align: center; }

/* ==========================================================================
   05d POSTERS
   ========================================================================== */
.hscroll { overflow: hidden; }
.hscroll__track { display: flex; gap: clamp(20px, 3vw, 48px); padding: 20px var(--pad) 40px; width: max-content; will-change: transform; }
.poster { width: clamp(240px, 26vw, 400px); flex: 0 0 auto; cursor: zoom-in; }
.poster img { width: 100%; aspect-ratio: 1 / 1.414; object-fit: cover; border-radius: 3px; box-shadow: var(--shadow); transition: transform .6s var(--ease); }
.poster:hover img { transform: translateY(-8px) rotate(-1deg); }
.poster figcaption { margin-top: 14px; font: 400 .7rem/1.3 var(--f-wide); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

/* ==========================================================================
   06 ABOUT
   ========================================================================== */
.about {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(30px, 6vw, 110px);
  padding: clamp(90px, 12vw, 180px) var(--pad); max-width: var(--max); margin: 0 auto; align-items: start;
}
.about__portrait {
  position: relative; border-radius: 50%; overflow: hidden;
  aspect-ratio: 1 / 1; box-shadow: var(--shadow); background: var(--fog);
  outline: 2px solid var(--cobalt); outline-offset: 10px;
}
/* 'Mojca krog' photo: background removed, black & white, on the merch-page grey */
.about__portrait { width: min(100%, 420px); justify-self: center; background: var(--fog); outline-color: var(--cobalt); }
/* at the end of the page About + footer fill exactly one screen, with About's content in the vertical middle */
@media (min-width: 1025px) {
  .about { min-height: calc(100svh - 72px); padding-block: clamp(40px, 6vh, 90px); align-content: center; align-items: center; }
}
/* photo on the left, text on the right (wide screens; narrow ones stack, see the 1024px rule) */
@media (min-width: 1025px) {
  .about { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .about__portrait { grid-column: 1; grid-row: 1; align-self: center; }
  .about__body { grid-column: 2; grid-row: 1; }
}
.about__portrait img { width: 100%; height: 100%; object-fit: cover; }

/* last page in the same world as the first: blue, cream type, vermilion accents */
.about[data-bg="cobalt"] {
  max-width: none; padding-inline: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  background: linear-gradient(180deg, var(--cobalt) 50%, var(--night) 100%); color: var(--cream);
}
.about[data-bg="cobalt"] .about__portrait { outline-color: var(--vermilion); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); }
.about[data-bg="cobalt"] .label { color: var(--cream); }
.about[data-bg="cobalt"] .about__facts, .about[data-bg="cobalt"] .about__facts li { border-color: rgba(255, 248, 221, .22); }
.about[data-bg="cobalt"] .tools li { border-color: var(--cream); color: var(--cream); }
.footer[data-bg="cobalt"] { background: var(--night); color: var(--cream); }
.footer[data-bg="cobalt"] .footer__row { border-top-color: rgba(255, 248, 221, .22); }
.about__tools-label { margin-top: 30px; }
.about__facts { margin: 40px 0 0; border-top: 1px solid var(--line); }
.about__facts li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }

.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tools li {
  border: 1.5px solid var(--cobalt); color: var(--cobalt); border-radius: 999px; padding: 9px 16px;
  font: 400 .75rem/1 var(--f-wide); letter-spacing: .08em; text-transform: uppercase;
}
.tools--icons { gap: 18px; align-items: center; }
.tools--icons li { border: 0; padding: 0; text-transform: none; width: 44px; height: 44px; display: grid; place-items: center; }
.tools--icons svg { width: 100%; height: 100%; }
.tools--icons li[title="Figma"] svg { width: 70%; }
.tools em { font-style: normal; opacity: .6; margin-left: 6px; text-transform: none; letter-spacing: 0; font-family: var(--f-body); }

/* ==========================================================================
   07 FOOTER (right under About)
   ========================================================================== */
.footer { background: var(--fog); color: var(--cobalt); padding: 0 var(--pad) 32px; }
.footer__row {
  max-width: var(--max); margin: 0 auto; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; align-items: center;
  font: 400 .72rem/1.5 var(--f-wide); letter-spacing: .08em; text-transform: uppercase;
}
.footer__row a { text-decoration: none; }
.footer__row a:hover { color: var(--vermilion); }

/* ==========================================================================
   PANEL + LIGHTBOX
   ========================================================================== */
.panel { position: fixed; inset: 0; z-index: 140; visibility: hidden; }
.panel.is-open { visibility: visible; }
.panel__backdrop { position: absolute; inset: 0; background: rgba(18, 11, 56, .45); opacity: 0; transition: opacity .5s var(--ease); }
.panel.is-open .panel__backdrop { opacity: 1; }
.panel__sheet {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(640px, 92vw);
  background: var(--fog); padding: clamp(28px, 4vw, 52px); overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform .7s var(--ease);
}
.panel.is-open .panel__sheet { transform: none; }
.panel__close { position: absolute; right: 22px; top: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--cobalt); color: var(--cobalt); }
.panel__close:hover { background: var(--cobalt); color: var(--fog); }
.panel__title { font: 400 clamp(1.5rem, 3vw, 2.4rem)/1.1 var(--f-wide); text-transform: uppercase; color: var(--cobalt); padding-right: 50px; }
.panel__line { margin: 12px 0 26px; max-width: 46ch; }
.panel__gallery { display: grid; gap: 14px; }
.panel__step { font: 400 .68rem/1 var(--f-wide); letter-spacing: .16em; text-transform: uppercase; color: var(--vermilion); display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.panel__step svg { width: 34px; }
.panel__row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
.panel__row figure { position: relative; flex: 0 0 auto; }
.panel__row img { height: 300px; width: auto; border-radius: 4px; background: #fff; }

.lightbox { position: fixed; inset: 0; z-index: 145; background: rgba(18, 11, 56, .92); display: grid; place-items: center; padding: 5vh 5vw; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 90vh; width: auto; max-width: 100%; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox__close { position: absolute; right: 20px; top: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--cream); color: var(--cream); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .about { grid-template-columns: 1fr; }
  .about__portrait { max-width: 420px; grid-column: 1; grid-row: 1; }
  .about__body { grid-row: 2; }
}

@media (max-width: 600px) {
  .nav { grid-template-columns: 1fr auto; padding: 14px 16px; }
  .nav__links > a:not(.pill) { display: none; }

  .hero { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto auto 1fr; padding: 0 16px; }
  .hero__mega { margin-top: 0; font-size: 20.5vw; }
  .hero__kid { position: relative; left: auto; right: auto; bottom: auto; grid-row: 3; justify-self: center; margin: -9vw 0 0; width: 66vw; height: auto; }
  .hero__name { grid-row: 4; margin-top: 22px; max-width: none; }
  .hero__intro { grid-column: 1; grid-row: 5; justify-self: start; text-align: left; margin-top: 14px; max-width: 34ch; }



  .merch__stage { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .merch__item { position: relative; left: auto; top: auto; width: auto; }


  .screens { height: 220vh; }
  .phones .phone:not(.phone--mid) { display: none; }
  .phone { width: 62vw; }
  .phone--mid { translate: 0 0; }

  .feed { grid-template-columns: repeat(3, 1fr); }
  .feed__col:nth-child(4) { display: none; }
  .ig { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 20px; scrollbar-width: none; }
  .ig::-webkit-scrollbar { display: none; }
  .igphone { flex: 0 0 76vw; scroll-snap-align: center; }
  .igphone--app { flex-basis: 47vw; width: 47vw; }
  .igphone--feature { translate: 0 0; }
  .igphone__nav { opacity: 1; }

  .hscroll { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .hscroll::-webkit-scrollbar { display: none; }
  .poster { width: 70vw; scroll-snap-align: center; }

  .panel__sheet { top: auto; left: 0; width: 100%; max-height: 88svh; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .panel__row img { height: 220px; }
  .footer__row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .grain { animation: none; }
  .screens { height: auto; }
  .screens__pin { position: relative; height: auto; padding: 80px 0; }
}
