@font-face {
  font-family: Manrope;
  src: url(fonts/manrope.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url(fonts/instrument-serif-italic.woff2) format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0c0b0a;
  --card: #151311;
  --line: #2b2723;
  --ink: #f4efe6;
  --dim: #a39c90;
  --accent: #e2b866;
  --wine: #b8485c;
  --side: max(16px, 9vw);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  font-size: clamp(16px, 1.1vw, 30px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
h1 { font-size: clamp(3rem, 8.2vw, 9rem); }
h2 { font-size: clamp(2.3rem, 5.6vw, 6rem); }
h1 em, h2 em, h3 em { font-size: 1.08em; }
.reel h2 em { white-space: nowrap; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Floating navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  padding: 0.9rem max(16px, 2vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.03em; }
.nav nav {
  display: flex;
  gap: 0.2rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 11, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav nav a {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.nav nav a:hover { color: var(--bg); background: var(--accent); }

/* Small labels with a hard offset shadow */
.chips { margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  display: inline-block;
  align-self: flex-start;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 0.5rem;
  box-shadow: 3px 3px 0 var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip.alt { border-color: var(--wine); box-shadow: 3px 3px 0 var(--wine); }

.button {
  display: inline-block;
  align-self: flex-start;
  padding: 0.8rem 1.3rem;
  border-radius: 0.8rem;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 4px 4px 0 var(--accent);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--accent); }

/* Hero */
.hero {
  min-height: 100vh;
  padding: 6rem var(--side) 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5vw;
  background: radial-gradient(ellipse 45% 55% at 78% 50%, rgba(226, 184, 102, 0.16), transparent 70%);
}
.hero-text { display: flex; flex-direction: column; gap: 1.6rem; max-width: 48rem; }
.hero-text > * { animation: rise 0.9s ease-out both; }
.hero-text > :nth-child(2) { animation-delay: 0.15s; }
.hero-text > :nth-child(3) { animation-delay: 0.3s; }
.hero-text > :nth-child(4) { animation-delay: 0.45s; }
.hero h1 em { display: block; }
.sub { margin: 0; max-width: 30rem; color: var(--dim); font-size: 1.1rem; }

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

.phone {
  position: relative;
  flex: none;
  height: 72vh;
  aspect-ratio: 660 / 1434;
  border-radius: 9% / 4.2%;
  overflow: hidden;
  outline: 1px solid #3a352e;
  box-shadow: 0 0 0 6px #0c0b0a, 0 0 0 7px #3a352e, 0 30px 80px rgba(0, 0, 0, 0.8);
}
.phone.tilt { transform: rotate(4deg); animation: float 7s ease-in-out infinite; }
@keyframes float {
  50% { transform: rotate(2.5deg) translateY(-1.5%); }
}
.phone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.8s ease, transform 1.4s ease;
}
.phone img.on { opacity: 1; transform: none; }

/* Reel: a tilted wall of screens that keeps moving, like film running past */
.reel {
  position: relative;
  height: 90vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.wall {
  position: absolute;
  inset: -30% -10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.2rem;
  transform: rotate(-9deg);
}
.row { display: flex; gap: 1.2rem; width: max-content; animation: run 60s linear infinite; }
.row.back { animation-direction: reverse; }
.row img {
  height: 42vh;
  width: auto;
  aspect-ratio: 660 / 1434;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
}
@keyframes run {
  to { transform: translateX(calc(-50% - 0.6rem)); }
}
.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--bg), transparent 25%, transparent 75%, var(--bg)),
    rgba(12, 11, 10, 0.4);
}
.reel h2 {
  position: relative;
  z-index: 1;
  padding: 0 16px;
  text-align: center;
  text-shadow: 0 4px 40px #000;
}

/* Work intro */
.intro, .inside { padding: 7rem var(--side) 4rem; display: flex; flex-direction: column; gap: 2rem; }
.intro-grid { display: flex; align-items: flex-end; justify-content: space-between; gap: 4vw; }
.note {
  flex: none;
  width: min(100%, 24rem);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--wine);
  border-radius: 1rem;
  box-shadow: 5px 5px 0 var(--wine);
  background: var(--card);
}
.note img { width: 11rem; height: auto; }
.note p { margin: 0; color: var(--dim); }
.note a, footer a { color: var(--accent); font-weight: 700; text-decoration: none; }
.note a:hover { text-decoration: underline; }

/* Feature: a tall section whose stage stays pinned while the scenes change */
.feature { height: 400vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 5rem var(--side) 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8vw;
  background: radial-gradient(ellipse 35% 50% at 66% 50%, rgba(184, 72, 92, 0.2), transparent 70%);
}
.captions { position: relative; width: min(100%, 30rem); height: 18rem; }
.caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.caption.on { opacity: 1; transform: none; }
.caption h3 { font-size: clamp(2rem, 4.4vw, 4.4rem); }
.caption p { margin: 0; color: var(--dim); font-size: 1.05rem; }

/* What we built */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.bento article {
  min-height: 11rem;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: linear-gradient(160deg, #1b1815, var(--card));
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.bento article:hover { border-color: var(--accent); transform: translateY(-4px); }
.bento h3 { font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1.1; }
.bento p { margin: 0; color: var(--dim); }

footer {
  padding: 3rem var(--side);
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.85rem;
}

@media (max-width: 800px) {
  .hero { flex-direction: column; justify-content: center; padding-top: 5.5rem; gap: 2.5rem; }
  .hero .phone { height: 56vh; }
  .intro-grid { flex-direction: column; align-items: flex-start; gap: 2rem; }
  .stage { flex-direction: column-reverse; gap: 1.2rem; padding-top: 4.5rem; }
  .stage .phone { height: 48vh; }
  .captions { height: 11.5rem; }
  .caption { gap: 0.6rem; }
  .caption p { font-size: 0.95rem; }
  .row img { height: 30vh; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento article { min-height: 8.5rem; padding: 1rem; }
  .bento h3 { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text > *, .phone.tilt, .row { animation: none; }
  .caption, .phone img { transition: none; transform: none; }
}
