/* ================= Sticky "workday" video ================= */
:root { --reel-w: min(39vw, 680px); }

.reel {
  position: fixed; z-index: 40;
  pointer-events: none;
}
.reel__card {
  position: relative; overflow: hidden;
  border-radius: 26px;
  background: #111115;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4), 0 0 60px rgba(198,255,61,.06);
  pointer-events: auto;
  transition: box-shadow .4s;
}
.reel.is-working .reel__card { box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(198,255,61,.35), 0 0 70px rgba(198,255,61,.14); }
.reel video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 0% 50%; /* keep the laptop + me, trim the right-hand wall */
  display: block;
}
.reel__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,8,10,.55) 0%, transparent 22%, transparent 62%, rgba(8,8,10,.85) 100%);
}

.reel__top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.reel__status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(10,10,12,.72); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: .72rem; color: var(--text); white-space: nowrap;
}
.reel__status i { width: 8px; height: 8px; border-radius: 50%; background: #6b6b75; flex: none; transition: background .3s, box-shadow .3s; }
.reel.is-working .reel__status i { background: var(--accent); box-shadow: 0 0 0 4px rgba(198,255,61,.18); animation: pulse 2s infinite; }
.reel.is-waking .reel__status i, .reel.is-bye .reel__status i { background: #ffd166; }
.reel__status b { font-weight: 500; }
.reel__clock { padding: 6px 10px; border-radius: 99px; background: rgba(10,10,12,.72); border: 1px solid rgba(255,255,255,.12); font-size: .72rem; color: #cfcfd6; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.reel__task {
  position: absolute; left: 18px; right: 18px; bottom: 26px;
  font-family: var(--display); font-weight: 500; font-size: clamp(1rem, 1.5vw, 1.35rem); line-height: 1.25; letter-spacing: -0.01em;
  color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6);
  transition: opacity .3s, transform .3s;
}
.reel__task.is-swap { opacity: 0; transform: translateY(6px); }
.reel__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.1); }
.reel__progress span { display: block; height: 100%; width: 0; background: var(--accent); }

.reel__toggle {
  display: none;
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 1rem; line-height: 28px; color: #fff;
  background: rgba(10,10,12,.7);
}

/* ---------- desktop: pinned on the right for the whole page ---------- */
@media (min-width: 1024px) {
  .reel { top: 0; right: 0; bottom: 0; width: var(--reel-w); padding: 92px var(--pad) 32px 0; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
  /* full height, right ~15% of the frame trimmed (3:2) */
  .reel__card { width: 100%; aspect-ratio: 3 / 2; height: auto; flex: none; }
  .reel__days { display: flex; }

  main, .sitelinks, .footer { margin-right: var(--reel-w); }
  .stack { margin-right: 0; }

  /* the hero's right side is now the video */
  .hero__photo { display: none; }
  .hero__content { max-width: none !important; }
  .hero__name { font-size: clamp(3.6rem, 8.4vw, 10.5rem); }
  .hero__role { font-size: clamp(1.15rem, 2.1vw, 2rem); }

  /* sections now live in the left ~60% */
  .steps, .products, .clients, .contact__grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { margin-left: 0; }
  .build { grid-template-columns: 1fr; }
  .build:nth-child(even) .build__visual { order: 0; }
  .build__visual { aspect-ratio: 16 / 9; }
  .contact__title { font-size: clamp(2.8rem, 6.4vw, 7rem); }
  .section__title { font-size: clamp(2.4rem, 4.6vw, 4.6rem); }
}
@media (min-width: 1024px) and (max-width: 1699px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 32px clamp(20px, 3vw, 48px); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .job { grid-template-columns: 170px 1fr; gap: 24px; }
}

/* ---------- phones & tablets: floating mini player ---------- */
@media (max-width: 1023px) {
  .reel { right: 12px; bottom: 12px; width: min(54vw, 260px); }
  .reel__card { aspect-ratio: 3 / 2; border-radius: 16px; }
  .reel__top { top: 8px; left: 8px; right: 40px; }
  .reel__clock { display: none; }
  .reel__status { font-size: .62rem; padding: 4px 8px; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .reel__task { left: 10px; right: 10px; bottom: 10px; font-size: .74rem; }
  .reel__toggle { display: block; }
  .reel__days { display: none; }
  .reel.is-min { width: auto; }
  .reel.is-min .reel__card { aspect-ratio: auto; width: 58px; height: 58px; border-radius: 50%; cursor: pointer; }
  .reel.is-min .reel__top, .reel.is-min .reel__task, .reel.is-min .reel__progress, .reel.is-min .reel__shade { display: none; }
  .reel.is-min .reel__toggle { inset: 0; width: 100%; height: 100%; background: transparent; font-size: 0; }
  .footer { padding-bottom: 28px; }
}

/* day stages under the video (desktop) */
.reel__days { justify-content: space-between; gap: 6px; pointer-events: auto; }
.reel__days span {
  flex: 1; text-align: center; padding: 9px 4px; border-radius: 12px;
  font-family: var(--mono); font-size: .7rem; color: var(--muted);
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  transition: color .3s, border-color .3s, background .3s;
}
.reel__days span.is-on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.reel__days span.is-done { color: #cfcfd6; border-color: rgba(198,255,61,.35); }

/* hidden while the AI intro runs */
body.intro-on .reel { opacity: 0; }
.reel { transition: opacity .5s; }
