/* ==================================================================
   Dane Webster — portfolio
   Dark, high-contrast, motion-forward. WCAG-AA text contrast.
   ================================================================== */

:root {
  --bg: #0b0d12;
  --bg-raise: #12151d;
  --bg-card: #151924;
  --line: #262c3a;
  --text: #f0eee8;
  --text-dim: #b3b9c6;
  --red: #ff4655;
  --blue: #5d86ff;
  --grad: linear-gradient(92deg, var(--red), var(--blue));
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1200px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }

a { color: var(--text); }
img { max-width: 100%; display: block; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: #0b0d12;
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0.8rem 1.7rem;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255, 70, 85, 0.25); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); }
.btn--small { padding: 0.5rem 1.15rem; font-size: 0.9rem; }
.btn--big { font-size: clamp(1.1rem, 2.5vw, 1.5rem); padding: 1.1rem 2.4rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav__logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  text-decoration: none; letter-spacing: 0.02em;
}
.nav__logo-dot { color: var(--red); }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a {
  text-decoration: none; color: var(--text-dim);
  font-family: var(--font-display); font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__cta { white-space: nowrap; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  background: #05060a;
}
/* Scrim keeps hero text legible over the moving footage.
   Darker on the left (where the copy sits), lighter on the right. */
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 9, 14, 0.9) 0%, rgba(8, 9, 14, 0.62) 42%, rgba(8, 9, 14, 0.28) 100%),
    linear-gradient(0deg, rgba(8, 9, 14, 0.92) 0%, rgba(8, 9, 14, 0) 34%);
}
.hero__sound {
  position: absolute; z-index: 3;
  right: var(--pad); top: calc(0.9rem + 4.4rem);
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(11, 13, 18, 0.62); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.42rem 0.9rem; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.hero__sound:hover { border-color: var(--text-dim); background: rgba(11, 13, 18, 0.8); }
.hero__sound[aria-pressed="true"] { border-color: var(--red); }
.hero__sound-icon { color: var(--red); font-size: 0.95rem; }
.hero__sound-label { font-size: 0.72rem; }
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto; width: 100%;
  padding: 7rem var(--pad) 4rem;
}
.hero__eyebrow { color: var(--red); margin-bottom: 1.4rem; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.hero__title-accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero__sub {
  max-width: 34rem; margin-top: 1.8rem; color: var(--text-dim); font-size: 1.05rem;
}
.hero__sub a { color: var(--text); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.hero__scroll {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--text-dim); text-decoration: none;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

/* ---------- proof strip ---------- */
.proof {
  border-block: 1px solid var(--line);
  background: var(--bg-raise);
  overflow: hidden;
  padding: 1.05rem 0;
}
.proof__track {
  display: flex; gap: 3.5rem; width: max-content;
  list-style: none;
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.05em;
  color: var(--text-dim); text-transform: uppercase;
  animation: marquee 42s linear infinite;
  padding-left: 100vw;
}
.proof__track li { white-space: nowrap; }
.proof__track li::after { content: "✦"; color: var(--red); margin-left: 3.5rem; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .proof__track { animation: none; padding-left: var(--pad); flex-wrap: wrap; width: auto; gap: 1rem 2rem; }
  .proof__track li::after { margin-left: 2rem; }
}

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) var(--pad) 0; }
.section--tight { padding-top: clamp(3rem, 6vw, 4.5rem); }
.section__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 2rem;
  margin-bottom: 2.2rem;
}
.section__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem); letter-spacing: -0.01em;
}
.section__num { color: var(--red); vertical-align: super; margin-right: 0.35rem; }
.section__note { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; }
.chip {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-dim); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 1rem; cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--text-dim); }
.chip.is-active { color: #0b0d12; background: var(--text); border-color: var(--text); }

/* ---------- work grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font: inherit;
  padding: 0;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.card--wide { grid-column: span 2; }
.card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.card--wide .card__media { aspect-ratio: 21 / 9; }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
  filter: saturate(0.92);
}
.card:hover .card__media img { transform: scale(1.045); filter: saturate(1.05); }
.card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 13, 18, 0.88));
}
.card__play {
  position: absolute; right: 1rem; top: 1rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(11, 13, 18, 0.72); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.32rem 0.75rem; color: var(--text-dim);
  backdrop-filter: blur(6px);
}
.card__body { position: relative; padding: 1.15rem 1.3rem 1.35rem; }
.card__title-row { display: flex; align-items: baseline; gap: 0.8rem; }
.card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.card__year { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); margin-left: auto; white-space: nowrap; }
.card__tagline { color: var(--text-dim); font-size: 0.95rem; margin-top: 0.4rem; }
.card__tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.tag {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--blue); border: 1px solid color-mix(in srgb, var(--blue) 35%, transparent);
  border-radius: 999px; padding: 0.18rem 0.6rem;
}
.card.is-hidden { display: none; }

/* ---------- experiments strip ---------- */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.strip .card__media { aspect-ratio: 4 / 3; }
.strip .card__title { font-size: 1.1rem; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.about__photo img { border-radius: 14px; border: 1px solid var(--line); filter: grayscale(0.25); }
.about__copy p + p { margin-top: 1.1rem; }
.about__lede { font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.45; }
.about__copy strong { color: var(--text); }
.about__copy { color: var(--text-dim); }
.about__footnote { font-size: 0.92rem; border-left: 2px solid var(--red); padding-left: 1rem; }
.about__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* ---------- contact ---------- */
.contact { text-align: center; padding-bottom: clamp(4rem, 9vw, 7rem); }
.contact__eyebrow { color: var(--red); margin-bottom: 1.2rem; }
.contact__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.06; letter-spacing: -0.02em;
}
.contact__accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact__sub { color: var(--text-dim); max-width: 32rem; margin: 1.4rem auto 2.2rem; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between;
  max-width: var(--max); margin: 0 auto;
  padding: 1.6rem var(--pad) 2.2rem;
  color: var(--text-dim); font-size: 0.9rem;
}
.footer__built { text-transform: none; letter-spacing: 0.02em; }
.footer a { color: var(--text-dim); }

/* ---------- overlay / case study ---------- */
.overlay { position: fixed; inset: 0; z-index: 150; }
.overlay[hidden] { display: none; }
.overlay__backdrop { position: absolute; inset: 0; background: rgba(5, 6, 9, 0.78); backdrop-filter: blur(6px); }
.overlay__panel {
  position: relative; z-index: 1;
  max-width: 860px; margin: clamp(1rem, 4vh, 3.5rem) auto;
  max-height: calc(100vh - clamp(2rem, 8vh, 7rem));
  overflow-y: auto;
  background: var(--bg-raise);
  border: 1px solid var(--line); border-radius: 16px;
  animation: rise 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.overlay__close {
  position: sticky; top: 0.9rem; margin-left: calc(100% - 3.4rem);
  translate: -0.9rem 0; z-index: 5;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: rgba(11, 13, 18, 0.8); color: var(--text);
  border: 1px solid var(--line); cursor: pointer; font-size: 1rem;
  backdrop-filter: blur(6px);
}
.overlay__close:hover { border-color: var(--red); color: var(--red); }
.overlay__content { padding: 0 clamp(1.3rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem); margin-top: -1.6rem; }

.case__eyebrow { color: var(--red); margin-bottom: 0.7rem; }
.case__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4.5vw, 2.8rem); letter-spacing: -0.015em; line-height: 1.1; }
.case__tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0 1.6rem; }
.case__media { margin: 0 0 1.2rem; }
.case__media + .case__media { margin-top: 1.2rem; }
.case__media-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.5rem; }
.case__image { width: 100%; display: block; border-radius: 12px; border: 1px solid var(--line); background: #000; }

.videobox {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden;
  background: #000; border: 1px solid var(--line);
}
.videobox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.videobox__poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: grid; place-items: center;
  background-size: cover; background-position: center;
  cursor: pointer; border: 0; padding: 0;
}
.videobox__poster::before { content: ""; position: absolute; inset: 0; background: rgba(5, 6, 9, 0.35); transition: background 0.2s ease; }
.videobox__poster:hover::before { background: rgba(5, 6, 9, 0.15); }
.videobox__playbtn {
  position: relative; z-index: 1;
  width: 4.4rem; height: 4.4rem; border-radius: 50%;
  background: rgba(11, 13, 18, 0.7); border: 1px solid rgba(240, 238, 232, 0.5);
  display: grid; place-items: center;
  color: var(--text); font-size: 1.3rem;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.videobox__poster:hover .videobox__playbtn { transform: scale(1.08); border-color: var(--red); }

.case__body p { color: var(--text-dim); }
.case__body p + p { margin-top: 1rem; }
.case__h { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin: 1.8rem 0 0.7rem; }
.case__build { list-style: none; }
.case__build li { color: var(--text-dim); padding-left: 1.3rem; position: relative; margin-top: 0.5rem; }
.case__build li::before { content: "→"; position: absolute; left: 0; color: var(--red); }
.case__links { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.case__demo-note { font-size: 0.9rem; color: var(--text-dim); margin-top: 0.6rem; }

body.overlay-open { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .grid { grid-template-columns: 1fr; }
  .card--wide { grid-column: span 1; }
  .card--wide .card__media { aspect-ratio: 16 / 9; }
  .strip { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 260px; }
  .filters { margin-left: 0; }
}
