/* ==========================================================================
   Lenka Vavrincová — portfolio
   One stylesheet for every page. Built from the Claude Design canvas
   (Portfolio + eight case studies): the design's inline styles live here as
   classes, plus the tablet / phone rules the canvas did not have.
   ========================================================================== */

/* ===== Tokens ===== */
:root {
  --bg: #f7f2ea;
  --paper: #fffdf7;
  --ink: #33302a;
  --ink-2: #60584d;
  --ink-3: #8a8073;
  --ink-4: #9a9084;
  --ink-5: #7c7568;
  --accent: #c98b82;
  --olive: #6f7150;
  --pa: #c0895a;          /* project accent on case pages */
  --pa-ink: #a06f42;
  --line: rgba(51, 48, 42, .12);

  --glass-bg: rgba(255, 253, 247, .55);
  --glass-border: rgba(255, 255, 255, .75);
  --glass-shadow: 0 18px 44px rgba(90, 70, 55, .1);

  --serif: 'Cormorant Garamond', serif;
  --sans: 'Karla', sans-serif;
  --script: 'Sacramento', cursive;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.2, .7, .2, 1);   /* row indent, tile lift */
  --gutter: clamp(18px, 5vw, 64px);
  --icon-gap: clamp(12px, 1.6vw, 22px);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(185, 138, 128, .28); color: var(--ink); }
a { color: var(--olive); text-decoration: none; }
a:hover { color: var(--ink); }
img, video { max-width: 100%; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper);
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* ===== Scroll reveal =====
   js/site.js adds .is-visible when a [data-reveal] block scrolls in
   (data-reveal-delay="ms" staggers siblings) and .is-revealing only while the
   fade runs, so hover transitions on the same element keep their own timing. */
.js [data-reveal]:not(.is-visible) { opacity: 0; transform: translateY(24px); }
.js [data-reveal].is-revealing { transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* ===== Layout ===== */
/* home: 1180px of content plus the gutters */
.wrap {
  max-width: 1180px;
  box-sizing: content-box;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
/* case pages: 1180px including the gutters */
.wrap--case { box-sizing: border-box; }

.shader {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.page { position: relative; z-index: 1; }

/* ===== Header =====
   <header class="site-header"> brand · <nav class="site-nav"> links · pill · button */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter);
  background: rgba(247, 242, 234, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(51, 48, 42, .08);
  transition: transform .38s var(--ease);
}
.site-header.is-hidden { transform: translateY(-110%); }
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 600; font-size: 23px; letter-spacing: .01em;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand img { display: block; height: 30px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.site-nav__link {
  font-size: 14px; letter-spacing: .02em; color: var(--ink-2);
  transition: color .25s;
}
.site-nav__link:hover, .site-nav__link.is-active { color: var(--ink); }
.avail {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; letter-spacing: .03em; color: var(--ink-5);
}
.avail__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--olive);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.82); }
}

@media (max-width: 760px) {
  .site-nav__link:not(.site-nav__link--keep), .avail { display: none; }
}
@media (max-width: 480px) {
  .site-nav .btn--wide-only { display: none; }
}
@media (max-width: 400px) {
  .brand { font-size: 19px; gap: 10px; }
  .brand img { height: 26px; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffdf7;
  font-weight: 600; font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), filter .25s,
              border-color .3s, background .3s;
}
.btn:hover {
  color: #fffdf7;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(51, 48, 42, .2);
  filter: brightness(1.04);
}
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--sm:hover { box-shadow: 0 8px 20px rgba(51, 48, 42, .18); }
.btn--ghost {
  padding: 14px 26px;
  background: transparent;
  border: 1px solid rgba(51, 48, 42, .22);
  color: var(--ink);
}
.btn--ghost:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(185, 138, 128, .08);
  box-shadow: none;
  filter: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ===== Shared bits ===== */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 247, .85);
  border: 1px solid rgba(51, 48, 42, .08);
  font-size: 13.5px; color: var(--ink);
  transition: color .2s ease, border-color .2s ease;
}
.toolbox .chip:hover { color: var(--accent); border-color: var(--accent); }
.label {
  font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-2);
}
.label--accent { color: var(--accent); }
.label--olive { color: var(--olive); }

/* ==========================================================================
   HOME
   ========================================================================== */

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: clamp(120px, 16vh, 168px) var(--gutter) clamp(48px, 8vh, 88px);
  overflow: hidden;
}
/* the ring sits in .hero__art with the photo: sized and placed in % of the photo
   (at 1280px: 520px circle, 100px left of and 55px above the 400x500 photo) */
.hero__art { position: relative; justify-self: center; }
.hero__ring {
  position: absolute; top: -11%; left: -25%;
  width: 130%; aspect-ratio: 1;
  border: 1px solid rgba(185, 138, 128, .35); border-radius: 50%;
  pointer-events: none;
}
.hero__glow {
  position: absolute; bottom: -8%; left: -6%;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 113, 80, .10), transparent 68%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.hero__hello {
  font-family: var(--script); font-size: clamp(30px, 4vw, 42px);
  color: var(--accent); line-height: 1; margin-bottom: 6px;
}
.hero__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(48px, 8vw, 92px); line-height: 1.02; letter-spacing: -.01em;
  margin: 0 0 18px; color: var(--ink);
}
.hero__role {
  font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 26px;
}
.hero__lead {
  max-width: 500px;
  font-size: clamp(16px, 1.8vw, 18px); line-height: 1.75; color: var(--ink-2);
  margin: 0 0 34px;
}
.hero__portrait {
  position: relative;
  animation: portraitIn 1s var(--ease) both, softfloat 7s ease-in-out 1s infinite;
}
.hero__sparkle {
  position: absolute; top: -18px; left: -10px; z-index: 1;
  width: 34px; height: 34px; color: var(--accent);
  animation: sparkleIn .6s cubic-bezier(.34, 1.56, .64, 1) .95s both;
}
.hero__frame {
  width: min(400px, 82vw); aspect-ratio: 4 / 5;
  border-radius: 210px 210px 26px 26px; overflow: hidden;
  border: 1px solid rgba(51, 48, 42, .1);
  box-shadow: 0 30px 60px rgba(90, 70, 55, .16);
  transform: translateZ(0);
  transition: transform .5s var(--ease);
}
.hero__frame:hover { transform: scale(1.02) rotate(-1deg); }
.hero__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

@keyframes softfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes portraitIn { from { opacity: 0; transform: translateY(26px) scale(.93); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes sparkleIn { 0% { opacity: 0; transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.25) rotate(8deg); } 100% { opacity: 1; transform: scale(1) rotate(0deg); } }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__frame { width: min(340px, 82vw); }
}

/* ===== Disciplines (what I do) ===== */
.disciplines {
  padding-top: clamp(36px, 6vh, 64px);
  padding-bottom: clamp(16px, 2vh, 28px);
}
.disciplines__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
}
.discipline {
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px 24px 26px;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, .7);
  box-shadow: 0 14px 36px rgba(90, 70, 55, .1);
  transition: transform .34s var(--ease-out), box-shadow .3s ease;
}
.discipline:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(90, 70, 55, .15); }
.discipline__text {
  font-size: 16px; line-height: 1.6; color: var(--ink); text-wrap: pretty;
}

/* ===== Section head =====
   <div class="sec-head"> <div class="sec-head__title"><span num><h2></div> <span aside> */
.sec-head {
  padding-top: clamp(40px, 6vh, 72px);
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.sec-head--spaced { padding-top: clamp(56px, 9vh, 104px); }
.sec-head__title { display: flex; align-items: baseline; gap: 14px; }
.sec-head__num { font-size: 14px; letter-spacing: .06em; color: var(--accent); }
.sec-head__title h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 4vw, 46px); letter-spacing: -.01em; color: var(--ink);
}
.sec-head__aside { font-size: 14.5px; color: var(--ink-2); }

/* ===== Product cards ===== */
.proj-grid {
  padding-top: clamp(24px, 4vh, 40px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
}
.proj-card {
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.proj-card:hover {
  color: var(--ink);
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(90, 70, 55, .16);
  border-color: rgba(185, 138, 128, .55);
}
.cover-swap {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid rgba(51, 48, 42, .08);
}
.cover-swap img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s var(--ease);
}
.cover-swap .cover-swap__hover {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .45s ease;
  pointer-events: none;
}
.proj-card:hover .cover-swap img { transform: scale(1.06); }
.proj-card:hover .cover-swap__hover { opacity: 1; }
.proj-card__body {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px 26px 26px; flex: 1;
}
.proj-card__meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
}
.proj-card__num { color: var(--accent); }
.proj-card__rule { width: 24px; height: 1px; background: rgba(51, 48, 42, .25); }
.proj-card__cat { color: var(--ink-2); }
.proj-card__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 2.6vw, 34px); line-height: 1.1;
}
.proj-card__text {
  flex: 1; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; text-wrap: pretty;
}
.proj-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 6px;
}
.proj-card__cta { position: relative; font-size: 15px; font-weight: 600; color: var(--accent); }
.proj-card__cta::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 1px; background: currentColor;
  transition: width .4s var(--ease);
}
.proj-card:hover .proj-card__cta::after { width: 100%; }
.proj-card__arrow { display: inline-block; transition: transform .35s var(--ease); }
.proj-card:hover .proj-card__arrow { transform: translateX(6px); }
.proj-card__year { font-size: 14px; color: var(--ink-2); }

/* ===== Game UI list ===== */
.game-wrap {
  padding-top: clamp(24px, 4vh, 40px);
  padding-bottom: clamp(30px, 5vh, 60px);
}
.game-list {
  display: flex; flex-direction: column;
  padding: clamp(10px, 1.6vw, 22px);
}
.game-row {
  display: grid;
  grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) minmax(0, 1.5fr) auto auto;
  grid-template-areas: "thumb title text year arrow";
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  transition: background .3s, padding-left .3s var(--ease-out);
}
.game-row:last-child { border-bottom: 0; }
.game-row:hover { color: var(--ink); background: rgba(255, 253, 247, .6); padding-left: 24px; }
.game-row__thumb {
  grid-area: thumb;
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .8);
  transition: transform .45s var(--ease);
}
.game-row:hover .game-row__thumb { transform: scale(1.05); }
.game-row__title {
  grid-area: title;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15;
}
.game-row__text { grid-area: text; color: var(--ink-2); font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.game-row__year { grid-area: year; font-size: 14px; color: var(--ink-2); }
.game-row__arrow { grid-area: arrow; color: var(--accent); font-size: 18px; transition: transform .35s var(--ease); }
.game-row:hover .game-row__arrow { transform: translateX(6px); }

@media (max-width: 760px) {
  .game-row {
    grid-template-columns: minmax(84px, 120px) minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb title year"
      "thumb text  text";
    align-items: start;
    row-gap: 6px;
    padding: 16px 8px;
  }
  .game-row:hover { padding-left: 16px; }
  .game-row__text { font-size: 14px; line-height: 1.5; }
  .game-row__year { font-size: 13px; padding-top: 4px; }
  .game-row__arrow { display: none; }
}

/* ===== About =====
   head · <div class="about__row"> photo | text (claim, para, facts) · toolbox panel */
.about { padding-top: clamp(56px, 9vh, 104px); }
.about__row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(28px, 5vw, 64px);
  margin-top: clamp(24px, 4vh, 40px);
}
.about__photo { flex: 0 1 280px; min-width: 220px; margin: 0 auto; }
.about__frame {
  aspect-ratio: 4 / 5;
  border-radius: 22px 22px 140px 140px; overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 44px rgba(90, 70, 55, .14);
  transition: transform .5s var(--ease);
}
.about__frame:hover { transform: scale(1.02) rotate(1deg); }
.about__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about__body { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about__claim {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(26px, 3vw, 38px); line-height: 1.2; color: var(--ink); text-wrap: pretty;
}
.about__text {
  color: var(--ink-2); font-size: 16px; line-height: 1.75; max-width: 600px; text-wrap: pretty;
}
.facts { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 56px); margin-top: 12px; }
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact__label { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.fact__value {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 3vw, 38px); line-height: 1; color: var(--ink);
}

.toolbox {
  margin-top: clamp(32px, 5vh, 56px);
  padding: clamp(20px, 2.6vw, 28px) clamp(22px, 3vw, 32px);
  display: flex; flex-wrap: wrap; align-items: flex-start;
  column-gap: clamp(32px, 5vw, 72px); row-gap: 18px;
}
.toolbox > .label { flex-basis: 100%; }
.toolbox__group { display: flex; flex-direction: column; gap: 10px; }
.toolbox__title { font-size: 14.5px; font-weight: 600; color: var(--ink); }

/* ===== Contact ===== */
.contact {
  padding-top: clamp(56px, 10vh, 120px);
  padding-bottom: clamp(56px, 10vh, 120px);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(20px, 3vh, 32px);
}
.contact__mail {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(22px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.05;
  color: var(--ink); overflow-wrap: anywhere;
  transition: color .3s;
}
.contact__mail:hover { color: var(--accent); }
.contact__links { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 40px); font-size: 15.5px; }
.contact__links a { color: var(--ink-2); transition: color .3s; }
.contact__links a:hover { color: var(--accent); }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid rgba(51, 48, 42, .1); }
.site-footer__inner {
  padding-top: 26px; padding-bottom: 26px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
}
.site-footer__copy { font-size: 14px; color: var(--ink-2); }
.site-footer__name { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.site-footer__note { font-size: 13px; color: var(--ink-4); }
.site-footer__top { font-size: 13px; letter-spacing: .04em; color: var(--ink-2); transition: color .25s; }
.site-footer__top:hover { color: var(--accent); }

/* ==========================================================================
   CASE STUDIES
   ========================================================================== */

.case-top { padding-top: 118px; }
.case-top__label {
  font-size: 12.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
}
.case { padding-top: clamp(28px, 5vh, 64px); padding-bottom: clamp(28px, 5vh, 64px); }
.case--flush { padding-top: 0; }

/* ===== Case header =====
   <div class="case-head"> <div> numline · h1 · sub · meta · intro · decisions · outcome </div> <div class="case-art"> */
.case-head {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: clamp(28px, 5vw, 72px); align-items: center;
  margin-bottom: clamp(24px, 3.5vw, 44px);
}
.numline { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.numline__num { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--pa); }
.numline__rule { flex: 1; height: 1px; background: rgba(51, 48, 42, .14); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(192, 137, 90, .12);
  border: 1px solid rgba(192, 137, 90, .4);
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--pa-ink); white-space: nowrap;
}
.pill__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--pa);
  animation: chip-blink 1.6s steps(1, end) infinite;
}
@keyframes chip-blink {
  0%, 45%   { opacity: 1; }
  55%, 100% { opacity: .15; }
}
.case-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.01em;
  margin: 0 0 8px; color: var(--ink);
}
.case-sub {
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px;
}
.meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px;
  margin: 0 0 22px;
}
.meta__label {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--pa); margin-bottom: 5px;
}
.meta__value { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.case-intro { color: var(--ink-2); font-size: 15.5px; line-height: 1.72; margin: 0 0 22px; }
.kd-label {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 5px;
}
.kd-list {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 9px;
}
.kd-list li { display: flex; gap: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.kd-list li::before {
  content: ""; flex: none;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--pa); margin-top: 9px;
}
.kd-list strong { color: var(--ink); }
.outcome { margin: 20px 0 0; color: var(--ink); font-size: 15px; line-height: 1.6; }
.case-art { justify-self: center; width: min(320px, 72vw); }
.case-art__box { aspect-ratio: 1; border-radius: 26px; overflow: hidden; }
.case-art__box img { display: block; width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 900px) {
  .case-head { grid-template-columns: 1fr; }
  .case-art { order: -1; width: min(240px, 60vw); }
}
@media (max-width: 420px) {
  .meta { grid-template-columns: 1fr; }
}

/* ===== Figures & grids ===== */
.fig { transition: transform .35s var(--ease); }
.fig:hover { transform: translateY(-4px); }
.fig--still:hover { transform: none; }
.fig > img { display: block; width: 100%; height: auto; border-radius: 16px; }
.fig__frame { border-radius: 16px; overflow: hidden; }
.fig__frame--phone { border-radius: 18px; }
.fig__frame > img, .fig__frame > video { display: block; width: 100%; height: auto; }
/* fixed-ratio frame: the ratio comes from an inline aspect-ratio */
.fig__frame--fit > img { height: 100%; object-fit: cover; }
.fig__frame--video { aspect-ratio: 16 / 9; }
.fig__frame--video > video { height: 100%; object-fit: cover; }
/* trims the dev-build watermark strip off the bottom of a capture */
.fig__frame--trim > video {
  width: 106.93%; max-width: none; height: auto;
  margin-left: -3.465%;
}
.fig__cap { font-size: 11px; color: var(--ink-4); margin-top: 8px; text-align: center; }
.fig__cap--accent { color: var(--pa); }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.grid--gap-lg { gap: clamp(12px, 1.6vw, 20px); }
.grid--promo { gap: 18px; }
.grid + .grid { margin-top: 16px; }
.grid--align-start { align-items: start; }

@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid--2 { grid-template-columns: 1fr; }
}

/* ===== Blocks ===== */
.block { margin-top: clamp(28px, 4vh, 44px); }
.block--first { margin-top: 0; }
.block__label {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 12px;
}
.block__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.block__head .block__label { margin-bottom: 0; }
.block__rule { flex: 1; height: 1px; background: var(--line); }
.block__count { font-size: 11px; letter-spacing: .06em; color: var(--ink-4); }
.block__note {
  color: var(--ink-2); font-size: 15.5px; line-height: 1.72;
  margin: 0 0 20px; max-width: 66ch;
}
.block__cap { font-size: 11px; color: var(--ink-4); margin: 8px 0 0; text-align: center; }

/* paper panel: RnD buttons / icons */
.paper {
  background: var(--paper);
  border: 1px solid rgba(51, 48, 42, .1);
  border-radius: 16px;
  padding: clamp(14px, 1.8vw, 20px);
}
.paper img { display: block; width: 100%; height: auto; border-radius: 10px; }

/* ===== Foundations: type scale + colour ===== */
.found { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
.found__panel { padding: clamp(18px, 2.5vw, 28px); }
.found__title {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 12px;
}
.type-row {
  display: grid; grid-template-columns: 1.6fr .5fr .9fr 1fr; gap: 10px;
  padding: 11px 0; border-top: 1px solid rgba(51, 48, 42, .09);
  font-size: 14px; color: var(--ink-2); align-items: baseline;
}
.type-row--head {
  padding: 0 0 9px; border-top: 0;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4);
}
.type-row__name { color: var(--ink); font-weight: 600; }
.type-row__font { font-style: italic; font-family: var(--serif); font-size: 16px; }
.type-row--jakarta .type-row__name, .type-row--jakarta .type-row__font { font-family: 'Plus Jakarta Sans', sans-serif; }
.type-row--jakarta .type-row__font { font-style: normal; font-size: 14px; }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatch {
  border-radius: 12px; padding: 13px 14px; min-height: 76px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #f2f0ea;
}
.swatch--light { color: var(--ink); border: 1px solid rgba(51, 48, 42, .1); }
.swatch__name { font-size: 12.5px; font-weight: 600; }
.swatch__hex { font-size: 11px; letter-spacing: .04em; opacity: .75; }
/* hex-only swatches: the code sits bottom-left, full strength */
.swatches--hex .swatch { justify-content: flex-end; }
.swatches--hex .swatch__hex { font-size: 12.5px; font-weight: 600; opacity: 1; }

@media (max-width: 860px) {
  .found { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .type-row { grid-template-columns: 1.4fr .5fr .8fr 1fr; gap: 6px; font-size: 13px; }
}

/* ===== Pulse: user flow + prototype =====
   <div class="flow"> label · <a class="flow__link" data-lightbox> diagram on the page background
   <div class="proto"> text (label, title, intro, <ol class="steps">) | <div class="proto__media"><div class="phone"><video>
   The text sets the row height; the phone fills that height exactly (top at the
   label, bottom at the last step's rule) and takes its width from the 9:19.5 ratio. */
.flow { margin-bottom: clamp(28px, 4vh, 44px); }
.flow .found__title { margin-bottom: 16px; }
.flow__link { display: block; cursor: zoom-in; }
.flow__link img { display: block; width: 100%; height: auto; transition: opacity .2s ease; }
.flow__link:hover img { opacity: .88; }

.proto {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 72px); align-items: stretch;
  padding: clamp(8px, 1.5vw, 16px) 0;
  margin-bottom: 16px;
}
.proto__text { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.proto__text .found__title { margin-bottom: 0; }
.proto__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(24px, 2.8vw, 32px); color: var(--ink);
}
.proto__intro { color: var(--ink-2); font-size: 15px; line-height: 1.65; margin: 0 0 12px; text-wrap: pretty; }
.steps { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid rgba(51, 48, 42, .1); }
.steps li {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px;
  padding: 16px 0; border-top: 1px solid rgba(51, 48, 42, .1);
}
.steps__num { font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--pa); }
.steps__body { display: flex; flex-direction: column; gap: 3px; }
.steps__body strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.steps__body span { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.proto__media { position: relative; }
.phone {
  position: absolute; top: 0; left: 50%;
  height: 100%; width: auto; aspect-ratio: 9 / 19.5;
  transform: translateX(-50%);
  border-radius: 34px; overflow: hidden;
  background: #33302a; border: 6px solid #33302a;
  box-shadow: 0 18px 40px rgba(51, 48, 42, .18);
}
.phone video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* stacked on phones: the text no longer sits beside it, so the phone gets its own size */
@media (max-width: 760px) {
  .proto { grid-template-columns: 1fr; }
  .proto__media { position: static; }
  .phone { position: static; transform: none; height: auto; width: min(300px, 70vw); margin: 0 auto; }
}

/* ===== Prev / next ===== */
.pager { padding-top: clamp(28px, 5vh, 56px); padding-bottom: clamp(28px, 5vh, 56px); }
.pager__inner {
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.pager__link { display: flex; flex-direction: column; gap: 4px; transition: transform .3s var(--ease); }
.pager__link:hover { transform: translateX(-4px); }
.pager__link--next { text-align: right; }
.pager__link--next:hover { transform: translateX(4px); }
.pager__label { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); }
.pager__title { font-family: var(--serif); font-size: 21px; color: var(--ink); }

/* ==========================================================================
   Page-specific pieces
   ========================================================================== */

/* ===== Sweet Farm: dark art-direction band =====
   <section class="dark"> head (kicker, title | text) · icon sets · UI elements tile */
.dark {
  background: #2b2621; color: #f2ece2;
  padding: clamp(56px, 8vw, 104px) var(--gutter);
  margin-top: clamp(28px, 4vw, 56px);
}
.dark__inner { max-width: 1180px; margin: 0 auto; }
.dark__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: clamp(24px, 5vw, 80px); align-items: end;
  margin-bottom: clamp(32px, 5vw, 60px);
}
.dark__kicker {
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--pa); margin-bottom: 14px;
}
.dark__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 5vw, 60px); line-height: 1.02; letter-spacing: -.02em;
  color: #f7f2ea;
}
.dark__text { color: rgba(242, 236, 226, .62); font-size: 15.5px; line-height: 1.7; }
.dark__block + .dark__block { margin-top: clamp(36px, 5vw, 64px); }
.dark__sub { display: flex; align-items: baseline; gap: 12px; margin-bottom: clamp(16px, 2vw, 22px); }
.dark__label { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: #e8dfd2; }
.dark__rule { flex: 1; height: 1px; background: rgba(255, 255, 255, .12); }
.dark__note { font-size: 11px; letter-spacing: .06em; color: rgba(242, 236, 226, .4); }
.tile {
  border-radius: 16px; overflow: hidden;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.tile--icon { aspect-ratio: 1; }
.tile--icon:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 1px rgba(192, 137, 90, .5), 0 14px 30px rgba(0, 0, 0, .35);
}
.tile--icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tile--wide { padding: clamp(12px, 2vw, 24px); }
.tile--wide:hover { box-shadow: inset 0 0 0 1px rgba(192, 137, 90, .5), 0 16px 34px rgba(0, 0, 0, .32); }
.tile--wide img { display: block; width: 100%; height: auto; }

/* in-game icons (4 columns) beside shop icons (2 columns): the 4-column group
   takes 2/3 of the row minus a third of the gap, so every tile is the same size */
.icon-sets { display: flex; gap: var(--icon-gap); }
.icon-sets__group { min-width: 0; }
.icon-sets__group--4 { flex: 0 0 calc(66.667% - var(--icon-gap) / 3); }
.icon-sets__group--2 { flex: 1 1 0; }
.icon-sets .dark__sub { flex-wrap: wrap; row-gap: 4px; }
.icon-grid { display: grid; gap: var(--icon-gap); }
.icon-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.icon-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 860px) {
  .dark__head { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .icon-sets { flex-direction: column; gap: clamp(28px, 6vw, 40px); }
  .icon-sets__group--4 { flex-basis: auto; }
  .icon-grid--2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===== Highway Heroes ===== */
.states {
  margin-top: 16px; padding: 14px;
  border-radius: 16px; overflow: hidden;
  background: rgba(93, 101, 95, .35);
}
.states img { display: block; width: 100%; height: auto; }
.divider { border-top: 1px solid var(--line); margin-bottom: clamp(28px, 4vw, 48px); }
.intro-block { max-width: 640px; margin-bottom: clamp(20px, 3vw, 36px); }
.intro-block__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(24px, 3vw, 34px); color: var(--ink); margin: 0 0 10px;
}
.intro-block__text { color: var(--ink-2); font-size: 15.5px; line-height: 1.72; }
.wide-img { border-radius: 16px; overflow: hidden; }
.wide-img img { display: block; width: 100%; height: auto; }
.res-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.res { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(90, 70, 55, .1); }
.res__swatch { height: 64px; }
.res__body { padding: 12px 14px 14px; }
.res__name {
  font-size: 13.5px; font-weight: 700; color: #3d4258; letter-spacing: .02em;
  font-variant: small-caps; text-transform: lowercase;
}
.res__hex { font-size: 11.5px; color: #6b7086; margin-top: 2px; }
.res__hex:first-of-type { margin-top: 6px; }
.res-grid + .block__cap { margin-bottom: 22px; }

@media (max-width: 860px) {
  .res-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Cesta SNP ===== */
.center-img { width: min(720px, 100%); margin: 0 auto; }
.center-img img { display: block; width: 100%; height: auto; }

/* ===== Graphic projects ===== */
.invite {
  display: grid; grid-template-columns: auto auto;
  gap: clamp(18px, 3vw, 32px); justify-content: center; align-items: center;
}
.invite__front { width: min(300px, 80vw); }
.invite__details { width: min(420px, 90vw); }
.invite img { display: block; width: 100%; height: auto; border-radius: 16px; }
.website { width: min(480px, 100%); margin: 0 auto; }
.website img { display: block; width: 100%; height: auto; border-radius: 16px; }
.section-gap { margin-bottom: clamp(32px, 5vw, 56px); }

@media (max-width: 760px) {
  .invite { grid-template-columns: 1fr; justify-items: center; }
}

/* ===== Lightbox =====
   built by js/site.js for any <a data-lightbox href="full image">: the picture opens
   over the page, fitted to the window; click it to see it at full size and scroll
   around, × / Esc / a click on the backdrop closes it. */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(247, 242, 234, .97);   /* no backdrop-filter: it would pin the fixed × to the scrolling overlay */
  overflow: auto;
  opacity: 0; transition: opacity .2s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox__img {
  display: block;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  cursor: zoom-in;
}
/* zoomed: natural size, the overlay scrolls */
.lightbox.is-zoomed { align-items: flex-start; justify-content: flex-start; }
.lightbox.is-zoomed .lightbox__img { max-width: none; max-height: none; margin: auto; cursor: zoom-out; }
.lightbox__close {
  position: fixed; top: 16px; right: 16px; z-index: 1;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(51, 48, 42, .18);
  background: var(--paper); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 18px rgba(90, 70, 55, .12);
  transition: border-color .2s ease, color .2s ease, transform .3s var(--ease);
}
.lightbox__close:hover { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); }
html.has-lightbox { overflow: hidden; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js [data-reveal]:not(.is-visible) { opacity: 1; transform: none; }
}
