/* =============================================================================
   OKY Tech — Site Styles (Refined, Mobile-first)
   ---------------------------------------------------------------------------
   Order:
   01) Tokens & Reset
   02) Layout primitives
   03) Global UI (progress / reveal)
   04) Navigation
   05) Hero + Programmer code canvas
   06) Sections, cards, lists
   07) Snap gallery & ticker
   08) Timeline
   09) Footer (black)
   10) First-visit Intro (SVG)
   11) Capabilities (pill tabs)
   12) Promise rows
   13) Contrast switcher (Do/Don’t)
   14) Helpers & responsive
   ========================================================================== */

/* ====================== 01) Tokens & Reset ====================== */
:root {
  /* palette */
  --bg: #fff;
  --bg-soft: #f7f7fb;
  --ink: #0a0a0a;
  --muted: #667085;
  --line: #e7e9ee;
  --brand: #4f46e5;
  --brand-2: #22c55e;
  --accent: #f59e0b1a;

  /* layout */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .06);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 400 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

/* ====================== 02) Layout primitives =================== */
.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.row {
  display: grid;
  gap: 24px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 340px;
}

/* ====================== 03) Global UI =========================== */
.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform-origin: left;
  z-index: 80;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ====================== 04) Navigation ========================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .2px;
}

.nav a.link {
  padding: 10px 12px;
  border-radius: 10px;
}

.nav a.link:hover {
  background: var(--bg-soft);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid #000;
}

.cta:hover {
  opacity: .9;
}

.brand img {
  transition: transform .8s ease;
  transform-origin: center;
}

.brand.flip img {
  transform: rotateY(360deg) scale(1.05);
}

.brand span {
  transition: transform .6s ease, color .4s ease;
}

.brand.flip span {
  transform: scale(1.3);
  color: var(--brand);
}

/* ====================== 05) Hero + Code canvas ================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 90px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  margin: .3em 0 .35em;
  font-weight: 900;
}

.hero p {
  color: var(--muted);
  max-width: 62ch;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 24px;
  align-items: center;
}

.hero--programmer .hero-grid {
  grid-template-columns: 1.05fr .95fr;
}

/* reserve width for typing word to prevent line-jumps */
.type {
  display: inline-block;
  min-width: 12ch;
  white-space: nowrap;
}

/* “editor” visual */
.editor {
  position: relative;
  height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: radial-gradient(90% 60% at 50% 40%, #eef2ff, transparent 60%), radial-gradient(50% 50% at 65% 45%, #dcfce7, transparent 60%), radial-gradient(40% 40% at 35% 55%, #fff7ed, transparent 60%);
}

.editor-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.editor-top .dot {
  height: 10px;
  width: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
}

.editor-top .tab {
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
}

.editor-top .tab.active {
  background: #f1f5f9;
  color: var(--ink);
}

.code {
  margin: 0;
  padding: 16px 18px;
  height: calc(100% - 44px);
  overflow: auto;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #0b1220;
}

.code .k {
  color: #4f46e5;
  font-weight: 600;
}

.code .s {
  color: #16a34a;
}

.code .n {
  color: #0ea5e9;
}

.code .f {
  color: #9333ea;
}

.code .c {
  color: #94a3b8;
}

/* ====================== 06) Sections / cards / lists ============ */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(26px, 3.6vw, 40px);
  margin: 0 0 8px;
}

.section .lead {
  color: var(--muted);
}

.card {
  grid-column: span 4;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}

.card h3 {
  margin: 0 0 6px;
}

.list {
  padding-left: 18px;
}

.list li {
  margin-bottom: 8px;
}

/* ====================== 07) Snap gallery & ticker ================ */
.snapwrap {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 0 10px;
}

.tile {
  flex: 0 0 76%;
  max-width: 76%;
  height: 320px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #eef2ff, #f0fdf4, #fff7ed);
}

.tile h4 {
  position: absolute;
  left: 16px;
  bottom: 16px;
  margin: 0;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 10px;
}

.ticker {
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.ticker-track {
  display: inline-block;
  padding: 10px 0;
  animation: marquee 28s linear infinite;
}

.ticker span {
  display: inline-block;
  padding: 6px 18px;
  margin: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

@keyframes marquee {
  to {
    transform: translateX(-50%)
  }
}

/* ====================== 08) Timeline ============================= */
.timeline {
  position: relative;
  margin: 30px 0 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.node {
  position: relative;
  padding: 10px 10px 10px 42px;
  border-radius: 12px;
}

.dot {
  position: absolute;
  left: 6px;
  top: 14px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: #fff;
}

.node.in {
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

/* ====================== 09) Footer (black) ====================== */
.site-footer {
  --ink: #fff;
  color: var(--ink);
  background: #000;
  position: relative;
  overflow: hidden;
  margin-top: 60px;
}

.footer-wave {
  display: block;
  width: 100%;
  color: #0a0a0a;
}

.footer-grid {
  display: grid;
  gap: 32px;
  padding: 48px 0 24px;
  grid-template-columns: 1.2fr 1fr 1fr;
  align-items: start;
}

.footer-logo {
  height: 34px;
  width: auto;
  filter: invert(1);
}

.footer-title {
  font-weight: 800;
  font-size: 20px;
  margin-top: 8px;
}

.tagline {
  margin: 6px 0 12px;
  color: #c7c7c7;
}

.copy-email {
  background: transparent;
  color: #bfbfbf;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: copy;
  font-size: 14px;
}

.copy-email:hover {
  color: #fff;
  border-color: #333;
}

.copy-toast {
  display: inline-block;
  margin-left: 8px;
  color: #9ae6b4;
  font-size: 13px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: #f5f5f5;
}

.footer-nav a:hover {
  color: #aecdff;
}

.footer-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social .pill {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  perspective: 600px;
}

.footer-social .pill img {
  width: 28px;
  height: auto;
  filter: invert(1);
  transition: transform .25s ease;
}

.footer-social .pill:hover {
  transform: translateY(-6px) rotateX(6deg) rotateY(-4deg);
  border-color: #333;
  background: #111;
  box-shadow: 0 0 18px rgba(255, 255, 255, .08);
}

.footer-social .pill:hover img {
  transform: scale(1.15);
}

.footer-social .pill:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, .6);
}

.footer-ticker {
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
  padding: 10px 0;
  color: #9a9a9a;
  overflow: hidden;
  white-space: nowrap;
}

.footer-ticker .ticker-track {
  display: inline-block;
  animation: marquee 28s linear infinite;
}

.footer-ticker .ticker-track span {
  display: inline-block;
  padding: 6px 16px;
  margin: 2px 6px;
  border: 1px solid #181818;
  border-radius: 999px;
}

.footer-bottom {
  text-align: center;
  color: #9a9a9a;
  font-size: 14px;
  padding: 16px 0 24px;
  border-top: 1px solid #111;
}

.footer-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(280px 180px at var(--x, 50%) var(--y, 0%), rgba(255, 255, 255, .06), transparent 60%);
  mix-blend-mode: screen;
}

/* ====================== 10) First-visit Intro (SVG) ============= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #0b0d11;
  color: #fff;
  overflow: hidden;
}

.intro-bg::before,
.intro-bg::after {
  content: "";
  position: absolute;
  inset: -25%;
  background: conic-gradient(from 0deg, #0b0d11 0 70deg, #0ea5e9 90deg, #22c55e 140deg, #0b0d11 200deg, #0ea5e9 300deg, #0b0d11 360deg);
  filter: blur(40px) saturate(120%);
  opacity: .32;
  animation: swirl 10s linear infinite;
}

.intro-bg::after {
  animation-direction: reverse;
  opacity: .26;
}

@keyframes swirl {
  to {
    transform: rotate(360deg)
  }
}

.intro-svg {
  width: min(56vmin, 520px);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .35));
}

.mk {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: currentColor;
}

.intro-svg {
  --dash: 360;
  animation: tint 3.4s ease-in-out infinite;
}

.mk-ring {
  stroke-dasharray: var(--dash);
  stroke-dashoffset: var(--dash);
  animation: draw 1200ms ease-out forwards, glow 3s ease-in-out infinite;
}

.mk-spoke {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: draw 800ms ease-out 300ms forwards, glow 3s ease-in-out infinite;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0
  }
}

@keyframes glow {

  0%,
  100% {
    filter: none
  }

  50% {
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, .35))
  }
}

@keyframes tint {

  0%,
  100% {
    color: #e5e7eb
  }

  40% {
    color: #a7f3d0
  }

  70% {
    color: #7dd3fc
  }
}

.intro.exit {
  animation: vanish .55s ease forwards;
}

@keyframes vanish {
  to {
    opacity: 0;
    transform: scale(1.02)
  }
}

@media (prefers-reduced-motion:reduce) {

  .intro-bg::before,
  .intro-bg::after,
  .mk-ring,
  .mk-spoke,
  .intro-svg {
    animation: none !important;
  }
}

/* ====================== 11) Capabilities (pill tabs) ============ */
#capabilities .cap-head {
  text-align: center;
  margin-bottom: 12px;
}

#capabilities .pill-tabs {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem .7rem;
  padding: .55rem .7rem .95rem;
  margin-inline: auto;
  max-width: min(100%, 960px);
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

#capabilities .pill {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15.5px;
  color: #475569;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

#capabilities .pill:hover {
  transform: translateY(-1px);
}

#capabilities .pill:focus-visible {
  outline: none;
  border-color: rgba(70, 168, 229, .48);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
}

#capabilities .pill.active {
  color: #fff;
  background: var(--brand);
}

#capabilities .pill-underline {
  position: absolute;
  left: 0;
  bottom: .35rem;
  height: 3px;
  width: 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: translateX(0);
  opacity: .9;
  transition: transform .28s ease, width .28s ease, opacity .28s ease;
}

#capabilities .cap-panels {
  margin-top: 14px;
}

#capabilities .cap-panel {
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}

#capabilities .cap-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: start;
}

#capabilities .cap-copy h3 {
  margin: .2rem 0 .5rem;
}

#capabilities .cap-copy .muted {
  color: var(--muted);
}

#capabilities .cap-ul {
  margin: .6rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

#capabilities .mini-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#capabilities .mini-stats>div {
  min-width: 160px;
  padding: 12px 14px;
  text-align: center;
  border-radius: 14px;
  background: #f4fff8;
  border: 1px solid #d9f5e4;
}

#capabilities .mini-stats strong {
  display: block;
  font-size: 1.25rem;
}

#capabilities .cap-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

#capabilities .btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 999px;
  padding: .6rem .95rem;
  font-weight: 700;
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}

#capabilities .btn:hover {
  transform: translateY(-1px);
}

#capabilities .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent);
}

#capabilities .btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: #000;
}

#capabilities .btn-primary:hover {
  opacity: .92;
}

#capabilities .btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

#capabilities .btn-outline:hover {
  background: var(--bg-soft);
}

#capabilities .btn-primary::after,
#capabilities .btn-outline::after {
  content: "↗";
  font-size: .95em;
  line-height: 1;
  transform: translateY(1px);
}

/* ====================== 12) Promise rows ========================= */
.promise-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.promise-copy h3 {
  margin: 0 0 8px;
}

.promise-copy p {
  margin: 0;
}

/* ====================== 13) Contrast switcher (Do/Don’t) ========= */
#contrast .contrast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

#contrast h2 {
  margin: 0;
}

/* Track */
#contrast .contrast-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  gap: 8px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 10px 28px rgba(2, 6, 23, .05);
}

/* Moving thumb */
#contrast .seg-underline {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 120px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(2, 6, 23, .10), inset 0 0 0 2px rgba(37, 99, 235, .5);
  transition: transform .24s ease, width .24s ease;
  pointer-events: none;
  z-index: 0;
}

/* Pills */
#contrast .seg {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  color: #475569;
  transition: color .18s ease, transform .18s ease;
}

#contrast .seg:hover {
  transform: translateY(-1px);
}

#contrast .seg:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .20);
  border-radius: 999px;
}

#contrast .seg.active {
  color: #0f172a;
}

/* Panels */
#contrast .contrast-panels {
  margin-top: 16px;
}

#contrast .contrast-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

#contrast .contrast-panel[hidden] {
  display: none !important;
}

#contrast .contrast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

#contrast .contrast-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: flex-start;
}

#contrast .contrast-list strong {
  font-weight: 800;
  display: block;
}

#contrast .contrast-list p {
  margin: 4px 0 0;
}

#contrast .badge-good,
#contrast .badge-bad {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 16px;
}

#contrast .badge-good {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

#contrast .badge-bad {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

@media (min-width:881px) {
  #contrast .contrast-head {
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
  }

  #contrast h2 {
    width: 100%;
    text-align: center;
  }
}

@media (max-width:880px) {
  #contrast .contrast-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ====================== 14) Helpers & responsive ================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

pre,
code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* compact features grid */
.mini-cards .card {
  grid-column: span 6;
  display: grid;
  gap: 8px;
}

@media (max-width:640px) {
  .mini-cards .card {
    grid-column: span 12;
  }
}

/* feature icon */
.feature .feat-icon {
  inline-size: 40px;
  block-size: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: color-mix(in oklab, var(--brand) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--brand) 30%, var(--line));
}

.feature h3 {
  margin: 4px 0 0;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

/* responsive page adjustments */
@media (max-width:980px) {

  .hero-grid,
  .row {
    grid-template-columns: 1fr;
  }

  .tile {
    flex-basis: 86%;
    max-width: 86%;
  }

  .card {
    grid-column: span 6;
  }

  #capabilities .cap-row {
    grid-template-columns: 1fr;
  }

  #capabilities .mini-stats {
    justify-content: flex-start;
  }

  .promise-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .promise-image {
    order: -1;
  }
}

@media (max-width:640px) {
  .card {
    grid-column: span 12;
  }

  .hero {
    padding: 90px 0 70px;
  }
}

@media (min-width:980px) {
  .compare-wrap {
    grid-template-columns: 1fr 280px 1fr;
    align-items: stretch;
  }

  .compare {
    grid-column: 1 / -1;
  }

  .why {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
  }
}

/* ============================== */
/* MOBILE FIX PATCH (phones)      */
/* Place at end of styles.css     */
/* ============================== */

@media (max-width: 768px) {
  /* 1) Make every grid item full-width by default,
        then let special components override as needed. */
  .grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .grid > * {
    grid-column: 1 / -1 !important;
  }

  /* 2) Container breathing room & safe sides */
  .container {
    padding-inline: 16px !important;
  }

  /* 3) Navigation compact */
  .nav-inner {
    height: 60px !important;
  }
  .nav a.link { padding: 8px 10px; }

  /* 4) Hero layout & type scale */
  .hero {
    padding: 72px 0 56px !important;
  }
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  h1 {
    font-size: clamp(28px, 7vw, 40px) !important;
    line-height: 1.1;
  }

  /* 5) Editor block: fit shorter viewports */
  .editor {
    height: 260px !important;
  }

  /* 6) “Promise” rows: always single column on phones */
  .promise-row {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .promise-image img {
    width: 100% !important;
    max-width: 360px !important;
    margin-inline: auto;
  }

  /* 7) Capabilities pills: stop underline fighting line wrap */
  #capabilities .pill-tabs {
    justify-content: center !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    border-radius: 16px !important;
  }
  /* Hide the sliding underline on small screens (use active color only) */
  #capabilities .pill-underline { display: none !important; }
  #capabilities .pill {
    padding: 10px 12px !important;
    font-size: 14.5px !important;
  }

  /* 8) Contrast (We do / We don’t) segmented control */
  #contrast .contrast-head {
    align-items: stretch !important;
    gap: 10px !important;
  }
  #contrast .contrast-toggle {
    width: 100%;
    justify-content: space-between;
  }
  #contrast .seg {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0 8px !important;
    height: 38px !important;
    font-size: 14.5px !important;
  }
  #contrast .seg-underline {
    display: none !important; /* avoid overlap when pills wrap */
  }

  /* 9) Cards: make sure they really span full width */
  .card {
    grid-column: 1 / -1 !important;
    padding: 18px !important;
  }

  /* 10) Snap gallery tiles: slightly narrower so edges show */
  .tile {
    flex-basis: 88% !important;
    max-width: 88% !important;
    height: 260px !important;
  }

  /* 11) Footer spacing & icon sizing */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    padding: 36px 0 18px !important;
  }
  .footer-social .pill {
    width: 52px !important;
    height: 52px !important;
  }
  .footer-social .pill img {
    width: 24px !important;
  }
}

/* Ultra-small phones (≤360px) */
@media (max-width: 360px) {
  .hero { padding-top: 64px !important; }
  h1 { font-size: clamp(26px, 8vw, 36px) !important; }
  .editor { height: 230px !important; }
  .tile { height: 230px !important; }
}

/* ==========================================================================
   Mobile Header/Footer Enhancements
   - Hides hamburger on desktop
   - Turns primary nav into a dropdown on phones
   - Keeps header on top when menu is open
   ========================================================================== */

/* Keep header above content when dropdown opens */
.nav { position: sticky; top: 0; z-index: 1000; }

/* Default desktop layout: inline links, no hamburger */
.nav-links { display: flex; gap: 6px; }
.nav-toggle { display: none; } /* hidden on desktop */

/* Show the big CTA on desktop by default */
.nav .cta { display: inline-flex; }

/* ---------- Phones & small tablets ---------- */
@media (max-width: 768px) {
  .nav-inner { position: relative; gap: 10px; justify-content: space-between; }

  /* Show hamburger; keep size/tap target friendly */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px; width: 42px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 20px;
  }

  /* Collapse primary links into a dropdown */
  .nav-links {
    position: absolute;
    top: 60px;              /* matches mobile nav-inner height */
    left: 0; right: 0;
    display: none;
    flex-direction: column; /* vertical list */
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 16px;
  }
  .nav-links.open { display: flex; }

  /* Hide the big header CTA on phones (footer has one; hero has one) */
  .nav .cta { display: none; }

  /* Footer minor polish for compact screens */
  .footer-grid { padding: 36px 0 18px; }
  .footer-title { font-size: 18px; }
  .footer-bottom { font-size: 13px; }
}