/* ── Self-hosted fonts ── */
@font-face { font-family:'Inter'; font-style:normal; font-weight:300; font-display:swap; src:url('fonts/Inter_18pt-Light.ttf') format('truetype'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/Inter_18pt-Regular.ttf') format('truetype'); }
@font-face { font-family:'Inter'; font-style:italic; font-weight:400; font-display:swap; src:url('fonts/Inter_18pt-Italic.ttf') format('truetype'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/Inter_18pt-Medium.ttf') format('truetype'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/Inter_18pt-SemiBold.ttf') format('truetype'); }
@font-face { font-family:'DM Serif Display'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/DMSerifDisplay-Regular.ttf') format('truetype'); }
@font-face { font-family:'DM Serif Display'; font-style:italic; font-weight:400; font-display:swap; src:url('fonts/DMSerifDisplay-Italic.ttf') format('truetype'); }

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
a { cursor: pointer; }
html { scroll-behavior: smooth; }

body {
  background: #0e0e0e;
  color: #e2e2e2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body.loaded { overflow-y: auto; }

/* ── PRELOAD: pause loader animations until images are ready ── */
html.preloading #img1,
html.preloading #img2 { animation-play-state: paused; }

/* ── LOADER SPINNER ── */
#loader-spinner {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.spinner-ring {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: rgba(255,255,255,.6);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LOADER BACKGROUND ── */
/* Only the dark overlay fades out — img1/img2 live separately */
#loader-bg {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: linear-gradient(180deg, #0e0e0e 0%, #1e1e1e 100%);
  pointer-events: none;
}

/* ── DEVICE LAYERS (fixed, outside loader) ── */
.img-layer {
  position: fixed;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
}

#img1 {
  background-image: url('1.png');
  z-index: 901;
  transform-origin: center;
  animation:
    fadeIn1 2s cubic-bezier(.4,0,.2,1) forwards,
    hideImg1 .4s ease-out 3s forwards;
}

#img2 {
  background-image: url('2.png');
  z-index: 902;
  transform-origin: center;
  animation:
    fadeIn2 1s ease-out 2s forwards,
    shrinkImg2 1s cubic-bezier(.4,0,.2,1) 4s forwards;
}

@keyframes fadeIn1    { 0% { opacity:0; transform:scale(.08); } 100% { opacity:1; transform:scale(1); } }
@keyframes fadeIn2    { 0% { opacity:0; } 100% { opacity:1; } }
@keyframes shrinkImg2 { 0% { transform:scale(1); } 100% { transform:scale(.5); } }
@keyframes hideImg1   { 0% { opacity:1; transform:scale(1); } 100% { opacity:0; transform:scale(1); } }


/* ── MAIN CONTENT ── */
#content {
  opacity: 0;
  transition: opacity 0.9s ease;
}
#content.visible { opacity: 1; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
  mix-blend-mode: exclusion;
}
.nav-cta {
  padding: 9px 24px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 100px;
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.nav-cta:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.3);
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-size: .88rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .2s;
}
.nav-link:hover { color: rgba(255,255,255,.9); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: rgba(255,255,255,.8);
  transition: transform .25s ease, opacity .25s ease;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile fullscreen overlay — outside #content so z-index 903 clears img2 (902) */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 903;
  background: #0e0e0e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.nav-mobile.open {
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile-link {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .2s;
}
.nav-mobile-link:hover { color: #fff; }

/* ── HERO ── */
/*
  Layout: three direct children stacked vertically.
  - .hero-title  : sits just below nav (no extra gap)
  - .hero-spacer : invisible, exact size of img2 at scale(.5).
                   margin: auto 0  splits free space evenly above/below it,
                   which puts its center ≈ viewport center (off by ~7px only).
  - .hero-bottom : CTA area, immediately after spacer

  img2 is fixed and truly centered at 50vh — spacer just reserves that space
  so scrollable content doesn't overlap the device.
*/
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 70px 48px 0; /* 70px = nav clearance */
}

.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 5.4rem);
  color: #fff;
  line-height: 1.05;
  letter-spacing: -.01em;
  padding: 32px 0 0;
}

/*
  Spacer exactly matches img2 visual size at scale(.5).

  img2 uses background-size:contain on 100vw×100vh.
  Image aspect = 2758/1504 ≈ 1.834 (landscape).

  When viewport ratio < 1.834 (nearly all cases):
    → width-limited: displayed = 100vw × 1.834 height → at scale(.5): 50vw wide, 50vw/1.834 tall

  When viewport ratio ≥ 1.834 (ultra-wide monitors):
    → height-limited: displayed = 100vh tall → at scale(.5): 50vh tall, 50vh×1.834 wide

  Result: width = min(50vw, 50vh × 1.834)
*/
.hero-spacer {
  width: min(50vw, calc(50svh * 2758 / 1504));
  aspect-ratio: 2758 / 1504;
  flex-shrink: 0;
  margin: auto 0;
  visibility: hidden; /* layout spacer only — img2 is the actual visual */
}

.hero-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0px 0 64px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,.62);
  max-width: 500px;
  line-height: 1.55;
}

.hero-note {
  font-size: .78rem;
  color: rgba(255,255,255,.28);
  letter-spacing: .04em;
}

.btn-primary {
  margin-top: 8px;
  display: inline-block;
  padding: 14px 36px;
  background: #fff;
  color: #0e0e0e;
  border-radius: 100px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  letter-spacing: .01em;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(255,255,255,.12);
}

.hero-tags {
  margin-top: 20px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-tag { font-size: .83rem; color: rgba(255,255,255,.38); }

/* ── SHARED ── */
section { padding: 130px 48px; }
.container { max-width: 1080px; margin: 0 auto; }

.section-title {
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  color: #fff;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.section-text {
  font-size: clamp(.95rem, 1.4vw, 1.1rem);
  color: rgba(255,255,255,.48);
  line-height: 1.72;
}

/* ── RENDER PLACEHOLDER ── */
.render {
  background: linear-gradient(135deg, #141414 0%, #1b1b1b 100%);
  border: 1px dashed rgba(255,255,255,.09);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,.18);
  font-size: .76rem;
  letter-spacing: .04em;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.render::before { content: '⬜'; font-size: 1.6rem; opacity: .25; }

.render > img,
.render > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.render:has(> img),
.render:has(> video) { border: none; }
.render:has(> img)::before,
.render:has(> video)::before { display: none; }

/* ── SECTION 2: PROBLEM ── */
#problem { background: #090909; }

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-bottom: 1.5rem;
}

.stat-number {
  font-size: clamp(5rem, 13vw, 11rem);
  color: #fff;
  line-height: .88;
}

.stat-desc {
  margin-top: .75rem;
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
  color: rgba(255,255,255,.45);
  line-height: 1.5;
}

.stat-source {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  font-size: .7rem;
  color: rgba(255,255,255,.2);
  letter-spacing: .02em;
}
.stat-source a {
  color: rgba(255,255,255,.3);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.stat-source a:hover { color: rgba(255,255,255,.6); }

.problem-body {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 3.5rem;
  max-width: 680px;
}

.problem-body p {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255,255,255,.45);
  line-height: 1.75;
}

.problem-body p + p { margin-top: 1.4rem; }

/* ── SECTION 3: COMPARISON ── */
#comparison { background: #0e0e0e; }

.comparison-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-bottom: 3.5rem;
  align-items: end;
}
.comparison-header .section-text { margin-top: 1.4rem; max-width: 420px; }

.compare-table {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow: hidden;
}

.ct-head {
  display: grid;
  grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
.ct-head span {
  padding: 14px 20px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  overflow-wrap: break-word;
}
.ct-head span:nth-child(2),
.ct-head span:nth-child(3) { text-align: center; }

.ct-row {
  display: grid;
  grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.ct-row:last-child { border-bottom: none; }
.ct-row > div { padding: 14px 20px; font-size: .93rem; }
.ct-row > div:nth-child(2),
.ct-row > div:nth-child(3) { text-align: center; }

.ct-head span:nth-child(3),
.ct-row > div:nth-child(3) { background: rgba(255,255,255,.025); }

.ct-feature { color: rgba(255,255,255,.5); }
.ct-feature.active { color: rgba(255,255,255,.85); }
.ct-yes      { color: rgba(255,255,255,.45); font-size: 1.05rem; }
.ct-yes-puck { color: #fff; font-size: 1.05rem; }
.ct-no       { color: rgba(255,255,255,.16); font-size: 1.1rem; }

.ct-divider {
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  padding: 7px 20px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
}

/* ── SECTION 4: DEVICE ── */
#device { background: #090909; }

.device-title { margin-bottom: 3rem; max-width: 700px; }

.device-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 150px 150px 150px;
  grid-auto-rows: 150px;
  gap: 10px;
}

.db-card {
  background: #161616;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.db-render {
  grid-column: 1 / 3;
  grid-row: 1 / 4;
  padding: 0;
  overflow: hidden;
}
.db-render .render {
  height: 100%;
  border-radius: 20px;
  border: none;
  background: #111;
}

.db-label {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
}

.db-value {
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
  color: #fff;
  line-height: 1.15;
}

.ctrl-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.cb-card {
  background: #161616;
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  min-height: 190px;
}

.cb-icon { flex-shrink: 0; }

.cb-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.32);
  margin-top: auto;
  padding-top: 20px;
}

.cb-desc {
  font-size: .88rem;
  color: rgba(255,255,255,.58);
  line-height: 1.45;
  margin-top: 6px;
}

.device-caption {
  margin-top: 2.5rem;
  font-size: clamp(.95rem, 1.3vw, 1.05rem);
  color: rgba(255,255,255,.55);
  line-height: 1.65;
  max-width: 560px;
}

/* ── SECTION 5: ROOM MODE ── */
#room-mode { background: #0a0a0a; }

.room-intro {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 80px;
}
.room-intro .section-text { margin-top: 1.25rem; max-width: 100%; }

.room-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 72px 0;
  border-top: 1px solid rgba(255,255,255,.05);
}
.room-row:last-child { border-bottom: 1px solid rgba(255,255,255,.05); }

.room-row.flip .room-vis  { order: 2; }
.room-row.flip .room-copy { order: 1; }

.room-status { font-size: 1.15rem; font-weight: 500; color: #fff; margin-bottom: 12px; }

.room-desc {
  font-size: clamp(.95rem, 1.4vw, 1.05rem);
  color: rgba(255,255,255,.42);
  line-height: 1.68;
  max-width: 400px;
}

.room-screen-hint { margin-top: 14px; font-size: .82rem; font-style: italic; color: rgba(255,255,255,.24); }

.room-vis {
  height: 280px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.ring-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.ring-bar.green  { background: linear-gradient(90deg, transparent, #34d399 50%, transparent); }
.ring-bar.yellow { background: linear-gradient(90deg, transparent, #fbbf24 50%, transparent); }
.ring-bar.red    { background: linear-gradient(90deg, transparent, #ef4444 50%, transparent); }
.ring-bar.purple { background: linear-gradient(90deg, transparent, #a78bfa 50%, transparent); }


/* ── SECTION 6: ASK PUCK ── */
#ask-puck { background: #0e0e0e; }

.ask-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.ask-grid .section-text { margin-top: 1.5rem; max-width: 440px; }

.quotes { margin-top: 3rem; display: flex; flex-direction: column; gap: 16px; }

.quote-item {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  color: rgba(255,255,255,.65);
  border-left: 2px solid rgba(255,255,255,.1);
  padding-left: 18px;
  line-height: 1.3;
}

/* ── SECTION 7: PERSONAL ── */
#personal { background: #111; }

.personal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.personal-grid .section-text { margin-top: 1.5rem; max-width: 420px; }

/* ── SECTION 8: APPS ── */
#apps { background: #0a0a0a; }

.mode-badge {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .01em;
  color: rgba(255,255,255,.45);
  margin-bottom: 1.2rem;
}
.mode-badge::before {
  content: '— ';
}

.apps-intro { max-width: 580px; margin-bottom: 3.5rem; }
.apps-intro .section-text { margin-top: 1rem; }

.apps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.apps-col-title {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin-bottom: 1.2rem;
}

.apps-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.apps-features li {
  font-size: .93rem;
  color: rgba(255,255,255,.52);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}
.apps-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: rgba(255,255,255,.18);
}

.personal-features { margin-top: 2rem; }

/* ── SECTION 9: DEVELOPERS ── */
#developers { background: #090909; }

.dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.dev-grid .section-text { margin-top: 1.4rem; max-width: 400px; }

.lang-row { display: flex; gap: 10px; margin-top: 1.8rem; }

.lang-badge {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 7px 16px;
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
}

.code-block {
  background: #131313;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 28px;
  overflow-x: auto;
}
.code-block pre {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .8rem;
  line-height: 1.75;
  color: rgba(255,255,255,.55);
}
.ck { color: #a78bfa; }
.cs { color: #34d399; }
.cc { color: rgba(255,255,255,.22); }
.cf { color: #60a5fa; }

.dev-cards {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dev-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 22px 24px;
}
.dev-card-title { font-weight: 600; font-size: .9rem; color: rgba(255,255,255,.85); margin-bottom: 6px; }
.dev-card-desc  { font-size: .82rem; color: rgba(255,255,255,.32); line-height: 1.5; }

.puck-apps-header {
  margin-bottom: 2rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 4rem;
}
.puck-apps-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-bottom: 6px;
}
.puck-apps-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.32);
}

/* ── SECTION 10: FINAL CTA ── */
#final-cta {
  background: #0e0e0e;
  text-align: center;
  padding: 150px 48px;
}

.final-render { max-width: 400px; height: 260px; margin: 0 auto 64px; }

.final-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  color: #fff;
  line-height: 1.08;
  letter-spacing: -.01em;
}

.final-sub {
  margin-top: 1rem;
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
  color: rgba(255,255,255,.42);
}

.email-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  max-width: 420px;
  margin: 3rem auto 0;
}

.email-input {
  flex: 1;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 100px;
  padding: 13px 22px;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: .93rem;
  outline: none;
  transition: border-color .2s;
}
.email-input::placeholder { color: rgba(255,255,255,.28); }
.email-input:focus { border-color: rgba(255,255,255,.32); }

.btn-submit {
  padding: 13px 26px;
  background: #fff;
  color: #0e0e0e;
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,255,255,.1);
}

.no-spam { margin-top: 14px; font-size: .72rem; color: rgba(255,255,255,.2); }

/* ── FOOTER ── */
footer {
  padding: 40px 48px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo { font-family: 'DM Serif Display', serif; font-size: 1.25rem; color: rgba(255,255,255,.45); }
.footer-copy { font-size: .75rem; color: rgba(255,255,255,.18); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  /* No shrink on phone — device stays full size after fade-in */
  #img2 {
    animation: fadeIn2 1s ease-out 2s forwards;
  }
  /* Spacer matches img2 at scale(1): full contain size */
  .hero-spacer {
    width: min(100vw, calc(100svh * 2758 / 1504));
  }
}

@media (max-width: 900px) {
  section { padding: 90px 24px; }
  nav { padding: 20px 24px; }

  #hero { padding: 70px 24px 0; }

  #final-cta { padding: 100px 24px; }
  footer { padding: 32px 24px; }

  .comparison-header,
  .ask-grid,
  .personal-grid,
  .dev-grid { grid-template-columns: 1fr; gap: 3rem; }

  .stats-row { grid-template-columns: 1fr; gap: 3.5rem; }

  .room-row { grid-template-columns: 1fr; gap: 2.5rem; padding: 50px 0; }
  .room-row.flip .room-vis  { order: 1; }
  .room-row.flip .room-copy { order: 2; }

  .dev-cards { grid-template-columns: 1fr 1fr; }
  .apps-grid { grid-template-columns: 1fr; }
  .email-form { flex-direction: column; }
  .ctrl-bento { grid-template-columns: 1fr 1fr; }
  .hero-tags { gap: 14px; }
}

@media (max-width: 560px) {
  .device-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 240px auto;
  }
  .db-render { grid-column: 1 / 3; grid-row: 1; }
  .dev-cards { grid-template-columns: 1fr; gap: 12px; }
}
