:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e4e4e1;
  --tile: #f4f4f2;
  --accent: #ff3b1f;
  --gutter: clamp(16px, 2.4vw, 32px);
  --max: 1600px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Switzer', 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }
button { font: inherit; color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* "En construcción" gate */
html:not(.unlocked) .top,
html:not(.unlocked) #app,
html:not(.unlocked) .contact { display: none; }
html.unlocked .gate { display: none; }
.gate { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: var(--gutter); }
.gate__box { text-align: center; max-width: 360px; width: 100%; }
.gate__title { font-size: clamp(32px, 6vw, 48px); margin: 8px 0 32px; }
.gate__form { display: flex; gap: 8px; }
.gate__form input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--ink); background: var(--bg); color: var(--ink); }
.gate__form button { padding: 12px 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; }
.gate__form button:hover { opacity: .85; }
.gate__error { color: var(--accent); margin-top: 12px; }
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.muted { color: var(--muted); }
.display { font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 62%; text-transform: uppercase; line-height: 0.86; letter-spacing: -0.015em; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; min-height: 44px; min-width: 44px; }
.link-btn:hover { color: var(--muted); }
.rule { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--ink); padding-top: 14px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.top__inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.top__name { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
.top__role { justify-self: center; }
.top__nav { grid-column: 3; justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; }
.top__nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* Big pixel-art wordmark — like the giant logo on iwonderu.se's home,
   scrolls away above the sticky header + hero text below it. */
.logo-mark { padding-top: clamp(32px, 6vw, 64px); text-align: left; }
.logo-mark img { width: clamp(220px, 34vw, 480px); height: auto; }

/* Home hero */
.hero-intro { padding-top: clamp(40px, 6vw, 72px); }
.hero-intro__text { margin: 0; max-width: 1100px; font-size: clamp(28px, 4.6vw, 64px); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }
.accent { font-family: 'Fraunces', serif; font-style: italic; font-weight: 450; letter-spacing: 0; }

/* Sequence (à la iwonderu.se) — one project per row, alternating
   left/right offset, each cover at its own natural ratio (never
   cropped). Only the item nearest the scroll trigger line is at full
   size (JS toggles transform/margin-bottom inline); the rest sit
   shrunk down, so the active one visibly grows and pushes the next
   item's content down as you scroll, instead of a plain reveal. */
.sequence { margin-top: clamp(56px, 8vw, 96px); display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); }
.seq__item { display: block; }
.seq__frame { position: relative; display: block; overflow: hidden; width: min(100%, 760px); background: var(--tile); transform: scale(0.62); transform-origin: left top; transition: transform .8s cubic-bezier(.16,.8,.2,1), margin-bottom .8s cubic-bezier(.16,.8,.2,1); will-change: transform; }
.seq__item:nth-child(even) .seq__frame { margin-left: auto; transform-origin: right top; }
.seq__frame img { display: block; width: 100%; height: auto; }
.seq__cap { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; width: min(100%, 760px); }
.seq__item:nth-child(even) .seq__cap { margin-left: auto; align-items: flex-end; text-align: right; }
.seq__line { display: block; border-top: 1px solid var(--line); padding-top: 8px; }
.seq__title { font-weight: 600; transition: color .2s; }
.seq__item:hover .seq__title { color: var(--accent); }
@media (max-width: 720px) { .seq__frame, .seq__cap { width: 100%; margin-left: 0; } .seq__item:nth-child(even) .seq__cap { align-items: flex-start; text-align: left; } }

/* Index */
.index { padding-top: clamp(72px, 9vw, 140px); }
.index__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.filters button { color: var(--muted); }
.filters button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.index__list { border-top: 1px solid var(--ink); }
.row { position: relative; display: grid; grid-template-columns: 48px minmax(0, 3fr) minmax(0, 2fr) 64px; align-items: baseline; gap: 16px; padding: 18px 8px; border-bottom: 1px solid var(--line); transition: background .2s, color .2s; }
.row:hover, .row:focus-visible { background: var(--ink); color: var(--bg); outline: none; z-index: 10; }
.row:hover .muted, .row:focus-visible .muted { color: #bdbdbd; }
.row__title { font-size: clamp(26px, 3.4vw, 52px); font-weight: 700; font-stretch: 70%; text-transform: uppercase; line-height: 1; }
.row__year { text-align: right; }
.row__thumb { position: absolute; right: 120px; top: 50%; width: auto; height: auto; max-width: 260px; max-height: 260px; object-fit: cover; box-shadow: 0 18px 40px rgba(0,0,0,.35); z-index: 2; pointer-events: none; opacity: 0; transform: translateY(-50%) scale(.92); transition: opacity .25s, transform .35s cubic-bezier(.2,.7,.2,1); }
.row:hover .row__thumb { opacity: 1; transform: translateY(-50%) scale(1); }

/* About */
.about { padding-top: clamp(72px, 9vw, 140px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px; }
.about p { margin: 0; grid-column: span 2; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.22; font-weight: 500; }

/* Project */
.project { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.project__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.project__pager { display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.project__title { margin: clamp(16px, 3vw, 40px) 0 0; font-size: clamp(60px, 12vw, 200px); }
.facts { margin-top: clamp(20px, 3vw, 36px); display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px 24px; padding: 14px 0; border-top: 1px solid var(--ink); }
.facts div { display: flex; flex-direction: column; gap: 4px; }
.hero { margin-top: 8px; position: relative; overflow: hidden; background: var(--tile); }
.hero img, .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro { margin-top: clamp(40px, 6vw, 96px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px 32px; }
.intro__lead { margin: 0; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.22; font-weight: 500; }
.intro__body { margin: 0; font-size: 17px; line-height: 1.55; color: #3a3a3a; }
.embed { margin-top: clamp(32px, 5vw, 64px); }
.embed--video { position: relative; aspect-ratio: 16 / 9; background: var(--tile); }
.embed--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed--spotify iframe { width: 100%; height: 152px; border: 0; border-radius: 12px; }
.gallery { margin-top: clamp(40px, 6vw, 96px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; gap: 8px; }
.shot { position: relative; overflow: hidden; background: var(--tile); }
.next { margin-top: clamp(64px, 9vw, 140px); width: 100%; padding: 14px 0 0; border: 0; border-top: 1px solid var(--ink); background: none; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.next__title { font-size: clamp(48px, 9vw, 150px); transition: color .25s; }
.next:hover .next__title { color: var(--accent); }

/* Contact */
.contact { padding-top: clamp(72px, 9vw, 140px); padding-bottom: 20px; }
.contact__mail { display: block; margin-top: clamp(16px, 2vw, 24px); font-size: 14px; overflow-wrap: anywhere; }
.contact__foot { margin-top: clamp(48px, 7vw, 96px); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.contact__links { display: flex; gap: 20px; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .hide-sm { display: none !important; }
  .row { grid-template-columns: 36px minmax(0, 1fr) 48px; }
  .row__thumb { display: none; }
  .gallery > * { grid-column: 1 / -1 !important; }
  .about p { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project { animation: none; }
  .seq__frame { transition: none; }
}
