/* ===== Musa C Portfolio ===== */
:root {
  --ink: #0e0d0b;          /* warm off-black */
  --surface: #161512;
  --surface-2: #1c1a17;
  --line: rgba(237, 230, 218, 0.12);
  --line-strong: rgba(237, 230, 218, 0.28);
  --paper: #ede6da;        /* warm off-white */
  --muted: #9b9488;
  --rec: #ff3b2f;          /* record light - the only accent */

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 4px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain, behind everything so it never dulls the videos */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--rec); color: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
@media (min-width: 600px) {
  .wrap { padding-left: 32px; padding-right: 32px; }
}
@media (min-width: 1000px) {
  .wrap { padding-left: 48px; padding-right: 48px; }
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--paper); color: var(--ink);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ===== Nav ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 13, 11, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
  gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 18px;
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: -0.01em;
}
.rec {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 0 3px rgba(255, 59, 47, 0.18);
  animation: recBlink 2s steps(1) infinite;
}
@keyframes recBlink { 50% { opacity: 0.25; box-shadow: none; } }

.brand-wrap { display: flex; align-items: center; gap: 20px; }
.tc {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
@media (max-width: 900px) { .tc { display: none; } }

/* Scroll progress drawn as a timeline with a playhead along the bottom of the nav */
.timeline {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px;
  pointer-events: none;
  --p: 0;
}
.timeline-fill {
  position: absolute; inset: 0;
  background: var(--rec);
  transform-origin: left;
  transform: scaleX(var(--p));
}
.timeline-head {
  position: absolute; left: 0; bottom: 0;
  width: 1px; height: 9px;
  background: var(--rec);
  transform: translateX(calc(var(--p) * (100vw - 1px)));
  opacity: 0;
  transition: opacity .2s ease;
}
.timeline.moving .timeline-head { opacity: 1; }
.timeline-head::before {
  content: "";
  position: absolute; left: -4px; top: -5px;
  border-style: solid;
  border-width: 6px 4.5px 0 4.5px;
  border-color: var(--rec) transparent transparent transparent;
}

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  position: relative;
  transition: color .15s ease;
}
.nav-link:hover, .nav-link.active { color: var(--paper); }
.nav-link.active::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--rec);
}
.nav-cta { margin-left: 12px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: transparent; border: 1px solid var(--line);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  cursor: pointer;
}
.nav-toggle span { width: 18px; height: 1.5px; background: var(--paper); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch;
    padding: 8px 20px 24px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav-link.active::after { display: none; }
  .nav-cta { margin: 20px 0 0; text-align: center; }
}

/* ===== Type ===== */
h1, h2, h3 { margin: 0; font-weight: 700; }
h1 {
  font-size: clamp(40px, 6.6vw, 82px);
  font-stretch: 75%;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
h2 {
  font-size: clamp(30px, 4.4vw, 56px);
  font-stretch: 75%;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.005em; }
p.lede {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--muted);
  max-width: 58ch;
  margin: 0;
}

/* ===== Layout ===== */
.section { padding-top: 96px; padding-bottom: 96px; }
.hero.section { padding-top: 72px; padding-bottom: 88px; }
@media (max-width: 600px) {
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero.section { padding-top: 40px; padding-bottom: 56px; }
}
.section-head { padding-bottom: 40px; }
.section-head.center { text-align: center; max-width: 640px; margin: 0 auto; }
.section-head.center .lede { margin: 0 auto; }

/* Section divider drawn like a timeline ruler */
hr.tick {
  border: 0; margin: 0;
  height: 12px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) bottom / 100% 1px no-repeat,
    repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px 80px) bottom / 100% 12px no-repeat,
    repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 16px) bottom / 100% 6px no-repeat;
}


/* ===== Raw take: the headline edits itself ===== */
.raw-btn {
  display: inline-flex; align-items: center; gap: 9px;
  margin: -8px 0 26px;
  padding: 7px 12px 7px 10px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.raw-btn:hover { color: var(--paper); border-color: var(--paper); }
.raw-btn:focus-visible { outline: 2px solid var(--rec); outline-offset: 3px; }
.raw-btn[disabled] { cursor: default; color: var(--paper); border-color: var(--rec); }
.raw-icon {
  width: 10px; height: 10px;
  flex-shrink: 0;
  background: var(--rec);
  clip-path: polygon(10% 0, 100% 50%, 10% 100%);
}
.raw-btn[disabled] .raw-icon {
  clip-path: circle(40% at 50% 50%);
  animation: recBlink 1s steps(1) infinite;
}

/* During the raw take the headline is locked to its normal height (set in JS),
   so the page below never moves */
#heroTitle.is-raw {
  font-weight: 700;
  font-stretch: 85%;
  overflow: hidden;
}
#heroTitle .tk {
  display: inline-block;
  white-space: pre;
  vertical-align: top;
  position: relative;
  transition: max-width .38s cubic-bezier(0.7, 0, 0.2, 1), opacity .25s ease, color .12s ease;
}
#heroTitle .tk.cut { color: var(--rec); }
#heroTitle .tk.cut::after {
  content: "";
  position: absolute; left: 0; top: 52%;
  height: 0.09em; width: 0;
  background: var(--rec);
  transition: width .14s linear;
}
#heroTitle .tk.cut.struck::after { width: calc(100% - 0.28em); }
#heroTitle .tk.gone { opacity: 0; }

/* ===== Retention graph (bottom-left) ===== */
.retention {
  position: fixed; left: 20px; bottom: 20px; z-index: 98;
  width: 196px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  padding: 10px 10px 10px 12px;
  background: rgba(22, 21, 18, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: width .4s cubic-bezier(0.16, 1, 0.3, 1), border-color .3s ease, opacity .3s ease, transform .3s ease;
}
.retention[hidden] { display: none; }
.retention.enter { opacity: 0; transform: translateY(8px); }
.ret-graph { grid-column: 1 / -1; grid-row: 1; width: 100%; height: 40px; display: block; }
.ret-rest { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.ret-area { fill: rgba(255, 59, 47, 0.16); }
.ret-line { fill: none; stroke: var(--rec); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ret-text { grid-row: 2; display: flex; align-items: baseline; gap: 6px; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ret-num { color: var(--paper); font-variant-numeric: tabular-nums; }
.ret-close {
  grid-row: 2; align-self: center;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: transparent; border: 0; padding: 0;
  color: var(--muted); font-size: 16px; line-height: 1;
  cursor: pointer;
}
.ret-close:hover { color: var(--paper); }
.ret-close:focus-visible { outline: 2px solid var(--rec); outline-offset: 1px; }

/* The payoff when they reach Contact */
.retention.done { width: 300px; border-color: rgba(255, 59, 47, 0.5); }
.retention.done .ret-text { flex-direction: column; gap: 2px; font-family: var(--sans); font-size: 14px; line-height: 1.35; color: var(--paper); }
.retention.done .ret-num { display: none; }
.retention.done .ret-msg strong { font-weight: 700; }
.retention.done .ret-msg span { display: block; color: var(--muted); }
.retention.done.settled { width: 196px; border-color: var(--line); }
.retention.done.settled .ret-msg span { display: none; }
.retention.done.settled .ret-text { font-family: var(--mono); font-size: 12px; }

@media (max-width: 600px) {
  .retention { left: 14px; bottom: 14px; width: 150px; padding: 8px 8px 8px 10px; }
  .ret-graph { height: 28px; }
  .retention.done { width: calc(100vw - 28px); }
  .retention.done.settled { width: 150px; }
}

/* ===== Buttons ===== */
.btn {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-primary { background: var(--paper); color: var(--ink); }
.btn-primary:hover { background: var(--rec); color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
@media (max-width: 420px) {
  .btn-row .btn { flex: 1 1 100%; }
}

/* ===== Grids ===== */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; }
.grid-2.align-top { align-items: start; }

/* Work samples: one wide, two side by side, one wide */
.pyramid-item-full {
  grid-column: 1 / -1;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .pyramid-item-full { max-width: 100%; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; gap: 12px; }
}

/* ===== Hero ===== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 64px;
  align-items: end;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-grid .viewer { max-width: 380px; }
}

/* Photo framed like a monitor, with crop marks in the corners */
.viewer {
  --m: 16px;
  position: relative;
  padding: var(--m);
}
.viewer::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  --c: var(--line-strong);
  background:
    linear-gradient(var(--c), var(--c)) top left / 22px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 22px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 22px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 22px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 22px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 22px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 22px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 22px no-repeat;
}

/* ===== Photo slots (show initials until the image file exists) ===== */
.photo {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.photo::before {
  content: attr(data-initials);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-stretch: 75%;
  color: var(--muted);
}
.photo img {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
}
.photo-portrait::before { font-size: clamp(56px, 9vw, 104px); }
.photo-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
}
.photo-avatar::before { font-size: 18px; }

/* Client faces + stars under the hero buttons */
.proof {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 28px;
}
.proof-faces { display: flex; }
.photo-face {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.photo-face + .photo-face { margin-left: -12px; }
.photo-face::before { font-size: 12px; font-stretch: 100%; font-weight: 700; }
.proof-text { display: flex; flex-direction: column; line-height: 1.3; }
.proof-stars { color: #f5b82e; letter-spacing: 2px; font-size: 15px; }
.proof-text span:last-child {
  font-size: 14px; color: var(--muted);
  transition: color .15s ease;
}
.proof:hover .proof-text span:last-child { color: var(--paper); }

/* ===== Camera viewfinder over the hero photo ===== */
.vf {
  position: absolute; inset: 0;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.vf-rec {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  letter-spacing: 0.08em;
}
.vf-rec i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rec);
  animation: recBlink 1.2s steps(1) infinite;
}
.vf-tc {
  position: absolute; bottom: 14px; right: 14px;
  font-variant-numeric: tabular-nums;
}
/* focus box that "hunts" for focus now and then */
.vf-focus {
  position: absolute; left: 50%; top: 40%;
  width: 34%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  --c: rgba(255, 255, 255, 0.75);
  background:
    linear-gradient(var(--c), var(--c)) top left / 14px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1.5px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 14px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1.5px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 14px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1.5px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 14px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1.5px 14px no-repeat;
  animation: focusHunt 6s ease-in-out infinite;
}
@keyframes focusHunt {
  0%, 70%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .9; }
  76% { transform: translate(-50%, -50%) scale(1.14); opacity: 1; }
  82% { transform: translate(-50%, -50%) scale(0.96); }
  88% { transform: translate(-50%, -50%) scale(1); }
}

/* A playhead sweeps across the headline once on load (text is already there) */
#heroTitle { position: relative; }
#heroTitle::after {
  content: "";
  position: absolute; top: -6px; bottom: -6px; left: 0;
  width: 2px;
  background: var(--rec);
  box-shadow: 0 0 12px rgba(255, 59, 47, 0.6);
  opacity: 0;
  pointer-events: none;
  animation: scan 1.3s 0.15s cubic-bezier(0.5, 0, 0.3, 1) both;
}
@keyframes scan {
  0% { left: 0; opacity: 0; }
  8% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
#heroTitle.is-raw::after { display: none; }

/* ===== About ===== */
.bio .lede { color: var(--paper); }
.bio .lede + .lede { margin-top: 20px; }
.facts { margin: 0; }
.facts div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; }
@media (min-width: 761px) {
  .facts { margin-top: 84px; }
}
@media (max-width: 400px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ===== Service cards: plain panels, hover marks them like a selected clip ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.grid-4 .card {
  min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.grid-4 .card:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow: inset 3px 0 0 var(--rec);
}
.card-text { color: var(--muted); margin: 0; font-size: 15.5px; }
.grid-4 .card h3 { margin-bottom: 10px; }
.grid-4 .card { gap: 0; justify-content: flex-start; }

/* Little looping animations, one per kind of video */
.card-anim {
  display: flex; align-items: center;
  height: 44px;
  margin-bottom: 28px;
  position: relative;
}
/* Course: a lesson progress bar with chapter marks, filling up */
.anim-course {
  background: linear-gradient(var(--line-strong), var(--line-strong)) left center / 100% 3px no-repeat;
}
.anim-course::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  height: 3px; margin-top: -1.5px;
  background: var(--rec);
  animation: courseFill 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.anim-course::after {
  content: "";
  position: absolute; top: 50%;
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--paper);
  animation: courseKnob 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.anim-course i {
  position: absolute; top: 50%;
  width: 2px; height: 11px; margin-top: -5.5px;
  background: var(--ink);
}
.anim-course i:nth-child(1) { left: 22%; }
.anim-course i:nth-child(2) { left: 45%; }
.anim-course i:nth-child(3) { left: 63%; }
.anim-course i:nth-child(4) { left: 84%; }
@keyframes courseFill { 0% { width: 0; } 85%, 100% { width: 100%; } }
@keyframes courseKnob { 0% { left: 0; } 85%, 100% { left: 100%; } }

/* Podcast: an audio waveform */
.anim-pod { gap: 4px; }
.anim-pod i {
  flex: 1;
  height: 100%;
  background: var(--paper);
  border-radius: 2px;
  transform-origin: center;
  animation: wave 1.1s ease-in-out infinite alternate;
  opacity: .85;
}
.anim-pod i:nth-child(3n) { animation-duration: .8s; }
.anim-pod i:nth-child(3n+1) { animation-duration: 1.3s; }
.anim-pod i:nth-child(4n) { animation-delay: -.4s; }
.anim-pod i:nth-child(5n) { animation-delay: -.7s; background: var(--rec); opacity: 1; }
.anim-pod i:nth-child(2n) { animation-delay: -.2s; }
@keyframes wave { from { transform: scaleY(0.15); } to { transform: scaleY(1); } }

/* Vlogs: a strip of film rolling past */
.anim-film {
  overflow: hidden;
  border-radius: 2px;
  background:
    repeating-linear-gradient(to right, var(--ink) 0 4px, transparent 4px 10px) top / 100% 5px repeat-x,
    repeating-linear-gradient(to right, var(--ink) 0 4px, transparent 4px 10px) bottom / 100% 5px repeat-x,
    var(--line-strong);
}
.anim-film i {
  position: absolute; left: 0; right: -64px; top: 8px; bottom: 8px;
  background: repeating-linear-gradient(to right,
    rgba(237, 230, 218, 0.55) 0 26px, var(--ink) 26px 30px,
    rgba(237, 230, 218, 0.3) 30px 56px, var(--ink) 56px 60px,
    rgba(255, 59, 47, 0.7) 60px 86px, var(--ink) 86px 90px,
    rgba(237, 230, 218, 0.42) 90px 116px, var(--ink) 116px 120px);
  animation: filmRoll 2.4s linear infinite;
}
@keyframes filmRoll { to { transform: translateX(-120px); } }

/* Short-form: a phone with clips swiping up */
.anim-phone { justify-content: flex-start; }
.anim-phone i {
  position: relative;
  width: 26px; height: 44px;
  border: 1.5px solid var(--paper);
  border-radius: 5px;
  overflow: hidden;
}
.anim-phone b {
  position: absolute; left: 2px; right: 2px; height: 36px;
  border-radius: 2px;
  animation: swipe 4s cubic-bezier(0.7, 0, 0.2, 1) infinite;
}
.anim-phone b:nth-child(1) { top: 2px; background: var(--rec); }
.anim-phone b:nth-child(2) { top: 42px; background: var(--muted); }
.anim-phone b:nth-child(3) { top: 82px; background: var(--paper); }
.anim-phone b:nth-child(4) { top: 122px; background: var(--rec); }
@keyframes swipe {
  0%, 18% { transform: translateY(0); }
  25%, 43% { transform: translateY(-40px); }
  50%, 68% { transform: translateY(-80px); }
  75%, 93% { transform: translateY(-120px); }
  100% { transform: translateY(-120px); }
}
@media (max-width: 560px) {
  .grid-4 .card { min-height: 0; gap: 12px; padding: 22px 20px; }
}

/* ===== Work: clip cards ===== */
.clip { display: block; }
.clip-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease;
}
.clip-vertical .clip-thumb { aspect-ratio: 9 / 16; }
.clip-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(0.16, 1, 0.3, 1), filter .3s ease;
  filter: brightness(0.82);
}
.clip-play {
  position: absolute;
  left: 50%; top: 50%;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(14, 13, 11, 0.55);
  border: 1.5px solid rgba(237, 230, 218, 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background .15s ease, border-color .15s ease, transform .2s ease;
}
.clip-play::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  margin: -9px 0 0 -5px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--paper);
}
.clip-vertical .clip-play { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
.clip:hover .clip-thumb, .clip:focus-visible .clip-thumb { border-color: var(--line-strong); }
.clip:hover .clip-thumb img { transform: scale(1.03); filter: brightness(1); }
.clip:hover .clip-play, .clip:focus-visible .clip-play {
  background: var(--rec);
  border-color: var(--rec);
  transform: scale(1.06);
}
.clip:focus-visible { outline: none; }
.clip:focus-visible .clip-thumb { outline: 2px solid var(--rec); outline-offset: 3px; }

.clip-meta { padding-top: 14px; }
.clip-label {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 2px;
}
.clip-type {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
@media (max-width: 560px) {
  .clip-label { font-size: 16px; }
  .clip-type { font-size: 12px; }
}

/* ===== Pop-up player ===== */
.player {
  width: 100%; max-width: none;
  height: 100%; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
}
.player::backdrop {
  background: rgba(8, 7, 6, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.player[open] {
  display: flex; align-items: center; justify-content: center;
}
.player-inner {
  width: min(1100px, 100% - 32px);
}
.player.is-vertical .player-inner {
  width: min(420px, 100% - 32px, (100vh - 140px) * 9 / 16);
  width: min(420px, 100% - 32px, (100dvh - 140px) * 9 / 16);
}
.player-bar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 14px;
}
.player-title { font-size: 18px; font-weight: 600; line-height: 1.25; }
.player-type { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.player-close {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.player-close span { font-size: 18px; line-height: 1; }
.player-close:hover { border-color: var(--paper); }
.player-close:focus-visible { outline: 2px solid var(--rec); outline-offset: 3px; }
.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.player.is-vertical .player-frame { aspect-ratio: 9 / 16; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player[open] .player-inner { animation: playerIn .35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes playerIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}

.embed-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.embed-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.embed-frame.square { padding-top: 100%; }

.subhead {
  font-size: clamp(24px, 2.8vw, 34px);
  font-stretch: 75%;
  font-weight: 800;
  margin: 96px 0 8px;
}
.subhead + .lede { margin-bottom: 28px; }

/* Vertical 9:16 reels */
.reels-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  justify-content: center;
  gap: 32px;
}
@media (max-width: 560px) {
  .reels-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ===== Testimonials ===== */
.testimonial {
  margin: 0;
  display: flex; flex-direction: column; gap: 24px;
}
.testimonial blockquote {
  margin: 0;
  font-size: 16px; line-height: 1.7;
  display: flex; flex-direction: column; gap: 14px;
}
.testimonial blockquote p { margin: 0; }
.testimonial blockquote p:first-child { font-size: 19px; line-height: 1.5; font-weight: 500; }
.testimonial figcaption {
  display: flex; align-items: center; gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.stars { display: flex; gap: 2px; color: #f5b82e; margin-bottom: 5px; }
.t-name { font-weight: 600; font-size: 17px; line-height: 1.2; }
.t-role { font-size: 14px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

/* ===== Contact ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start;
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
.contact-paths p { color: var(--muted); margin: 0 0 24px; }
.contact-info-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.contact-info-item .ci-label { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.contact-info-item a {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  word-break: break-word;
  background: linear-gradient(var(--rec), var(--rec)) left bottom / 0 2px no-repeat;
  transition: background-size .25s ease;
}
.contact-info-item a:hover { background-size: 100% 2px; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
@media (max-width: 600px) {
  .contact-form { padding: 22px 18px; }
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block; font-size: 14px; font-weight: 500;
  color: var(--muted); margin-bottom: 8px;
}
.form-row input, .form-row textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px; /* 16px stops iOS zooming into the field */
  resize: vertical;
  transition: border-color .15s ease;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--paper);
}
.contact-form .btn { width: 100%; }
.hp-field { position: absolute; left: -9999px; }
.form-note { margin: 14px 0 0; font-size: 14px; min-height: 20px; color: var(--muted); }
.form-note.success { color: var(--paper); }
.form-note.error { color: var(--rec); }

/* ===== Floating contact button ===== */
.floating-contact-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background: var(--paper);
  color: var(--ink);
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: opacity .25s ease, transform .25s ease, background .15s ease, color .15s ease;
}
.floating-contact-btn:hover { background: var(--rec); color: #fff; }
.floating-contact-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
@media (max-width: 600px) {
  .floating-contact-btn { bottom: 14px; right: 14px; padding: 10px 14px; font-size: 13px; }
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 96px;
}
.footer-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-mono { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.footer-mono a:hover { color: var(--paper); }

/* Carousel controls (only shown on phones, see below) */
.car-nav {
  display: none;
  align-items: center; justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}
.car-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}
.car-btn:active { background: var(--surface-2); }
.car-btn:focus-visible { outline: 2px solid var(--rec); outline-offset: 3px; }
.car-btn[disabled] { opacity: .3; cursor: default; }
.car-dots { display: flex; gap: 8px; }
.car-dots button {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 4px;
  background: var(--line-strong);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.car-dots button[aria-current="true"] { width: 24px; background: var(--rec); }

/* ===== Phones ===== */
@media (max-width: 760px) {
  /* hero photo becomes a wide camera frame instead of a full-screen portrait */
  .hero-grid .viewer { max-width: none; --m: 12px; }
  .photo-portrait { aspect-ratio: 16 / 10; }
  .photo-portrait img { object-position: center 22%; }
  .photo-portrait::before { font-size: 56px; }
  .vf-focus { width: 24%; top: 45%; }
  .section-head.center { text-align: left; }
  .section-head.center .lede { margin: 0; }
}
@media (max-width: 560px) {
  /* services become a swipeable row with the next card peeking in */
  .grid-4 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px;
    gap: 12px;
    margin: 0 -20px;
    padding: 0 20px 4px;
    scrollbar-width: none;
  }
  .grid-4::-webkit-scrollbar { display: none; }
  .car-nav { display: flex; }
  .grid-4 .card {
    flex: 0 0 80%;
    scroll-snap-align: start;
    min-height: 236px;
  }
  .card-anim { margin-bottom: 22px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .section-head { padding-bottom: 28px; }
}

/* ===== Scroll-linked motion (only transforms, content is never hidden) ===== */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .clip-thumb img {
      animation: drift linear both;
      animation-timeline: view();
    }
    main h2 {
      animation: glide linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
    @media (min-width: 561px) {
      .grid-4 .card, .testimonial, .clip {
        animation: rise linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 90%;
      }
    }
  }
}
@keyframes drift {
  from { transform: scale(1.16) translateY(-3%); }
  to { transform: scale(1.1) translateY(3%); }
}
@keyframes glide { from { transform: translateX(-40px); } to { transform: none; } }
@keyframes rise { from { transform: translateY(48px) scale(0.96); } to { transform: none; } }

a:focus-visible, .btn:focus-visible, .nav-toggle:focus-visible {
  outline: 2px solid var(--rec);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .rec, .raw-btn[disabled] .raw-icon { animation: none; }
  #heroTitle .tk, .retention { transition: none; }
  .vf-rec i, .vf-focus, #heroTitle::after,
  .card-anim i, .card-anim b, .card-anim::before, .card-anim::after { animation: none; }
  .anim-course::before { width: 60%; }
  .anim-course::after { left: 60%; }
  .player[open] .player-inner { animation: none; }
  .clip-thumb img { transition: none; }
}
