/* ====================================================
   VELOXSOL — styles.css
   Color palette: #004c4c · #008080 · #006666 · white
   ==================================================== */

/* --------------------------------------------------
   1. CSS Variables & Reset
   -------------------------------------------------- */
:root {
  --clr-primary:   #004c4c;
  --clr-mid:       #008080;
  --clr-dark:      #006666;
  --clr-accent:    #00aaaa;
  --clr-bg:        #000000;
  --clr-bg-card:   #0a0a0a;
  --clr-bg-raised: #111111;
  --clr-bg-hover:  #1a1a1a;
  --clr-white:     #ffffff;
  --clr-text:      rgba(255, 255, 255, 0.90);
  --clr-muted:     rgba(255, 255, 255, 0.55);
  --clr-border:    rgba(0, 128, 128, 0.18);
  --clr-border-hi: rgba(0, 128, 128, 0.50);
  --clr-glow:      rgba(0, 128, 128, 0.15);
  --clr-glow-hi:   rgba(0, 170, 170, 0.25);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--clr-border);
  --shadow-glow: 0 0 30px var(--clr-glow);
  --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--clr-border-hi), 0 0 20px var(--clr-glow-hi);

  --trans-fast: 0.18s ease;
  --trans-base: 0.28s ease;
  --trans-slow: 0.45s ease;

  --font-head: 'Sora', sans-serif;
  --font-body: 'Public Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
  --section-gap: 100px;
  --header-h: 72px;
}

/* --------------------------------------------------
   1b. Light Theme Overrides
   -------------------------------------------------- */
[data-theme="light"] {
  /* Backgrounds — clean neutral whites, no teal tint */
  --clr-bg:        #f7f9fb;
  --clr-bg-card:   #ffffff;
  --clr-bg-raised: #eef1f4;
  --clr-bg-hover:  #e3e7ed;

  /* Text — professional near-black */
  --clr-white:     #111827;
  --clr-text:      rgba(17, 24, 39, 0.87);
  --clr-muted:     rgba(17, 24, 39, 0.48);

  /* Teal palette — darkened for WCAG contrast on white */
  --clr-primary:   #004c4c;
  --clr-mid:       #006d6d;
  --clr-dark:      #005858;
  --clr-accent:    #007272;

  /* Borders — neutral grey so cards feel clean, not teal-heavy */
  --clr-border:    rgba(17, 24, 39, 0.10);
  --clr-border-hi: rgba(0, 114, 114, 0.35);
  --clr-glow:      rgba(0, 114, 114, 0.06);
  --clr-glow-hi:   rgba(0, 114, 114, 0.12);

  /* Shadows — soft, depth-focused, no colour cast */
  --shadow-card:  0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.07), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --shadow-glow:  0 0 16px var(--clr-glow);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.11), 0 0 0 1px rgba(0, 114, 114, 0.28);
}

/* Orbs — barely there on light, just a whisper of warmth */
[data-theme="light"] .orb-a {
  background: radial-gradient(circle, #a8d8d8 0%, transparent 70%);
  opacity: 0.08;
}
[data-theme="light"] .orb-b {
  background: radial-gradient(circle, #a8d8d8 0%, transparent 70%);
  opacity: 0.06;
}
[data-theme="light"] .orb-c {
  background: radial-gradient(circle, #a8d8d8 0%, transparent 70%);
  opacity: 0.05;
}

/* Header scrolled — clean frosted white */
[data-theme="light"] .site-header.scrolled {
  background: rgba(247, 249, 251, 0.95);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08), 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Mobile nav panel */
[data-theme="light"] .primary-nav {
  background: rgba(247, 249, 251, 0.98);
}

/* Gradient text — legible teal range on white */
[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #007272 0%, #006060 55%, #004c4c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Eyebrow pill on light bg */
[data-theme="light"] .eyebrow {
  background: rgba(0, 95, 95, 0.08);
  border-color: rgba(0, 95, 95, 0.22);
  color: var(--clr-accent);
}

/* Featured service card — lighter tint */
[data-theme="light"] .service-card.featured {
  background: linear-gradient(145deg, rgba(0,76,76,0.05) 0%, #ffffff 100%);
  border-color: rgba(0, 95, 95, 0.30);
}

/* Tags, stack markers, proj-num — adapt to light */
[data-theme="light"] .tag {
  background: rgba(0, 95, 95, 0.07);
  border-color: rgba(0, 95, 95, 0.22);
  color: var(--clr-accent);
}

/* Impact bar and proj-num */
[data-theme="light"] .proj-impact {
  background: rgba(0, 95, 95, 0.06);
  border-left-color: var(--clr-mid);
  color: var(--clr-accent);
}
[data-theme="light"] .proj-num {
  background: rgba(0, 95, 95, 0.07);
  color: var(--clr-mid);
  border-color: var(--clr-border);
}

/* Modal backdrop — dark-teal at lower opacity */
[data-theme="light"] .modal-backdrop {
  background: rgba(5, 24, 24, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Modal stack tags */
[data-theme="light"] .modal-stack span {
  background: rgba(0, 95, 95, 0.08);
  color: var(--clr-mid);
  border-color: var(--clr-border);
}

/* CSO block on light */
[data-theme="light"] .cso-block h5 {
  color: var(--clr-mid);
}

/* Cursor — solid teal on light (screen blend is invisible on white) */
[data-theme="light"] .cursor-dot {
  mix-blend-mode: normal;
  background: var(--clr-accent);
}
[data-theme="light"] .cursor-ring {
  mix-blend-mode: normal;
  border-color: rgba(0, 114, 114, 0.45);
}
[data-theme="light"] .cursor-dot.hovering { background: #005858; }
[data-theme="light"] .cursor-ring.hovering { border-color: rgba(0, 114, 114, 0.65); }
[data-theme="light"] .trail-particle { background: rgba(0, 114, 114, 0.35); }

/* Form placeholders — white rgba is invisible on light backgrounds */
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder { color: rgba(17, 24, 39, 0.38); }

/* Node status colors need readable contrast */
[data-theme="light"] .node-status {
  background: rgba(0, 95, 95, 0.10);
  border-color: rgba(0, 95, 95, 0.24);
  color: var(--clr-accent);
}

/* CSO section inner line-color */
[data-theme="light"] .wf-connector {
  background: linear-gradient(to bottom, var(--clr-border), var(--clr-border-hi));
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* Skip link */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--clr-mid);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--trans-fast);
}
.skip-link:focus { top: 16px; }

/* --------------------------------------------------
   2. Section Orbs (Hero + Footer only)
   -------------------------------------------------- */
.hero-orbs,
.footer-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orbs .orb-a,
.hero-orbs .orb-b,
.hero-orbs .orb-c,
.footer-orbs .orb-a,
.footer-orbs .orb-b {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
}

.hero-orbs .orb-a,
.footer-orbs .orb-a {
  width: 600px; height: 600px;
  top: -200px; left: -150px;
  background: radial-gradient(circle, #004c4c 0%, transparent 70%);
  animation: orbFloat 18s ease-in-out infinite;
}

.hero-orbs .orb-b,
.footer-orbs .orb-b {
  width: 500px; height: 500px;
  top: 20%; right: -100px;
  background: radial-gradient(circle, #008080 0%, transparent 70%);
  animation: orbFloat 22s ease-in-out infinite reverse;
}

.hero-orbs .orb-c {
  width: 400px; height: 400px;
  bottom: 10%; left: 20%;
  background: radial-gradient(circle, #006666 0%, transparent 70%);
  animation: orbFloat 26s ease-in-out infinite 5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.05); }
  66%      { transform: translate(-20px, 40px) scale(0.95); }
}

/* --------------------------------------------------
   2b. Custom Cursor & Mouse Trail
   -------------------------------------------------- */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--clr-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}
.cursor-dot.hovering {
  width: 14px; height: 14px;
  background: #00dddd;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 2px solid rgba(0, 170, 170, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}
.cursor-ring.hovering {
  width: 50px; height: 50px;
  border-color: rgba(0, 170, 170, 0.85);
}

.trail-particle {
  position: fixed;
  width: 5px; height: 5px;
  background: rgba(0, 170, 170, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9996;
  animation: trailFade 0.6s ease forwards;
}

@keyframes trailFade {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
}

/* Hide custom cursors on touch & reduced-motion */
@media (hover: none) {
  .cursor-dot, .cursor-ring, .trail-particle { display: none !important; }
}

/* --------------------------------------------------
   3. Layout Utilities
   -------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--section-gap) 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}
.section-header p:not(.eyebrow) {
  color: var(--clr-muted);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* --------------------------------------------------
   4. Typography
   -------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.18;
  color: var(--clr-white);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-accent);
  background: rgba(0, 170, 170, 0.1);
  border: 1px solid rgba(0, 170, 170, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #00dddd 0%, #008080 50%, #006666 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------
   5. Buttons
   -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  transition: all var(--trans-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-mid) 0%, var(--clr-dark) 100%);
  color: #fff;
  border-color: var(--clr-mid);
  box-shadow: 0 4px 16px rgba(0, 128, 128, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--clr-accent) 0%, var(--clr-mid) 100%);
  box-shadow: 0 6px 24px rgba(0, 128, 128, 0.45);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-accent);
  border-color: var(--clr-border-hi);
}
.btn-ghost:hover {
  background: var(--clr-glow);
  border-color: var(--clr-accent);
  transform: translateY(-2px);
}

.btn-lg {
  font-size: 1rem;
  padding: 13px 30px;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* --------------------------------------------------
   6. Scroll Reveal
   -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--delay, 0ms);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------
   7. Header
   -------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--trans-base), box-shadow var(--trans-base);
}

.site-header.scrolled {
  background: rgba(1, 15, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--clr-border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-img {
  height: 100px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Primary nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--clr-muted);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  transition: color var(--trans-fast), background var(--trans-fast);
}
.nav-link:hover,
.nav-link.active {
  color: var(--clr-white);
  background: var(--clr-glow);
}

.header-cta { margin-left: 8px; }

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--clr-glow);
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
  transition: color var(--trans-fast), background var(--trans-fast), border-color var(--trans-fast), transform var(--trans-fast);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--clr-white);
  background: var(--clr-bg-hover);
  border-color: var(--clr-border-hi);
  transform: rotate(20deg);
}
[data-theme="light"] .theme-toggle {
  background: rgba(17, 24, 39, 0.06);
  border-color: rgba(17, 24, 39, 0.14);
  color: var(--clr-muted);
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(17, 24, 39, 0.10);
  border-color: rgba(0, 114, 114, 0.38);
  color: var(--clr-accent);
  transform: rotate(-20deg);
}

/* Icon visibility — CSS-driven, no JS needed */
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--clr-white);
  border-radius: 4px;
  transition: all var(--trans-base);
  display: block;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------
   8. Hero
   -------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.hero-copy { max-width: 760px; }

.hero-lead {
  font-size: 1.1rem;
  color: var(--clr-muted);
  margin: 20px 0 32px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  justify-content: center;
}

/* Metrics */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--clr-border);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.metric strong {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--clr-accent);
  line-height: 1;
}
.metric span {
  font-size: 0.75rem;
  color: var(--clr-muted);
}

/* Workflow card visual */
.hero-visual { perspective: 1000px; }

.workflow-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 60px rgba(0, 128, 128, 0.08);
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform var(--trans-slow);
}
.workflow-card:hover {
  transform: rotateY(0deg) rotateX(0deg);
}

.wf-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  background: var(--clr-bg-raised);
  border-bottom: 1px solid var(--clr-border);
}
.wf-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #28c840; }
.wf-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--clr-muted);
  margin-left: 6px;
}

.wf-body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wf-node {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.node-badge {
  width: 36px; height: 36px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--clr-glow);
  border: 1px solid var(--clr-border);
}

.node-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--clr-white);
}

.node-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--clr-accent);
  background: rgba(0, 170, 170, 0.1);
  border: 1px solid rgba(0, 170, 170, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.node-status.done {
  color: #28c840;
  background: rgba(40, 200, 64, 0.1);
  border-color: rgba(40, 200, 64, 0.25);
}

.wf-connector {
  width: 2px;
  height: 20px;
  margin: 0 auto;
  background: linear-gradient(to bottom, var(--clr-border), var(--clr-border-hi));
  position: relative;
}
.wf-connector::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clr-mid);
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.5; transform: translateX(-50%) scale(1.4); }
}

.pulse-1 { animation: nodePulse 4s ease-in-out infinite 0s; }
.pulse-2 { animation: nodePulse 4s ease-in-out infinite 1s; }
.pulse-3 { animation: nodePulse 4s ease-in-out infinite 2s; }
.pulse-4 { animation: nodePulse 4s ease-in-out infinite 3s; }

@keyframes nodePulse {
  0%, 90%, 100% { box-shadow: none; }
  45% { box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.3); }
}

.wf-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--clr-bg-raised);
  border-top: 1px solid var(--clr-border);
}
.wf-exec, .wf-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--clr-muted);
}
.wf-time { color: #28c840; }

/* --------------------------------------------------
   10. About
   -------------------------------------------------- */
.about { background: var(--clr-bg-card); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-copy p {
  color: var(--clr-muted);
  line-height: 1.8;
  margin-bottom: 18px;
}
.about-copy p:last-of-type { margin-bottom: 32px; }

.value-list { display: flex; flex-direction: column; gap: 18px; }

.value-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.value-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--clr-glow);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xs);
}
.value-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--clr-white);
  margin-bottom: 2px;
}
.value-item span {
  font-size: 0.82rem;
  color: var(--clr-muted);
}

/* Team cards */
.team-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color var(--trans-base), box-shadow var(--trans-base);
}
.team-card:hover {
  border-color: var(--clr-border-hi);
  box-shadow: var(--shadow-hover);
}

.team-avatar {
  width: 50px; height: 50px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-avatar span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.team-body h4 { margin-bottom: 6px; }
.team-body p {
  font-size: 0.82rem;
  color: var(--clr-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--clr-accent);
  background: rgba(0, 170, 170, 0.1);
  border: 1px solid rgba(0, 170, 170, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* --------------------------------------------------
   11. Services
   -------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.service-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color var(--trans-base), box-shadow var(--trans-base), transform var(--trans-base);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--clr-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--trans-base);
}
.service-card:hover {
  border-color: var(--clr-border-hi);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.service-card:hover::before { opacity: 1; }

.service-card.featured {
  grid-column: span 1;
  border-color: var(--clr-dark);
  background: linear-gradient(145deg, rgba(0,76,76,0.3) 0%, var(--clr-bg-card) 100%);
}

.service-card h3 {
  margin: 16px 0 10px;
  font-size: 1.1rem;
}

.service-card p {
  font-size: 0.85rem;
  color: var(--clr-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.service-list { display: flex; flex-direction: column; gap: 6px; }
.service-list li {
  font-size: 0.8rem;
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-list li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--clr-mid);
  flex-shrink: 0;
}

.service-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--clr-mid);
  background: rgba(0, 128, 128, 0.12);
  border: 1px solid var(--clr-border);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Service icon wraps */
.service-icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  border: 1px solid var(--clr-border);
  position: relative;
  z-index: 1;
}
.icon-n8n    { background: rgba(242,91,0,0.12); color: #f89b4e; border-color: rgba(242,91,0,0.2); font-family: var(--font-mono); font-size: 0.85rem; }
.icon-make   { background: rgba(104,58,231,0.12); color: #a584f5; border-color: rgba(104,58,231,0.2); font-family: var(--font-head); }
.icon-zapier { background: rgba(255,74,0,0.12); color: #ff8040; border-color: rgba(255,74,0,0.2); font-family: var(--font-head); }
.icon-custom { background: rgba(0,128,128,0.12); color: var(--clr-accent); border-color: var(--clr-border); }
.icon-ai     { background: rgba(16,185,129,0.12); color: #34d399; border-color: rgba(16,185,129,0.2); font-family: var(--font-mono); font-size: 0.78rem; }
.icon-consult { background: rgba(0,128,128,0.08); color: var(--clr-mid); }

/* Platform showcase */
.platform-showcase {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
}

.showcase-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 20px;
  text-align: center;
}

.platform-row { overflow: hidden; }

.platform-track {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.platform-inner {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: tickerScroll 55s linear infinite;
}

.platform-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  width: 60px;
  height: 60px;
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--trans-fast), background var(--trans-fast);
  flex-shrink: 0;
}
.platform-pill:hover {
  border-color: var(--clr-border-hi);
  background: var(--clr-bg-hover);
}

/* Real SVG logos */
.plat-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  opacity: 0.9;
}

/* Light mode: invert white logos → dark readable icons */
[data-theme="light"] .plat-logo-img { filter: invert(1); }

/* --------------------------------------------------
   12. Portfolio
   -------------------------------------------------- */
.portfolio { background: var(--clr-bg-card); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.proj-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--trans-base), box-shadow var(--trans-base), transform var(--trans-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.proj-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-primary) 0%, var(--clr-mid) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--trans-base);
}
.proj-card:hover {
  border-color: var(--clr-border-hi);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}
.proj-card:hover::after { opacity: 1; }

.proj-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proj-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--clr-mid);
  background: rgba(0, 128, 128, 0.1);
  border: 1px solid var(--clr-border);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.proj-cat {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--clr-muted);
}

.proj-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-white);
  line-height: 1.3;
}

.proj-subtitle {
  font-size: 0.82rem;
  color: var(--clr-muted);
  line-height: 1.55;
}

.proj-impact {
  background: rgba(0, 128, 128, 0.1);
  border: 1px solid var(--clr-border);
  border-left: 3px solid var(--clr-mid);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--clr-accent);
}

.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.proj-stack span {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--clr-muted);
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.proj-cta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--clr-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-accent);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--trans-fast);
}
.proj-card:hover .proj-cta { gap: 10px; }

/* --------------------------------------------------
   13. Contact
   -------------------------------------------------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h2 { margin: 8px 0 16px; }
.contact-info > p {
  color: var(--clr-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 36px;
}

.contact-details { display: flex; flex-direction: column; gap: 10px; }

.contact-detail {
  display: flex;
  gap: 10px;
  align-items: center;
}
.detail-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: var(--clr-glow);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xs);
}
.contact-detail strong {
  display: block;
  font-size: 0.85rem;
  color: var(--clr-white);
  margin-bottom: 0;
  line-height: 1.2;
}
.contact-detail a,
.contact-detail span {
  font-size: 0.82rem;
  color: var(--clr-muted);
  line-height: 1.2;
}
.contact-detail a:hover { color: var(--clr-accent); }

/* Form */
.contact-form-wrap {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.contact-form { display: flex; flex-direction: column; gap: 18px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-muted);
}

.required { color: var(--clr-accent); }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--clr-white);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--clr-mid);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.25); }
.form-group select option { background: var(--clr-bg-raised); }
.form-group textarea { resize: vertical; min-height: 110px; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-feedback { margin-top: 4px; }
.feedback-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.feedback-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* --------------------------------------------------
   14. Footer
   -------------------------------------------------- */
.site-footer {
  position: relative;
  background: var(--clr-bg-raised);
  border-top: 1px solid var(--clr-border);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-brand .logo-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--clr-white);
  display: block;
  margin-bottom: 6px;
}
.footer-brand p {
  font-size: 0.82rem;
  color: var(--clr-muted);
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-size: 0.82rem;
  color: var(--clr-muted);
  transition: color var(--trans-fast);
}
.footer-nav a:hover { color: var(--clr-accent); }

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  padding-top: 8px;
  border-top: 1px solid var(--clr-border);
  width: 100%;
  text-align: center;
}

/* --------------------------------------------------
   15. Modal
   -------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--trans-base);
}
.modal.open {
  pointer-events: all;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 8, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border-hi);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 860px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 128, 128, 0.1);
  transform: translateY(24px) scale(0.97);
  transition: transform var(--trans-base);
  scrollbar-width: thin;
  scrollbar-color: var(--clr-border-hi) transparent;
}
.modal.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans-fast), border-color var(--trans-fast);
  z-index: 2;
}
.modal-close:hover { color: var(--clr-white); border-color: var(--clr-border-hi); }

.modal-content { padding: 24px 32px 32px; clear: both; }

/* Modal sections */
.modal-project-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--clr-mid);
  margin-bottom: 8px;
}
.modal-project-title {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: 8px;
  line-height: 1.2;
}
.modal-project-subtitle {
  font-size: 0.9rem;
  color: var(--clr-muted);
  margin-bottom: 24px;
}

/* Gallery */
.modal-gallery {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
}
.gallery-main-img {
  aspect-ratio: 16/9;
  object-fit: contain;
  width: 100%;
  background: var(--clr-bg);
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: var(--clr-bg-raised);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-border) transparent;
}
.gallery-thumb {
  width: 64px; height: 48px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--trans-fast), opacity var(--trans-fast);
  opacity: 0.6;
}
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--clr-mid); opacity: 1; }

/* CSO sections */
.cso-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.cso-block {
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.cso-block h5 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--clr-accent);
}
.cso-block p {
  font-size: 0.82rem;
  color: var(--clr-muted);
  line-height: 1.6;
}

.modal-highlights {
  margin-bottom: 20px;
}
.modal-highlights h5 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-white);
  margin-bottom: 10px;
}
.modal-highlights ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-highlights li {
  font-size: 0.82rem;
  color: var(--clr-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.modal-highlights li::before {
  content: '→';
  color: var(--clr-mid);
  flex-shrink: 0;
  font-size: 0.8rem;
  margin-top: 1px;
}

.modal-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-stack span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--clr-mid);
  background: rgba(0,128,128,0.1);
  border: 1px solid var(--clr-border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* ==================================================
   16. Responsive
   ================================================== */

/* ------------------------------------------
   16a. ≤ 1200px — Narrow laptop
   ------------------------------------------ */
@media (max-width: 1200px) {
  .header-inner { gap: 20px; }
}

/* ------------------------------------------
   16b. ≤ 1024px — Tablet landscape
   ------------------------------------------ */
@media (max-width: 1024px) {
  .hero-copy { max-width: 100%; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card.featured { grid-column: span 2; }

  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-inner { grid-template-columns: 1fr; gap: 48px; }

  .cso-grid { grid-template-columns: 1fr; }

  .header-inner { gap: 16px; }
}

/* ------------------------------------------
   16c. ≤ 900px — Hide CTA, tighten header
   ------------------------------------------ */
@media (max-width: 900px) {
  .header-cta { display: none; }
  .header-inner { gap: 12px; }
}

/* ------------------------------------------
   16d. ≤ 768px — Tablet portrait / large mobile
   ------------------------------------------ */
@media (max-width: 768px) {
  :root {
    --section-gap: 70px;
    --header-h: 64px;
  }

  /* Header layout */
  .header-inner { gap: 8px; }
  .logo-img { height: 72px; }

  /* Reorder: logo | [space] | theme-toggle | hamburger */
  .theme-toggle { order: 2; margin-left: auto; }
  .nav-toggle   { order: 3; margin-left: 0; display: flex; }

  /* Mobile nav drawer — uses CSS vars so light/dark both work */
  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--clr-bg);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 20px;
    transform: translateY(-110%);
    /* visibility hides the element + its shadow while closed;
       delay matches the slide-up duration so it hides AFTER animating away */
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.3s;
    z-index: 99;
    margin-left: 0;
  }
  .primary-nav.open {
    transform: translateY(0);
    visibility: visible;
    /* visibility snaps to visible immediately so it shows before sliding down */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0s;
  }
  .nav-link {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--clr-border);
  }
  .nav-link:last-child { border-bottom: none; }

  /* Typography */
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.75rem; }

  /* Hero */
  .hero { padding-top: calc(var(--header-h) + 36px); min-height: auto; padding-bottom: 60px; }
  .hero-lead { font-size: 1rem; margin: 16px 0 26px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .metric strong { font-size: 1.45rem; }
  /* Kill 3D tilt — bad UX on touch devices */
  .workflow-card { transform: none !important; }

  /* About */
  .about-grid { gap: 36px; }
  .team-card { flex-direction: row; align-items: flex-start; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }
  .service-card.featured { grid-column: span 1; }
  .service-card { padding: 22px 18px; }

  /* Portfolio */
  .portfolio-grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact-inner { gap: 36px; }
  .form-row { grid-template-columns: 1fr; }

  /* Modal */
  .modal { padding: 12px; }
  .modal-panel { border-radius: var(--radius-lg); max-height: 92vh; }
  .modal-content { padding: 12px 16px 20px; }
  .cso-grid { grid-template-columns: 1fr; }

  /* Platform pills */
  .platform-pill { padding: 10px; width: 52px; height: 52px; }
  .plat-logo-img { width: 28px; height: 28px; }

  /* Footer */
  .footer-nav { gap: 16px; }

  /* Section headers */
  .section-header { margin-bottom: 48px; }
}

/* ------------------------------------------
   16e. ≤ 480px — Mobile phones
   ------------------------------------------ */
@media (max-width: 480px) {
  :root { --section-gap: 56px; }
  .container { padding: 0 16px; }

  /* Header */
  .logo-img { height: 64px; }
  .theme-toggle { width: 34px; height: 34px; }
  .nav-toggle { padding: 4px; }

  /* Hero — hide complex workflow card, keep content clean */
  .hero-visual { display: none; }
  .hero-grid { gap: 0; }
  .hero-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric strong { font-size: 1.3rem; }
  .hero-actions { gap: 10px; }

  /* Section headers */
  .section-header { margin-bottom: 36px; }

  /* About */
  .value-item { flex-direction: row; }
  .value-icon { width: 32px; height: 32px; font-size: 1rem; }

  /* Service cards */
  .service-card { padding: 18px 16px; }
  .service-icon-wrap { width: 42px; height: 42px; }

  /* Portfolio */
  .proj-card { padding: 18px 16px; }
  .proj-stack { gap: 4px; }
  .proj-stack span { font-size: 0.62rem; padding: 2px 6px; }

  /* Contact */
  .contact-form-wrap { padding: 20px 16px; }

  /* Modal */
  .gallery-thumb { width: 52px; height: 40px; }
  .modal-project-title { font-size: 1.3rem; }
  .modal-content { padding: 10px 14px 18px; }

  /* Footer */
  .footer-nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
}

/* ------------------------------------------
   16f. ≤ 360px — Small phones
   ------------------------------------------ */
@media (max-width: 360px) {
  :root { --header-h: 58px; }
  .logo-img { height: 56px; }
  h1 { font-size: 1.85rem; }
  .btn-lg { font-size: 0.9rem; padding: 12px 20px; }
  .hero-metrics { gap: 8px; }
  .metric strong { font-size: 1.2rem; }
  .proj-card { padding: 16px 14px; }
}

/* ------------------------------------------
   16g. Touch devices (pointer: coarse)
   Replace hover-only effects with active-press feedback
   ------------------------------------------ */
@media (pointer: coarse) {
  /* Suppress hover transforms that never reset on touch */
  .proj-card:hover,
  .service-card:hover,
  .team-card:hover,
  .platform-pill:hover { transform: none; box-shadow: var(--shadow-card); }

  .btn-primary:hover,
  .btn-ghost:hover { transform: none; }

  /* Active (press-down) feedback */
  .proj-card:active    { transform: scale(0.98); transition: transform 0.1s; }
  .service-card:active { transform: scale(0.98); transition: transform 0.1s; }
  .team-card:active    { transform: scale(0.99); transition: transform 0.1s; }
  .btn-primary:active  { opacity: 0.85; }
  .btn-ghost:active    { opacity: 0.80; }
  .platform-pill:active { background: var(--clr-bg-hover); }
  .nav-link:active     { background: var(--clr-glow); color: var(--clr-white); }

  /* Minimum touch target sizes (WCAG 2.5.5) */
  .nav-link    { min-height: 44px; display: flex; align-items: center; }
  .nav-toggle  { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .theme-toggle { min-width: 44px; min-height: 44px; }
  .modal-close  { min-width: 44px; min-height: 44px; }
  .gallery-thumb { width: 72px; height: 54px; }

  /* Disable 3D tilt everywhere on touch */
  .workflow-card        { transform: none; }
  .workflow-card:hover  { transform: none; }

  /* Pause ticker animation on touch so users can read pills */
  .platform-inner:active { animation-play-state: paused; }
  .ticker-inner:active   { animation-play-state: paused; }
}

/* --------------------------------------------------
   17. Utility / Misc
   -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--clr-border-hi); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--clr-mid); }

::selection { background: rgba(0,128,128,0.35); color: #fff; }
