/* ===========================
   NERDWARE INNOVATIONS — CSS
   Theme tokens first; every colour below reads from them.
   =========================== */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg:            #070d1a;
  --bg-alt:        #0b1424;
  --surface:       #0f1a2e;
  --surface-2:     #15233b;
  --border:        rgba(148,163,184,0.14);
  --border-strong: rgba(148,163,184,0.28);
  --heading:       #f8fafc;
  --text:          #cbd5e1;
  --text-muted:    #94a3b8;
  --accent:        #38bdf8;
  --accent-soft:   rgba(56,189,248,0.12);
  --accent-border: rgba(56,189,248,0.32);
  --gradient:      linear-gradient(100deg, #38bdf8 0%, #818cf8 100%);
  --btn-bg:        #38bdf8;
  --btn-bg-hover:  #7dd3fc;
  --btn-text:      #04121f;
  --nav-bg:        rgba(7,13,26,0.8);
  --input-bg:      #0b1424;
  --grid-line:     rgba(56,189,248,0.06);
  --orb-1:         rgba(14,165,233,0.22);
  --orb-2:         rgba(129,140,248,0.14);
  --shadow:        0 1px 2px rgba(0,0,0,0.3), 0 16px 40px rgba(0,0,0,0.35);
  --shadow-lg:     0 32px 80px rgba(0,0,0,0.5);
  --success:       #4ade80;
  --success-soft:  rgba(74,222,128,0.1);
  --danger:        #f87171;
  --danger-soft:   rgba(248,113,113,0.1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg:            #f8fafc;
  --bg-alt:        #eef4fa;
  --surface:       #ffffff;
  --surface-2:     #f1f5f9;
  --border:        rgba(15,23,42,0.09);
  --border-strong: rgba(15,23,42,0.18);
  --heading:       #0b1220;
  --text:          #334155;
  --text-muted:    #526075;
  --accent:        #0369a1;
  --accent-soft:   rgba(2,132,199,0.09);
  --accent-border: rgba(2,132,199,0.28);
  --gradient:      linear-gradient(100deg, #0284c7 0%, #4f46e5 100%);
  --btn-bg:        #0369a1;
  --btn-bg-hover:  #075985;
  --btn-text:      #ffffff;
  --nav-bg:        rgba(248,250,252,0.85);
  --input-bg:      #ffffff;
  --grid-line:     rgba(2,132,199,0.07);
  --orb-1:         rgba(56,189,248,0.28);
  --orb-2:         rgba(129,140,248,0.18);
  --shadow:        0 1px 2px rgba(15,23,42,0.05), 0 12px 32px rgba(15,23,42,0.08);
  --shadow-lg:     0 32px 64px rgba(15,23,42,0.16);
  --success:       #15803d;
  --success-soft:  rgba(22,163,74,0.08);
  --danger:        #b91c1c;
  --danger-soft:   rgba(220,38,38,0.07);
}

:root {
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    20px;
  --nav-h:        72px;
  --gutter:       clamp(16px, 4vw, 32px);
  --ease:         cubic-bezier(0.4,0,0.2,1);
  --transition:   0.25s var(--ease);
}

/* ─── BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word; /* safety net for long words on very small screens */
}
p { text-wrap: pretty; }
em { font-style: normal; color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ─── SECTION SHARED ─── */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}
.section-header.align-left { text-align: left; margin-left: 0; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 800;
  margin-bottom: 16px;
}
.section-sub {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--text-muted);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn i { transition: transform var(--transition); }
.btn:hover i.fa-arrow-right { transform: translateX(3px); }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 8px 24px -8px var(--accent-border);
}
.btn-primary:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px var(--accent-border);
}
.btn-primary:disabled { opacity: 0.7; cursor: progress; transform: none; }

.btn-outline {
  background: transparent;
  color: var(--heading);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 16px 34px; font-size: 16px; }
.btn-block { width: 100%; }

/* ─── NAVIGATION ─── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.nav.scrolled,
body.menu-open .nav {
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: var(--heading);
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #0369a1);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 6px 16px -6px rgba(2,132,199,0.6);
}
.logo-text span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}
.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color var(--transition), background-color var(--transition);
}
.nav-links a:hover { color: var(--heading); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle i { grid-area: 1 / 1; font-size: 15px; transition: transform 0.4s var(--ease), opacity 0.3s; }
/* Show the icon of the theme you would switch to */
[data-theme="dark"] .theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }

.nav-hamburger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE MENU ─── */
.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 999;
  background: var(--bg);
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.open { opacity: 1; transform: none; }
.mobile-menu nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--heading);
}
.mobile-menu nav a i { font-size: 16px; color: var(--text-muted); }
.mobile-menu nav a.active { color: var(--accent); }
.mobile-menu nav a.active i { color: var(--accent); }
.mobile-menu-footer { display: grid; gap: 16px; margin-top: 32px; }
.mobile-menu-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 15px;
  word-break: break-all;
}

/* ─── HERO BACKGROUND (shared) ─── */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 100%);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.hero-orb-1 {
  width: min(640px, 90vw); aspect-ratio: 1;
  background: radial-gradient(circle, var(--orb-1), transparent 70%);
  top: -220px; right: -120px;
}
.hero-orb-2 {
  width: min(460px, 70vw); aspect-ratio: 1;
  background: radial-gradient(circle, var(--orb-2), transparent 70%);
  bottom: -160px; left: -80px;
}

/* ─── HOME HERO ─── */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + clamp(40px, 8vw, 96px)) 0 clamp(56px, 8vw, 96px);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.hero-badge-dot {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}

.hero-title {
  font-size: clamp(40px, 5.2vw, 66px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}

/* All words share one grid cell, so swapping them never shifts the layout */
.rotator { display: inline-grid; vertical-align: top; }
.rotator > span {
  grid-area: 1 / 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
  opacity: 0;
  transform: translateY(0.35em);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.rotator > span.is-active { opacity: 1; transform: none; }
.rotator > span.is-leaving { opacity: 0; transform: translateY(-0.35em); }

.hero-desc {
  font-size: clamp(17px, 1.8vw, 19px);
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: clamp(20px, 4vw, 48px);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat + .stat { padding-left: clamp(20px, 4vw, 48px); border-left: 1px solid var(--border-strong); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--heading);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

.hero > .container,
.hero-content,
.hero-visual { min-width: 0; }

.hero-content > * { animation: fadeUp 0.7s var(--ease) both; }
.hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }
.hero-content > *:nth-child(5) { animation-delay: 0.32s; }

/* ─── CODE WINDOW (stays dark in both themes, like a real editor) ─── */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  animation: fadeUp 0.8s 0.25s var(--ease) both;
}
.code-window {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #0b1424;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.6s var(--ease);
}
.code-window:hover { transform: none; }
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: #111c31;
  border-bottom: 1px solid rgba(148,163,184,0.14);
}
.code-titlebar span { width: 12px; height: 12px; border-radius: 50%; }
.code-titlebar span:nth-child(1) { background: #ff5f57; }
.code-titlebar span:nth-child(2) { background: #febc2e; }
.code-titlebar span:nth-child(3) { background: #28c840; }
.code-titlebar small {
  margin-left: auto;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 12px;
  color: #64748b;
}
.code-body {
  padding: 22px 24px 26px;
  font-family: ui-monospace, 'Cascadia Code', Consolas, 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.95;
  color: #e2e8f0;
  overflow-x: auto;
}
.code-line { white-space: pre; }
.code-indent { padding-left: 2ch; }
.code-kw  { color: #c792ea; }
.code-fn  { color: #82aaff; }
.code-key { color: #94a3b8; }
.code-str { color: #c3e88d; }
.code-num { color: #f78c6c; }
.code-comment { color: #64748b; font-style: italic; }
.code-cursor {
  display: inline-block;
  width: 8px; height: 1.1em;
  background: #38bdf8;
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
  animation: float 5s ease-in-out infinite;
}
.float-chip i { color: var(--accent); }
.float-chip-1 { top: 42%; right: -20px; }
.float-chip-2 { bottom: -20px; left: -12px; animation-delay: 1.4s; }

/* ─── CARDS (services, values, steps) ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
a.card:hover,
.card.is-hoverable:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 21px;
  margin-bottom: 22px;
  transition: background-color var(--transition), color var(--transition);
}
a.card:hover .card-icon { background: var(--btn-bg); color: var(--btn-text); }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--text-muted); }
.card-link {
  margin-top: auto;
  padding-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.card-link i { transition: transform var(--transition); }
a.card:hover .card-link i { transform: translateX(4px); }

/* ─── CAPABILITIES ─── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.feature-list { display: grid; gap: 24px; margin-top: 36px; }
.feature-item { display: flex; gap: 18px; align-items: flex-start; }
.feature-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
}
.feature-item h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.feature-item p { font-size: 15px; color: var(--text-muted); }

.orbit {
  position: relative;
  width: min(400px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  animation: spin 40s linear infinite;
}
.orbit-ring-1 { inset: 18%; }
.orbit-ring-2 { inset: 0; animation-direction: reverse; animation-duration: 60s; }
.orbit-core {
  width: 34%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(135deg, #38bdf8, #0369a1);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  box-shadow: 0 24px 60px -16px rgba(2,132,199,0.6);
}
.orbit .float-chip-a { top: 4%; left: 50%; translate: -50% 0; }
.orbit .float-chip-b { bottom: 12%; right: -4%; animation-delay: 1.5s; }
.orbit .float-chip-c { bottom: 12%; left: -4%; animation-delay: 0.8s; }

/* ─── PORTFOLIO ─── */
.work-card {
  overflow: hidden;
  padding: 0;
}
.work-art {
  position: relative;
  height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.work-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: 18px 18px;
}
.work-art i {
  position: relative;
  font-size: 52px;
  color: rgba(255,255,255,0.9);
  transition: transform 0.4s var(--ease);
}
.work-card:hover .work-art i { transform: scale(1.08) rotate(-4deg); }
.art-blue   { background: linear-gradient(135deg, #0ea5e9, #1e3a8a); }
.art-green  { background: linear-gradient(135deg, #10b981, #064e3b); }
.art-purple { background: linear-gradient(135deg, #8b5cf6, #3b0764); }
.work-body { padding: 22px 26px 26px; }
.work-body h3 { font-size: 18px; margin-bottom: 6px; }
.work-body p { font-size: 14px; }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ─── CTA ─── */
.cta-section { padding: clamp(56px, 8vw, 96px) 0; }
.cta-box {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 64px);
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.cta-box > *:not(.hero-bg) { position: relative; }
.cta-box h2 {
  font-size: clamp(28px, 4.6vw, 52px);
  font-weight: 800;
  margin-bottom: 16px;
}
.cta-box p {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ─── PAGE HERO (inner pages) ─── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + clamp(48px, 8vw, 96px)) 0 clamp(48px, 7vw, 80px);
  text-align: center;
}
.page-hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.page-hero-content > * { animation: fadeUp 0.7s var(--ease) both; }
.page-hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.page-hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.page-hero h1 {
  font-size: clamp(38px, 6.5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.page-hero p { font-size: clamp(17px, 1.8vw, 19px); color: var(--text-muted); }

.breadcrumb {
  display: inline-flex;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.breadcrumb a:hover { color: var(--accent); }

/* ─── ABOUT PAGE ─── */
.about-text p { color: var(--text-muted); margin-bottom: 16px; font-size: 17px; }
.quote-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.quote-card::before {
  content: '';
  position: absolute;
  left: 0; top: 28px; bottom: 28px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gradient);
}
.quote-card i { color: var(--accent); font-size: 26px; margin-bottom: 16px; display: block; }
.quote-card p { font-size: clamp(17px, 1.8vw, 19px); line-height: 1.75; color: var(--heading); }

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stats-band .stat {
  align-items: center;
  text-align: center;
  padding: 32px 16px;
}
.stats-band .stat + .stat { padding-left: 16px; border-left: 1px solid var(--border); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card-lg { padding: clamp(28px, 4vw, 44px); }
.card-lg h3 { font-size: 22px; }
.card-lg p { font-size: 16px; }

.value-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── SERVICES PAGE ─── */
.chip-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.chip-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--transition), color var(--transition);
}
.chip-nav a i { color: var(--accent); font-size: 13px; }
.chip-nav a:hover { border-color: var(--accent); color: var(--accent); }

.service-rows { display: grid; gap: 20px; }
.service-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
}
.service-row:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.service-row-head .card-icon { width: 60px; height: 60px; font-size: 24px; }
.service-row-head h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 10px; }
.service-row-head p { color: var(--text-muted); font-size: 15px; }
.check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
}
.check-list li i {
  flex-shrink: 0;
  margin-top: 4px;
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
}
.check-list strong { display: block; color: var(--heading); font-weight: 600; }
.check-list span { color: var(--text-muted); font-size: 14px; }

.steps { counter-reset: step; }
.step { padding-top: 28px; }
.step::before {
  counter-increment: step;
  content: '0' counter(step);
  position: absolute;
  top: 24px; right: 24px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-soft);
  -webkit-text-stroke: 1px var(--accent-border);
}

/* ─── CONTACT PAGE ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact-info h2 { font-size: clamp(26px, 3vw, 32px); margin-bottom: 12px; }
.contact-info > p { color: var(--text-muted); margin-bottom: 32px; }
.contact-cards { display: grid; gap: 12px; }
.contact-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
  min-width: 0;
}
a.contact-card:hover { border-color: var(--accent-border); transform: translateX(3px); }
.contact-card .feature-icon { width: 42px; height: 42px; font-size: 16px; }
.contact-card div { min-width: 0; }
.contact-card strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-card span { display: block; color: var(--heading); font-weight: 500; overflow-wrap: anywhere; }
.contact-info .social-links { margin-top: 28px; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.form-card h2 { font-size: 22px; margin-bottom: 6px; }
.form-card > p { color: var(--text-muted); font-size: 15px; margin-bottom: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 8px;
}
.form-group label .optional { color: var(--text-muted); font-weight: 400; }
.form-group input,
.form-group textarea {
  width: 100%;
  min-height: 50px;
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--heading);
  font-family: var(--font-body);
  font-size: 16px; /* 16px stops iOS zooming into the field */
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:hover,
.form-group textarea:hover { border-color: var(--text-muted); }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); opacity: 0.75; }
.form-group textarea { resize: vertical; min-height: 140px; }
.form-group [aria-invalid="true"] { border-color: var(--danger); }
.form-group [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
.field-error {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--danger);
}
.field-error.visible { display: flex; }
.form-note { margin-top: 14px; font-size: 13px; color: var(--text-muted); text-align: center; }
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 15px;
  border: 1px solid;
}
.alert i { margin-top: 4px; }
.alert strong { display: block; color: var(--heading); }
.alert-success { background: var(--success-soft); border-color: var(--success); color: var(--text); }
.alert-success i { color: var(--success); }
.alert-error { background: var(--danger-soft); border-color: var(--danger); color: var(--text); }
.alert-error i { color: var(--danger); }
.alert ul { margin-top: 4px; padding-left: 18px; list-style: disc; }

/* ─── MAP ─── */
.map-section { padding-bottom: clamp(56px, 8vw, 96px); }
.map-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}
#googleMap { position: relative; z-index: 1; width: 100%; height: clamp(320px, 45vw, 460px); }
.map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 14px;
}
.map-link {
  position: absolute;
  left: 16px; bottom: 24px;
  z-index: 2;
}
.map-marker {
  background: #0369a1;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  white-space: nowrap;
}

/* ─── FOOTER ─── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: clamp(56px, 7vw, 80px);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-logo { margin-bottom: 16px; }
.footer-brand p { font-size: 15px; color: var(--text-muted); max-width: 300px; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.social-links a:hover { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }

.footer-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col li { margin-bottom: 4px; }
.footer-col ul a,
.footer-contact a,
.footer-contact p {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  font-size: 15px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-contact { display: flex; flex-direction: column; align-items: flex-start; }
.footer-contact a { overflow-wrap: anywhere; }
.footer-contact i { color: var(--accent); margin-top: 5px; }
.footer-col ul a:hover,
.footer-contact a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding: 22px 0 calc(22px + env(safe-area-inset-bottom));
  font-size: 14px;
  color: var(--text-muted);
}
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 6px 0;
}
.back-to-top:hover { color: var(--accent); }

/* ─── REVEAL (only hides content once JS has confirmed it is running) ─── */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.visible { opacity: 1; transform: none; }

/* ─── KEYFRAMES ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }

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

/* ─── RESPONSIVE ─── */
@media (max-width: 1080px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .service-row { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-content { text-align: center; }
  .hero-desc { margin-inline: auto; }
  .hero-actions, .stats { justify-content: center; }
  .hero-visual { margin-top: 16px; }
  .code-window { transform: none; }

  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .orbit-wrap { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --nav-h: 64px; }

  .card-grid,
  .card-grid-4,
  .two-col { grid-template-columns: 1fr; }
  .card { padding: 26px 22px; }

  /* Sized so the longest rotating word ("Applications") still fits a 360px screen */
  .hero-title { font-size: clamp(30px, 8.8vw, 48px); }
  .section-title { font-size: clamp(24px, 7vw, 34px); }
  .hero-actions .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 0; width: 100%; }
  .stat + .stat { padding-left: 12px; }
  .stat { align-items: center; text-align: center; padding-inline: 4px; }
  .stat-label { font-size: 12px; }
  .float-chip-1, .float-chip-2 { display: none; }
  .code-body { font-size: 12.5px; padding: 18px; }

  .stats-band .stat { padding: 24px 8px; }
  .stats-band .stat + .stat { padding-left: 8px; }

  .check-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-actions .btn { flex: 1 1 100%; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-brand, .footer-contact { grid-column: 1 / -1; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (max-width: 380px) {
  .nav-inner { gap: 12px; }
  .nav-actions { gap: 8px; }
  .logo-text { font-size: 19px; }
  .hero-badge { font-size: 13px; }
}
