/* ============================================================
   Whatifio AB  |  Design system
   Paper, ink, signal yellow, ice blue. Pixel bar signature.
   ============================================================ */

/* Nav / footer visibility cloak.
   Nav starts hidden until cms.js applies pages.json toggles, so a hidden
   page never flashes as a clickable link. cms.js removes .cms-cloak the
   moment visibility is settled. The animation is a failsafe: if JS fails,
   the nav reveals automatically after 400ms so no one is stranded. */
html.cms-cloak .nav-links,
html.cms-cloak .site-footer .footer-col ul,
html.cms-cloak [data-section="blog"] {
  visibility: hidden;
  animation: cms-uncloak 0s 400ms forwards;
}
@keyframes cms-uncloak { to { visibility: visible; } }


:root {
  --paper: #F5F5F3;
  --card: #FEFEFE;
  --ink: #1C1C1C;
  --ink-soft: #3F3F3F;
  --gray: #7C7C7C;
  --line: #ECECE7;
  --yellow: #FFFA52;
  --yellow-soft: #FBFDD7;
  --ice: #F1F8FF;
  --sky: #98C0E7;
  --sky-deep: #6FA6DB;
  --radius: 22px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(28, 28, 28, 0.04), 0 10px 30px rgba(28, 28, 28, 0.05);
  --shadow-card-hover: 0 2px 4px rgba(28, 28, 28, 0.05), 0 18px 44px rgba(28, 28, 28, 0.09);
  --font-sans: "Hanken Grotesk", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Type scale ---------- */

h1, h2, h3, h4 { font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }

.display {
  font-size: clamp(2.7rem, 6.4vw, 5.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; letter-spacing: -0.025em; }
.h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 700; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  line-height: 1.55;
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gray);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--yellow);
  display: inline-block;
}

.mark {
  background: var(--yellow);
  padding: 0.04em 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.muted { color: var(--gray); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 245, 243, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.nav-logo img { height: 26px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  position: relative;
}

.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 3px;
  background: var(--yellow);
}

.nav-cta { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  line-height: 1;
}

.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: 0 1px 2px rgba(28,28,28,0.08); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(28,28,28,0.14); }

.btn-ghost { background: #E9E9E4; color: var(--ink); }
.btn-ghost:hover { background: #DFDFD9; transform: translateY(-1px); }

.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(28,28,28,0.22); }

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

/* ---------- Pixel signature ---------- */

.pixel-field { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.px {
  position: absolute;
  background: var(--ink);
  opacity: 0;
  transform: translateY(24px);
  animation: pxin 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.px.y { background: var(--yellow); }
.px.b { background: var(--sky); }

@keyframes pxin { to { opacity: 1; transform: translateY(0); } }

.pixel-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  height: 44px;
}

.pixel-bars i {
  width: 12px;
  background: var(--ink);
  display: block;
}

.pixel-bars i:nth-child(1) { height: 30%; }
.pixel-bars i:nth-child(2) { height: 55%; background: var(--yellow); outline: 1px solid var(--ink); }
.pixel-bars i:nth-child(3) { height: 40%; }
.pixel-bars i:nth-child(4) { height: 100%; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 2; max-width: 960px; }

.hero .display { margin: 6px 0 26px; }

.hero-sub { max-width: 560px; margin-bottom: 38px; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-note {
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray);
}

/* ---------- Credential strip ---------- */

/* ---------- Technology rows (recognition card style) ---------- */

.tech-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tech-row {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 34px;
  display: flex;
  align-items: center;
  gap: 30px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tech-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }

.tech-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

.tech-logo-duo { width: 96px; }

.tech-row-text h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.tech-row-text p { font-size: 0.96rem; color: var(--ink-soft); line-height: 1.5; margin: 0; }

@media (max-width: 560px) {
  .tech-row { flex-direction: column; align-items: flex-start; gap: 18px; padding: 26px 24px; }
}

/* ---------- Sections ---------- */

.section { padding: 120px 0; }
.section-tight { padding: 84px 0; }
.section-ice { background: var(--ice); }
.section-card { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .lede, .section-ink .muted { color: #C9C9C4; }

.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head .h2 { margin-bottom: 16px; }

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

/* ---------- Service cards ---------- */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.svc-card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 38px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.svc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.svc-whatif {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray);
  letter-spacing: 0.02em;
}

.svc-card .h3 { margin: 0; }

.svc-card p { color: var(--ink-soft); font-size: 0.98rem; flex-grow: 1; }

.svc-link {
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.svc-link .arr { transition: transform 0.15s ease; }
.svc-card:hover .svc-link .arr { transform: translateX(4px); }

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.step {
  border-top: 3px solid var(--ink);
  padding-top: 22px;
}

.step .num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gray);
  display: block;
  margin-bottom: 12px;
}

.step h3 { font-size: 1.2rem; margin-bottom: 10px; }
.step p { font-size: 0.95rem; color: var(--ink-soft); }

.section-ink .step { border-top-color: var(--yellow); }
.section-ink .step p { color: #C9C9C4; }
.section-ink .step .num { color: #9A9A94; }

/* ---------- Case study feature ---------- */

.case-feature {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.case-visual {
  background: var(--ice);
  border: none;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.case-visual .bars { display: flex; align-items: flex-end; gap: 14px; height: 55%; }
.case-visual .bars i { width: 34px; background: var(--ink); border-radius: 4px 4px 0 0; }
.case-visual .bars i:nth-child(1) { height: 34%; }
.case-visual .bars i:nth-child(2) { height: 58%; }
.case-visual .bars i:nth-child(3) { height: 44%; background: var(--yellow); outline: 2px solid var(--ink); }
.case-visual .bars i:nth-child(4) { height: 78%; }
.case-visual .bars i:nth-child(5) { height: 100%; background: var(--sky); }

.case-stats {
  display: flex;
  gap: 36px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.stat .stat-n {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: block;
}

.stat .stat-l {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Placeholder marker ---------- */

.placeholder-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--yellow-soft);
  border: 1px dashed var(--ink);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

/* ---------- Testimonials ---------- */

.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.testi {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-card);
}

.testi blockquote {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.testi .who { display: flex; align-items: center; gap: 14px; }

.testi .avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--ice);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--sky-deep);
  flex-shrink: 0;
}

.testi .who strong { display: block; font-size: 0.95rem; }
.testi .who span { font-size: 0.83rem; color: var(--gray); }

/* ---------- Engagement cards ---------- */

.eng-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 26px;
  max-width: 900px;
  margin: 0 auto;
}

.eng-card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  box-shadow: var(--shadow-card);
}

.eng-card.featured { background: var(--yellow); box-shadow: 0 2px 4px rgba(28,28,28,0.06), 0 18px 44px rgba(255, 250, 82, 0.45); }

.eng-card .h3 { font-size: 1.5rem; }

.eng-card ul { list-style: none; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }

.eng-card ul li {
  padding-left: 26px;
  position: relative;
  font-size: 0.97rem;
  color: var(--ink-soft);
}

.eng-card.featured ul li { color: var(--ink); }

.eng-card ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 10px; height: 10px;
  background: var(--ink);
}

.eng-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray);
}

.eng-card.featured .eng-tag { color: var(--ink-soft); }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; margin: 0 auto; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.faq summary {
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

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

.faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--gray);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { margin-top: 14px; color: var(--ink-soft); max-width: 640px; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 72px 56px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-band .h2 { margin-bottom: 18px; }
.cta-band p { color: #C9C9C4; max-width: 520px; margin: 0 auto 34px; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.field input, .field select, .field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 15px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: #EDEDE8;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--card);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--yellow);
}

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

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #C9C9C4;
  padding: 64px 0 36px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img { height: 24px; filter: invert(1); margin-bottom: 18px; }
.footer-brand p { font-size: 0.92rem; max-width: 300px; }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8A8A85;
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 0.95rem; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--yellow); }

.footer-bottom {
  border-top: 1px solid #333330;
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #8A8A85;
}

/* ---------- Page hero (subpages) ---------- */

.page-hero { padding: 84px 0 64px; position: relative; overflow: hidden; }
.page-hero .display { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 6px 0 20px; }
.page-hero .lede { max-width: 620px; }

/* ---------- Detail rows (services page) ---------- */

.detail-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

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

.detail-side { position: sticky; top: 110px; }

.detail-side .svc-whatif { display: block; margin-bottom: 12px; }

.detail-body p { color: var(--ink-soft); margin-bottom: 18px; }

.detail-body h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray);
  margin: 28px 0 14px;
}

.chip-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }

.chip-list li {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  background: #ECECE7;
  border: none;
  border-radius: 999px;
}

/* ---------- Recognition band ---------- */

.recognition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  max-width: 820px;
}

.recog {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex;
  align-items: center;
  gap: 26px;
  box-shadow: var(--shadow-card);
}

.recog img {
  width: 116px;
  height: 116px;
  object-fit: contain;
  flex-shrink: 0;
}

.recog-text h3 { font-size: 1.15rem; margin-bottom: 6px; }
.recog-text p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.45; }

@media (max-width: 520px) {
  .recog { flex-direction: column; text-align: center; gap: 18px; }
}

/* ---------- Cert wall ---------- */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.cert {
  background: var(--card);
  border: none;
  border-radius: var(--radius-sm);
  padding: 26px 20px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cert:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

.cert-badge {
  height: 96px;
  width: auto;
  display: block;
}

.cert .cert-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  display: block;
  margin-bottom: 4px;
}

.cert p { font-size: 0.82rem; color: var(--gray); line-height: 1.4; margin: 0; }

/* ---------- Page transitions (Apple style veil and rise) ---------- */

#page-veil {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#page-veil.show { opacity: 1; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

body:not(.no-motion) main {
  animation: rise-in 0.75s cubic-bezier(0.28, 0.11, 0.32, 1) both;
}

body main { transition: opacity 0.34s ease, transform 0.34s cubic-bezier(0.55, 0, 0.7, 0.4); }

body.leaving main {
  opacity: 0;
  transform: translateY(-22px);
}

/* ---------- Spotlight popup ---------- */

.spotlight-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 28, 28, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.spotlight-overlay.show { opacity: 1; pointer-events: auto; }

body.spotlight-open { overflow: hidden; }

.spotlight-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
  padding: 40px 36px;
  text-align: center;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.28, 0.11, 0.32, 1);
}

.spotlight-overlay.show .spotlight-modal { transform: translateY(0) scale(1); }

.spotlight-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease;
}

.spotlight-close:hover { background: var(--line); }

.spotlight-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
  margin: 18px auto 22px;
  border-radius: var(--radius-sm);
}

.spotlight-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--yellow);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.spotlight-modal h3 { font-size: 1.4rem; margin-bottom: 10px; }

.spotlight-modal p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 24px;
}

.spotlight-cta { width: 100%; justify-content: center; }

@media (max-width: 520px) {
  .spotlight-modal { padding: 32px 24px; }
}

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Cascade: grid children arrive a few frames apart, Apple style */
.svc-grid > .reveal:nth-child(2), .testi-grid > .reveal:nth-child(2),
.process-grid > .reveal:nth-child(2), .cert-grid > .reveal:nth-child(2),
.eng-grid > .reveal:nth-child(2) { transition-delay: 0.08s; }

.svc-grid > .reveal:nth-child(3), .testi-grid > .reveal:nth-child(3),
.process-grid > .reveal:nth-child(3), .cert-grid > .reveal:nth-child(3) { transition-delay: 0.16s; }

.svc-grid > .reveal:nth-child(4), .process-grid > .reveal:nth-child(4),
.cert-grid > .reveal:nth-child(4) { transition-delay: 0.24s; }

.svc-grid > .reveal:nth-child(5), .cert-grid > .reveal:nth-child(5) { transition-delay: 0.32s; }
.svc-grid > .reveal:nth-child(6), .cert-grid > .reveal:nth-child(6) { transition-delay: 0.4s; }
.cert-grid > .reveal:nth-child(7) { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .px { animation: none; opacity: 1; transform: none; }
  .btn, .svc-card { transition: none; }
  body main, body:not(.no-motion) main { animation: none; transition: none; transform: none; opacity: 1; }
  #page-veil { display: none; }
  .spotlight-overlay, .spotlight-modal { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .case-feature, .detail-row, .footer-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .case-visual { aspect-ratio: 16 / 9; }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 28px 32px;
    gap: 22px;
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .nav-cta .btn { display: none; }
  .hero { padding: 72px 0 64px; }
  .section { padding: 68px 0; }
  .cta-band { padding: 52px 28px; }
}

/* ---------- From the blog section ---------- */
.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.blog-post-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: block;
}
.blog-post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.blog-post-card .bp-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--gray);
  display: block;
  margin-bottom: 10px;
}
.blog-post-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.blog-post-card p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; margin: 0; }
