/* ============================================================
   moros — shared stylesheet
   Cinematic Premium Agency
   ============================================================ */

:root {
  --bg:        #0a0a0a;
  --bg-soft:   #0d0d0d;
  --ink:       #f5f0eb;
  --ink-muted: #9a948c;
  --ink-faint: #807b75;
  --accent:    #c9a55a;
  --line:      rgba(245, 240, 235, 0.10);
  --line-soft: rgba(245, 240, 235, 0.06);

  --serif: "Playfair Display", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --gutter: clamp(1.5rem, 5vw, 6rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: #0a0a0a; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: manipulation;
  overscroll-behavior-y: none;
}

/* hide grain while loader is covering the screen */
body:has(#loader:not(.done)) ::before { display: none; }

/* fine grain texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--bg); }

/* Skip-to-content — visible only on keyboard focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1.5rem;
  z-index: 10000;
  background: var(--accent);
  color: var(--bg);
  padding: 0.65rem 1.2rem;
  font-size: 0.75rem;
  font-family: var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.75rem; outline: 2px solid var(--ink); outline-offset: 2px; }

/* Global keyboard focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.accent { color: var(--accent); }


/* ---------- Loader ---------- */
#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 9999;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.8rem;
  transition: opacity 0.75s ease;
  transform: translateZ(0); /* own GPU layer — sits above canvas compositor layer */
  isolation: isolate;
}
#loader.done { opacity: 0; pointer-events: none; }
/* Page-transition mode: plain dark overlay, no logo or bar */
#loader.pg-enter .loader-logo,
#loader.pg-enter .loader-track { display: none; }
.loader-logo {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.loader-logo span { color: var(--accent); }
.loader-track {
  width: 140px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.loader-bar {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  right: 100%;
  background: var(--accent);
  transition: right 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.loader-bar.go { right: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  padding: 1rem 1.9rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { background: transparent; color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-size: 0.74rem;
  padding: 0.7rem 1.3rem;
}
.btn--ghost:hover { border-color: var(--ink); background: transparent; }

.btn--lg { padding: 1.25rem 2.6rem; font-size: 0.86rem; }

/* ---------- Nav ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gutter);
  transition: background 0.5s ease, padding 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom-color: var(--line-soft);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.wordmark span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.nav-links a.navlink {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.35s ease;
  position: relative;
}
.nav-links a.navlink:hover { color: var(--ink); }
.nav-links a.navlink.active { color: var(--ink); }
.nav-links a.navlink.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--accent);
}

/* mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding-top: 11rem;
  padding-bottom: clamp(3rem, 8vh, 6rem);
}
.page-hero .eyebrow { margin-bottom: 1.6rem; }
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 18ch;
}
.page-hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.page-hero .lede {
  margin-top: 1.8rem;
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  color: var(--ink-muted);
  max-width: 50ch;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Home hero ---------- */
header.hero {
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding-top: 8rem;
  padding-bottom: 6rem;
}
header.hero .eyebrow { margin-bottom: 2.2rem; }
header.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.7rem, 7.5vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
header.hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-sub {
  margin-top: 2rem;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  color: var(--ink-muted);
  max-width: 48ch;
  line-height: 1.75;
}
.hero-cta { margin-top: 3rem; display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.hero-rule {
  margin-top: 5rem;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, var(--line) 0%, transparent 80%);
}
.text-link {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color 0.35s ease, border-color 0.35s ease;
}
.text-link:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- Section scaffolding ---------- */
section { position: relative; z-index: 2; }
.section-pad { padding-block: clamp(6rem, 14vh, 11rem); }
.section-pad-sm { padding-block: clamp(4rem, 9vh, 7rem); }

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 3.5rem;
}

.section-head {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.15;
  max-width: 20ch;
  margin-bottom: 1.4rem;
}
.section-head em { font-style: italic; color: var(--accent); font-weight: 400; }
.section-intro {
  color: var(--ink-muted);
  max-width: 52ch;
  font-size: 1.05rem;
}

/* ---------- Problem ---------- */
.problem p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.7rem);
  line-height: 1.4;
  max-width: 22ch;
  color: var(--ink);
}
.problem .muted { color: var(--ink-faint); }

/* ---------- Offer grid ---------- */
.offer-grid { border-top: 1px solid var(--line); }
.offer-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 1.4fr;
  gap: 2rem;
  align-items: start;
  padding-block: 3.6rem;
  border-bottom: 1px solid var(--line);
}
.offer-num {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--accent);
  padding-top: 0.4rem;
}
.offer-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
}
.offer-desc {
  color: var(--ink-muted);
  font-size: 1.02rem;
  max-width: 44ch;
  padding-top: 0.3rem;
}
.offer-desc .meta {
  display: block;
  margin-top: 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Service detail blocks ---------- */
.svc {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  padding-block: clamp(3rem, 7vh, 5.5rem);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.svc:first-of-type { border-top: 1px solid var(--line); }
.svc-num {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.svc h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
}
.svc-body p { color: var(--ink-muted); font-size: 1.05rem; margin-bottom: 1.6rem; }
.svc-list { list-style: none; }
.svc-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 0.98rem;
  display: flex;
  gap: 0.9rem;
}
.svc-list li::before { content: "—"; color: var(--accent); }

/* ---------- Pricing ---------- */
.pricing {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}
.pricing .eyebrow { margin-bottom: 2rem; }
.price-amount {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.price-term {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
  letter-spacing: 0.06em;
}
.price-switch {
  display: inline-flex;
  gap: 0;
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.price-switch button {
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease;
  border-right: 1px solid var(--line);
}
.price-switch button:last-child { border-right: none; }
.price-switch button.active { background: var(--ink); color: var(--bg); }
.price-note {
  margin-top: 1.6rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* ---------- Timeline / process ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.stage {
  padding: 4.5rem 3rem 4.5rem 3rem;
  border-right: 1px solid var(--line);
}
.stage:first-child { padding-left: 0; }
.stage:last-child { border-right: none; padding-right: 0; }
.stage-num {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.stage h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
}
.stage p { color: var(--ink-muted); font-size: 0.98rem; }

/* process — full rows */
.phase {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 3rem;
  padding-block: clamp(2.8rem, 6vh, 4.5rem);
  border-bottom: 1px solid var(--line);
}
.phase:first-of-type { border-top: 1px solid var(--line); }
.phase-tag .stage-num { margin-bottom: 0.8rem; }
.phase-tag h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
}
.phase-body p { color: var(--ink-muted); font-size: 1.05rem; margin-bottom: 1.4rem; }
.phase-body p:last-child { margin-bottom: 0; }

/* ---------- About ---------- */
.statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.35;
  max-width: 26ch;
}
.statement em { font-style: italic; color: var(--accent); }

.principles { border-top: 1px solid var(--line); }
.principle {
  display: grid;
  grid-template-columns: 4.5rem 1fr 1.4fr;
  gap: 2rem;
  padding-block: 3.4rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.principle .pn { font-family: var(--serif); color: var(--accent); font-size: 1rem; }
.principle h4 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; }
.principle p { color: var(--ink-muted); font-size: 1rem; max-width: 44ch; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}
.stat .num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  color: var(--ink);
}
.stat .lbl {
  color: var(--ink-faint);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* ---------- Objections ---------- */
.objections { border-top: 1px solid var(--line); }
.objection {
  padding-block: 3.2rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 2rem;
  align-items: baseline;
}
.objection .mark { font-family: var(--serif); color: var(--accent); font-size: 1.4rem; }
.objection p {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 44ch;
  font-weight: 300;
}

/* ---------- Closing CTA ---------- */
.closing {
  text-align: center;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.closing h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 1.05;
  margin-bottom: 1.4rem;
}
.closing p { color: var(--ink-muted); max-width: 44ch; margin: 0 auto 2.8rem; }

/* ---------- Contact form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.contact-aside h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 1.6rem;
}
.contact-aside h2 em { font-style: italic; color: var(--accent); }
.contact-aside p { color: var(--ink-muted); margin-bottom: 2rem; max-width: 40ch; }
.contact-points { list-style: none; margin-top: 2rem; }
.contact-points li {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.95rem;
  display: flex;
  gap: 1rem;
}
.contact-points li:last-child { border-bottom: 1px solid var(--line); }
.contact-points .k {
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  min-width: 7rem;
  padding-top: 2px;
}

form .field { margin-bottom: 1.6rem; }
form .field label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}
form .field .opt { color: var(--ink-faint); text-transform: none; letter-spacing: 0.02em; }
form .field input,
form .field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  padding: 0.6rem 0;
  transition: border-color 0.35s ease;
}
form .field input:focus,
form .field select:focus { outline: none; border-bottom-color: var(--accent); }
form .field input:focus-visible,
form .field select:focus-visible {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 2px 0 -1px var(--accent);
}
form .field select { cursor: pointer; }
form .field select option { background: var(--bg); color: var(--ink); }
form .field input::placeholder { color: var(--ink-faint); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }

.form-foot { margin-top: 2.2rem; }
.form-foot .btn { width: 100%; text-align: center; }
.magnet {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
  line-height: 1.6;
  text-align: center;
}
.form-success { padding: 2rem 0; }
.form-success .mark {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}
.form-success h3 { font-family: var(--serif); font-weight: 500; font-size: 1.8rem; margin-bottom: 0.8rem; }
.form-success p { color: var(--ink-muted); max-width: 38ch; }

/* ---------- Footer ---------- */
footer {
  padding-block: 4rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-inner .wordmark { font-size: 1.2rem; }
.footer-desc { max-width: 32ch; line-height: 1.6; margin-top: 0.6rem; }
.footer-col h5 {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  font-weight: 400;
}
.footer-col a { display: block; padding: 0.3rem 0; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .contact-grid { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr; gap: 1.5rem; }
  .phase { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    gap: 2.4rem;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
    z-index: 40;
  }
  .nav-links.open { transform: none; }
  .nav-links a.navlink { font-size: 1.4rem; letter-spacing: 0.06em; }
  .nav-links a.navlink.active::after { display: none; }
  .nav-links .btn { font-size: 0.9rem; padding: 1rem 2.2rem; }
  .nav-toggle {
    display: flex;
    z-index: 60;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
  }

  .offer-row { grid-template-columns: 3rem 1fr; row-gap: 0.8rem; }
  .offer-num { grid-row: 1; }
  .offer-title { grid-column: 2; }
  .offer-desc { grid-column: 2; }

  .timeline { grid-template-columns: 1fr; }
  .stage { border-right: none; border-bottom: 1px solid var(--line); padding: 3rem 0; }
  .stage:last-child { border-bottom: none; }

  .objection { grid-template-columns: 2.5rem 1fr; gap: 1rem; }
  .principle { grid-template-columns: 3rem 1fr; row-gap: 0.6rem; }
  .principle .pn { grid-row: 1; }
  .principle h4 { grid-column: 2; }
  .principle p { grid-column: 2; }

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

  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .demo-card:nth-child(4) { grid-column: auto; }
  .demo-card:nth-child(5) { grid-column: auto; }
}

/* ---------- Work / Demo Showcase ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.demo-card {
  grid-column: span 2;
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s;
}
.demo-card:nth-child(4) { grid-column: 2 / span 2; }
.demo-card:nth-child(5) { grid-column: 4 / span 2; }

.demo-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.demo-niche {
  padding: 0.75rem 1rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 500;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.demo-chrome {
  background: #1a1a1a;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.demo-chrome .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #444;
}
.demo-chrome .dot:nth-child(1) { background: #ff5f57; }
.demo-chrome .dot:nth-child(2) { background: #ffbd2e; }
.demo-chrome .dot:nth-child(3) { background: #28ca41; }
.demo-url {
  flex: 1;
  background: #111;
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
  color: #555;
  font-family: var(--sans);
  margin-left: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-frame-wrap {
  height: 360px;
  overflow: hidden;
  position: relative;
  background: #0a0a0a;
}

.demo-frame {
  --s: 0.235;
  width: 1440px;
  height: 2400px;
  border: none;
  pointer-events: none;
  transform: scale(var(--s)) translateY(0px);
  transform-origin: top left;
  transition: transform 4s ease-in-out;
}

.demo-card:hover .demo-frame {
  transform: scale(var(--s)) translateY(-800px);
}

.demo-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: object-position 4s ease-in-out;
}
.demo-card:hover .demo-screenshot {
  object-position: bottom center;
}

.demo-frame-wrap::after {
  content: 'View Site  ↗';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 4rem 1rem 1.4rem;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, transparent 100%);
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
  z-index: 5;
}
.demo-card:hover .demo-frame-wrap::after {
  opacity: 1;
  transform: translateY(0);
}

.demo-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 3;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.demo-card.iframe-loaded .demo-poster {
  opacity: 0;
}

.demo-frame.no-transition {
  transition-duration: 0s !important;
}
