/* Bradford Hill — portfolio (creative technologist edition) */

:root {
  --bg: #0e0e0f;
  --bg-alt: #131315;
  --surface: #18181b;
  --line: #27272b;
  --line-strong: #3a3a40;
  --text: #edebe6;
  --muted: #9b9891;
  --faint: #6c6a65;
  --accent: #ffb547;
  --accent-ink: #1a1307;
  --rec: #ff4d3d;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --section-y: clamp(72px, 10vw, 128px);
}

*, *::before, *::after { 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(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
em { font-style: italic; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.label, .eyebrow, .index, .credit, .dur, .tc, .case-when, .tool-tag, .flow-n {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px;
  background: var(--text); color: var(--bg); font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav .nav-cta { color: var(--text); border: 1px solid var(--line-strong); margin-left: 8px; }
.site-nav .nav-cta:hover { border-color: var(--text); background: transparent; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; color: var(--text); cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; transition: transform .2s, opacity .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .site-nav a:hover { background: none; }
  .site-nav .nav-cta { margin: 12px 0 0; border-radius: 8px; text-align: center; border: 1px solid var(--line-strong); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffc56e; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.eyebrow { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 4px rgb(255 77 61 / .18); animation: rec 2s ease-in-out infinite; flex: none; }
@keyframes rec { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec { animation: none; } }
.hero h1 { font-size: clamp(40px, 6vw, 80px); letter-spacing: -0.04em; line-height: 1.0; margin: 22px 0 24px; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-media { margin: 0; justify-self: center; width: min(100%, 340px); }
.phone {
  position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .8), 0 0 0 8px var(--bg-alt), 0 0 0 9px var(--line);
}
.phone video { width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption { margin-top: 20px; font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; flex-wrap: wrap; }
.tc { color: var(--accent); }

.proof {
  list-style: none; margin: clamp(48px, 7vw, 80px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.proof li { padding: 22px 20px 0 0; display: grid; gap: 4px; }
.proof li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.proof strong { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.proof span { font-size: 14px; color: var(--muted); line-height: 1.45; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { width: min(72%, 300px); }
  .proof { grid-template-columns: 1fr 1fr; }
  .proof li:nth-child(3) { padding-left: 0; border-left: 0; }
  .proof li:nth-child(n+3) { padding-top: 22px; }
}
@media (max-width: 480px) {
  .proof { grid-template-columns: 1fr; }
  .proof li, .proof li + li { padding: 16px 0 0; border-left: 0; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.section-head { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; margin-bottom: clamp(36px, 5vw, 56px); }
.index { color: var(--accent); padding-top: 12px; }
.section h2 { font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -0.035em; }
.intro { color: var(--muted); max-width: 44em; margin-top: 18px; font-size: clamp(16px, 1.4vw, 18px); }
@media (max-width: 640px) { .section-head { grid-template-columns: 1fr; gap: 4px; } .index { padding-top: 0; } }

/* ---------- Grids ---------- */
.grid { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wide-row { margin-top: clamp(36px, 4vw, 56px); }
.mixed { align-items: start; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid-2, .grid-3, .h-row { grid-template-columns: 1fr; }
  /* Vertical work becomes a swipeable rail on phones */
  .rail {
    display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 12px;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { flex: 0 0 72%; scroll-snap-align: start; }
  .rail > .spec-card { flex-basis: 72%; }
}

/* ---------- Work cards ---------- */
.work { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.thumb {
  position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 0;
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--surface); outline-offset: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.thumb img, .thumb video.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .25s; }
.thumb video.preview { opacity: 0; }
.thumb.previewing video.preview { opacity: 1; }
.thumb:hover img { transform: scale(1.03); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .55), transparent 45%); pointer-events: none; }
.r-916 { aspect-ratio: 9 / 16; }
.r-45 { aspect-ratio: 4 / 5; }
.r-169 { aspect-ratio: 16 / 9; }

.play {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgb(255 255 255 / .14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / .28);
  transition: background .15s, transform .15s;
}
.play::before { content: ""; position: absolute; left: 15px; top: 12px; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.thumb:hover .play { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.thumb:hover .play::before { border-left-color: var(--accent-ink); }
.dur {
  position: absolute; right: 12px; bottom: 16px; z-index: 2;
  font-size: 11px; color: #fff; background: rgb(0 0 0 / .5); padding: 3px 7px; border-radius: 5px;
}

.meta { display: grid; gap: 8px; }
.meta h3 { font-size: 18px; letter-spacing: -0.015em; line-height: 1.25; }
.meta p { font-size: 15px; color: var(--muted); line-height: 1.55; }
.meta .credit, .credit { color: var(--faint); font-size: 11px; }

/* Thumbnail fallback (e.g. a YouTube still that fails to load) */
.thumb img { color: transparent; }
.thumb.no-img {
  background:
    radial-gradient(120% 90% at 20% 10%, rgb(255 181 71 / .16), transparent 60%),
    linear-gradient(160deg, #1d1d21, #111113);
}
.thumb.no-img::before {
  content: attr(data-title); position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center; padding: 24px; text-align: center;
  font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.02em; color: var(--text);
}

/* Placement card beside the vertical ads */
.spec-card {
  align-self: stretch; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, var(--surface), transparent);
}
.spec-card .label { color: var(--accent); }
.spec-lede { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.spec-card ul { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 0; }
.spec-card li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.spec-card li span { font-family: var(--mono); font-size: 12px; color: var(--text); padding-top: 1px; }
@media (max-width: 1000px) { .spec-card { min-height: 0; } }

.stack-line { margin-top: clamp(32px, 4vw, 48px); padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.stack-line .label { color: var(--accent); }

/* ---------- Pipelines ---------- */
.flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.flow-step {
  position: relative; padding: 18px 16px 18px 16px; font-size: 14px; font-weight: 500; line-height: 1.3;
  background: var(--surface); border: 1px solid var(--line); margin-left: -1px;
  display: grid; gap: 10px; align-content: start; min-height: 110px;
}
.flow-step:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.flow-step:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.flow-step:not(:last-child)::after {
  content: ""; position: absolute; right: -7px; top: 50%; z-index: 1;
  width: 12px; height: 12px; background: var(--surface);
  border-top: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong);
  transform: translateY(-50%) rotate(45deg);
}
.flow-n { color: var(--accent); font-size: 11px; }
.flow-caption { margin-top: 14px; font-size: 13px; color: var(--faint); max-width: 56em; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow-step { min-height: 0; margin: -1px 0 0; grid-template-columns: 36px 1fr; align-items: center; padding: 14px 16px; }
  .flow-step:first-child { border-radius: var(--radius) var(--radius) 0 0; margin-top: 0; }
  .flow-step:last-child { border-radius: 0 0 var(--radius) var(--radius); }
  .flow-step:not(:last-child)::after { right: auto; left: 22px; top: auto; bottom: -7px; transform: rotate(135deg); }
}

.cases { margin-top: clamp(40px, 5vw, 64px); }
.case { border-top: 1px solid var(--line-strong); padding-top: 20px; display: grid; gap: 10px; align-content: start; }
.case-when { color: var(--faint); }
.case h3 { font-size: 20px; }
.case-when { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case p:not(.case-when) { color: var(--muted); font-size: 15px; }

.sub-h { font-size: clamp(22px, 2.2vw, 28px); margin: clamp(56px, 7vw, 88px) 0 24px; }
.tool {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: grid; gap: 10px; align-content: start;
}
.tool-tag { color: var(--accent); font-size: 11px; }
.tool h4 { font-size: 19px; letter-spacing: -0.015em; }
.tool p:not(.tool-tag) { color: var(--muted); font-size: 15px; }

.stack { margin-top: clamp(40px, 5vw, 56px); display: grid; grid-template-columns: 80px 1fr; gap: 16px; align-items: start; }
.stack .label { color: var(--faint); padding-top: 8px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); }
@media (max-width: 640px) { .stack { grid-template-columns: 1fr; gap: 10px; } .stack .label { padding: 0; } }

/* ---------- Story feature ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: clamp(48px, 6vw, 80px); }
.feature-copy { display: grid; gap: 14px; }
.feature-copy h3 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.03em; }
.feature-copy > p:not(.eyebrow):not(.credit) { color: var(--muted); }
.laurels { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.laurels li { font-size: 14px; padding-left: 18px; position: relative; }
.laurels li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 72px); }
.about-grid .index { margin-bottom: 12px; padding-top: 0; }
.about-copy { display: grid; gap: 18px; max-width: 42em; }
.about-copy p { color: var(--muted); }
.about-copy .about-lede { color: var(--text); font-size: clamp(20px, 2vw, 26px); line-height: 1.35; letter-spacing: -0.015em; }
.recog { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.recog .label { color: var(--faint); margin-bottom: 12px; }
.recog ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.recog li { font-size: 15px; color: var(--text); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { padding: var(--section-y) 0; border-top: 1px solid var(--line); text-align: center; }
.contact h2 { font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.04em; max-width: 14em; margin: 0 auto; }
.contact .intro { margin: 18px auto 0; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }
@media (max-width: 480px) { .contact-links .btn { width: 100%; } .contact-links .btn-primary { font-size: 14px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--faint); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Player ---------- */
.player {
  width: min(1200px, 100vw - 32px); max-height: calc(100vh - 32px); padding: 0; border: 0;
  background: transparent; color: var(--text); overflow: visible;
}
.player::backdrop { background: rgb(6 6 7 / .92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.player-title { font-weight: 500; font-size: 15px; }
.player-close {
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 16px; flex: none;
}
.player-close:hover { border-color: var(--text); }
.player-stage { display: grid; place-items: center; }
.player-stage video, .player-stage iframe {
  display: block; max-width: 100%; max-height: calc(100vh - 110px);
  border-radius: var(--radius); background: #000; border: 0;
}
.player-stage iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* Disney training series */
.episodes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.ep {
  width: 100%; display: flex; align-items: baseline; gap: 10px; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--line); padding: 9px 0 3px;
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
}
.ep:hover { color: var(--accent); }
.ep-n { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.proof-link { color: var(--accent); text-decoration: none; text-transform: none; letter-spacing: 0; font-family: var(--font); font-size: 13px; }
.proof-link:hover { text-decoration: underline; }
.case .proof-link { display: inline-block; margin-top: 4px; }
@media (max-width: 480px) { .episodes { grid-template-columns: 1fr; } }

.feature-inline { margin: clamp(56px, 7vw, 88px) 0 0; }
.player-bar .player-title { flex: 1; min-width: 0; }
.player-yt { font-size: 13px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.player-yt:hover { text-decoration: underline; }
