/* Scale Comm — Home page styles */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ================= Top meta + Nav ================= */
.scs-top {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 60;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 360ms var(--ease-emph);
}
.scs-top.is-hidden { transform: translateY(-110%); }
.scs-top > * { pointer-events: auto; }

.scs-meta {
  display: flex; gap: 24px;
  padding: 10px 96px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
  justify-content: space-between;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--paper);
  opacity: 1;
  transition: background 320ms var(--ease-standard), backdrop-filter 320ms;
}
/* Docked = at the top of the page. Solid bg, no blur, no shading. */
.scs-top.is-docked .scs-meta {
  background: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.scs-top.is-docked .scs-nav {
  background: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: rgba(244,241,234,0.06);
}
.scs-meta span { white-space: nowrap; }

.scs-nav {
  display: flex; align-items: center;
  /* Padding-left matches the page-content gutter (96px on desktop, scaled down
     on smaller viewports) so the logo aligns with the page hero text. */
  padding: 14px 96px; gap: 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(244, 241, 234, 0.55);
  border-bottom: 1px solid rgba(10,10,10,0.08);
  transition: background 320ms var(--ease-standard), color 320ms var(--ease-standard), border-color 320ms var(--ease-standard);
}
.scs-nav.on-ink {
  background: rgba(10,10,10,0.55);
  color: var(--paper);
  border-bottom-color: rgba(244,241,234,0.10);
}
/* Logo size bumped from 18px to 26px for stronger brand presence */
.scs-logo { height: 26px; display: block; }
.scs-logo img { height: 100%; display: block; }
.scs-nav-links {
  display: flex; gap: 28px; margin-left: auto; align-items: center;
}
.scs-link {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: inherit; text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color 220ms var(--ease-standard);
}
.scs-link:hover, .scs-link.is-active { border-bottom-color: currentColor; }

.scs-cta-sm {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  padding: 10px 16px; border-radius: 6px;
  background: var(--ink); color: var(--paper);
  text-decoration: none; cursor: pointer;
  display: inline-flex; gap: 8px; align-items: center;
  border: 0;
  transition: background 220ms var(--ease-standard), transform 90ms;
}
.scs-cta-sm:hover { background: #1F1F1F; }
.scs-nav.on-ink .scs-cta-sm { background: var(--paper); color: var(--ink); }
.scs-nav.on-ink .scs-cta-sm:hover { background: #fff; }

.scs-burger { display: none; }

/* ================= Buttons ================= */
.scs-btn {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 14px 22px; border-radius: 6px; border: 0;
  cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  line-height: 1; text-decoration: none;
  transition: background 220ms var(--ease-standard), color 220ms var(--ease-standard), transform 90ms, border-color 220ms;
}
.scs-btn-primary { background: var(--ink); color: var(--paper); }
.scs-btn-primary:hover { background: #1F1F1F; }
.scs-btn-ghost { background: transparent; color: currentColor; border: 1.5px solid currentColor; }
.scs-btn-ghost:hover { background: currentColor; color: var(--paper); }
.ink-mode .scs-btn-primary { background: var(--paper); color: var(--ink); }
.ink-mode .scs-btn-primary:hover { background: #fff; }
.ink-mode .scs-btn-ghost:hover { color: var(--ink); }
.scs-btn:active { transform: translateY(1px); }
.scs-arrow { font-family: var(--font-mono); font-weight: 500; }

/* ================= HERO ================= */
.scs-hero {
  position: relative;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 96px 80px;
}
.scs-hero::after {
  /* protection scrim — vertical for footer/header, plus a horizontal pull so the
     headline on the left reads cleanly over the robot on the right. */
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.55) 32%, rgba(10,10,10,0.0) 60%),
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.0) 28%, rgba(10,10,10,0.0) 65%, rgba(10,10,10,0.55) 100%);
  pointer-events: none;
  z-index: 2;
}
@media (max-width: 1099px) {
  .scs-hero::after {
    background:
      linear-gradient(180deg, rgba(10,10,10,0.45) 0%, rgba(10,10,10,0.15) 30%, rgba(10,10,10,0.55) 75%, rgba(10,10,10,0.85) 100%);
  }
}
.scs-hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
  /* Brand-infuse the Spline render: desaturate to monochrome, raise contrast,
     and tint slightly toward Bone so it sits in the Ink + Paper system. */
  filter: grayscale(1) contrast(1.08) brightness(0.95);
  mix-blend-mode: screen;
}
.scs-hero-bg canvas, .scs-hero-bg iframe, .scs-hero-bg .spline-host,
.scs-hero-bg spline-viewer {
  width: 100% !important; height: 100% !important;
  display: block;
  background: transparent !important;
}
/* The Spline robot is anchored to the right of the hero so the headline owns the left.
   On narrow screens it slides behind the type and reduces in opacity. */
.scs-hero-bg .scs-hero-tilt {
  transform-origin: 65% 55%;
}
@media (min-width: 1100px) {
  .scs-hero-bg { left: 35%; }
}
@media (max-width: 1099px) {
  .scs-hero-bg { opacity: 0.55; }
}
/* fallback monochrome 3D shape */
.scs-hero-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  perspective: 1600px;
}
.scs-hero-shape {
  width: min(720px, 70vw); aspect-ratio: 1;
  transform-style: preserve-3d;
  animation: scs-orbit 24s linear infinite;
  position: relative;
  will-change: transform;
}
.scs-hero-shape > div {
  position: absolute; inset: 0;
  border: 1.5px solid rgba(244,241,234,0.18);
  border-radius: 4px;
}
.scs-hero-shape > div:nth-child(1) { transform: rotateY(0deg) translateZ(160px); }
.scs-hero-shape > div:nth-child(2) { transform: rotateY(60deg) translateZ(160px); border-color: rgba(244,241,234,0.10); }
.scs-hero-shape > div:nth-child(3) { transform: rotateY(120deg) translateZ(160px); border-color: rgba(244,241,234,0.05); }
.scs-hero-shape > div:nth-child(4) { transform: rotateY(180deg) translateZ(160px); border-color: rgba(244,241,234,0.18); }
.scs-hero-shape > div:nth-child(5) { transform: rotateY(240deg) translateZ(160px); border-color: rgba(244,241,234,0.10); }
.scs-hero-shape > div:nth-child(6) { transform: rotateY(300deg) translateZ(160px); border-color: rgba(244,241,234,0.05); }
@keyframes scs-orbit {
  from { transform: rotateX(-12deg) rotateY(0); }
  to   { transform: rotateX(-12deg) rotateY(360deg); }
}

/* tilt parallax wrapper for hero bg on mobile/desktop */
.scs-hero-tilt {
  position: absolute; inset: 0;
  transform: translate3d(var(--tilt-x, 0), var(--tilt-y, 0), 0) rotateX(var(--tilt-rx, 0)) rotateY(var(--tilt-ry, 0));
  transition: transform 220ms var(--ease-standard);
  will-change: transform;
}

.scs-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(244,241,234,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244,241,234,0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
  pointer-events: none;
  z-index: 1;
}

/* Pixel trail sits ABOVE the hero background but BELOW the text content,
   so it paints across the full hero — including behind the headline. The
   trail itself absorbs pointer events; we proxy mousemove from the parent
   section so users can hover anywhere (including over the text). Text
   stays clickable via .scs-hero-content > * { pointer-events: auto }. */
.scs-pixel-trail {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.85;
}
.scs-pixel-trail .scs-pixel { will-change: opacity; }

.scs-hero-content {
  position: relative; z-index: 3;
  max-width: 1280px;
  pointer-events: none;
}
.scs-hero-content > * { pointer-events: auto; }
.scs-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--bone);
  margin: 0 0 28px;
  display: flex; gap: 14px; align-items: center;
  filter: url(#scs-goo);
}
.scs-hero-eyebrow .dot { width: 6px; height: 6px; background: var(--paper); border-radius: 999px; box-shadow: 0 0 0 4px rgba(244,241,234,0.18); animation: scs-pulse 2.4s ease-in-out infinite; }
@keyframes scs-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(244,241,234,0.25);} 50% { box-shadow: 0 0 0 8px rgba(244,241,234,0); } }

.scs-hero-h {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 156px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 1200px;
  font-weight: 800;
}
.scs-hero-h .soft { font-weight: 300; }
.scs-hero-h .hard { font-weight: 800; }
.scs-hero-h .line { display: block; overflow: hidden; }
.scs-hero-h .line > span { display: inline-block; transform: translateY(120%); animation: scs-rise 900ms var(--ease-emph) forwards; }
.scs-hero-h .line:nth-child(1) > span { animation-delay: 80ms; }
.scs-hero-h .line:nth-child(2) > span { animation-delay: 200ms; }
.scs-hero-h .line:nth-child(3) > span { animation-delay: 320ms; }
@keyframes scs-rise { to { transform: translateY(0); } }

.scs-hero-lede {
  font-family: var(--font-display);
  font-weight: 500; font-size: 22px; line-height: 1.45;
  max-width: 620px;
  color: var(--bone);
  margin: 36px 0 0;
  opacity: 0;
  animation: scs-fade 700ms var(--ease-standard) 540ms forwards;
}
.scs-hero-actions {
  display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap;
  opacity: 0;
  animation: scs-fade 700ms var(--ease-standard) 700ms forwards;
}
@keyframes scs-fade { to { opacity: 1; } }

.scs-hero-actions .scs-btn-primary { background: var(--paper); color: var(--ink); }
.scs-hero-actions .scs-btn-primary:hover { background: #fff; }
.scs-hero-actions .scs-btn-ghost { color: var(--paper); border-color: rgba(244,241,234,0.55); }
.scs-hero-actions .scs-btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.scs-hero-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 24px 32px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
  pointer-events: none;
}
.scs-hero-foot > * { pointer-events: auto; }
.scs-hero-foot .scroll-cue {
  display: flex; align-items: center; gap: 10px;
  opacity: 0.85;
}
.scs-hero-foot .scroll-cue::before {
  content: ""; width: 28px; height: 1px; background: currentColor;
  animation: scs-cue 1.6s ease-in-out infinite;
}
@keyframes scs-cue {
  0%,100% { transform: translateX(0); opacity: 0.5; }
  50%     { transform: translateX(8px); opacity: 1; }
}

/* ================= Marquee ================= */
.scs-marquee {
  background: var(--ink); color: var(--paper);
  padding: 22px 0; overflow: hidden;
  border-top: 1px solid rgba(244,241,234,0.08);
  border-bottom: 1px solid rgba(244,241,234,0.08);
}
.scs-marquee-track {
  display: inline-flex; gap: 40px; white-space: nowrap;
  animation: scs-marq 36s linear infinite;
}
.scs-marquee-item {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  display: inline-flex; gap: 40px; align-items: center;
}
.scs-marquee-dot { color: var(--steel); font-family: var(--font-mono); }
@keyframes scs-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================= Section base ================= */
.scs-section {
  padding: 120px 96px;
  border-top: 1px solid var(--rule);
  position: relative;
}
.scs-section.ink {
  background: var(--ink); color: var(--paper);
  border-top-color: rgba(244,241,234,0.10);
}
.scs-section-head {
  max-width: 1080px;
  display: flex; flex-direction: column; gap: 18px;
  margin-bottom: 64px;
}
.scs-eyebrow {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel);
  display: flex; gap: 12px; align-items: center;
}
.scs-section.ink .scs-eyebrow { color: var(--bone); }
.scs-eyebrow .num { font-weight: 500; color: currentColor; opacity: 0.65; }
.scs-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  margin: 0;
}
.scs-h2 .soft { font-weight: 300; }
.scs-h2 .hard { font-weight: 800; }
.scs-lede-lg {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px; line-height: 1.45;
  max-width: 760px; margin: 0;
  color: var(--fg-2);
}
.scs-section.ink .scs-lede-lg { color: #D8D4CA; }

/* ================= Disciplines ================= */
.scs-disciplines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1.5px solid var(--rule-strong);
  border-left: 1.5px solid var(--rule-strong);
}
.scs-discipline {
  padding: 40px 32px 48px;
  border-right: 1.5px solid var(--rule-strong);
  border-bottom: 1.5px solid var(--rule-strong);
  display: flex; flex-direction: column; gap: 18px;
  min-height: 360px;
  position: relative;
  transition: background 320ms var(--ease-standard);
}
.scs-discipline:hover { background: rgba(10,10,10,0.04); }
.scs-discipline-num {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel);
}
.scs-discipline h3 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 32px;
  line-height: 1.05; letter-spacing: -0.015em;
  margin: 0; color: var(--ink);
}
.scs-discipline p {
  font-family: var(--font-display);
  font-weight: 400; font-size: 15.5px; line-height: 1.55;
  color: var(--fg-2); margin: 0;
  max-width: 32ch;
}
.scs-discipline-list {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--ink);
}
.scs-discipline-list li {
  list-style: none;
  display: flex; gap: 10px; align-items: baseline;
}
.scs-discipline-list li::before {
  content: "→"; color: var(--steel);
}

/* ================= Portfolio carousel (circular 3D gallery) ================= */
.scs-portfolio {
  background: var(--ink); color: var(--paper);
  border-top: 1px solid rgba(244,241,234,0.10);
  position: relative;
  /* height set inline (N * 100vh) — outer scroll-track for the pin */
}
/* The pin uses a grid: [headline] | [stage] | [controls].
   This guarantees the stage row has its own bounded space — no matter the
   viewport, cards are clipped to that row and can never visually overlap
   the headline above or the controls below. */
.scs-portfolio-pin {
  position: sticky; top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.scs-portfolio-inner {
  position: relative;
  z-index: 1;
  min-height: 0; /* let the row collapse to its content if needed */
  overflow: hidden; /* hard-clip cards to the stage row */
  /* Safety inset: even though cards are sized to fit, this leaves a small
     visual gap between the front card and the headline/controls so the
     gallery never reads as touching either edge. */
  padding: 24px 0 16px;
}
.scs-portfolio .scs-section-head {
  position: relative;
  padding: 18px 96px 16px;
  margin-bottom: 0;
  max-width: none;
  z-index: 5;
  background: var(--ink);
  border-bottom: 1px solid rgba(244,241,234,0.08);
}
.scs-portfolio .scs-section-head .scs-eyebrow { margin-bottom: 4px; }
.scs-portfolio .scs-section-head .scs-h2 {
  /* Compact headline for the portfolio section — title only, no lede. */
  font-size: clamp(22px, 2.8vw, 36px);
  line-height: 1.04;
  margin: 0;
}
.scs-portfolio .scs-section-head > * {
  max-width: 1080px;
  position: relative;
}
/* Match: bottom controls bar fully opaque too. */
.scs-portfolio .scs-carousel-controls {
  position: relative;
  background: var(--ink);
  padding: 16px 96px;
  border-top: 1px solid rgba(244,241,234,0.08);
  z-index: 5;
}
.scs-portfolio .scs-eyebrow { color: var(--bone); }

.scs-goo-svg { position: absolute; width: 0; height: 0; }

.scs-circular-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  /* Larger perspective = less front-card magnification, so the rendered
     card stays close to its CSS dimensions. */
  perspective: 3200px;
  perspective-origin: 50% 50%;
  overflow: visible;
  z-index: 1;
}
.scs-circular-track {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 220ms linear; /* smooth out scroll jitter */
}
/* 4:3 card — landscape orientation. Width/height set inline by JS to adapt
   to viewport. */
.scs-circular-card {
  position: absolute;
  left: 50%; top: 50%;
  border-radius: 12px;
  overflow: hidden;
  background: #141414;
  border: 1px solid rgba(244,241,234,0.10);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.8);
  text-decoration: none;
  color: var(--paper);
  transform-style: preserve-3d;
  cursor: pointer;
  transition: opacity 0.35s linear, box-shadow 0.4s var(--ease-emph), border-color 0.4s var(--ease-emph);
}
.scs-circular-card.is-front {
  box-shadow: 0 60px 100px -20px rgba(0,0,0,0.85), 0 0 0 1px rgba(244,241,234,0.6);
}
.scs-circular-card:hover { border-color: rgba(244,241,234,0.4); }
.scs-circular-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 1.6s var(--ease-emph);
}
.scs-circular-card.is-front:hover .scs-circular-img { transform: scale(1.04); }
.scs-circular-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 45%, rgba(10,10,10,0.85) 100%);
}
.scs-circular-card .card-meta {
  position: absolute; left: 22px; right: 22px; bottom: 22px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; color: var(--paper);
}
.scs-circular-card .card-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 32px; letter-spacing: -0.01em; line-height: 1.04;
}
.scs-circular-card .card-tags {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone); margin-top: 8px;
}
.scs-circular-card .card-metric {
  text-align: right;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
}
.scs-circular-card .card-metric strong {
  display: block; font-family: var(--font-display);
  font-weight: 800; font-size: 30px; letter-spacing: -0.01em;
  color: var(--paper); margin-top: 6px;
}
.scs-circular-card .card-num {
  position: absolute; top: 22px; left: 26px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--paper); opacity: 0.85;
}
.scs-circular-card .card-meta {
  position: absolute; left: 26px; right: 26px; bottom: 26px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; color: var(--paper);
}
.scs-circular-card .card-arrow {
  position: absolute; top: 16px; right: 18px;
  width: 34px; height: 34px;
  border: 1px solid rgba(244,241,234,0.4);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper); font-family: var(--font-mono); font-size: 14px;
  transition: background 220ms;
}
.scs-circular-card.is-front:hover .card-arrow { background: var(--paper); color: var(--ink); }

.scs-circular-floor {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 80px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  pointer-events: none;
}

.scs-carousel-controls {
  display: flex; gap: 16px; justify-content: space-between; align-items: center;
  z-index: 5;
}
.scs-carousel-nav { display: flex; gap: 12px; }
.scs-carousel-btn {
  width: 48px; height: 48px;
  border: 1px solid rgba(244,241,234,0.30);
  background: transparent;
  color: var(--paper);
  border-radius: 999px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 16px;
  transition: background 220ms, color 220ms, border-color 220ms;
}
.scs-carousel-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.scs-carousel-counter {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
  display: flex; align-items: center; gap: 12px;
}
.scs-carousel-counter .bar {
  width: 220px; height: 1px; background: rgba(244,241,234,0.18);
  position: relative; overflow: hidden;
}
.scs-carousel-counter .bar > i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--paper);
  transition: width 220ms linear;
}
.scs-carousel-dots { display: flex; gap: 8px; }
.scs-carousel-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(244,241,234,0.20);
  border: 0; cursor: pointer; padding: 0;
  transition: background 220ms, transform 220ms;
}
.scs-carousel-dot.is-active { background: var(--paper); transform: scale(1.4); }

/* ================= Metrics strip ================= */
.scs-metrics {
  background: var(--paper);
  padding: 96px 96px;
  border-top: 1px solid var(--rule);
}
.scs-metric-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1.5px solid var(--ink);
}
.scs-metric-cell {
  padding: 32px 28px 36px;
  border-right: 1px solid var(--rule);
  border-bottom: 1.5px solid var(--ink);
  display: flex; flex-direction: column; gap: 8px;
}
.scs-metric-cell:last-child { border-right: 0; }
.scs-metric-cell .metric-eye {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel);
}
.scs-metric-cell .metric-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.scs-metric-cell .metric-num .unit {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.4em; color: var(--steel);
  margin-left: 4px; letter-spacing: 0;
}
.scs-metric-cell .metric-cap {
  font-family: var(--font-display);
  font-weight: 400; font-size: 14px; line-height: 1.4;
  color: var(--fg-2);
  max-width: 28ch;
}

/* ================= Enwany feature (homepage) ================= */
.scs-enwany-feature {
  background: var(--ink);
  color: var(--paper);
  padding: 120px 96px;
  border-top: 1px solid rgba(244,241,234,0.10);
  position: relative;
  overflow: hidden;
}
.scs-enwany-feature::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(244,241,234,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244,241,234,0.045) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 80% 30%, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 30%, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.scs-enwany-feature > * { position: relative; z-index: 1; }
.scs-enwany-feature .scs-eyebrow { color: var(--bone); }
.scs-enwany-feature .scs-h2 { color: var(--paper); }
.scs-enwany-feature .scs-lede-lg { color: #D8D4CA; max-width: 64ch; }

.scs-enwany-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
  max-width: 1400px;
}

.scs-enwany-pill {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.20em; text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid rgba(244,241,234,0.32);
  border-radius: 999px;
  color: var(--paper);
  display: inline-flex; align-items: center; gap: 6px;
}
.scs-enwany-pill.is-live {
  background: var(--paper); color: var(--ink); border-color: var(--paper);
}
.scs-enwany-pill [lang="ar"] {
  font-family: var(--font-arabic);
  font-weight: 600;
}

/* Terminal-style demo card */
.scs-enwany-demo {
  background: #0E0E0E;
  border: 1px solid rgba(244,241,234,0.18);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.scs-enwany-demo-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(244,241,234,0.04);
  border-bottom: 1px solid rgba(244,241,234,0.12);
}
.scs-enwany-demo-head .dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(244,241,234,0.18);
}
.scs-enwany-demo-head .dot.r { background: #FF5F56; }
.scs-enwany-demo-head .dot.y { background: #FFBD2E; }
.scs-enwany-demo-head .dot.g { background: #27C93F; }
.scs-enwany-demo-head .title {
  margin-left: auto;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(244,241,234,0.62);
}
.scs-enwany-demo-body {
  padding: 22px 24px 26px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--paper);
  display: flex; flex-direction: column; gap: 4px;
}
.scs-enwany-demo-body .line .lbl { color: #FFBD2E; margin-right: 8px; }
.scs-enwany-demo-body .line .cmd { color: var(--paper); }
.scs-enwany-demo-body .line.dim { color: rgba(244,241,234,0.55); }
.scs-enwany-demo-body .line.ok { color: #27C93F; }
.scs-enwany-demo-body .line.ok strong {
  background: rgba(39,201,63,0.14);
  border: 1px dashed rgba(39,201,63,0.45);
  padding: 1px 8px; border-radius: 4px;
  color: var(--paper);
  font-family: var(--font-mono); font-weight: 500;
}
.scs-enwany-demo-body .blink {
  display: inline-block;
  animation: scs-blink 1.0s steps(1) infinite;
}
@keyframes scs-blink { 50% { opacity: 0; } }

/* Edges grid — 4 up */
.scs-enwany-edges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1.5px solid rgba(244,241,234,0.32);
  border-left: 1.5px solid rgba(244,241,234,0.32);
  margin-top: 8px;
}
.scs-enwany-edge {
  padding: 32px 28px 36px;
  border-right: 1.5px solid rgba(244,241,234,0.32);
  border-bottom: 1.5px solid rgba(244,241,234,0.32);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 220px;
  transition: background 280ms var(--ease-standard);
}
.scs-enwany-edge:hover { background: rgba(244,241,234,0.03); }
.scs-enwany-edge .num {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(244,241,234,0.62);
}
.scs-enwany-edge h3 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px;
  line-height: 1.18; letter-spacing: -0.012em;
  margin: 0; color: var(--paper);
}
.scs-enwany-edge p {
  font-family: var(--font-display); font-weight: 400;
  font-size: 14.5px; line-height: 1.55;
  color: rgba(244,241,234,0.78); margin: 0;
}

.scs-enwany-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(244,241,234,0.18);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
  flex-wrap: wrap; gap: 18px;
}
.scs-enwany-foot .scs-btn-primary {
  background: var(--paper); color: var(--ink);
}
.scs-enwany-foot .scs-btn-primary:hover { background: #fff; }

/* ================= Approach ================= */
.scs-approach {
  background: var(--paper);
}
.scs-approach-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.scs-approach-steps {
  display: flex; flex-direction: column;
  border-top: 1.5px solid var(--ink);
}
.scs-step {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  align-items: baseline;
  transition: background 220ms;
}
.scs-step:hover { background: rgba(10,10,10,0.03); }
.scs-step .step-num {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel);
}
.scs-step h4 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 26px; letter-spacing: -0.012em;
  margin: 0 0 8px;
}
.scs-step p {
  font-family: var(--font-display); font-weight: 400;
  font-size: 15.5px; line-height: 1.55;
  color: var(--fg-2); margin: 0;
  max-width: 56ch;
}

/* ================= Founder ================= */
.scs-founder {
  background: var(--ink); color: var(--paper);
  padding: 120px 96px;
  border-top: 1px solid rgba(244,241,234,0.10);
}
.scs-founder-grid {
  display: grid; grid-template-columns: 0.9fr 1.4fr;
  gap: 80px; align-items: center;
  max-width: 1400px; margin: 0 auto;
}
.scs-founder-img {
  position: relative;
  border-radius: 12px; overflow: hidden;
  aspect-ratio: 4/5;
  background: #1A1A1A;
  filter: grayscale(0.92) contrast(1.05);
}
.scs-founder-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.scs-founder-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10,10,10,0.55));
}
.scs-founder-meta {
  position: absolute; left: 20px; right: 20px; bottom: 18px;
  z-index: 2; display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
}
.scs-founder-quote {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(28px, 3vw, 44px); line-height: 1.2;
  letter-spacing: -0.012em; color: var(--paper);
  margin: 0;
}
.scs-founder-quote .hard { font-weight: 700; }
.scs-founder-sig {
  margin-top: 36px; display: flex; gap: 24px; align-items: center;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
}
.scs-founder-sig .name {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  letter-spacing: 0; text-transform: none; color: var(--paper);
}

/* ================= CTA ================= */
.scs-cta {
  padding: 140px 96px 160px;
  background: var(--paper); color: var(--ink);
  border-top: 1px solid var(--rule);
  text-align: left;
}
.scs-cta .scs-h-big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 168px);
  line-height: 0.92; letter-spacing: -0.028em;
  margin: 0;
  max-width: 1400px;
}
.scs-cta .scs-h-big .soft { font-weight: 300; }
.scs-cta-actions { display: flex; gap: 14px; margin-top: 56px; flex-wrap: wrap; }

/* ================= Footer ================= */
.scs-footer {
  background: var(--ink); color: var(--paper);
  padding: 96px 96px 40px;
}
.scs-footer-top {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(244,241,234,0.12);
}
.scs-footer-col h5 {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
  margin: 0 0 20px; font-weight: 500;
}
.scs-footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.scs-footer-col a {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; color: var(--paper); text-decoration: none;
  transition: opacity 220ms;
}
.scs-footer-col a:hover { opacity: 0.7; text-decoration: underline; text-underline-offset: 4px; }
.scs-footer-brand {
  display: flex; flex-direction: column; gap: 18px;
}
.scs-footer-brand .scs-logo { height: 22px; }
.scs-footer-brand p {
  font-family: var(--font-display); font-weight: 400;
  font-size: 14px; line-height: 1.55;
  color: var(--bone); margin: 0; max-width: 28ch;
}
.scs-footer-bottom {
  margin-top: 32px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
}

/* ================= Reveal animations ================= */
.scs-reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-emph), transform 700ms var(--ease-emph); }
.scs-reveal.in-view { opacity: 1; transform: translateY(0); }

/* Section transition slab — code-style */
.scs-slab-divider {
  position: relative;
  height: 1px;
  background: var(--rule);
  overflow: visible;
}
.scs-slab-divider::before, .scs-slab-divider::after {
  content: "";
  position: absolute; top: -1px;
  width: 30%; height: 1.5px;
  background: var(--ink);
}
.scs-slab-divider::before { left: 0; }
.scs-slab-divider::after { right: 0; }

/* ================= Responsive ================= */
@media (max-width: 1100px) {
  .scs-disciplines { grid-template-columns: 1fr; }
  .scs-discipline { min-height: auto; }
  .scs-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .scs-metric-cell:nth-child(2) { border-right: 0; }
  .scs-approach-grid { grid-template-columns: 1fr; gap: 48px; }
  .scs-founder-grid { grid-template-columns: 1fr; gap: 48px; }
  .scs-footer-top { grid-template-columns: 1fr 1fr; }
  .scs-enwany-feature-grid { grid-template-columns: 1fr; gap: 40px; }
  .scs-enwany-edges { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .scs-hero { padding: 110px 24px 80px; }
  .scs-section, .scs-portfolio .scs-section-head, .scs-metrics, .scs-founder, .scs-cta, .scs-footer, .scs-enwany-feature {
    padding-left: 24px; padding-right: 24px;
  }
  .scs-portfolio .scs-section-head { padding: 0 24px; margin-bottom: 0; }
  .scs-portfolio-inner { padding: 60px 0 24px; gap: 16px; }
  .scs-carousel-controls { padding-left: 24px; padding-right: 24px; flex-direction: column; gap: 18px; align-items: flex-start; }
  .scs-metric-grid { grid-template-columns: 1fr; }
  .scs-metric-cell { border-right: 0; }
  .scs-footer-top { grid-template-columns: 1fr; }
  .scs-meta { padding: 8px 24px; gap: 10px; font-size: 10px; }
  .scs-meta span:nth-child(3) { display: none; }
  .scs-nav { padding: 12px 24px; }
  .scs-logo { height: 22px; }
  .scs-nav-links .scs-link { display: none; }
  .scs-nav-links .scs-cta-sm { padding: 8px 12px; font-size: 12px; }
  .scs-hero-foot { padding: 16px 20px; font-size: 10px; }
  .scs-hero-foot .right { display: none; }
  .scs-enwany-edges { grid-template-columns: 1fr; }
  .scs-enwany-foot { flex-direction: column; align-items: flex-start; }
}


/* ================= Language switcher ================= */
.scs-lang-switch {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: inherit;
  margin: 0 16px 0 0;
  opacity: 0.85;
  user-select: none;
}
.scs-lang-switch a {
  color: inherit; text-decoration: none;
  padding: 4px 6px;
  border-bottom: 1.5px solid transparent;
  transition: border-color 200ms ease, opacity 200ms ease;
}
.scs-lang-switch a.is-current { border-bottom-color: currentColor; }
.scs-lang-switch a:not(.is-current):hover { border-bottom-color: rgba(255,255,255,0.4); }
.scs-lang-switch .sep { opacity: 0.35; }
@media (max-width: 760px) {
  .scs-lang-switch { font-size: 10px; margin-right: 8px; }
}
/* Arabic-page nav: flip metadata strip + nav-links direction */
html[dir="rtl"] .scs-meta { flex-direction: row-reverse; }
html[dir="rtl"] .scs-nav-links { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .scs-lang-switch { margin: 0 0 0 16px; }


/* ================ Arabic / RTL polish ================ */
html[dir="rtl"] .scs-footer-bottom { direction: rtl; }
html[dir="rtl"] .scs-footer-bottom span { font-family: var(--font-arabic); letter-spacing: 0; }
html[dir="rtl"] .scs-cta-actions { direction: rtl; }
html[dir="rtl"] .scs-btn .scs-arrow { display: inline-block; transform: scaleX(-1); }

/* ================ RTL hero adjustments ================ */
@media (min-width: 1100px) {
  /* In RTL the visualization sits on the left; content area on the right */
  html[dir="rtl"] .scs-hero-bg { left: 0; right: 35%; }
}
/* Hero h1 must wrap properly in RTL — break long Arabic words */
html[dir="rtl"] .scs-hero-h {
  word-break: normal;
  overflow-wrap: break-word;
}
/* Hero content max-width to prevent overflow at any viewport */
html[dir="rtl"] .scs-hero-content {
  max-width: 100%;
}

/* ============================================================
   COMPREHENSIVE RTL OVERRIDES — Arabic pages need their own
   layout flow on every component that uses absolute positioning,
   flex, or grid in LTR-assumed direction.
   ============================================================ */

/* Footer: column reading order flips in RTL */
html[dir="rtl"] .scs-footer-top {
  direction: rtl;
}
html[dir="rtl"] .scs-footer-brand p,
html[dir="rtl"] .scs-footer-col h5,
html[dir="rtl"] .scs-footer-col ul,
html[dir="rtl"] .scs-footer-col li,
html[dir="rtl"] .scs-footer-col a {
  text-align: right;
}
html[dir="rtl"] .scs-footer-bottom {
  direction: rtl;
}
html[dir="rtl"] .scs-footer-bottom span {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

/* Comparison table on Enwany page must read right-to-left */
html[dir="rtl"] .scs-compare-table {
  direction: rtl;
}
html[dir="rtl"] .scs-compare-table th,
html[dir="rtl"] .scs-compare-table td {
  text-align: right;
}
html[dir="rtl"] .scs-compare-table th[scope="row"] {
  text-align: right;
}
html[dir="rtl"] .scs-compare-table .feat-col {
  /* Featured column should still align right but stand out */
  text-align: right;
}

/* CTA actions row should flow RTL */
html[dir="rtl"] .scs-cta-actions {
  direction: rtl;
}

/* Mirror arrow icons inside buttons in RTL (← becomes correct "forward") */
html[dir="rtl"] .scs-btn .scs-arrow,
html[dir="rtl"] .scs-cta-sm .scs-arrow,
html[dir="rtl"] .scs-cta-lg-alt .scs-arrow {
  display: inline-block;
  transform: scaleX(-1);
}

/* Aside meta panels in heroes should align right */
html[dir="rtl"] .hero-side .row {
  direction: rtl;
  text-align: right;
}

/* Pricing card layouts */
html[dir="rtl"] .scs-pricing-grid {
  direction: rtl;
}
html[dir="rtl"] .scs-price-card,
html[dir="rtl"] .scs-price-card ul,
html[dir="rtl"] .scs-price-card li {
  text-align: right;
}

/* Service grid */
html[dir="rtl"] .scs-services-grid {
  direction: rtl;
}
html[dir="rtl"] .scs-service-card,
html[dir="rtl"] .scs-service-card ul,
html[dir="rtl"] .scs-service-card li,
html[dir="rtl"] .scs-service-card .svc-meta {
  text-align: right;
}

/* Service card meta strip — flow icons properly */
html[dir="rtl"] .scs-service-card .svc-meta .arrow {
  display: inline-block;
  transform: scaleX(-1);
}

/* Approach steps */
html[dir="rtl"] .scs-approach-steps {
  direction: rtl;
}
html[dir="rtl"] .scs-step,
html[dir="rtl"] .scs-step h4,
html[dir="rtl"] .scs-step p {
  text-align: right;
}

/* Hero h1 line-height: Arabic glyphs need more breathing room than English */
html[dir="rtl"] .scs-h-big,
html[dir="rtl"] .scs-cta-inner .scs-h-big {
  line-height: 1.15;
}
html[dir="rtl"] .scs-h2 {
  line-height: 1.2;
}

/* Portfolio cards */
html[dir="rtl"] .scs-portfolio-grid,
html[dir="rtl"] .scs-portfolio-card,
html[dir="rtl"] .pf-body {
  text-align: right;
}

/* Case study side aside */
html[dir="rtl"] .scs-case-side .row {
  direction: rtl;
  text-align: right;
}

/* Form labels right-aligned */
html[dir="rtl"] .scs-form label {
  text-align: right;
}
html[dir="rtl"] .scs-form input,
html[dir="rtl"] .scs-form textarea,
html[dir="rtl"] .scs-form select {
  text-align: right;
}

/* Stat strip — keep numbers (LTR digits) but Arabic labels */
html[dir="rtl"] .scs-stat-strip .stat {
  text-align: right;
}

/* TOC (longread sidebar) — must read right */
html[dir="rtl"] .scs-toc {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] .scs-toc h5 {
  text-align: right;
}
html[dir="rtl"] .scs-toc a {
  text-align: right;
}

/* Pricing card grid items */
html[dir="rtl"] .scs-pricing-card .price {
  direction: ltr;
  text-align: right;
}

/* FAQ items */
html[dir="rtl"] .scs-faq-item h3,
html[dir="rtl"] .scs-faq-item p {
  text-align: right;
}

/* === MOBILE MENU OVERLAY === */
.scs-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(.6,.01,.36,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.scs-mobile-menu[hidden] {
  display: block;  /* override default hidden behaviour to allow transition */
}
body.is-menu-open .scs-mobile-menu {
  opacity: 1;
  pointer-events: auto;
}
body.is-menu-open {
  overflow: hidden;
}
.scs-mobile-menu-inner {
  min-height: 100%;
  padding: 92px 28px 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-display);
}
.scs-mobile-menu-inner .mm-link {
  display: block;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(244,241,234,0.08);
  transition: opacity 180ms ease;
}
.scs-mobile-menu-inner .mm-link:hover { opacity: 0.7; }
.scs-mobile-menu-inner .mm-link.is-active {
  font-weight: 700;
}

.scs-mobile-menu-inner .mm-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px;
  padding: 16px 24px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  align-self: flex-start;
}

.scs-mobile-menu-inner .mm-lang {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.55);
}
.scs-mobile-menu-inner .mm-lang a {
  color: rgba(244,241,234,0.55);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(244,241,234,0.18);
  border-radius: 4px;
}
.scs-mobile-menu-inner .mm-lang a.is-current {
  color: var(--paper);
  border-color: var(--paper);
}

.scs-mobile-menu-inner .mm-foot {
  margin-top: auto;
  padding-top: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.45);
}

/* RTL adjustments */
html[dir="rtl"] .scs-mobile-menu-inner { text-align: right; }
html[dir="rtl"] .scs-mobile-menu-inner .mm-cta { align-self: flex-end; }

/* ============================================================
   Safety: if JS fails to load (no nav.js), elements with .scs-reveal
   should still be visible. We use @supports (selector(...)) to detect
   when JS hasn't run by checking if `js-ready` class is missing on html.
   Simpler approach: a fallback animation that auto-completes after 2s
   so even if IntersectionObserver fails, content appears.
   ============================================================ */
@keyframes scs-reveal-fallback {
  to { opacity: 1; transform: translateY(0); }
}
.scs-reveal {
  animation: scs-reveal-fallback 700ms var(--ease-emph) 0.3s forwards;
}
.scs-reveal.in-view {
  /* JS-driven: cancel the fallback animation when in-view fires properly */
  animation: none;
  opacity: 1; transform: translateY(0);
}

/* ============================================================
   MOBILE BURGER MENU — pure CSS, no JavaScript dependency
   - Uses a hidden checkbox <input id="scs-menu-toggle"> as state
   - <label> burger toggles the checkbox via :checked
   - Overlay shows when the checkbox is checked
   - Works without any JS — bullet-proof for file:// and any browser
   ============================================================ */

/* The toggle checkbox is functionally invisible but must remain in DOM */
.scs-menu-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px; height: 1px;
  margin: -1px;
  border: 0; padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* Burger label — replaces the old <button>, behaves identically */
.scs-nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 6px;
  width: 40px; height: 40px;
  padding: 0;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: opacity 180ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.scs-nav.on-ink .scs-nav-burger {
  border-color: rgba(244,241,234,0.5);
}
.scs-nav-burger span {
  position: absolute;
  left: 9px; right: 9px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 220ms cubic-bezier(.6,.01,.36,1), opacity 180ms ease, top 220ms cubic-bezier(.6,.01,.36,1);
  pointer-events: none;
}
.scs-nav.on-ink .scs-nav-burger span { background: var(--paper); }
.scs-nav-burger span:nth-child(1) { top: 12px; }
.scs-nav-burger span:nth-child(2) { top: 19px; }
.scs-nav-burger span:nth-child(3) { top: 26px; }

/* Burger morphs to X when checkbox is checked */
.scs-menu-toggle:checked ~ .scs-nav .scs-nav-burger span:nth-child(1),
.scs-menu-toggle:checked ~ * .scs-nav-burger span:nth-child(1),
body:has(.scs-menu-toggle:checked) .scs-nav-burger span:nth-child(1) {
  top: 19px; transform: rotate(45deg);
}
.scs-menu-toggle:checked ~ .scs-nav .scs-nav-burger span:nth-child(2),
.scs-menu-toggle:checked ~ * .scs-nav-burger span:nth-child(2),
body:has(.scs-menu-toggle:checked) .scs-nav-burger span:nth-child(2) {
  opacity: 0;
}
.scs-menu-toggle:checked ~ .scs-nav .scs-nav-burger span:nth-child(3),
.scs-menu-toggle:checked ~ * .scs-nav-burger span:nth-child(3),
body:has(.scs-menu-toggle:checked) .scs-nav-burger span:nth-child(3) {
  top: 19px; transform: rotate(-45deg);
}

/* Show burger only on mobile */
@media (max-width: 880px) {
  .scs-nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .scs-nav-links .scs-link { display: none; }
  .scs-nav-links .scs-cta-sm { display: none; }
  .scs-nav-links .scs-lang-switch { display: none; }
  .scs-meta span:not(:first-child) { display: none; }
}

@media (max-width: 480px) {
  .scs-nav { padding: 10px 16px; gap: 12px; }
}

/* === Mobile menu overlay === */
.scs-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(.6,.01,.36,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
}

@media (max-width: 880px) {
  .scs-mobile-menu { display: block; }
}

/* When checkbox is checked, show overlay (covers all browsers without :has) */
.scs-menu-toggle:checked ~ .scs-mobile-menu,
body:has(.scs-menu-toggle:checked) .scs-mobile-menu {
  opacity: 1;
  pointer-events: auto;
}

/* Lock body scroll when menu open */
body:has(.scs-menu-toggle:checked) {
  overflow: hidden;
}

.scs-mobile-menu-inner {
  min-height: 100%;
  padding: 92px 28px 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-display);
  position: relative;
}

/* X close button inside overlay */
.scs-mobile-menu-x {
  position: absolute;
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border: 1px solid rgba(244,241,234,0.3);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; line-height: 1;
  color: var(--paper);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-mono);
}
html[dir="rtl"] .scs-mobile-menu-x { right: auto; left: 24px; }

/* Hidden visual close-target covering area outside the inner panel — but actually
   we don't need this since the whole overlay is the menu. Keep for backward compat. */
.scs-menu-overlay-close { display: none; }

.scs-mobile-menu-inner .mm-link {
  display: block;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(244,241,234,0.08);
  transition: opacity 180ms ease;
}
.scs-mobile-menu-inner .mm-link:hover { opacity: 0.7; }
.scs-mobile-menu-inner .mm-link.is-active { font-weight: 700; }

.scs-mobile-menu-inner .mm-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px;
  padding: 16px 24px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  align-self: flex-start;
}
html[dir="rtl"] .scs-mobile-menu-inner .mm-cta { align-self: flex-end; }

.scs-mobile-menu-inner .mm-lang {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.55);
}
.scs-mobile-menu-inner .mm-lang a {
  color: rgba(244,241,234,0.55);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(244,241,234,0.18);
  border-radius: 4px;
}
.scs-mobile-menu-inner .mm-lang a.is-current {
  color: var(--paper);
  border-color: var(--paper);
}

.scs-mobile-menu-inner .mm-foot {
  margin-top: auto;
  padding-top: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.45);
}

html[dir="rtl"] .scs-mobile-menu-inner { text-align: right; }
