/* ============================================================
   Cineva by Apex Sound & Light — Shared Styles
   Static HTML site · GitHub Pages · No build step
   ============================================================ */

/* ---- Webfonts ----
   Loaded in each HTML <head> via an async pattern (media="print" onload swap)
   with a <noscript> fallback, so the request does not block first paint.
   Do NOT @import here — an @import would itself be render-blocking. */

/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Neutrals */
  --ink:        #1C1D20;
  --ink-soft:   #1F2025;
  --carbon:     #292A2F;
  --smoke:      #383A40;
  --steel:      #4F525A;
  --iron:       #90939C;
  --fog:        #9598A2;
  --mist:       #C5C8D0;
  --bone:       #DDDFE5;
  --signal:     #E5E8EC;
  --white:      #FFFFFF;

  /* Brand accents */
  --cyan:       #38B6D9;
  --cyan-deep:  #267E99;
  --cyan-soft:  #0D2A33;
  --cyan-bright:#5FC6E2;
  --stage:      #C9337A;
  --stage-deep: #962257;

  /* Hairlines */
  --line-1: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.18);

  /* Typography */
  --font-sans:  "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale */
  --t-hero:     clamp(48px, 7vw, 112px);
  --t-xxl:      clamp(48px, 7vw, 96px);
  --t-xl:       clamp(36px, 5vw, 64px);
  --t-lg:       clamp(28px, 3.5vw, 48px);
  --t-md:       28px;
  --t-sm:       20px;
  --t-body:     16px;
  --t-caption:  14px;
  --t-eyebrow:  13px;

  /* Spacing (4-based) — rem so spacing scales with user's browser font-size */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.25rem;  --s-6: 1.5rem;   --s-8: 2rem;     --s-10: 2.5rem;
  --s-12: 3rem;    --s-16: 4rem;    --s-20: 5rem;    --s-24: 6rem;
  --s-32: 8rem;

  /* Radii */
  --r-0: 0;  --r-1: 2px;  --r-2: 4px;  --r-3: 6px;  --r-4: 8px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --d-fast: 120ms;
  --d-base: 200ms;
  --d-slow: 360ms;

  /* Layout */
  --container: 1280px;
  --gutter: 24px;
  --nav-height: 144px;
}

/* ============================================================
   2. RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--cyan); color: var(--white); }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  text-wrap: balance;
}

.display-hero {
  font-weight: 900;
  font-size: clamp(32px, 5vw, 66px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.display-page {
  font-weight: 900;
  font-size: clamp(32px, 5vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.display-section {
  font-weight: 800;
  font-size: clamp(32px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lede {
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--mist);
  max-width: 560px;
}

.body-lg {
  font-size: 18px;
  line-height: 1.55;
  color: var(--mist);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pt { color: var(--cyan); }

/* ============================================================
   4. LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: calc(var(--s-24) * 0.6) 0; /* 96px -> ~58px: section gaps tightened 40%, kept equal */
  border-top: 1px solid var(--line-1);
}

.section:first-of-type { border-top: none; }

/* ============================================================
   5. EYEBROW
   ============================================================ */
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--cyan);
  flex-shrink: 0;
}

/* ============================================================
   6. NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  margin-bottom: 0;
  background: rgba(28, 29, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
}

/* Sticky-buffer: a fading gradient that rides under the nav while it's pinned,
   so body content never butts directly against the nav border on scroll. */
.site-nav::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 112px;
  background: linear-gradient(
    to bottom,
    rgba(28, 29, 32, 0.85) 0%,
    rgba(28, 29, 32, 0.55) 40%,
    rgba(28, 29, 32, 0) 100%
  );
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  pointer-events: none;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-lockup {
  height: 72px;
  width: auto;
  /* The SVG uses fill="currentColor" which falls back to black when loaded via <img>.
     Force it to white so the lockup reads on the dark nav background. */
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.nav-links a {
  font-weight: 500;
  font-size: 14px;
  color: var(--mist);
  letter-spacing: 0.01em;
  transition: color var(--d-fast) var(--ease-out);
}

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

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  cursor: pointer;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  margin-top: 12px;
  min-width: 220px;
  background: var(--carbon);
  border: 1px solid var(--line-2);
  padding: var(--s-3) 0;
  z-index: 101;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown-menu a {
  display: block;
  padding: var(--s-2) var(--s-5);
  font-size: 13px;
  font-weight: 500;
  color: var(--mist);
  transition: color var(--d-fast) var(--ease-out),
              background var(--d-fast) var(--ease-out);
}

.nav-dropdown-menu a:hover {
  color: var(--cyan);
  background: var(--line-1);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--bone);
  cursor: pointer;
  padding: var(--s-2);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: all var(--d-base) var(--ease-out);
}

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

.btn-cyan:hover {
  background: var(--cyan-bright);
  border-color: var(--cyan-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--bone);
  border-color: var(--line-3);
}

.btn-ghost:hover {
  border-color: var(--bone);
  color: var(--white);
}

.btn-sm {
  font-size: 13px;
  padding: 10px 18px;
}

/* ============================================================
   8. HERO (homepage)
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  padding: 0 0 var(--s-6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--carbon);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--iron);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,29,32,0) 0%, rgba(28,29,32,0) 40%, rgba(28,29,32,0.85) 75%, var(--ink) 100%);
}

.display-page {
  position: relative;
  isolation: isolate;
}

.hero .display-page,
.sub-hero .display-page {
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

.hero-card {
  position: relative;
  display: block;
  width: fit-content;
  padding: 0.02em 0.18em;
  line-height: 0.98;
  margin: 0;
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(28, 29, 32, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  z-index: -1;
}

.hero-card--no-bg::before {
  display: none;
}

.hero .container {
  position: relative;
}

.hero h1 {
  margin-top: var(--s-8);
}

.hero .lede {
  margin-top: var(--s-8);
}

.hero-ctas {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-10);
}

/* ============================================================
   9. SUB-HERO (inner pages)
   ============================================================ */
.sub-hero {
  position: relative;
  min-height: calc(92vh - 296px);
  padding: 0 0 var(--s-6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sub-hero h1 {
  margin-top: 0;
}

.sub-hero .container {
  position: relative;
}

/* Pull the first section up directly under the sub-hero headline */
.sub-hero + .section {
  padding-top: var(--s-12);
}

/* ============================================================
   10. SERVICE GRID (homepage teaser)
   ============================================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-1);
  margin-top: var(--s-8);
}

.service-grid--five {
  grid-template-columns: repeat(5, 1fr);
}

.service-card {
  padding: var(--s-8) var(--s-6);
  background: var(--ink);
  transition: background var(--d-base) var(--ease-out);
  position: relative;
}

.service-card:hover {
  background: var(--ink-soft);
}

.service-card h3 {
  font-size: var(--t-md);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-2);
  padding-right: 48px;
}

.service-card p {
  font-size: var(--t-caption);
  color: var(--fog);
  line-height: 1.5;
}

.service-icon {
  position: absolute;
  top: var(--s-8);
  right: var(--s-6);
  width: 32px;
  height: 32px;
  color: var(--stage);
  opacity: 1;
  pointer-events: none;
}

.service-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

/* ============================================================
   11. SERVICE BLOCKS (what-we-do page — full detail)
   ============================================================ */
.service-blocks {
  display: flex;
  flex-direction: column;
}

.service-block {
  padding: var(--s-16) 0;
  border-top: 1px solid var(--line-1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--s-6) var(--s-12);
  align-items: start;
}

.service-block:first-child { border-top: none; }

.service-block-title {
  font-size: var(--t-lg);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.service-block-title a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  transition: color 0.18s ease;
}

.service-block-title a:hover {
  color: var(--cyan);
}

.service-block-icon {
  width: 36px;
  height: 36px;
  color: var(--stage);
  flex-shrink: 0;
  display: inline-flex;
}

.service-block-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.service-block p {
  color: var(--mist);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 0 var(--s-4);
}

.service-block p:last-child {
  margin-bottom: 0;
}

.service-block-image {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--carbon);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-block-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.service-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-block-image span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--iron);
}

.spec-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-6);
}

.spec-item {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone);
  border: 1px solid var(--cyan);
  background: rgba(56, 182, 217, 0.08);
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  transition: background var(--d-fast) var(--ease-out);
}

.spec-item:hover {
  background: rgba(56, 182, 217, 0.18);
}

.spec-item::before {
  content: none;
}

/* ============================================================
   12. PILLARS
   ============================================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
  margin-top: var(--s-8);
}

.pillar {
  border-top: 2px solid var(--cyan);
  padding-top: var(--s-5);
}

.pillar h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--s-2);
}

.pillar p {
  font-size: var(--t-caption);
  color: var(--fog);
  line-height: 1.5;
}

/* Pillar full (about page — expanded) */
.pillar-full {
  padding: var(--s-12) 0;
  border-top: 1px solid var(--line-1);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--s-8);
  align-items: start;
}

.pillar-full h3 {
  font-size: var(--t-md);
  font-weight: 800;
  border-left: 3px solid var(--cyan);
  padding-left: var(--s-5);
  line-height: 1.2;
}

.pillar-full p {
  color: var(--mist);
  line-height: 1.6;
}

/* ============================================================
   13. TRUSTED BY
   ============================================================ */
.trusted-by {
  display: flex;
  justify-content: center;
  gap: var(--s-12);
  flex-wrap: wrap;
  padding: var(--s-12) 0;
}

.trusted-by span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--iron);
}

/* ============================================================
   14. CTA BAND
   ============================================================ */
.cta-band {
  padding: var(--s-20) 0;
  text-align: center;
  border-top: 1px solid var(--line-1);
}

.cta-band h2 {
  font-size: var(--t-xl);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.cta-band .btn {
  margin-top: var(--s-8);
}

/* ============================================================
   15. ABOUT — story, warehouse, stats
   ============================================================ */
.story-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s-16);
  align-items: start;
}

.story-grid p {
  color: var(--mist);
  line-height: 1.65;
  margin-bottom: var(--s-6);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
}

.stat {
  padding: var(--s-6);
  border: 1px solid var(--line-2);
}

.stat-value {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 40px;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog);
  margin-top: var(--s-2);
}

.image-slot {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--carbon);
  border: 1px dashed var(--smoke);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--s-6);
}

.image-slot span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--iron);
}

/* ============================================================
   16. WORK — demo reel, case studies
   ============================================================ */
.reel-slot {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--carbon);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-top: var(--s-8);
}

.reel-slot span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--iron);
}

.reel-play {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 2px solid var(--line-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--d-base) var(--ease-out);
}

.reel-slot:hover .reel-play {
  border-color: var(--cyan);
}

.reel-play svg {
  width: 24px;
  height: 24px;
  fill: var(--bone);
  margin-left: 3px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6);
  margin-top: var(--s-8);
}

.case-card {
  background: var(--ink);
  padding: 0;
  transition: background var(--d-base) var(--ease-out);
}

.case-card:hover { background: var(--ink-soft); }

.case-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--carbon);
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-thumb span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--iron);
}

.case-info {
  padding: var(--s-5) var(--s-6);
}

.case-info h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-1);
}

.case-meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fog);
  text-transform: uppercase;
}

/* Networks strip */
.network-strip {
  display: flex;
  justify-content: center;
  gap: var(--s-12);
  flex-wrap: wrap;
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
  margin-top: var(--s-12);
}

.network-strip span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--iron);
}

/* Trusted-by grid (3 x 3) */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-1);
  margin-top: var(--s-8);
}

.trust-cell {
  background: var(--ink);
  padding: var(--s-16) var(--s-8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-cell span {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 36px;
  letter-spacing: -0.02em;
  color: var(--mist);
}

.trust-cell img {
  display: block;
  max-height: 36px;
  max-width: 70%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ============================================================
   17. CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-16);
  align-items: start;
  margin-top: var(--s-8);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.contact-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog);
}

.contact-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}

.contact-value a {
  color: var(--white);
  border-bottom: 1px solid var(--line-2);
  transition: color var(--d-fast) var(--ease-out),
              border-color var(--d-fast) var(--ease-out);
}

.contact-value a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.hours-strip {
  margin-top: var(--s-12);
  padding: var(--s-5) var(--s-6);
  border-top: 1px solid var(--cyan);
  border-bottom: 1px solid var(--cyan);
  background: rgba(56, 182, 217, 0.06);
}

.hours-strip p {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--bone);
  text-align: center;
  margin: 0;
}

.hours-strip .accent {
  color: var(--stage);
  font-weight: 700;
}

/* ============================================================
   18. FOOTER
   ============================================================ */
.site-footer {
  margin-top: var(--s-24);
  padding: var(--s-6) 0 var(--s-5);
  border-top: 1px solid var(--line-1);
  background: var(--carbon);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line-1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

/* Footer aperture mark — masked from external SVG asset so the same
   file isn't inlined on every page. Color follows currentColor via mask. */
.footer-mark {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: var(--fog);
  -webkit-mask: url('assets/cineva-mark.svg') center / contain no-repeat;
          mask: url('assets/cineva-mark.svg') center / contain no-repeat;
  flex-shrink: 0;
}

.footer-brand span {
  font-size: 13px;
  color: var(--fog);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--iron);
}

.footer-contact {
  padding-top: var(--s-5);
  text-align: center;
}

/* ============================================================
   19. SCROLL REVEAL
   ============================================================ */
/* Hidden initial state only applies when JS is confirmed running
   (the .js class is added by app.js). Without JS, content stays visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(8px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--d-slow) var(--ease-out),
              transform var(--d-slow) var(--ease-out);
}

/* ============================================================
   20. RESPONSIVE
   ============================================================ */

/* Tablet — 768px */
@media (max-width: 768px) {
  .hero { padding: var(--s-20) 0 var(--s-16); }
  .sub-hero { padding: var(--s-16) 0 var(--s-12); }
  .section { padding: var(--s-16) 0; }

  .service-grid,
  .service-grid--five { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .service-block { grid-template-columns: 1fr; }
  .pillar-full { grid-template-columns: 1fr; }
  .network-grid { grid-template-columns: repeat(2, 1fr); }

  .trusted-by { gap: var(--s-8); }
}

/* Mobile — 540px */
@media (max-width: 540px) {
  :root {
    --gutter: 20px;
    --nav-height: 64px;
  }

  .nav-lockup { height: 44px; }

  .hero { padding: var(--s-16) 0 var(--s-12); }
  .sub-hero { min-height: calc(46vh - 148px); padding-bottom: var(--s-3); }
  .sub-hero + .section { padding-top: var(--s-6); }

  .service-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .network-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }

  /* When the mobile nav is open, remove backdrop-filter from site-nav.
     backdrop-filter creates a containing block for position:fixed children
     (CSS spec §9.3), so the full-screen overlay anchors to the nav bar
     (height: 64px) instead of the viewport — making its background invisible.
     Stripping it here lets position:fixed resolve to the viewport correctly. */
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: absolute;
    top: calc(100% + 6px);
    right: var(--gutter);
    left: auto;
    min-width: 180px;
    background: var(--ink-soft);
    border: 1px solid var(--line-2);
    border-radius: var(--r-2);
    padding: var(--s-2) 0;
    gap: 0;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  }

  .nav-links.is-open > a,
  .nav-links.is-open > .nav-dropdown > a {
    font-size: 14px;
    padding: var(--s-2) var(--s-5);
    width: 100%;
    text-align: right;
    display: block;
  }

  .nav-links.is-open .btn {
    margin: var(--s-2) var(--s-5) var(--s-1);
    text-align: right;
    justify-content: flex-end;
    font-size: 13px;
    padding: var(--s-1) var(--s-3);
  }

  /* Sub-nav: hidden by default, revealed when dropdown is toggled open */
  .nav-dropdown-menu {
    position: static;
    display: none;
    min-width: 0;
    background: none;
    border: none;
    border-top: 1px solid var(--line-1);
    padding: var(--s-1) 0;
  }
  .nav-dropdown.is-open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu::before { display: none; }
  .nav-links.is-open .nav-dropdown-menu a {
    font-size: 13px;
    padding: var(--s-1) var(--s-5);
    text-align: right;
    display: block;
    color: var(--fog);
  }

  .nav-toggle { display: block; }

  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; justify-content: center; }

  .footer-inner { flex-direction: column; gap: var(--s-4); text-align: center; }
  .footer-top { flex-direction: column; gap: var(--s-3); text-align: center; }
  .trusted-by { flex-direction: column; align-items: center; gap: var(--s-4); }
}

/* ============================================================
   TECH CATEGORIES + BRAND CARDS  (our-tech.html)
   ============================================================ */
body { counter-reset: tech-cat; }

.tech-category {
  padding: var(--s-12) 0 var(--s-10);
  border-top: 1px solid var(--line-2);
  counter-increment: tech-cat;
}

.tech-category:first-of-type { border-top: none; padding-top: var(--s-4); }

.tech-category-head {
  display: block;
  margin-bottom: var(--s-8);
}

.tech-category-head h2 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 var(--s-5);
  border-left: none;
  padding-left: 0;
  color: var(--bone);
}

/* Numbers removed in favour of inline category icons. */
.tech-category-head h2::before { display: none; }

.tech-category-icon {
  display: inline-flex;
  align-items: center;
  width: 0.82em;
  height: 0.82em;
  color: var(--stage);
  margin-right: 0.35em;
  vertical-align: -0.06em;
}

.tech-category-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

/* Cyan period accent — brand signature */
.tech-category-head h2::after {
  content: '.';
  color: var(--cyan);
  margin-left: 1px;
}

.tech-category-head p {
  color: var(--mist);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  max-width: 760px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.tech-card {
  background: var(--ink-soft);
  border: 1px solid var(--line-1);
  border-top: 2px solid var(--cyan);
  padding: var(--s-6);
  transition: border-color 200ms ease, transform 200ms ease;
}

.tech-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.tech-card-tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--s-3);
}

.tech-card-name {
  font-family: var(--font-display, var(--font-sans));
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--bone);
  margin: 0 0 var(--s-3);
  line-height: 1.15;
}

.tech-card-name .tm {
  font-size: 11px;
  font-weight: 500;
  color: var(--fog);
  vertical-align: super;
  margin-left: 2px;
}

.tech-card-note {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mist);
  margin: 0;
}

.tech-card-note strong { color: var(--bone); font-weight: 600; }

@media (max-width: 900px) {
  .tech-category-head { grid-template-columns: 1fr; gap: var(--s-4); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .tech-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FAQ — native <details> styling (contact + service pages)
   ============================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 800px;
}

.faq-item {
  background: var(--ink-soft);
  border: 1px solid var(--line-1);
  border-left: 2px solid var(--stage);
  padding: var(--s-5) var(--s-6);
  transition: border-color 200ms ease;
}

.faq-item[open] { border-color: var(--line-2); border-left-color: var(--stage); }

.faq-item summary {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--bone);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 22px;
  color: var(--stage);
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: var(--s-4) 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--mist);
}

/* ============================================================
   NAP footer block — name/address/phone (every page footer)
   ============================================================ */
.footer-nap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--iron);
}

.footer-nap a {
  color: var(--iron);
  border-bottom: 1px dotted var(--line-3);
}

.footer-nap a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form { max-width: 720px; }

.form-row { display: flex; flex-direction: column; gap: var(--s-5); margin-bottom: var(--s-5); }
.form-row--2 { flex-direction: row; }
@media (max-width: 640px) { .form-row--2 { flex-direction: column; } }

.form-field { display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }

.form-field label {
  font-size: var(--t-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.form-field label span { color: var(--stage); }

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--carbon);
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  padding: var(--s-3) var(--s-4);
  transition: border-color 0.15s ease;
  width: 100%;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); opacity: 0.6; }

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover { border-color: var(--line-2); }

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--cyan);
  /* outline is handled by the global :focus-visible rule */
}

.form-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238C8F9A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 12px 8px; background-position: right var(--s-4) center; padding-right: var(--s-8); }

.form-field textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   ACCESSIBILITY — focus, skip link, reduced motion
   ============================================================ */

/* Focus indicator — keyboard users */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s-4);
  background: var(--cyan);
  color: var(--ink);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-2);
  font-weight: 700;
  font-size: var(--t-caption);
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
