/* ============================================================
   Alex D. — orange portrait prototype (buildless), v009
   Neutral #f5f5f5 base, eased hero shrink, capsule glass nav,
   reel frame, bold stats, review marquee, justified gallery
   + lightbox, scripted demo chat.
   ============================================================ */

@import url("fonts.css");

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --line: #e5e5e5;
  --ink: #171717;
  --muted: #6b6b6b;
  --cream: #fff2dd;
  --cream-dim: rgba(255, 242, 221, 0.75);
  --red: #8a1500;
  --orange: #f05a0e;
  --apricot: #ffd9a8;
  --dark: #16110d;
  --reel-base: #120b06;
  --warm-dark: #63310f;
  --radius-md: 16px;
  --radius-pill: 999px;
  --pad-x: clamp(24px, 3.5vw, 48px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  /* Homepage wide frame shared by Reviews and Services */
  --wide-frame-max: 1920px;
  --wide-frame-gutter: 24px;
  --site-font: "Sora", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--site-font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
}

img {
  display: block;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h2 {
  font-size: clamp(34px, 4vw, 56px);
}

h3 {
  font-size: clamp(18px, 2vw, 24px);
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
video:focus-visible,
dialog:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--orange);
  color: var(--cream);
}

/* Single centered scene for every page */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.container > * {
  min-width: 0;
}

section {
  scroll-margin-top: 96px;
}

.section-label {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Shared centered heading for the grid front doors (Experience, Services):
   one eyebrow → display title rhythm, constrained width, balanced wrap */
.section-heading {
  max-width: 880px;
  margin: 0 auto clamp(28px, 4vw, 48px);
  text-align: center;
}

.section-heading .section-label {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.1;
  text-wrap: balance;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Reveal: visible by default; short entrance only when armed below fold */
html.js .reveal.is-visible {
  animation: revealIn 0.6s var(--ease) both;
}

@keyframes revealIn {
  from {
    opacity: 0.35;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Navigation — full width; collapses into glass capsule after hero
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

/* Decorative gradient blur strip under the bar (hero only) */
.nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 12, 6, 0.34) 0%, rgba(20, 12, 6, 0.16) 40%, rgba(20, 12, 6, 0) 100%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.8) 35%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.8) 35%, transparent 100%);
  opacity: 1;
  transition: opacity 0.4s var(--ease);
}

.nav.nav-light::before {
  background: linear-gradient(180deg, rgba(245, 245, 245, 0.62) 0%, rgba(245, 245, 245, 0.3) 40%, rgba(245, 245, 245, 0) 100%);
}

/* Once past the hero the strip is gone; the capsule carries its own blur */
.nav.is-capsule::before {
  opacity: 0;
}

.nav-inner {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  background: transparent;
  transition: max-width 0.45s var(--ease), margin 0.45s var(--ease), padding 0.45s var(--ease),
    border-radius 0.45s var(--ease), background 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

/* Compact rounded glass capsule */
.nav.is-capsule .nav-inner {
  max-width: min(860px, calc(100% - 24px));
  margin-top: 10px;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  background: rgba(22, 17, 13, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.nav.nav-light.is-capsule .nav-inner {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.nav-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand .brand-mark {
  width: 60px;
  height: auto;
  display: block;
  transition: width 0.45s var(--ease), filter 0.3s var(--ease);
}

.nav.is-capsule .nav-brand .brand-mark {
  width: 46px;
}

/* Black monogram: invert to white on dark/orange surfaces,
   keep as-is on light surfaces */
.nav.nav-dark .brand-mark {
  filter: invert(1);
}

.nav.nav-light .brand-mark {
  filter: none;
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 56px);
}

.nav-links a {
  font-size: 16px;
  text-decoration: none;
  padding: 10px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: opacity 0.25s var(--ease);
}

.nav-links a:hover {
  border-bottom-color: currentColor;
}

.nav-links a[aria-current="page"] {
  border-bottom-color: currentColor;
}

.nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
  text-decoration: none;
  font-size: 16px;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), padding 0.45s var(--ease);
}

.nav.is-capsule .nav-cta {
  padding: 8px 16px;
}

.nav-cta:hover {
  transform: translateY(-1px);
}

.nav-cta .arrow {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid currentColor;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: transform 0.3s var(--ease);
}

.nav-cta:hover .arrow {
  transform: translateX(3px);
}

/* Dark surfaces (hero / reel / services): light text */
.nav.nav-dark {
  color: var(--cream);
}

.nav.nav-dark .nav-links a {
  color: var(--cream-dim);
}

.nav.nav-dark .nav-links a:hover,
.nav.nav-dark .nav-links a[aria-current="page"] {
  color: var(--cream);
}

.nav.nav-dark.is-capsule .nav-links a {
  color: rgba(255, 242, 221, 0.85);
}

.nav.nav-dark.is-capsule .nav-links a:hover,
.nav.nav-dark.is-capsule .nav-links a[aria-current="page"] {
  color: var(--cream);
}

/* Light surfaces: dark text */
.nav.nav-light {
  color: var(--ink);
}

.nav.nav-light .nav-links a {
  color: var(--ink);
  opacity: 0.75;
}

.nav.nav-light .nav-links a:hover,
.nav.nav-light .nav-links a[aria-current="page"] {
  opacity: 1;
}

.nav.nav-light .nav-cta {
  color: var(--ink);
}

.nav.nav-light .nav-cta:hover {
  background: var(--ink);
  color: var(--surface);
}

/* Mobile menu */
.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}

.nav-menu-panel {
  display: none;
}

/* ============================================================
   Hero — full bleed; eased shrink into a rounded block on scroll
   ============================================================ */

.hero-wrap {
  position: relative;
  /* keeps the normal flow height while the hero itself scales */
}

.hero {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  background: var(--red);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  transform-origin: center center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 90% at 70% 30%, rgba(255, 150, 60, 0.5) 0%, rgba(240, 90, 14, 0.28) 40%, transparent 70%),
    radial-gradient(90% 70% at 20% 85%, rgba(255, 217, 168, 0.55) 0%, transparent 65%),
    linear-gradient(180deg, var(--red) 0%, #c22e02 26%, var(--orange) 58%, #f7892e 80%, var(--apricot) 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
}

.hero-scene {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 104px var(--pad-x) 96px;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  align-items: center;
}

.hero-scene > * {
  min-width: 0;
}

.hero-greeting {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-rubric {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(56px, 7.5vw, 128px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--cream);
  margin: 0 0 28px;
}

.hero-title span {
  display: block;
}

.hero-title .line-1 {
  white-space: nowrap;
}

.hero-sub {
  max-width: 460px;
  color: var(--cream-dim);
  font-size: 17px;
}

.hero-sub .lead {
  color: var(--cream);
  font-size: 19px;
  margin-bottom: 10px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--cream);
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
}

.btn-ghost:hover {
  background: rgba(255, 242, 221, 0.15);
}

.btn .arrow {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid currentColor;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: transform 0.3s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* Portrait: real photo, absolute layer over the right side of the scene.
   Soft mask melts the baked-in background edges into the hero gradient;
   the face (upper part) stays sharp and unmasked. */
.hero-portrait {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: min(86svh, 1000px);
  width: auto;
  aspect-ratio: 1792 / 2400;
  max-width: min(52%, 1000px);
  pointer-events: none;
  min-width: 0;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  display: block;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0) 97%),
    linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 7%, #000 93%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0) 97%),
    linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 7%, #000 93%, rgba(0, 0, 0, 0) 100%);
  mask-composite: intersect;
}

/* Ghost text: decorative, does not compete with the H1 */
.hero-ghost {
  position: absolute;
  left: 50%;
  bottom: -0.14em;
  transform: translateX(-50%);
  z-index: -1;
  font-size: clamp(70px, 11vw, 150px);
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  line-height: 1;
  color: rgba(255, 242, 221, 0.12);
  pointer-events: none;
  user-select: none;
}

/* Prototype tools (portrait preview) — small fixed details, unchanged */
.proto-tools {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 60;
  max-width: 280px;
  font-size: 13px;
}

.proto-tools summary {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(22, 17, 13, 0.85);
  color: var(--cream-dim);
  border: 1px solid rgba(255, 242, 221, 0.3);
  list-style: none;
}

.proto-tools summary::-webkit-details-marker {
  display: none;
}

.proto-tools[open] summary {
  border-radius: 12px 12px 0 0;
}

.proto-tools-body {
  padding: 14px;
  border-radius: 0 0 12px 12px;
  background: rgba(22, 17, 13, 0.92);
  color: var(--cream-dim);
}

.proto-tools input[type="file"] {
  font-size: 12px;
  color: var(--cream-dim);
  max-width: 100%;
}

.proto-tools .btn-mini {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 242, 221, 0.4);
  background: transparent;
  color: var(--cream);
  font-size: 12px;
  cursor: pointer;
}

/* ============================================================
   Reel — wide rounded frame; the video fills the whole panel.
   Custom glass player (JS) with native controls as no-JS fallback.
   ============================================================ */

.reel {
  position: relative;
  padding: 20px 24px;
  background: var(--bg);
  /* glow may bleed past the frame, but never past the section into the page */
  overflow-x: clip;
}

/* Positioning context tied to the 1920px frame, not the full-bleed
   section: glow center always matches the frame center on 360/1440/2560 */
.reel-ambient-wrap {
  position: relative;
  isolation: isolate;
  max-width: 1920px;
  margin: 0 auto;
}

/* Ambient light: a tiny canvas mirrors the live frame as light-only
   pastel samples, blurred and masked so the glow fades into #f5f5f5
   around the frame edges — no dark rectangle, no hard cut */
.reel-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% + 90px);
  height: calc(100% + 70px);
  max-width: none;
  z-index: 0;
  filter: blur(25px);
  opacity: 0.9;
  pointer-events: none;
  /* Both masks reach zero at the layer boundary, after blur. A large
     radial ellipse left nonzero alpha there and exposed a straight cut. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent), linear-gradient(180deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent), linear-gradient(180deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.reel-frame {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
  border-radius: 28px;
  overflow: hidden;
  background: #0c0805;
}

.reel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.reel-main {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0c0805;
}

/* Corner labels sit above the video without covering the frame */
.reel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  pointer-events: none;
}

.reel-tag {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 242, 221, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.reel-vimeo {
  pointer-events: auto;
  font-size: 13px;
  color: rgba(255, 242, 221, 0.85);
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.reel-vimeo:hover {
  text-decoration: underline;
}

/* Big flat-glass play button over the paused video.
   Geometry, blur and rim are stable: hover only moves the inner
   highlight and adjusts shadows — the button never scales. */
.reel-bigplay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 136px;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -10px 22px rgba(255, 255, 255, 0.05),
    0 0 36px rgba(255, 255, 255, 0.16),
    0 10px 30px rgba(0, 0, 0, 0.35);
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
}

/* Pointer-following highlight on the glass (vars set from JS) */
.reel-bigplay::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120px circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%);
  opacity: var(--bshine, 0);
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.reel-bigplay:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -10px 22px rgba(255, 255, 255, 0.08),
    0 0 46px rgba(255, 255, 255, 0.24),
    0 10px 30px rgba(0, 0, 0, 0.35);
}

.reel-bigplay svg {
  width: 52px;
  height: 52px;
  margin-left: 5px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.reel-stage.is-playing .reel-bigplay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Bottom control bar over a soft gradient veil */
.reel-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.62) 100%);
}

.rp-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
}

.rp-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.rp-btn svg {
  width: 22px;
  height: 22px;
}

.rp-btn .ic-pause {
  display: none;
}

.reel-stage.is-playing #rp-play .ic-play {
  display: none;
}

.reel-stage.is-playing #rp-play .ic-pause {
  display: block;
}

.rp-mute .ic-mute {
  display: none;
}

.rp-mute.is-muted .ic-vol {
  display: none;
}

.rp-mute.is-muted .ic-mute {
  display: block;
}

.rp-seek {
  flex: 1 1 auto;
  min-width: 0;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.rp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--orange);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.rp-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--orange);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.rp-seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.rp-time {
  flex: 0 0 auto;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}

/* Native controls stay until the custom UI is safely initialized */
.reel-stage:not(.is-enhanced) .reel-controls,
.reel-stage:not(.is-enhanced) .reel-bigplay {
  display: none;
}

/* ============================================================
   Experience — bold numbers, no table
   ============================================================ */

.experience {
  padding: 120px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  margin-top: 0; /* .section-heading owns the heading → content rhythm */
}

.stat {
  min-width: 0;
}

/* Counter: final value reserves the exact box and stays readable by SR;
   the animated layer is aria-hidden and only visible while counting */
.stat-num {
  position: relative;
  display: inline-block;
}

.stat .value,
.stat .stat-anim {
  /* ONE shared display style so final and animated layers match exactly */
  font-size: clamp(52px, 5.8vw, 86px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat .stat-anim {
  position: absolute;
  left: 0;
  right: 0; /* overlay spans the final-width box so the suffix X stays fixed */
  top: 0;
  display: none;
}

.stats-grid.is-counting .stat .value {
  color: transparent; /* stays in the a11y tree, overlay draws the count */
}

.stats-grid.is-counting .stat .stat-anim {
  display: block;
}

/* Suffix sits in its own slot pinned to the final number's right edge —
   identical X during the whole count-up */
.stat-anim-num,
.stat-anim-suffix {
  font-variant-numeric: tabular-nums;
}

.stat-anim-suffix {
  position: absolute;
  right: 0;
  top: 0;
}

.stat .label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
}

.stats-note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

.stats-note a {
  color: var(--ink);
}

/* ============================================================
   Reviews — warm gradient glass scene, counter-moving rows
   ============================================================ */

.reviews {
  padding: 40px var(--wide-frame-gutter) 100px;
}

.reviews-shell {
  /* keeps the layout height while the scene itself eases to scale .96 */
}

.reviews-scene {
  position: relative;
  max-width: var(--wide-frame-max);
  margin: 0 auto;
  border-radius: 32px;
  overflow: hidden;
  transform-origin: center top;
  padding: 96px 0 64px;
  background:
    radial-gradient(90% 60% at 18% 6%, rgba(122, 20, 0, 0.6) 0%, rgba(122, 20, 0, 0) 60%),
    radial-gradient(80% 55% at 86% 10%, rgba(240, 90, 14, 0.42) 0%, rgba(240, 90, 14, 0) 62%),
    radial-gradient(70% 60% at 50% 104%, rgba(255, 217, 168, 0.8) 0%, rgba(255, 217, 168, 0) 68%),
    linear-gradient(180deg, #7a1400 0%, #b23005 30%, #e4580e 62%, #f7892e 85%, #ffd9a8 100%);
}

.reviews-scene .rv-head {
  text-align: center;
  margin-bottom: 48px;
}

.reviews-scene .rv-head h2 {
  font-size: clamp(32px, 4.6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cream);
}

.reviews-scene .rv-head em {
  font-style: normal;
  color: #ffffff;
  text-shadow: 0 0 26px rgba(255, 90, 14, 0.65);
}

/* Honest caption sits right under the heading */
.reviews-scene .rv-head .rv-iron {
  font-size: 15px;
  color: var(--cream);
  opacity: 0.92;
  margin: 24px 0 0;
}

.reviews-scene .rv-head {
  margin-bottom: 44px;
}

.rv-row {
  overflow: hidden;
  /* vertical room so the gentle hover scale is never clipped */
  padding: 18px 0;
  /* cards drift out of the colored haze, no white overlay cuts */
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, #000 clamp(32px, 6vw, 120px), #000 calc(100% - clamp(32px, 6vw, 120px)), rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, #000 clamp(32px, 6vw, 120px), #000 calc(100% - clamp(32px, 6vw, 120px)), rgba(0, 0, 0, 0) 100%);
}

.rv-track {
  display: flex;
  gap: 18px;
  width: max-content;
  /* motion is driven by JS phase transform — no competing CSS animation */
  will-change: transform;
}

/* Without JS: show the originals statically, no empty track */
html:not(.js) .rv-track {
  width: 100%;
  flex-wrap: wrap;
  will-change: auto;
  transform: none;
}

.rv-card {
  position: relative;
  overflow: hidden;
  flex: 0 0 min(400px, 86vw);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 18px;
  /* dark warm translucent glass with rim only: no outer shadow and no
     backdrop-filter (they clipped into dark stripes at the row edges) */
  background: linear-gradient(160deg, rgba(45, 14, 3, 0.4) 0%, rgba(65, 20, 5, 0.32) 100%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-decoration: none;
  color: var(--cream);
  transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Gentle hover grow, only where a real hover pointer exists */
@media (hover: hover) and (pointer: fine) {
  .rv-card:hover {
    transform: scale(1.015);
  }
}

/* Pointer-following shine (CSS vars set from delegated JS, one rAF) */
.rv-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(190px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 62%);
  opacity: var(--shine, 0);
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

/* Click sweep: does not block the normal Upwork navigation */
.rv-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.32) 50%, rgba(255, 255, 255, 0) 68%);
  transform: translateX(-130%);
  pointer-events: none;
}

.rv-card.is-swept::before {
  animation: rvSweep 0.7s var(--ease);
}

@keyframes rvSweep {
  to {
    transform: translateX(130%);
  }
}

.rv-card:hover {
  /* no scale: avoids shimmering blur/border */
}

.rv-quote {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0;
  overflow-wrap: break-word;
}

/* Author block: honest placeholder (avatar + name on top of the card) */
.rv-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rv-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff2dd'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4.4 0-7.5 2.2-7.5 4.7V21h15v-2.3c0-2.5-3.1-4.7-7.5-4.7z'/%3E%3C/svg%3E") center / 22px no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.rv-name {
  font-size: 13px;
  color: rgba(255, 242, 221, 0.85);
}

/* Separate large star line */
.rv-stars-line {
  font-size: 24px;
  line-height: 1;
  color: #ffb340;
  letter-spacing: 3px;
}

.rv-meta {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  gap: 2px;
  font-size: 13px;
  color: rgba(255, 242, 221, 0.85);
}

.rv-meta strong {
  color: #fff;
  font-size: 14px;
}

.rv-meta .rv-link {
  color: #ffd9a8;
  font-size: 12px;
  margin-top: 4px;
}

/* ============================================================
   Services — approved horizontal cards aligned to the homepage
   wide frame (1920px max, 24px gutters, shared with Reviews):
   11 white var(--surface) panels + contact CTA, icons right, warm
   pointer tint and a neutral hover shadow on the shared surface
   ============================================================ */

.services {
  background: var(--bg);
  color: var(--ink);
  /* top gap after the reviews scene is intentionally tighter than 110px */
  padding: 64px 0 110px;
}

.services .section-label {
  color: var(--muted);
}

.services-board {
  width: min(var(--wide-frame-max), calc(100% - 2 * var(--wide-frame-gutter)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 1080px) {
  .services-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.svcb-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 2.03 / 1;
  border-radius: 27px;
  overflow: hidden;
  container-type: inline-size;
  background: var(--surface);
  outline: 1px solid rgba(23, 23, 23, 0.08); /* subtle inset silhouette */
  outline-offset: -1px;
  color: var(--ink);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.svcb-cta {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Pointer-following warm tint (CSS vars set from delegated JS, one rAF) —
   same mechanism as the reviews glass, tinted to read on white */
.svcb-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgba(240, 90, 14, 0.14), rgba(240, 90, 14, 0) 62%);
  opacity: var(--shine, 0);
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.svcb-card h3 {
  margin: 0;
  position: relative;
  z-index: 1;
  padding: 7.8% 47% 0 6%;
  font-size: 32px;
  font-size: clamp(18px, 6.2cqw, 60px);
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-wrap: balance;
  color: var(--ink);
}

.svcb-card h3 .l { display: block; }
.svcb-card h3 .l + .l { margin-top: 0.06em; }

/* Long titles: preview-matched smaller container-aware size */
.svcb-card.t-s h3 { font-size: clamp(18px, 5.3cqw, 52px); }

.svcb-card h3 .sfx {
  color: var(--muted);
  transition: color 0.28s var(--ease);
}

.svcb-art {
  /* Icon lane: no frame, no chip — the white cutout sits on the card
     surface; hover only scales the artwork inside its fixed lane */
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 41%;
  height: 84%;
  z-index: 0;
  pointer-events: none;
}

.svcb-art img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .svcb-card:hover {
    transform: scale(1.015);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.10);
  }
  /* Inner art scale on hover: img and video scale together inside the
     fixed lane (the wrapper keeps its centering translate), so the page
     layout never shifts */
  .svcb-art img,
  .svcb-art video {
    transition: transform 0.28s var(--ease);
  }
  .svcb-card:hover .svcb-art img,
  .svcb-card:hover .svcb-art video {
    transform: scale(1.07);
  }
  /* Animated wrappers are hit-testable only while hovering is possible */
  .svcb-art.is-animated { pointer-events: auto; }
}

/* Animated service icons: poster and
   overlay clip share one media box; the overlay swaps in immediately on
   real playback and the poster returns immediately on leave (visibility,
   no crossfade — never two ghost images at once) */
.svcb-art.is-animated { z-index: 2; }
.svcb-art.is-animated video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  visibility: hidden;
  pointer-events: none;
}
.svcb-art.is-animated.is-playing video { visibility: visible; }
.svcb-art.is-animated.is-playing img { visibility: hidden; }

/* Icon-only detail arrow (dialog opens via delegated JS) */
.svcb-more {
  position: absolute;
  left: 6%;
  top: 70%;
  bottom: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.svcb-more .disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(26px, 6cqw, 38px);
  height: clamp(26px, 6cqw, 38px);
  border-radius: 999px;
  background: rgba(23, 18, 12, 0.85);
  color: #fff;
  transition: transform 0.28s var(--ease);
}

.svcb-more .disc svg { width: 46%; height: 46%; }

.svcb-more:focus-visible {
  outline: 3px solid rgba(43, 17, 3, 0.85);
  outline-offset: 2px;
  border-radius: 8px;
}

.svcb-card:hover .svcb-more .disc { transform: translate(1px, -1px); }

.svcb-cta:focus-visible {
  outline: 3px solid rgba(43, 17, 3, 0.8);
  outline-offset: -3px;
}

/* Homepage variant: the card fills orange on hover (fine pointers) while
   the resting surface stays white; scoped by the section class so the
   shared base and the white preview keep their calm default */
@media (hover: hover) and (pointer: fine) {
  .services-orange-hover .svcb-card:hover {
    background: linear-gradient(100deg, #ff8b44 0%, #f97b28 46%, #f05a0e 100%);
  }
  .services-orange-hover .svcb-card:hover h3 { color: rgba(43, 17, 3, 0.94); }
  .services-orange-hover .svcb-card:hover h3 .sfx { color: rgba(64, 30, 8, 0.78); }
}

/* Shared description dialog */
.svc-dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  max-width: min(440px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.svc-dialog::backdrop { background: rgba(23, 23, 23, 0.42); }
.svc-dialog .inner { padding: 26px 26px 24px; }
.svc-dialog h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.svc-dialog p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(23, 21, 17, 0.76);
}
.svc-dialog .close {
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: #171210;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.svc-dialog .close:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (max-width: 750px) {
  .services-board { grid-template-columns: 1fr; gap: 12px; }
  .svcb-card { aspect-ratio: auto; min-height: 236px; }
  .svcb-card h3 {
    padding: 20px 45% 0 22px;
    font-size: clamp(17px, 5.2cqi, 24px);
  }
  .svcb-card.t-s h3 { font-size: clamp(17px, 5.6cqw, 23px); }
  .svcb-more { top: auto; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .svcb-card, .svcb-more .disc { transition: none !important; }
  .svcb-card:hover { transform: none; }
  .svcb-card:hover .svcb-more .disc { transform: none; }
  .svcb-card:hover .svcb-art img,
  .svcb-card:hover .svcb-art video { transform: none; transition: none; }
}

/* ============================================================
   Gallery — wide justified rows, no crop, no frames
   ============================================================ */

.gallery {
  padding: 90px 0 100px;
}

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.gallery-head .section-label {
  margin: 0;
}

.gallery-head a {
  font-size: 14px;
  color: var(--ink);
}

.g-board {
  max-width: 2048px;
  margin: 0 auto;
  padding: 0 clamp(24px, 2vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.g-row {
  display: flex;
  gap: 10px;
}

/* Justified row: tile widths proportional to image ratio → equal row height */
.g-tile {
  display: block;
  flex: var(--r) var(--r) 0%;
  min-width: 0;
  text-decoration: none;
}

.g-tile img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  transition: opacity 0.3s var(--ease);
}

.g-tile:hover img {
  opacity: 0.92;
}

/* Lightbox: dialog stays auto-sized and centered; the padding area
   and the ::backdrop are click-through close targets */
dialog.lb {
  border: 0;
  padding: 56px 84px;
  background: transparent;
  color: #eee;
  max-width: none;
  max-height: none;
}

dialog.lb::backdrop {
  background: rgba(10, 10, 10, 0.9);
}

.lb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.lb-inner figure {
  margin: 0;
  max-width: min(88vw, 1600px);
  text-align: center;
}

.lb-inner img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80svh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 10px;
}

.lb-inner figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: #ddd;
}

.lb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.lb-nav {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.lb-close:hover,
.lb-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ============================================================
   Contact — scripted demo chat (prototype of future AI + Telegram)
   ============================================================ */

.contact {
  padding: 120px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.contact-grid > * {
  min-width: 0;
}

.contact-title {
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.contact-invite {
  max-width: 480px;
  color: var(--muted);
  font-size: 18px;
}

.contact-lead {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 14px;
}

.chat-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  max-width: 1000px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Calm human header: modest title + honest availability line */
.chat-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.chat-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.chat-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Empty-by-default history: the visible breathing space of the panel */
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: clamp(200px, 30vh, 300px);
  overflow-y: auto;
  padding: 16px 2px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input-row textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
  font: inherit;
  color: var(--ink);
  resize: none;
}

.chat-send {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.chat-send:hover {
  background: #000;
}

/* Truthful post-submit status: hidden until an attempt is made */
.chat-status {
  display: none;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.chat-status.visible {
  display: block;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 14px;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
}

.site-footer nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   Inner pages — same centered scene
   ============================================================ */

.page-hero {
  padding-top: 150px;
  padding-bottom: 40px;
}

.page-hero h1 {
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.page-hero .sub {
  margin-top: 16px;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 36px;
}

.filter-btn {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

/* Work catalog: natural ratios, minimal lines */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
}

.cat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.cat-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  transition: opacity 0.3s var(--ease);
}

.cat-card:hover img {
  opacity: 0.92;
}

.cat-card .cat-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
}

.cat-card h3 {
  font-size: 16px;
  font-weight: 600;
  min-width: 0;
}

.cat-card .kind {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.case-strip {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.case-strip h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin-bottom: 24px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.case-card {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.case-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  display: block;
}

.case-card h3 {
  font-size: 15px;
  margin-top: 10px;
}

.case-card .kind {
  font-size: 12px;
  color: var(--muted);
}

.form-status {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  display: none;
}

.form-status.visible {
  display: block;
}

/* Case page */
.case-main-media {
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
}

.case-main-media img {
  width: 100%;
  height: auto;
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 40px;
}

.case-facts div {
  padding: 20px 24px;
  min-width: 0;
}

.case-facts div + div {
  border-left: 1px solid var(--line);
}

.case-facts dt {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.case-facts dd {
  margin: 6px 0 0;
  font-size: 16px;
}

.case-section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.case-section:first-of-type {
  border-top: 0;
  margin-top: 0;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.case-gallery .placeholder {
  aspect-ratio: 4 / 3;
  border: 1px dashed rgba(28, 23, 18, 0.35);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

.case-next {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 32px;
  margin-top: 24px;
}

.case-next .next-link {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.case-next .next-link:hover {
  color: var(--orange);
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

/* ============================================================
   Breakpoints
   ============================================================ */

@media (max-width: 1100px) {
  .hero-scene {
    padding-top: 104px;
  }

  .hero-title {
    font-size: clamp(52px, 8.5vw, 100px);
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  /* Nav: brand left, Menu right; capsule stays */
  .nav-inner {
    padding: 10px 16px;
    grid-template-columns: 1fr auto;
  }

  .nav.is-capsule .nav-inner {
    padding: 8px 12px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav::before {
    height: 110px;
  }

  /* Without JS keep the main links reachable */
  html:not(.js) .nav-toggle {
    display: none;
  }

  html:not(.js) .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 14px;
  }

  html:not(.js) .nav-cta {
    display: inline-flex;
  }

  .nav-menu-panel {
    display: none;
    margin: 8px 12px 0;
    border-radius: 16px;
    background: rgba(22, 17, 13, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 10px;
  }

  .nav.nav-light .nav-menu-panel {
    background: rgba(255, 255, 255, 0.96);
  }

  .nav.nav-light .nav-menu-panel a {
    color: var(--ink);
  }

  .nav-menu-panel.open {
    display: block;
  }

  .nav-menu-panel a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--cream);
    text-decoration: none;
    font-size: 16px;
  }

  .nav-menu-panel a:hover {
    background: rgba(255, 242, 221, 0.12);
  }

  /* Stack: text first, photo below (photo returns to normal flow) */
  .hero-scene {
    align-content: start;
    padding-top: 110px;
  }

  .hero-portrait {
    position: static;
    transform: none;
    height: auto;
    width: min(100%, 440px);
    max-width: 100%;
    aspect-ratio: 1792 / 2400;
    justify-self: flex-start;
    pointer-events: auto;
  }

  .work,
  .contact,
  .services,
  .experience,
  .gallery {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-facts div + div {
    border-left: 0;
  }

  .case-facts div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .case-facts div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .case-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .reel {
    padding: 12px;
  }

  .reel-frame {
    border-radius: 20px;
  }

  .reel-overlay {
    padding: 10px 14px;
  }
}

@media (max-width: 640px) {
  h2 {
    font-size: clamp(30px, 8vw, 38px);
  }

  .hero {
    min-height: 100svh;
  }

  .hero-title {
    font-size: clamp(44px, 12vw, 50px);
  }

  .hero-title .line-1 {
    white-space: normal;
  }

  .hero-sub {
    max-width: 100%;
  }

  .hero-ghost {
    font-size: clamp(56px, 18vw, 92px);
    bottom: 48px;
  }

  .reel-bigplay {
    width: 104px;
    height: 104px;
  }

  .reel-bigplay svg {
    width: 42px;
    height: 42px;
  }

  .reel-controls {
    gap: 10px;
    padding: 8px 10px 10px;
  }

  .rp-time {
    font-size: 12px;
  }

  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rv-card {
    /* narrow phones: one whole readable card inside the fog mask
       (360px → ~264px) */
    flex-basis: min(400px, calc(100vw - 96px));
    min-height: 240px;
  }

  /* Gallery: one tile per row, natural proportions */
  .g-row {
    flex-direction: column;
  }

  .g-tile {
    flex: none;
    width: 100%;
  }

  .cat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-panel {
    padding: 16px;
    border-radius: 18px;
  }

  dialog.lb {
    padding: 44px 10px;
  }

  .lb-inner {
    gap: 10px;
  }

  .lb-inner figure {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .lb-inner img {
    max-height: 66svh;
  }

  .lb-nav {
    width: 44px;
    height: 44px;
  }

  .case-next {
    flex-direction: column;
    align-items: flex-start;
  }

  .proto-tools {
    max-width: 220px;
  }
}

/* Narrow phones: keep the glass play clear of the control bar
   (video ~321×180: play center y≈72, bottom≈107, controls start≈118 → gap≈11px) */
@media (max-width: 450px) {
  .reel-bigplay {
    width: 70px;
    height: 70px;
    top: calc(50% - 18px);
  }

  .reel-bigplay svg {
    width: 28px;
    height: 28px;
    margin-left: 3px;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  /* Marquee: static wrapped rows, clones hidden, all 23 reachable */
  .rv-track {
    width: 100%;
    flex-wrap: wrap;
  }

  .rv-track [data-clone] {
    display: none;
  }
}

/* ============================================================
   Sora site font: heading voice, control inheritance, stats fit
   ============================================================ */

/* One heading voice across hero, section headings and card headings;
   :root prefix outspecificity .hero-title and card heading rules,
   and this block sits after it in the cascade */
:root h1,
:root h2,
:root h3 {
  font-weight: 760;
}

/* Native controls follow the site family */
input,
button,
textarea,
select {
  font-family: inherit;
}
