/* Richard Jerwood portfolio: dark, cinematic, big type. */
:root {
  --bg: #0a0a0b;
  --surface: #151517;
  --line: #2a2a2e;
  --text: #f2efea;
  --muted: #a19d96;
  --accent: #ff5a1f;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
/* Subtle film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  z-index: 50;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #000; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

.kicker {
  margin: 0;
  font: 600 .8125rem/1.2 var(--body);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem var(--pad);
  background: rgba(10,10,11,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font: 400 1.35rem/1 var(--display); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.topbar nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.topbar nav a {
  font: 600 .8125rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); padding: .75rem 0;
}
.topbar nav a:hover { color: var(--text); }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  min-height: calc(100vh - 64px);
  padding: clamp(4rem, 12vh, 9rem) var(--pad) clamp(3rem, 8vh, 6rem);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1.75rem;
}
.hero { position: relative; isolation: isolate; }
.hero > *:not(.hero-motion) { position: relative; z-index: 1; }
.hero-motion {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  /* opacity and edge fade are handled in motion.js */
}
.hero-title {
  margin: 0;
  font: 400 clamp(4rem, 13.5vw, 13rem)/.86 var(--display);
  text-transform: uppercase;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero-intro { margin: 0; max-width: 38rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); }
.btn {
  align-self: flex-start;
  display: inline-flex; align-items: center; min-height: 48px;
  padding: 0 1.6rem;
  background: var(--accent); color: #0a0a0b;
  font: 600 .875rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
}
.btn:hover { background: var(--text); }

/* Sections */
.section-head, .about, .work { max-width: var(--max); margin-left: auto; margin-right: auto; }
.work { padding: clamp(3rem, 8vw, 7rem) var(--pad); border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-title {
  margin: 0;
  font: 400 clamp(3rem, 8vw, 7.5rem)/.9 var(--display);
  text-transform: uppercase;
}
.count { margin: 0; color: var(--muted); font-weight: 500; }

/* Work grid */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
}
.card-link { display: block; text-decoration: none; }
.frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .8s; filter: saturate(.85); }
.card-link:hover .frame img { transform: scale(1.04); filter: saturate(1.05); }
.card-text { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: baseline; padding-top: 1.1rem; }
.card-num { font: 600 .8125rem/1 var(--body); color: var(--accent); letter-spacing: .1em; }
.card-title {
  margin: 0;
  font: 400 clamp(2rem, 3.6vw, 3.25rem)/.95 var(--display);
  text-transform: uppercase;
  transition: color .3s;
}
.card-link:hover .card-title { color: var(--accent); }
.card-meta { grid-column: 2; margin: .45rem 0 0; color: var(--muted); font-size: .95rem; }

.placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.025) 22px 23px),
    var(--surface);
  border: 1px dashed var(--line);
}
.placeholder span { font: 600 .75rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* About */
.about { padding: clamp(3rem, 8vw, 7rem) var(--pad); border-top: 1px solid var(--line); display: grid; gap: 2rem; }
.about-text { margin: 0; max-width: 52rem; font-size: clamp(1.2rem, 2.2vw, 1.75rem); line-height: 1.45; }
.disciplines { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.disciplines li { border: 1px solid var(--line); padding: .5rem 1rem; font-size: .9rem; color: var(--muted); }

/* Project page */
.project { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 7vw, 6rem) var(--pad) 0; }
.back { display: inline-block; margin-bottom: 2rem; color: var(--muted); text-decoration: none; font-weight: 500; padding: .5rem 0; }
.back:hover { color: var(--text); }
.project-title {
  margin: 0 0 2rem;
  font: 400 clamp(3.5rem, 11vw, 11rem)/.86 var(--display);
  text-transform: uppercase;
  text-wrap: balance;
}
.facts { margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: 1.25rem 3.5rem; }
.facts dt { font: 600 .75rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.facts dd { margin: 0; font-weight: 500; }
.project-summary { margin: 0 0 clamp(2.5rem, 5vw, 4rem); max-width: 46rem; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.45; }
.player { aspect-ratio: 16 / 9; background: #000; margin: 0 calc(var(--pad) * -1); }
@media (min-width: 900px) { .player { margin: 0; } }
.player iframe, .player img { width: 100%; height: 100%; border: 0; object-fit: cover; }
.project-body { max-width: 44rem; margin: clamp(2.5rem, 6vw, 5rem) 0; color: #d9d5cf; }
.project-body p { margin: 0 0 1.2em; }
.project-body h2, .project-body h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 2rem; line-height: 1; margin: 2em 0 .6em; color: var(--text); }
.gallery { list-style: none; margin: 0 0 clamp(3rem, 6vw, 5rem); padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.gallery img { width: 100%; height: auto; }
.next {
  display: block; text-decoration: none;
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 7vw, 6rem) 0;
}
.next .kicker { display: block; margin-bottom: 1rem; }
.next-title { font: 400 clamp(3rem, 9vw, 8rem)/.9 var(--display); text-transform: uppercase; transition: color .3s; }
.next:hover .next-title { color: var(--accent); }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(4rem, 10vw, 8rem) var(--pad) 2.5rem;
  max-width: var(--max); margin: 0 auto;
}
.footer-kicker { margin: 0 0 1rem; font: 600 .8125rem/1.2 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.footer-email {
  display: inline-block;
  font: 400 clamp(2rem, 6.5vw, 6rem)/1 var(--display);
  text-transform: uppercase;
  text-decoration: none;
  word-break: break-word;
}
.footer-email:hover { color: var(--accent); }
.footer-meta { margin-top: clamp(3rem, 6vw, 5rem); display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; color: var(--muted); font-size: .9rem; }
.footer-meta a { text-decoration: none; padding: .25rem 0; }
.footer-meta a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
