/* ─────────────────────────────────────────────
   Osoul Al-Taqniya — bold creative tech site
   ───────────────────────────────────────────── */

:root {
  /* Brand */
  --coral: #E84A3C;
  --coral-deep: #C9382C;
  --navy:  #1E2A6B;
  --navy-deep: #141B4A;

  /* Light theme */
  --bg:      #F6F1EA;
  --soft:    #EDE4D6;
  --surface: #FFFFFF;
  --ink:     #14193F;
  --ink-2:   #2B315A;
  --muted:   #6A6E89;
  --line:    rgba(30,42,107,0.14);
  --line-strong: rgba(30,42,107,0.28);

  --shadow-sm: 0 1px 0 rgba(30,42,107,0.06), 0 4px 14px -8px rgba(30,42,107,0.15);
  --shadow-lg: 0 30px 80px -30px rgba(30,42,107,0.35);

  /* Type */
  --f-display: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body:    "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, monospace;

  /* Sizes */
  --maxw: 1280px;
  --radius: 18px;
  --radius-lg: 28px;
}

[data-theme="dark"] {
  --bg:      #0C1030;
  --soft:    #161B42;
  --surface: #161B42;
  --ink:     #F4F1EC;
  --ink-2:   #D8D5E8;
  --muted:   #9094B5;
  --line:    rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.22);
  --navy:    #B8C0FF;   /* swap so navy-on-bg reads as light blue accent in dark */
  --navy-deep: #DDE2FF;
  --shadow-sm: 0 1px 0 rgba(0,0,0,0.3);
  --shadow-lg: 0 30px 80px -30px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

/* ───────── REVEAL animation ───────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,.84,.44,1), transform .8s cubic-bezier(.16,.84,.44,1);
  transition-delay: 0ms;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ───────── NAV ───────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.nav__logo { display: flex; align-items: center; justify-self: start; }
.nav__logo img { height: 40px; width: auto; }
.logo--dark, [data-theme="dark"] .logo--light { display: none; }
[data-theme="dark"] .logo--dark { display: block; }
.footer__logo--onnavy { display: block; }
.nav__links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2vw, 30px);
  white-space: nowrap;
}
.nav__links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: grid; place-items: center;
  transition: border-color .2s, background .2s;
}
.theme-toggle:hover { border-color: var(--line-strong); background: var(--surface); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ic-moon { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-moon { display: block; }

.nav__burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav__burger span {
  width: 16px; height: 2px; background: var(--ink); border-radius: 2px;
}

/* ───────── BUTTONS ───────── */
.btn {
  --bg: var(--coral);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid transparent;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn svg { width: 16px; height: 16px; }
/* RTL: arrow needs to flip visually */
.btn svg path[d^="M19 12H5"] { /* keep as left-pointing in RTL = "forward" */ }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(232,74,60,0.45); }
.btn--primary { --bg: var(--coral); --fg: #fff; }
.btn--primary:hover { --bg: var(--coral-deep); }
.btn--ghost {
  --bg: var(--surface);
  --fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { --bg: var(--surface); box-shadow: var(--shadow-sm); border-color: var(--ink-2); }
.btn--invert {
  --bg: var(--surface);
  --fg: var(--navy);
}
[data-theme="dark"] .btn--invert { --bg: #fff; --fg: #141B4A; }
.btn--lg { padding: 15px 30px; font-size: 15.5px; }

.nav__cta { padding: 10px 18px; }

/* ───────── HERO ───────── */
.hero {
  position: relative;
  padding: clamp(32px, 5vw, 60px) 0 clamp(44px, 6vw, 72px);
  overflow: hidden;
}
.hero::before {
  /* subtle grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 70%);
  opacity: .45;
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.07em;
}
.eyebrow .dot {
  width: 30px; height: 2px; border-radius: 0;
  background: var(--coral);
  box-shadow: none;
  animation: none;
}
@keyframes pulseDot {
  0%,100% { opacity: 1; }
  50% { opacity: 1; }
}

.hero__title {
  margin: 0 0 20px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1.5;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.hero__title .line { display: block; }
.hero__title em { font-style: normal; color: var(--coral); }
.hero__title .hl { color: var(--coral); white-space: nowrap; }

.hero__lede {
  font-size: clamp(16.5px, 1.35vw, 20.5px);
  color: var(--ink-2);
  font-weight: 300;
  max-width: 46ch;
  margin: 0 0 34px;
  line-height: 1.68;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 46px;
}

.hero__meta {
  display: flex;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero__meta > div { padding-inline: clamp(22px, 3vw, 44px); }
.hero__meta > div:first-child { padding-inline-start: 0; }
.hero__meta > div + div { border-inline-start: 1px solid var(--line); }
.meta__num {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 2.6vw, 38px);
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1;
}
.meta__lbl {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 8px;
}

/* Hero viz */
.hero__viz { position: relative; }
.viz {
  position: relative;
  aspect-ratio: 1/1;
  max-width: 520px;
  margin: 0 auto;
}
.viz__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  pointer-events: none;
}
.viz__ring--1 { inset: 10%; border-color: var(--line); animation: rot 30s linear infinite; }
.viz__ring--2 { inset: 22%; border: 1px dashed var(--line-strong); animation: rot 22s linear infinite reverse; }
.viz__ring--3 { inset: 34%; border: 1px solid var(--coral); opacity: 0.4; animation: rot 14s linear infinite; }
@keyframes rot {
  to { transform: rotate(360deg); }
}
.viz__net {
  position: relative;
  width: 100%; height: 100%;
}
.viz__net .n {
  transform-origin: center;
  transform-box: fill-box;
  animation: nodePulse 2.6s ease-in-out infinite;
}
.viz__net .n2 { animation-delay: .2s; }
.viz__net .n3 { animation-delay: .4s; }
.viz__net .n4 { animation-delay: .6s; }
.viz__net .n5 { animation-delay: .8s; }
.viz__net .n6 { animation-delay: 1s; }
.viz__net .n7 { animation-delay: 1.2s; }
.viz__net .n8 { animation-delay: 1.4s; }
.viz__net .n9 { animation-delay: 1.6s; }
.viz__net .n10 { animation-delay: 1.8s; }
.viz__net .n11 { animation-delay: 2s; }
.viz__net .n12 { animation-delay: 2.2s; }
@keyframes nodePulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.viz__film { transform-origin: 240px 240px; animation: rot 46s linear infinite; }
.viz__badges > g { transform-box: fill-box; transform-origin: center; animation: badgeFloat 5.4s ease-in-out infinite; }
.viz__badges > g:nth-child(2) { animation-delay: .5s }
.viz__badges > g:nth-child(3) { animation-delay: 1s }
.viz__badges > g:nth-child(4) { animation-delay: 1.5s }
.viz__badges > g:nth-child(5) { animation-delay: 2s }
.viz__badges > g:nth-child(6) { animation-delay: 2.5s }
.viz__badges > g:nth-child(7) { animation-delay: 3s }
.viz__badges > g:nth-child(8) { animation-delay: 3.5s }
@keyframes badgeFloat { 0%,100% { translate: 0 0 } 50% { translate: 0 -7px } }
.pulse-core { animation: corePulse 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes corePulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

.vb { cursor: pointer; outline: none; }
.vb circle:first-child { transition: fill .25s, stroke .25s, r .25s; }
.vb:hover circle:first-child,
.vb:focus-visible circle:first-child,
.vb.is-active circle:first-child { fill: var(--coral); stroke: var(--coral); }
.vb:hover g, .vb:focus-visible g, .vb.is-active g { color: #fff !important; }
.vb:focus-visible circle:first-child { stroke-width: 3; }

.viz-tip {
  position: absolute;
  z-index: 6;
  width: min(268px, 78%);
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 22px 44px -18px rgba(20,25,63,0.55);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px) scale(.96);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  pointer-events: none;
  text-align: start;
}
[data-theme="dark"] .viz-tip { background: var(--soft); border: 1px solid var(--line-strong); }
.viz-tip.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
.viz-tip__title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 5px;
  color: #fff;
}
.viz-tip__desc { font-size: 12.5px; line-height: 1.65; opacity: .78; }

.viz__chip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  animation: bobChip 4s ease-in-out infinite;
}
.viz__chip--1 { top: 6%; left: -6%; color: var(--coral); animation-delay: 0s; }
.viz__chip--2 { top: 18%; right: -8%; animation-delay: 0.6s; }
.viz__chip--3 { bottom: 18%; left: -10%; color: var(--coral); animation-delay: 1.2s; }
.viz__chip--4 { bottom: 8%; right: -4%; animation-delay: 1.8s; }
@keyframes bobChip {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.scroll-cue__line {
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, var(--coral), transparent);
  animation: cueLine 1.8s ease-in-out infinite;
}
@keyframes cueLine {
  0% { transform: scaleY(0.3); transform-origin: top; opacity: 0; }
  50% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.3); transform-origin: bottom; opacity: 0; }
}

/* ───────── MARQUEE ───────── */
.marquee {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  padding: 22px 0;
  border-block: 1px solid var(--navy);
}
[data-theme="dark"] .marquee {
  background: var(--coral);
  color: #fff;
}
.marquee__track {
  display: flex;
  gap: 36px;
  align-items: center;
  white-space: nowrap;
  animation: scroll-x 50s linear infinite;
  width: max-content;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
}
.marquee i {
  color: var(--coral);
  font-style: normal;
}
[data-theme="dark"] .marquee i { color: var(--navy); }
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}

/* ───────── SECTION shared ───────── */
.section {
  padding: clamp(52px, 6.5vw, 90px) 0;
  position: relative;
}
.section__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.section__num {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--coral);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.section__kicker {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
}

.h-display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 5.4vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 20px;
  text-wrap: balance;
  max-width: 20ch;
}
.h-display .hl {
  position: relative;
  color: var(--coral);
}
.lede {
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--ink-2);
  line-height: 1.75;
  max-width: 56ch;
}
.section__lede {
  color: var(--muted);
  font-size: 17px;
  max-width: 60ch;
  margin: 0 0 34px;
  line-height: 1.7;
}

/* ───────── ABOUT ───────── */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.pillars { display: grid; gap: 18px; margin-top: 32px; }
.pillars li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .2s, transform .2s;
}
.pillars li:hover { border-color: var(--coral); transform: translateY(-2px); }
.pillars__no {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
}
.pillars h4 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--ink); }
.pillars p  { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

.about__prose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(30px, 3.5vw, 48px);
  padding-top: clamp(26px, 3vw, 38px);
  border-top: 1px solid var(--line);
}
.about__prose p {
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.9;
  text-wrap: pretty;
}
.about__prose p::first-line { font-weight: 500; }
.vm { padding: 2px clamp(20px, 3vw, 46px) 0; }
.vm:first-child { padding-inline-start: 0; }
.vm + .vm { border-inline-start: 1px solid var(--line); }
.vm__icon {
  width: 60px; height: 60px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--coral);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.vm__icon svg { width: 29px; height: 29px; }
.vm__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}
.vm__label::before { content: none; }
.vm p {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(16px, 1.35vw, 19.5px);
  line-height: 1.78;
  color: var(--ink);
  max-width: 40ch;
  text-wrap: pretty;
}
@media (max-width: 860px) {
  .about__prose { grid-template-columns: 1fr; }
  .vm { padding: 0; }
  .vm + .vm { border-inline-start: 0; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 26px; }
}

.about__viz { position: relative; }
.ortho {
  position: relative;
  aspect-ratio: 368 / 392;
  max-width: 440px;
  margin-inline-start: auto;
}
.ortho svg { width: 100%; height: 100%; }
.float-a { animation: floatA 6s ease-in-out infinite; transform-origin: center; }
.float-b { animation: floatB 7s ease-in-out infinite; transform-origin: center; }
.float-c { animation: floatC 5s ease-in-out infinite; transform-origin: center; }
@keyframes floatA { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes floatB { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes floatC { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-6px, -8px); } }

/* ───────── STATS ───────── */
.stats {
  background: var(--navy);
  color: #fff;
  padding: clamp(42px, 5vw, 64px) 0;
}
[data-theme="dark"] .stats {
  background: var(--soft);
  color: var(--ink);
  border-block: 1px solid var(--line);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.stat {
  border-inline-start: 2px solid rgba(255,255,255,0.18);
  padding-inline-start: 22px;
}
[data-theme="dark"] .stat { border-color: var(--line); }
.stat__num {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
[data-theme="dark"] .stat__num { color: var(--coral); }
.stat__lbl {
  margin-top: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 14.5px;
}
[data-theme="dark"] .stat__lbl { color: var(--muted); }

/* ───────── SERVICES ───────── */
.svc {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  align-items: start;
}
.svc__tabs {
  display: grid;
  gap: 4px;
  position: sticky;
  top: 90px;
}
.svc__tab {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 0;
  text-align: start;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--ink-2);
  transition: background .2s, color .2s;
  border-inline-end: 2px solid transparent;
}
.svc__tab-no {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.svc__tab-name {
  font-weight: 500;
  font-size: 15px;
}
.svc__tab:hover { background: var(--surface); color: var(--ink); }
.svc__tab.is-active {
  background: var(--surface);
  color: var(--ink);
  border-inline-end-color: var(--coral);
  box-shadow: var(--shadow-sm);
}
.svc__tab.is-active .svc__tab-no { color: var(--coral); }

.svc__panels { position: relative; min-height: 400px; }
.svc__panel {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.svc__panel.is-active {
  display: block;
  animation: panelIn .5s cubic-bezier(.16,.84,.44,1);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.svc__panel::before {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px; height: 240px;
  background: radial-gradient(circle, var(--coral) 0%, transparent 60%);
  opacity: 0.10;
  pointer-events: none;
}
.svc__panel-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff;
  display: grid; place-items: center;
  margin-bottom: 22px;
}
.svc__panel-icon svg { width: 32px; height: 32px; }
.svc__panel h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(26px, 2.8vw, 38px);
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.svc__panel-lede {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.8;
  margin: 0 0 24px;
  max-width: 60ch;
}
.svc__features {
  display: grid;
  gap: 12px;
  margin: 0;
}
.svc__features li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.svc__features li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--coral);
  margin-top: 8px;
  margin-inline-start: 4px;
}
.svc__partners {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
  font-family: var(--f-mono);
  letter-spacing: 0.02em;
}

/* ───────── WORK / PORTFOLIO ───────── */
.work__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--coral); font-weight: 500; font-size: 15px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(-4px); }

.work__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}
.work__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.work__card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.work__art {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--soft);
  display: grid;
  place-items: center;
  padding: clamp(14px, 1.8vw, 22px);
  overflow: hidden;
}
.work__art img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 24px -12px rgba(20,25,63,0.35);
  transition: transform .5s cubic-bezier(.16,.84,.44,1);
}
.work__card:hover .work__art img { transform: translateY(-3px); }
.work__body {
  padding: clamp(20px, 2.4vw, 30px);
  display: grid;
  gap: 10px;
}
.work__client {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.work__client-logo {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 5px;
}
.work__client-logo img {
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  object-fit: contain;
}
.work__client-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.35;
}
.work__type {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--coral);
  margin-bottom: -2px;
}
.work__type::before { content: ""; width: 16px; height: 2px; background: currentColor; flex: none; }
.work__card h3 {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(20px, 1.9vw, 25px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.work__card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  text-wrap: pretty;
}

/* ───────── CLIENTS ───────── */
.clients__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 0;
}
.client-tile {
  aspect-ratio: 3/2;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  display: grid; place-items: center;
  padding: clamp(12px, 1.6vw, 22px);
  overflow: hidden;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.client-tile img {
  max-width: 100%;
  max-height: 68%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .72;
  transition: filter .3s, opacity .3s;
}
[data-theme="dark"] .client-tile img { filter: grayscale(1) brightness(0) invert(1); opacity: .6; }
.client-tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.client-tile:hover img { filter: none; opacity: 1; }
[data-theme="dark"] .client-tile:hover img { filter: none; opacity: 1; }

.partners {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.partners h4 {
  margin: 0 0 18px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 500;
}
.partners__row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 56px;
  align-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-2);
  opacity: 0.7;
}

/* ───────── CTA BANNER ───────── */
.cta-banner {
  padding: clamp(28px, 3.5vw, 48px) 0;
}
.cta-banner__inner {
  background: var(--coral);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 4.5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner__inner::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.18), transparent 60%);
  pointer-events: none;
}
.cta-banner__kicker {
  font-family: var(--f-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.85;
  margin-bottom: 12px;
}
.cta-banner h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  margin: 0;
  max-width: 24ch;
  letter-spacing: -0.03em;
}

/* ───────── CONTACT ───────── */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact__channels {
  margin-top: 26px;
  display: grid;
  gap: 18px;
}
.contact__channels li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.contact__channels li:last-child { border-bottom: 1px solid var(--line); }
.contact__lbl {
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.contact__channels a { color: var(--ink); font-weight: 500; }
.contact__stack { display: grid; gap: 4px; justify-items: start; }
.contact__channels a:hover { color: var(--coral); }

.contact__form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  gap: 18px;
  position: relative;
}
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.field input,
.field textarea,
.field select {
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(232,74,60,0.14);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: #c0392b;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.form-note { font-size: 12.5px; color: var(--muted); }
.form-note a { color: var(--coral); }

[hidden] { display: none !important; }
.form-success {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(16, 152, 92, 0.08);
  border: 1px solid rgba(16, 152, 92, 0.3);
  color: #0f7a4a;
}
[data-theme="dark"] .form-success { background: rgba(76, 217, 153, 0.12); color: #6fe2af; border-color: rgba(76,217,153,0.3); }
.form-success svg { width: 28px; height: 28px; flex-shrink: 0; }
.form-success strong { display: block; margin-bottom: 2px; font-weight: 600; }
.form-success span { font-size: 14px; opacity: 0.9; }

/* ───────── FOOTER ───────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: clamp(46px, 5.5vw, 72px) 0 26px;
}
[data-theme="dark"] .footer { background: var(--soft); }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
[data-theme="dark"] .footer__grid { border-color: var(--line); }
.footer__brand p { font-size: 14.5px; line-height: 1.8; margin: 18px 0 0; max-width: 40ch; }
.footer__logo { height: 52px; width: auto; }
.footer h5 {
  color: #fff;
  margin: 0 0 16px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}
[data-theme="dark"] .footer h5 { color: var(--ink); }
.footer ul li { padding: 6px 0; font-size: 14.5px; }
.footer ul li a:hover { color: var(--coral); }
.footer__social {
  display: flex; gap: 10px; margin-top: 18px;
}
.footer__social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.9);
  transition: background .2s, color .2s;
}
[data-theme="dark"] .footer__social a {
  background: var(--bg); border-color: var(--line); color: var(--ink);
}
.footer__social a:hover { background: var(--coral); border-color: var(--coral); color: #fff; }
.footer__social svg { width: 16px; height: 16px; }
.footer__bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
[data-theme="dark"] .footer__bar { color: var(--muted); }
.footer__bar a:hover { color: var(--coral); }

/* ───────── MOBILE NAV DRAWER ───────── */
.mnav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 8px clamp(20px, 5vw, 32px) 26px;
  max-height: calc(100dvh - 66px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav.is-open .mnav { display: block; animation: mnavIn .28s cubic-bezier(.16,.84,.44,1); }
@keyframes mnavIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }
.mnav__links { display: grid; }
.mnav__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.mnav__links a:active { color: var(--coral); }
.mnav__no { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; }
.mnav__foot { margin-top: 22px; display: grid; gap: 18px; }
.mnav__cta { justify-content: center; width: 100%; }
.mnav__contact { display: grid; gap: 8px; font-size: 14.5px; justify-items: start; }
.mnav__contact a { color: var(--ink-2); min-height: 24px; text-align: right; }
.nav__burger span { transition: transform .25s, opacity .2s; }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
body.menu-open { overflow: hidden; }

/* ───────── RESPONSIVE ───────── */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__viz { max-width: 460px; margin: 0 auto; }
  .about__grid { grid-template-columns: 1fr; }
  .ortho { margin-inline: auto; max-width: 380px; }
  .svc { grid-template-columns: 1fr; }
  .svc__tabs {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px;
  }
  .svc__tab.is-active { border-inline-end-color: transparent; border-bottom: 2px solid var(--coral); }
  .clients__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ── tablet / large phone ── */
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav__inner { grid-template-columns: 1fr auto; padding: 12px clamp(18px, 4vw, 32px); }
  .nav__logo img { height: 34px; }
  .work__grid { grid-template-columns: 1fr; }
  .work__head { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ── phone ── */
@media (max-width: 640px) {
  .section { padding: 46px 0; }
  .container { padding: 0 20px; }

  /* hero */
  .hero { padding: 24px 0 40px; }
  .hero__grid { gap: 34px; }
  .hero__title { font-size: clamp(42px, 13vw, 60px); line-height: 1.5; }
  .hero__lede { font-size: 16px; margin-bottom: 26px; max-width: none; }
  .hero__cta { gap: 10px; margin-bottom: 0; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; min-height: 52px; }
  .hero__meta { display: none; }
  .hero__viz { max-width: 320px; }
  .viz__chip { font-size: 10px; padding: 5px 10px; }
  .viz__chip--1 { left: -2%; }
  .viz__chip--3 { left: -4%; }
  .viz__chip--2, .viz__chip--4 { right: -2%; }
  .viz-tip { width: 84%; }
  .scroll-cue { display: none; }

  /* marquee */
  .marquee { padding: 16px 0; }
  .marquee__track { font-size: 17px; gap: 26px; }

  /* headings */
  .h-display { font-size: clamp(28px, 8.5vw, 38px); max-width: none; }
  .section__lede { font-size: 15.5px; margin-bottom: 26px; }
  .section__head { margin-bottom: 18px; }

  /* about */
  .pillars li { grid-template-columns: 44px 1fr; padding: 18px; gap: 14px; }
  .vm p { font-size: 16.5px; }

  /* stats */
  .stats { padding: 36px 0; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .stat { padding-inline-start: 14px; }
  .stat__num { font-size: 34px; }
  .stat__lbl { font-size: 13px; }

  /* services — horizontal pill scroller */
  .svc { margin-top: 22px; gap: 22px; }
  .svc__tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    margin-inline: -20px;
    padding-inline: 20px;
    scrollbar-width: none;
  }
  .svc__tabs::-webkit-scrollbar { display: none; }
  .svc__tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    grid-template-columns: auto auto;
    gap: 8px;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    border-inline-end: 1px solid var(--line);
    background: var(--surface);
  }
  .svc__tab.is-active {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
    border-bottom: 1px solid var(--coral);
  }
  .svc__tab.is-active .svc__tab-no { color: rgba(255,255,255,0.75); }
  .svc__tab-name { font-size: 14px; white-space: nowrap; }
  .svc__panels { min-height: 0; }
  .svc__panel { padding: 24px 20px; border-radius: 20px; }
  .svc__panel-icon { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 16px; }
  .svc__panel-icon svg { width: 26px; height: 26px; }
  .svc__panel h3 { font-size: 22px; }
  .svc__panel-lede { font-size: 15.5px; }
  .svc__features li { font-size: 14.5px; }

  /* work */
  .work__body { padding: 20px; }
  .work__card h3 { font-size: 20px; }

  /* clients */
  .clients__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .client-tile { border-radius: 12px; padding: 14px; }

  /* cta banner */
  .cta-banner { padding: 24px 0; }
  .cta-banner__inner { padding: 30px 22px; border-radius: 22px; align-items: stretch; }
  .cta-banner h2 { font-size: 26px; max-width: none; }
  .cta-banner .btn { justify-content: center; }

  /* contact */
  .contact__form { padding: 24px 20px; border-radius: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .field input, .field textarea, .field select { font-size: 16px; min-height: 50px; }
  .contact__channels { margin-top: 22px; }
  .contact__channels li { grid-template-columns: 1fr; gap: 5px; padding: 14px 0; }
  .form-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .form-foot .btn { justify-content: center; min-height: 52px; }
  .form-note { text-align: center; }

  /* footer */
  .footer { padding: 40px 0 22px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 26px; }
  .footer__logo { height: 48px; }
  .footer__social a { width: 42px; height: 42px; }
  .footer__bar { flex-direction: column; gap: 8px; }
}

/* ── small phone ── */
@media (max-width: 400px) {
  .stats__grid { grid-template-columns: 1fr; }
  .clients__grid { grid-template-columns: 1fr; }
  .viz__chip { display: none; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
