/* ===========================================================
   rileyhastings.ca — styles
   Palette: deep navy base, HCS blue accent, warm white type
   Type:    Barlow Condensed (display) + Barlow (body)
   =========================================================== */

:root {
  --bg: #0d1220;
  --bg-2: #141a2b;
  --line: #232c42;
  --text: #f1f3f8;
  --muted: #98a2ba;
  --accent: #3d7fe6;
  --accent-ink: #0b1a33;
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.95;
  margin: 0;
  letter-spacing: -0.005em;
}
h2 { font-size: clamp(38px, 5vw, 64px); }
h3 { font-size: clamp(26px, 3vw, 36px); }
p { margin: 0 0 1em; max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  background: rgba(13,18,32,.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.nav .brand {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  text-decoration: none; letter-spacing: .02em;
}
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav a:not(.brand) { text-decoration: none; font-size: 15px; color: var(--text); }
.nav a:not(.brand):hover { color: var(--accent); }
@media (max-width: 560px) { .nav ul { gap: 18px; } .nav a:not(.brand) { font-size: 14px; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  isolation: isolate; overflow: hidden;
}
.hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%; z-index: -2;
}
/* On wide screens push the subject to the right so the name sits clear of him */
@media (min-width: 900px) {
  .hero img { width: 140%; max-width: none; left: 0; object-position: 50% 18%; }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 8%, rgba(13,18,32,.55) 45%, rgba(13,18,32,.15) 100%),
    linear-gradient(to right, rgba(13,18,32,.55), rgba(13,18,32,0) 60%);
}
.hero .wrap { width: 100%; padding-bottom: clamp(40px, 8vh, 96px); padding-top: 140px; }
.hero h1 {
  font-size: clamp(64px, 13vw, 168px);
  font-weight: 700; line-height: .86; text-transform: none;
  margin-bottom: 22px;
}
.hero .lede { font-size: clamp(18px, 2vw, 24px); max-width: 44ch; margin-bottom: 26px; }
.hero .status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--muted);
}
.hero .status::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(61,127,230,.25);
}

/* ---------- logo wall ---------- */
.logos { padding: 56px 0 8px; border-top: 1px solid var(--line); }
.logos .row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 28px 56px; margin-bottom: 44px;
}
.logos .row img { width: auto; object-fit: contain; }
/* Per-logo heights, tuned so the marks read as the same visual weight */
.l-halo { height: 44px; } .l-hcs { height: 74px; } .l-mrbeast { height: 58px; }
.l-hirez { height: 62px; } .l-logi { height: 50px; } .l-envy { height: 66px; }
.l-disney { height: 50px; } .l-netflix { height: 32px; }
.logos .label { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
@media (max-width: 720px) {
  .logos .row { gap: 22px 36px; }
  .logos .row img { transform: scale(.78); transform-origin: left center; }
}

/* ---------- work ---------- */
.work { padding: 8px 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.work > .wrap > h2 { margin-bottom: 12px; }
.work .intro { margin-bottom: 56px; }

.role {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 12fr);
  gap: 40px clamp(24px, 4vw, 64px);
  padding: 48px 0 56px; border-top: 1px solid var(--line);
}
.role .about-role { position: sticky; top: 96px; align-self: start; }
.role .about-role h3 { margin-bottom: 14px; }
.role .about-role p { color: var(--muted); font-size: 16px; }
.role .count { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .role { grid-template-columns: 1fr; gap: 24px; }
  .role .about-role { position: static; }
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; align-items: start; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card { display: block; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; width: 100%; }
.card .thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-2); border-radius: 6px;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.005); }
.card .thumb .play {
  position: absolute; left: 14px; bottom: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(13,18,32,.8); display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.2);
}
.card .thumb .play svg { width: 16px; height: 16px; fill: #fff; margin-left: 3px; }
.card:hover .thumb .play, .card:focus-visible .thumb .play { background: var(--accent); border-color: var(--accent); }
.card .title { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.05; margin: 14px 0 4px; }
.card .credit { font-size: 15px; color: var(--muted); margin: 0; }
.card .note { font-size: 15px; color: var(--muted); margin: 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(6,9,18,.92); padding: 24px;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox .frame { width: min(1100px, 100%); }
.lightbox .video { aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.lightbox iframe { width: 100%; height: 100%; border: 0; display: block; }
.lightbox .meta { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-top: 16px; }
.lightbox .meta h3 { font-size: 26px; margin-bottom: 4px; }
.lightbox .meta p { font-size: 15px; color: var(--muted); margin: 0; }
.lightbox .close {
  flex: 0 0 auto; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 15px; cursor: pointer;
}
.lightbox .close:hover { border-color: var(--accent); }

/* ---------- about ---------- */
.about { padding: 72px 0; border-top: 1px solid var(--line); }
.about .cols {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px clamp(32px, 5vw, 80px); align-items: start;
}
.about h2 { margin-bottom: 24px; }
.about .bio p { font-size: 17px; }
.about .bio a { color: var(--accent); }
.about .portrait { border-radius: 6px; overflow: hidden; }
.about .portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; width: 100%; }
@media (max-width: 800px) {
  .about .cols { grid-template-columns: 1fr; }
  .about .portrait { max-width: 420px; }
}

.timeline { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 120px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px;
}
.timeline .when { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .what strong { font-weight: 600; display: block; }
.timeline .what span { color: var(--muted); }
@media (max-width: 480px) { .timeline li { grid-template-columns: 90px 1fr; font-size: 15px; } }

.skills { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.skills li { font-size: 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }

/* ---------- contact ---------- */
.contact { padding: 72px 0 40px; border-top: 1px solid var(--line); }
.contact .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 5vw, 80px); }
.contact h2 { margin-bottom: 18px; }
.contact .links { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; font-size: 17px; }
.contact .links a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.contact .links a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 800px) { .contact .cols { grid-template-columns: 1fr; } }

form .field { display: grid; gap: 6px; margin-bottom: 16px; }
form label { font-size: 14px; color: var(--muted); }
form input, form textarea {
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; width: 100%;
}
form input:focus, form textarea:focus { border-color: var(--accent); }
form textarea { min-height: 140px; resize: vertical; }
form .honey { position: absolute; left: -9999px; }
form button {
  font: inherit; font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: .02em;
  background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 12px 28px; cursor: pointer;
}
form button:hover { filter: brightness(1.1); }
form button[disabled] { opacity: .6; cursor: default; }
form .result { margin-top: 14px; font-size: 15px; min-height: 1.4em; }

/* ---------- footer ---------- */
footer { padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
