/* ============================================================
   3 BLOCK STUDIO — Mobile (true portrait, vertical scroll)
   Purpose-built phone layout. Activates < 640px via app Root.
   Reuses brand tokens from styles.css (--bg/--fg/--accent/etc).
   ============================================================ */

.m-root {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  --mpad: 22px;
  --rhythm: clamp(64px, 13vh, 104px);
  scroll-behavior: smooth;
}

/* scroll progress (top hairline) */
.m-prog {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--accent); z-index: 90;
  width: 0%; transition: width 90ms linear;
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent);
}

/* ---------- Top bar ---------- */
.m-top {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--mpad);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.m-top .brand-logo { height: 16px; }
.m-top .brand-logo svg path { fill: var(--fg); }
.m-tbtn {
  -webkit-appearance: none; appearance: none;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: transparent; color: var(--fg);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color 200ms, background 200ms;
}
.m-tbtn:active { background: var(--accent); border-color: var(--accent); }
.m-tbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Generic section scaffold ---------- */
.m-sec { padding: var(--rhythm) var(--mpad); position: relative; }
.m-sec + .m-sec { border-top: 1px solid var(--line); }
.m-eyebrow {
  display: flex; align-items: center; gap: 11px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 26px;
}
.m-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.m-eyebrow .num { color: var(--accent); font-weight: 700; }
.m-display {
  font-family: var(--font-display); font-weight: var(--display-weight);
  letter-spacing: -0.03em; line-height: 0.92; text-wrap: balance;
}
.m-accent { color: var(--accent); }

/* reveal on scroll — armed by JS so content is NEVER trapped invisible.
   Base state is visible; only once .m-root gets `.reveal-armed` (JS confirmed
   running) do un-revealed items hide, then `.in` brings them back. */
.m-rise { opacity: 1; transform: none; }
.reveal-armed .m-rise { opacity: 0; transform: translateY(22px); transition: opacity 640ms var(--ease), transform 640ms var(--ease); }
.reveal-armed .m-rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-armed .m-rise { opacity: 1 !important; transform: none !important; transition: none !important; }
  .m-root { scroll-behavior: auto; }
}

/* ---------- Hero / opener ---------- */
.m-hero { padding-top: clamp(40px, 8vh, 72px); padding-bottom: clamp(48px, 9vh, 80px); min-height: 86vh; display: flex; flex-direction: column; }
.m-verbs { list-style: none; margin: auto 0; display: flex; flex-direction: column; gap: 6px; }
.m-vrow { display: flex; align-items: center; gap: 18px; }
.m-vshape { flex: none; width: 38px; height: 38px; }
.m-vshape svg { display: block; width: 100%; height: 100%; }
.m-vtext {
  font-family: var(--font-display); font-weight: var(--display-weight);
  letter-spacing: -0.03em; font-size: clamp(34px, 11.5vw, 62px); line-height: 1.0; color: var(--fg);
  white-space: nowrap;
}
.m-vtext em { font-style: normal; }
.m-vrow.is-make .m-vtext { color: var(--accent); }
.m-vrow.is-make em { font-style: italic; font-weight: 700; }
.m-hero-foot {
  margin-top: clamp(34px, 7vh, 60px); padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px;
}
.m-hero-foot .fline { color: var(--muted); font-size: 13px; letter-spacing: 0.03em; line-height: 1.5; }
.m-hero-foot .brand-tag { height: 30px; align-self: flex-start; }

/* ---------- Thesis ---------- */
.m-claim { font-size: clamp(34px, 9.6vw, 50px); line-height: 1.02; }
.m-thesis-sub { margin-top: 26px; color: var(--muted); font-size: clamp(17px, 4.6vw, 21px); line-height: 1.5; text-wrap: pretty; }

/* ---------- Capabilities ---------- */
.m-caps-head h2 { font-size: clamp(40px, 12vw, 58px); }
.m-caps-list { margin-top: 30px; border-top: 1px solid var(--line); }
.m-cap {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.m-cap .cnum { font-size: 12px; font-weight: 600; color: var(--muted-2); flex: none; width: 2.2ch; align-self: flex-start; padding-top: 4px; }
.m-cap .cname {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(20px, 6vw, 28px); line-height: 1.05; flex: 1 1 auto; min-width: 0; text-wrap: balance;
}
.m-cap .m-cap-clip {
  flex: none; width: 92px; height: 60px; border-radius: 5px;
  object-fit: cover; background: var(--bg-2); display: block;
}

/* ---------- Reels ---------- */
.m-reels-head h2 { font-size: clamp(40px, 12vw, 58px); }
.m-reels-head .sub { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.m-reel-stack { margin-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.m-reel {
  position: relative; aspect-ratio: 9 / 11; border-radius: 12px; overflow: hidden;
  background: #000; cursor: pointer; isolation: isolate;
  border: 1px solid var(--line);
}
.m-reel-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.m-reel-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(0deg, rgba(8,7,6,0.9) 4%, rgba(8,7,6,0.28) 38%, rgba(8,7,6,0.05) 64%);
  transition: opacity 320ms var(--ease);
}
.m-reel-meta { position: absolute; z-index: 3; left: 18px; right: 18px; bottom: 18px; pointer-events: none; transition: opacity 280ms var(--ease); }
.m-reel-meta .rk { display: flex; align-items: center; gap: 9px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(243,238,228,0.78); margin-bottom: 10px; }
.m-reel-meta .rk .num { color: var(--accent); }
.m-reel-meta .rtitle { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.03em; font-size: clamp(30px, 9vw, 42px); line-height: 0.92; color: #fff; text-shadow: 0 8px 40px rgba(0,0,0,0.5); }
.m-reel-play {
  position: absolute; z-index: 4; top: 16px; right: 16px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 10px 34px rgba(0,0,0,0.45);
  transition: transform 240ms var(--ease);
}
.m-reel:active .m-reel-play { transform: scale(0.92); }
.m-reel-play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
/* corner ticks */
.m-reel .ct { position: absolute; width: 15px; height: 15px; border: 0 solid var(--accent); z-index: 4; pointer-events: none; }
.m-reel .ct.a { top: 11px; left: 11px; border-top-width: 2px; border-left-width: 2px; }
.m-reel .ct.c { bottom: 11px; left: 11px; border-bottom-width: 2px; border-left-width: 2px; }
.m-reel .ct.d { bottom: 11px; right: 11px; border-bottom-width: 2px; border-right-width: 2px; }
/* playing */
.m-reel.is-playing { cursor: default; }
.m-reel-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 6; background: #000; }
.m-reel.is-playing .m-reel-scrim,
.m-reel.is-playing .m-reel-meta,
.m-reel.is-playing .ct,
.m-reel.is-playing .m-reel-play { opacity: 0; pointer-events: none; }
.m-reel-close {
  position: absolute; z-index: 8; top: 12px; right: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(243,238,228,0.4); background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0;
  transition: opacity 240ms;
}
.m-reel.is-playing .m-reel-close { opacity: 1; }
.m-reel-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; fill: none; }

/* ---------- Process (vertical timeline) ---------- */
.m-proc-list { margin-top: 8px; display: flex; flex-direction: column; }
.m-pstep { position: relative; padding: 0 0 38px 34px; }
.m-pstep::before { content: ''; position: absolute; left: 5px; top: 7px; bottom: -7px; width: 1.5px; background: var(--line); }
.m-pstep:last-child { padding-bottom: 0; }
.m-pstep:last-child::before { display: none; }
.m-pstep::after { content: ''; position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.m-pstep .pn { font-size: 12px; font-weight: 600; color: var(--muted-2); letter-spacing: 0.04em; }
.m-pstep .pt { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(24px, 6.6vw, 32px); line-height: 1.05; margin: 8px 0 10px; }
.m-pstep .pd { color: var(--muted); font-size: 15.5px; line-height: 1.5; text-wrap: pretty; }

/* ---------- Clients ---------- */
.m-clients-claim { font-size: clamp(30px, 8.4vw, 44px); line-height: 1.05; max-width: 16ch; }
.m-logo-grid {
  margin-top: 38px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px 14px;
}
.m-logo-cell { display: grid; place-items: center; aspect-ratio: 3 / 2; }
.m-logo-cell img { max-width: 64%; max-height: 46%; width: auto; height: auto; object-fit: contain; opacity: 0.9; }
[data-theme="dark"] .m-logo-cell img { filter: invert(1) brightness(1.7); }

/* ---------- Team ---------- */
.m-team-head h2 { font-size: clamp(36px, 10.5vw, 52px); margin-top: 4px; }
.m-team-lede { margin-top: 18px; color: var(--muted); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.m-team-grid { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.m-member { display: flex; flex-direction: column; }
.m-member .m-photo { width: 100%; aspect-ratio: 4/5; object-fit: cover; background: var(--bg-2); border-radius: 6px; display: block; }
.m-member .spec-card { width: 100%; aspect-ratio: 4/5; border-radius: 6px; background: var(--accent); display: grid; place-items: center; }
.m-member .spec-card img { width: 46px; height: auto; }
.m-member .m-name { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 20px; margin-top: 12px; }
.m-member .m-role { color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 6px; }
.m-member .m-bio { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 9px; }
.m-member.is-spec { grid-column: 1 / -1; }
.m-member.is-spec .spec-card { aspect-ratio: 16/7; }

/* ---------- CTA ---------- */
.m-cta { padding-bottom: clamp(72px, 14vh, 120px); }
.m-cta .m-big { font-size: clamp(44px, 13.5vw, 72px); line-height: 0.96; }
.m-cta-link {
  margin-top: 34px; display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(22px, 6vw, 30px); color: var(--fg); text-decoration: none;
  border-bottom: 2px solid var(--accent); padding-bottom: 5px;
}
.m-cta-link .arr { color: var(--accent); }
.m-cta-sign { margin-top: 46px; display: flex; flex-direction: column; gap: 16px; }
.m-cta-sign .brand-logo { height: 22px; align-self: flex-start; }
.m-cta-sign .brand-tag { height: 36px; align-self: flex-start; }
.m-meta { margin-top: 34px; display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 13px; letter-spacing: 0.03em; }

/* Hide desktop deck chrome when mobile mounts (root swaps, but guard anyway) */
.m-root .rail, .m-root .nav, .m-root .cropmarks { display: none; }
