/* ==========================================================================
   Katya Austin — public site (0.0.6)
   Plain white, black type, one grotesque (Avenir) — laid out like her
   previous site: name left, nav right, six square tiles, banner pages,
   a wall of credits posters, and a simple contact page.
   ========================================================================== */

:root {
  --pad: clamp(18px, 3vw, 43px);
  --gap: 20px;
  --ink: #000;
  --paper: #fff;
  --mute: #6b6b6b;
  --line: #cfcfcf;
  --font: "Avenir Next", "Avenir", "Avenir Next LT Pro", "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --head-h: clamp(68px, 6.4vw, 92px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; }

.shell { width: 100%; padding-inline: var(--pad); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--pad); top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
}
.skip-link:focus { top: 10px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* --- Header ---------------------------------------------------------------- */

.head {
  position: sticky; top: 0; z-index: 50;
  height: var(--head-h);
  background: #fff; color: var(--ink);
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.head.is-stuck { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); }

/* Over a banner: transparent with white type until the banner scrolls away,
   then a normal white bar. Without JS it just sits on the banner (absolute),
   so the white type can never end up on white paper. */
.head--over { position: absolute; inset: 0 0 auto 0; background: transparent; color: #fff; }
.js .head--over { position: fixed; }
.js .head--over.is-solid { background: #fff; color: var(--ink); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); }

.head__inner {
  height: 100%;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.head__brand {
  font-size: clamp(1.6rem, 2.4vw, 2.125rem);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
}

.head__nav { display: flex; align-items: center; gap: clamp(14px, 1.45vw, 20px); font-size: 0.9375rem; }

.head__link {
  display: inline-flex;
  align-items: center;
  padding-block: 4px;
  line-height: 1.2;
  border-bottom: 1px solid transparent;
}
.head__link.is-current { border-bottom-color: currentColor; }
.head__link--icon { padding-block: 0; border-bottom: 0; margin-left: 6px; }
.head__link--icon + .head__link--icon { margin-left: 0; }
.head__link:hover { opacity: 0.6; }

/* --- Home ------------------------------------------------------------------ */

.home { padding-bottom: 80px; }

.home__tagline {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.35;
  margin-bottom: clamp(36px, 4.6vw, 66px);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #eee; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile__title {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center;
  color: #fff; background: rgba(0, 0, 0, 0.5);
  font-size: clamp(1.1rem, 1.7vw, 1.5rem); letter-spacing: 0.04em; text-transform: uppercase;
  opacity: 0; transition: opacity 0.25s ease;
}
.tile:hover .tile__title,
.tile:focus-visible .tile__title { opacity: 1; }

.home__tools { width: min(1010px, 100%); margin: clamp(50px, 6.5vw, 94px) auto 0; }
.home__tools img { width: 100%; }

/* --- Category pages ---------------------------------------------------------- */

.banner {
  position: relative;
  height: clamp(190px, 15vw, 270px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #111;
}
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.28); }
.banner__title {
  position: relative; z-index: 1;
  margin-top: clamp(30px, 5vw, 70px);
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
}
.banner--plain { background: #111; }

.work { padding-block: clamp(50px, 6vw, 90px) 0; display: grid; gap: clamp(46px, 6vw, 88px); }
.work__empty { text-align: center; color: var(--mute); }

.piece { display: block; scroll-margin-top: calc(var(--head-h) + 16px); }
.piece--wide { width: 100%; }
.piece--embed { width: min(78%, 1125px); margin-inline: auto; }
.piece__title {
  margin-bottom: 16px;
  text-align: center;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.still { width: 100%; }

.row { display: grid; gap: var(--gap); align-items: start; }
.row--1 { grid-template-columns: minmax(0, 1fr); width: min(33.33%, 450px); }
.row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row .piece .still, .row .piece .embed { width: 100%; }

.cap { margin-top: 12px; font-size: 0.75rem; line-height: 1.55; }
.cap span { display: block; }
.cap__b { margin-top: 12px; font-style: italic; }
.piece--embed .cap { text-align: center; }
.piece--embed .cap__b { margin-top: 2px; }

/* Click-to-play video: a poster until asked, then the real player over it.
   The poster stays in the flow so the block never changes size. */
.embed { position: relative; width: 100%; background: #000; }
.embed--bare { aspect-ratio: 16 / 9; }
.embed__poster { display: block; position: relative; }
.embed--bare .embed__poster { position: absolute; inset: 0; }
.embed__poster img { width: 100%; height: auto; }
.embed__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 3px;
  color: #fff; background: rgba(0, 0, 0, 0.55);
  transition: background 0.2s ease, scale 0.2s ease;
}
.embed__poster:hover .embed__play { background: rgba(0, 0, 0, 0.8); scale: 1.06; }
.embed.is-playing .embed__poster { visibility: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.catnav {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: clamp(80px, 9vw, 130px) 56px;
}
.catnav__link { display: inline-flex; align-items: center; gap: 14px; text-transform: uppercase; font-size: 0.9375rem; letter-spacing: 0.02em; }
.catnav__link:hover { opacity: 0.6; }

/* --- Credits ---------------------------------------------------------------- */

.credits { padding-block: 0 clamp(70px, 8vw, 120px); }

.posters { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); }
.posters__item { position: relative; overflow: hidden; background: #eee; aspect-ratio: 563 / 796; }
.posters__item img { width: 100%; height: 100%; object-fit: cover; }
.posters__cap {
  position: absolute; inset: auto 0 0 0;
  padding: 36px 12px 12px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  font-size: 0.72rem; line-height: 1.4;
  opacity: 0; transition: opacity 0.2s ease;
}
.posters__item:hover .posters__cap,
.posters__item:focus .posters__cap,
.posters__item:focus-within .posters__cap { opacity: 1; }
.posters__name { display: block; font-weight: 700; font-size: 0.82rem; margin-bottom: 4px; }
.posters__detail { display: block; white-space: pre-line; }

.resume { display: flex; flex-wrap: wrap; gap: 40px clamp(60px, 10vw, 160px); justify-content: center; margin-top: clamp(60px, 7vw, 100px); }
.resume__h { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 14px; }
.resume li { font-size: 0.9375rem; line-height: 1.8; }
.resume__two { columns: 2; column-gap: clamp(30px, 5vw, 70px); }
.resume__two li { break-inside: avoid; }

.credits__cta { text-align: center; margin-top: clamp(60px, 7vw, 100px); }

.button {
  display: inline-block;
  min-width: 120px;
  padding: 24px 40px;
  border: 0;
  background: #000; color: #fff;
  font-size: 0.8125rem; letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer;
}
.button:hover { background: #333; }

/* --- Contact ---------------------------------------------------------------- */

.contact { padding-block: clamp(40px, 12vw, 200px) clamp(70px, 8vw, 120px); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.contact__heading { font-size: 1.25rem; font-weight: 700; margin-bottom: 28px; }
.contact__info p { margin-bottom: 4px; }
.contact__info a:hover { opacity: 0.6; }
.contact__icons { display: flex; gap: 14px; margin-top: 56px !important; }
.contact__icons svg { width: 20px; height: 20px; }

.field { margin: 0 0 28px; padding: 0; border: 0; min-width: 0; }
.field legend, .field > label { display: block; padding: 0; font-size: 1rem; margin-bottom: 8px; }
.field label small, .field legend small { font-size: 0.75rem; color: var(--mute); margin-left: 4px; }
.field__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.field__pair label { font-size: 0.75rem; }
.field input, .field textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid #888; border-radius: 0; background: #fff; color: #000;
  font: inherit; font-size: 1rem;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid #000; outline-offset: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 14px 16px; margin-bottom: 24px; border: 1px solid; }
.notice--ok { border-color: #1e7a46; color: #14532d; background: #f0faf4; }
.notice--err { border-color: #b3261e; color: #7f1d1d; background: #fdf2f1; }

/* --- Error ------------------------------------------------------------------ */

.error { padding-block: 80px 120px; max-width: 40rem; }
.error__code { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.error__headline { font-size: 1.5rem; margin-bottom: 20px; }
.error a { border-bottom: 1px solid; }

/* --- Smaller screens ---------------------------------------------------------- */

@media (max-width: 1100px) {
  .posters { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 800px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .posters { grid-template-columns: repeat(3, 1fr); }
  .piece--embed { width: 100%; }
  .row--3, .row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row--1 { width: 60%; }
  .contact__grid { grid-template-columns: 1fr; }
  .head { height: auto; min-height: var(--head-h); }
  .head__inner { flex-wrap: wrap; padding-block: 14px; row-gap: 8px; }
}

@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; }
  .posters { grid-template-columns: repeat(2, 1fr); }
  .row--3, .row--2, .row--1 { grid-template-columns: 1fr; width: 100%; }
  .field__pair { grid-template-columns: 1fr; }
  .head__nav { gap: 12px; flex-wrap: wrap; }
}

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