/* Bálint Klinger, video portfolio.
   Look: taken from the reference video's style bible. Near-black teal, warm paper, and
   tungsten amber as the only colour that glows; amber marks every action and focus.
   Shapes: media frames 20px, phones 38px like a real device, anything you can press is a pill.
   Layers (z-index): nav 20, film grain 30, skip link 40. Nothing else stacks globally. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0d0e;
  --bg-raised: #11171a;
  --bg-sunk: #060808;
  --line: rgb(239 230 216 / 0.12);
  --line-strong: rgb(239 230 216 / 0.24);
  --ink: #efe6d8;
  --ink-2: rgb(239 230 216 / 0.74);
  --ink-3: rgb(239 230 216 / 0.58);
  --amber: #ffae52;
  --amber-hover: #ffbe74;
  --on-amber: #0a0d0e;
  --r-media: 20px;
  --r-phone: 38px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--amber); color: var(--on-amber); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.fine { font-size: 0.875rem; line-height: 1.55; color: var(--ink-3); }

/* Film grain, like the reel: fixed, never repainted on scroll, never catches a click. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.skip { position: fixed; left: 16px; top: -80px; z-index: 40; padding: 10px 16px; border-radius: 999px; background: var(--amber); color: var(--on-amber); font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  font-stretch: 106%;
  white-space: nowrap;
  transition: background-color 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--amber); color: var(--on-amber); }
.btn-primary:hover { background: var(--amber-hover); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: rgb(239 230 216 / 0.06); box-shadow: inset 0 0 0 1px var(--ink-3); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 0.94rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  background: rgb(10 13 14 / 0.78);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nav { background: var(--bg); } }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { font-size: 1.05rem; font-weight: 700; font-stretch: 116%; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { margin-left: 8px; font-weight: 450; font-stretch: 100%; letter-spacing: 0; color: var(--ink-3); }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 0.95rem; color: var(--ink-2); }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav .btn { flex: none; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 420px) { .brand span { display: none; } }

/* ---------- hero: the reference video ---------- */
.hero { position: relative; padding-block: clamp(28px, 5vh, 64px) clamp(72px, 9vw, 128px); overflow: clip; }
.hero::before {
  /* the reel's motif: one warm point of light behind the work */
  content: "";
  position: absolute;
  top: -18%;
  right: -12%;
  width: min(72vw, 1100px);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgb(255 174 82 / 0.1), transparent 72%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr);
  grid-template-areas: "head head" "reel side";
  gap: 28px clamp(24px, 3.2vw, 56px);
  align-items: end;
}
.hero-head { grid-area: head; }
.eyebrow { margin-bottom: 14px; font-size: 0.8rem; font-weight: 600; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
h1 { font-size: clamp(2.6rem, 5.6vw, 5rem); font-weight: 760; font-stretch: 118%; line-height: 1; letter-spacing: -0.028em; text-wrap: balance; }
.w { display: inline-block; }
.reel {
  grid-area: reel;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--bg-sunk);
  box-shadow: 0 0 0 1px var(--line), 0 40px 100px -40px rgb(0 0 0 / 0.9);
}
.reel-poster { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
.reel-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.reel-poster:hover img { transform: scale(1.02); }
.reel-play {
  position: absolute;
  right: clamp(16px, 2.4vw, 32px);
  bottom: clamp(16px, 2.4vw, 32px);
  width: clamp(60px, 6vw, 88px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: 0 0 0 10px rgb(255 174 82 / 0.16);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.reel-play .i { width: 36%; height: 36%; margin-left: 6%; }
.reel-poster:hover .reel-play { transform: scale(1.06); box-shadow: 0 0 0 16px rgb(255 174 82 / 0.12); }
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hero-side { grid-area: side; display: grid; gap: 24px; padding-bottom: 4px; }
.hero-side p { max-width: 32ch; font-size: clamp(1.05rem, 1.25vw, 1.2rem); color: var(--ink-2); }
@media (max-width: 899px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "reel" "side"; }
  .hero-side p { max-width: 46ch; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 9vw, 136px); border-top: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(44px, 6vw, 88px); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.75rem); font-weight: 740; font-stretch: 116%; line-height: 1.02; letter-spacing: -0.024em; text-wrap: balance; }
.section-head > p:not(.fine) { margin-top: 20px; max-width: 58ch; font-size: clamp(1.05rem, 1.25vw, 1.2rem); color: var(--ink-2); }
.section-head .fine { margin-top: 12px; }

/* ---------- the four ads ---------- */
.ads { display: grid; gap: clamp(64px, 7vw, 104px) clamp(40px, 5vw, 72px); }
@media (min-width: 1360px) { .ads { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ad { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 34rem); gap: clamp(24px, 3vw, 44px); align-items: center; }
@media (min-width: 1360px) { .ad { grid-template-columns: minmax(0, 268px) minmax(0, 1fr); } }
@media (max-width: 679px) { .ad { grid-template-columns: minmax(0, 1fr); } }

.phone {
  width: 100%;
  max-width: 340px;
  padding: 7px;
  border-radius: var(--r-phone);
  background: linear-gradient(155deg, #283134, #0d1113 55%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 0 0 1px rgb(0 0 0 / 0.6), 0 50px 90px -45px rgb(0 0 0 / 0.95);
  transition: transform 0.5s var(--ease-out);
}
.ad:hover .phone { transform: translateY(-4px); }
.screen {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: calc(var(--r-phone) - 7px);
  overflow: hidden;
  isolation: isolate;
  background: #000;
  cursor: pointer;
}
.screen video { width: 100%; height: 100%; object-fit: cover; }

.big-play {
  position: absolute;
  left: calc(50% - 32px);
  bottom: 8%;
  z-index: 2;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: 0 0 0 8px rgb(255 174 82 / 0.22), 0 12px 30px rgb(0 0 0 / 0.35);
  transition: opacity 0.25s, transform 0.3s var(--ease-out);
}
.big-play .i { width: 26px; height: 26px; }
.big-play .ico-play { margin-left: 3px; }
.screen:hover .big-play { transform: scale(1.06); }
.ad[data-state="playing"] .big-play { opacity: 0; transform: scale(0.85); pointer-events: none; }
.big-play .ico-replay, .ad[data-state="ended"] .big-play .ico-play { display: none; }
.ad[data-state="ended"] .big-play .ico-replay { display: block; }

.bar {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 32px 10px 10px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.62), transparent);
  transition: opacity 0.3s;
}
.ad[data-state="idle"] .bar { opacity: 0; visibility: hidden; }
.ctl { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgb(0 0 0 / 0.3); transition: background-color 0.2s; }
.ctl:hover { background: rgb(0 0 0 / 0.55); }
.ctl .i { width: 16px; height: 16px; }
.toggle .ico-pause, .ad[data-state="playing"] .toggle .ico-play { display: none; }
.ad[data-state="playing"] .toggle .ico-pause { display: block; }
.mute .ico-muted, .mute[aria-pressed="true"] .ico-sound { display: none; }
.mute[aria-pressed="true"] .ico-muted { display: block; }

.seek { --p: 0%; flex: 1; min-width: 0; height: 24px; margin: 0 4px; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.seek::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, var(--amber) var(--p), rgb(255 255 255 / 0.35) var(--p)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 0; border-radius: 50%; background: var(--amber); }
.seek::-moz-range-track { height: 3px; border-radius: 3px; background: rgb(255 255 255 / 0.35); }
.seek::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--amber); }
.seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--amber); }
.seek:focus-visible { outline-offset: 0; }

.ad-notes { min-width: 0; }
.ad-notes h3 { font-size: clamp(1.5rem, 2.1vw, 1.9rem); font-weight: 720; font-stretch: 114%; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; }
.ad-meta { display: flex; flex-wrap: wrap; row-gap: 2px; margin-top: 10px; font-size: 0.9rem; color: var(--ink-3); }
/* the separator trails its item, so a wrapped line never starts with a slash */
.ad-meta span:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--line-strong); }

.hooks {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
  padding: 4px;
  border-radius: 999px;
  background: rgb(239 230 216 / 0.05);
  box-shadow: inset 0 0 0 1px var(--line);
}
.hooks .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--amber); transition: transform 0.4s var(--ease-out); }
.ad[data-hook="b"] .hooks .thumb { transform: translateX(100%); }
.hooks button { position: relative; min-width: 96px; height: 36px; padding: 0 18px; border-radius: 999px; font-size: 0.92rem; font-weight: 600; font-stretch: 108%; color: var(--ink-2); transition: color 0.25s; }
.hooks button[aria-pressed="true"] { color: var(--on-amber); }
.hooks button[aria-pressed="false"]:hover { color: var(--ink); }
.hookline { min-height: 3em; margin-top: 14px; font-size: 1.06rem; font-weight: 500; line-height: 1.45; color: var(--ink); }
.hookline span { display: block; }
.hookline span[hidden] { display: none; }

.ad-notes dl { display: grid; gap: 16px; margin-top: 22px; }
.ad-notes dt { font-size: 0.75rem; font-weight: 600; font-stretch: 110%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.ad-notes dd { margin-top: 4px; font-size: 0.98rem; line-height: 1.5; color: var(--ink-2); }
.dl { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 0.9rem; color: var(--ink-3); transition: color 0.2s; }
.dl:hover { color: var(--ink); }

/* ---------- research ---------- */
.research-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.research-head { position: sticky; top: calc(var(--nav-h) + 40px); }
.research-head > p:not(.fine) { margin-top: 20px; max-width: 40ch; font-size: clamp(1.05rem, 1.25vw, 1.2rem); color: var(--ink-2); }
.research-head .fine { max-width: 46ch; margin-top: 20px; }
.finding { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; padding-block: 30px; border-top: 1px solid var(--line); }
.finding:first-child { padding-top: 0; border-top: 0; }
.finding h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 700; font-stretch: 112%; line-height: 1.15; letter-spacing: -0.012em; }
.finding p { grid-column: 1; max-width: 52ch; color: var(--ink-2); }
.tag {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  font-stretch: 106%;
  white-space: nowrap;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: color 0.2s, box-shadow 0.2s;
}
.tag:hover { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
@media (max-width: 899px) {
  .research-grid { grid-template-columns: minmax(0, 1fr); }
  .research-head { position: static; }
}
@media (max-width: 560px) {
  .finding { grid-template-columns: minmax(0, 1fr); }
  .tag { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* ---------- process bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-media); background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--line); }
.tile-wide { grid-column: span 2; }
.tile-media { height: clamp(220px, 22vw, 300px); overflow: hidden; background: var(--bg-sunk); }
.tile-media > img { width: 100%; height: 100%; object-fit: cover; }
.media-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 18px 0; }
.media-pair > img { object-position: 50% 42%; border-radius: 12px 12px 0 0; }
.media-wave { display: grid; place-items: center; padding: 28px; }
.media-wave > img { height: auto; object-fit: contain; }
.media-feed { display: grid; justify-items: center; padding-top: 18px; }
.media-feed > img { width: auto; object-fit: contain; border-radius: 12px 12px 0 0; }
.tile-body { padding: 22px 24px 26px; }
.tile h3 { font-size: 1.3rem; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; }
.tile p { margin-top: 8px; font-size: 0.98rem; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 1023px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile-wide { grid-column: auto; }
}

/* ---------- contact + footer ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 80px); align-items: end; }
.contact h2 { font-size: clamp(3.4rem, 10vw, 8.75rem); font-stretch: 122%; line-height: 0.92; letter-spacing: -0.035em; }
.contact-side { display: grid; gap: 22px; padding-bottom: 8px; }
.contact-side > p:first-child { max-width: 34ch; font-size: clamp(1.1rem, 1.4vw, 1.25rem); color: var(--ink-2); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.footer { padding-block: 40px 56px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 48px; font-size: 0.84rem; line-height: 1.6; color: var(--ink-3); }
.footer a { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--ink-2); transition: color 0.2s; }
.footer a:hover { color: var(--ink); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- motion: every move has a reason ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* the title reads in word by word, the reel rises under it */
  .w { animation: word-in 0.9s var(--ease-out) both; animation-delay: calc(120ms + var(--i) * 70ms); }
  .eyebrow { animation: fade-up 0.7s var(--ease-out) both; }
  .reel { animation: rise-in 1.1s 0.35s var(--ease-out) both; }
  .hero-side { animation: fade-up 0.8s 0.6s var(--ease-out) both; }
  /* switching hooks: the new line arrives the way the ads' captions do */
  .hookline span { animation: line-in 0.45s var(--ease-out); }
}
/* sections settle in as they scroll into view (pure CSS; older browsers just show them) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ad:hover .phone, .reel-poster:hover img { transform: none; }
}
@keyframes word-in { from { opacity: 0; transform: translateY(0.3em); filter: blur(12px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(28px) scale(0.985); } }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); filter: blur(6px); } }
@keyframes reveal { from { opacity: 0; transform: translateY(40px); } }
