/* ============================================================
   PULSEQUANTUM SOLUTIONS — styles.css  (Apple-inspired)
   ============================================================ */


/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */
:root {
  color-scheme: light dark;
  /* Apple-inspired light palette */
  --c-bg:          #fafafa;
  --c-bg-alt:      #f5f5f7;
  --c-card:        #ffffff;
  --c-card-hover:  #f5f5f7;

  --c-accent:      #0071e3;
  --c-accent-dark: #0062cc;

  /* Legacy aliases (so no -undefined- values if referenced anywhere) */
  --c-blue-300:    #69b9ff;
  --c-blue-400:    #0071e3;
  --c-blue-500:    #0071e3;
  --c-blue-600:    #0062cc;
  --c-border-hi:   rgba(0, 113, 227, 0.28);

  --c-text-1:      #1d1d1f;
  --c-text-2:      #6e6e73;
  --c-text-3:      #86868b;

  --c-border:      rgba(0, 0, 0, 0.08);
  --c-border-mid:  rgba(0, 0, 0, 0.14);

  /* Shadows (replace glow effects) */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);

  /* Legacy glow names → neutral shadows */
  --glow-sm:      var(--shadow-sm);
  --glow-md:      var(--shadow-md);
  --glow-lg:      var(--shadow-lg);

  /* Typography — SF Pro on Apple devices, Inter elsewhere */
  --ff-head: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ff-body: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Layout */
  --max-w:     1200px;
  --nav-h:     52px;
  --sec-py:    6rem;

  /* Radius */
  --radius-s:  8px;
  --radius-m:  12px;
  --radius-l:  18px;
  --radius-xl: 24px;
  --ease:      0.3s ease;
}

/* ============================================================
   1b. DARK MODE CUSTOM PROPERTIES
   ============================================================ */
[data-theme="dark"] {
  color-scheme: dark;
  --c-bg:          #1c1c1e;
  --c-bg-alt:      #2c2c2e;
  --c-card:        #2c2c2e;
  --c-card-hover:  #3a3a3c;

  --c-accent:      #0a84ff;
  --c-accent-dark: #0070f0;

  --c-blue-300:    #5ac8fa;
  --c-blue-400:    #0a84ff;
  --c-blue-500:    #0a84ff;
  --c-blue-600:    #0070f0;
  --c-border-hi:   rgba(10, 132, 255, 0.30);

  --c-text-1:      #f5f5f7;
  --c-text-2:      #aeaeb2;
  --c-text-3:      #8e8e93;

  --c-border:      rgba(255, 255, 255, 0.08);
  --c-border-mid:  rgba(255, 255, 255, 0.14);

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.22);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.40), 0 1px 4px rgba(0,0,0,0.22);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.48), 0 2px 8px rgba(0,0,0,0.28);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.52), 0 4px 16px rgba(0,0,0,0.32);

  --glow-sm:  var(--shadow-sm);
  --glow-md:  var(--shadow-md);
  --glow-lg:  var(--shadow-lg);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--ff-body);
  background: var(--c-bg);
  color: var(--c-text-1);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--ff-body); background: none; border: none; }
img, svg { display: block; max-width: 100%; }
input, textarea, select { font-family: var(--ff-body); }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--ff-head);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--c-text-1);
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem);  font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }

p  { color: var(--c-text-2); line-height: 1.75; }

/* ============================================================
   4. UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: var(--sec-py) 0; position: relative; }

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 { margin: 0.5rem 0 1rem; }
.section-header p  { max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

.section-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--ff-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-accent);
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}

.gradient-text {
  background: linear-gradient(120deg, #0071e3 0%, #34aadc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.6rem;
  border-radius: 980px;
  font-family: var(--ff-head);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background var(--ease), box-shadow var(--ease), opacity var(--ease);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--c-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--c-accent-dark); }
.btn-primary:active { opacity: 0.85; }

.btn-ghost {
  background: transparent;
  color: var(--c-accent);
  border: 1.5px solid rgba(0, 113, 227, 0.32);
}
.btn-ghost:hover {
  background: rgba(0, 113, 227, 0.06);
  border-color: var(--c-accent);
}

.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 0.9rem;
  font-size: 1rem;
  border-radius: var(--radius-m);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
   6. NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  transition: background var(--ease), box-shadow var(--ease);
}

/* Remove the pseudo-element we no longer need */
.navbar::before { display: none; }

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text-1);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
  position: relative;
}
/* Remove the ping animation */
.logo-pulse::before { display: none; }

/* Nav links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--c-text-2);
  position: relative;
  transition: color var(--ease);
}
.nav-link::after { display: none; }
.nav-link:hover { color: var(--c-text-1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 1.1rem;
  background: var(--c-accent);
  color: #fff;
  border-radius: 980px;
  font-family: var(--ff-head);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--ease);
}
.nav-cta:hover {
  background: var(--c-accent-dark);
  box-shadow: none;
  transform: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--c-text-1);
  border-radius: 2px;
  transition: all var(--ease);
  transform-origin: center;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Nav actions group (toggle + hamburger) ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ── Theme toggle pill ── */
/*
   Pill:  50 × 28 px, no border (avoids centering math complexity)
   Thumb: 22 × 22 px, 3 px inset each side → (28−22)/2 = 3 ✓ perfectly centred
   Travel: 50 − 22 − 3 − 3 = 22 px → translateX(22px)
   Icons: 12 × 12 px, each centred in its thumb-position zone
          Sun  zone centre x = 3+11 = 14 → icon left = 14−6 = 8px
          Moon zone centre x = 50−14 = 36 → icon right = 14−6 = 8px
*/
.theme-toggle {
  position: relative;
  width: 50px;
  height: 28px;
  background: rgba(0, 0, 0, 0.09);
  border: none;
  border-radius: 100px;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.28s ease;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

.theme-toggle-thumb {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  /* Layered shadow: crisp bottom shadow + soft ambient */
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.10);
  top: 3px;
  left: 3px;
  transition: transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  will-change: transform;
}

.theme-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.22s ease, color 0.22s ease;
}
/* Sun: sits in the left-thumb zone */
.theme-icon-sun  { left: 8px;  color: #ff9f0a; opacity: 1; }
/* Moon: sits in the right-thumb zone */
.theme-icon-moon { right: 8px; color: #8e8e93; opacity: 0.42; }

/* ── Dark mode toggle ── */
[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.13);
}
[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(22px);
  background: #48484a;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.50),
    0 2px 6px rgba(0, 0, 0, 0.30);
}
[data-theme="dark"] .theme-icon-sun  { opacity: 0.32; color: #636366; }
[data-theme="dark"] .theme-icon-moon { opacity: 1;    color: #e5e5ea; }

/* Dark mode: navbar */
[data-theme="dark"] .navbar {
  background: rgba(28, 28, 30, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .navbar.scrolled {
  background: rgba(28, 28, 30, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================================
   7. HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
  background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 55%);
}

/* Hide all decorative animated background elements */
.hero-bg,
.hero-grid,
.pulse-rings,
.pulse-ring { display: none; }

.hero-bg::after { display: none; }

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 4rem;
  padding-bottom: 6rem;
}

.hero-content { max-width: 800px; }

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 113, 227, 0.08);
  border: none;
  border-radius: 980px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--c-accent);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  animation: none;
  flex-shrink: 0;
}

/* Headline */
.hero-headline { margin-bottom: 1.4rem; }

/* Tagline with heartbeat */
.hero-tagline {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.heartbeat-wrap {
  width: 200px;
  height: 34px;
  overflow: visible;
}
.heartbeat-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.heartbeat-line {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw-ecg 3s ease-in-out infinite;
}
@keyframes draw-ecg {
  0%   { stroke-dashoffset: 340; opacity: 0; }
  8%   { stroke-dashoffset: 340; opacity: 1; }
  58%  { stroke-dashoffset: 0;   opacity: 1; }
  78%  { stroke-dashoffset: 0;   opacity: 0; }
  100% { stroke-dashoffset: 340; opacity: 0; }
}

.tagline-text {
  font-family: var(--ff-head);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 500;
  color: var(--c-accent);
  letter-spacing: -0.02em;
  animation: none;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--c-text-2);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Dark mode: hero background */
[data-theme="dark"] .hero {
  background: #1c1c1e;
}

/* Dark mode: gradient text */
[data-theme="dark"] .gradient-text {
  background: linear-gradient(120deg, #0a84ff 0%, #5ac8fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hide scroll indicator */
.scroll-indicator { display: none; }

/* ============================================================
   8. SERVICES
   ============================================================ */
.services {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  padding: 2.2rem 2rem;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
  position: relative;
  overflow: hidden;
}
.service-card::before { display: none; }
.service-card:hover {
  border-color: var(--c-border-mid);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--c-bg);
}

.card-icon {
  width: 48px; height: 48px;
  background: rgba(0, 113, 227, 0.08);
  border: none;
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-accent);
  margin-bottom: 1.2rem;
  transition: background var(--ease);
}
.card-icon svg { width: 22px; height: 22px; }
.service-card:hover .card-icon {
  background: rgba(0, 113, 227, 0.13);
  box-shadow: none;
}

.service-card h3 { margin-bottom: 0.75rem; }
.service-card p  { font-size: 0.95rem; margin-bottom: 1.3rem; }

.card-features { display: flex; flex-direction: column; gap: 0.45rem; }
.card-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--c-text-3);
}
.card-features li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
}

/* ============================================================
   9. WHY US
   ============================================================ */
.why-us {
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.trust-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.8rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.trust-item:hover {
  border-color: var(--c-border-mid);
  box-shadow: var(--shadow-sm);
}

.trust-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: rgba(0, 113, 227, 0.08);
  border: none;
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-accent);
  margin-top: 0.05rem;
}
.trust-icon svg { width: 20px; height: 20px; }

.trust-content h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.trust-content p  { font-size: 0.95rem; line-height: 1.72; }

/* ============================================================
   10. HOW IT WORKS
   ============================================================ */
.how-it-works { background: var(--c-bg); }

.steps-container {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 1050px;
  margin: 0 auto;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.step-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.3rem;
}

.step-number {
  font-family: var(--ff-head);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--c-accent);
  background: rgba(0, 113, 227, 0.08);
  border: none;
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
}

.step-icon {
  width: 72px; height: 72px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-accent);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.step-icon svg { width: 26px; height: 26px; }
.step:hover .step-icon {
  border-color: var(--c-border-mid);
  box-shadow: var(--shadow-md);
  background: var(--c-bg);
}

.step h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.step p   { font-size: 0.95rem; line-height: 1.72; }

/* Arrow divider between steps */
.step-divider {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 3.2rem;
  color: var(--c-text-3);
  opacity: 0.5;
}
.step-divider svg { width: 20px; height: 20px; }

/* ============================================================
   11. CONTACT
   ============================================================ */
.contact {
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 5rem;
  align-items: start;
}

.contact-info { padding-top: 0.5rem; }
.contact-info .section-label { margin-bottom: 1rem; display: block; }
.contact-info h2 { margin-bottom: 1rem; }
.contact-info > p { font-size: 1rem; line-height: 1.78; margin-bottom: 2rem; }

.contact-points { display: flex; flex-direction: column; gap: 0.9rem; }
.contact-point {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--c-text-2);
}
.contact-point svg {
  width: 18px; height: 18px;
  color: var(--c-accent);
  flex-shrink: 0;
}

/* Form wrapper card */
.contact-form-wrap {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-text-1);
}
.form-group label span { color: var(--c-accent); }

.form-group input,
.form-group textarea {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  padding: 0.78rem 1rem;
  color: var(--c-text-1);
  font-size: 0.95rem;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
  outline: none;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--c-text-3); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--c-accent);
  background: var(--c-bg);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.10);
}

/* Select custom styling */
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  padding: 0.78rem 2.5rem 0.78rem 1rem;
  color: var(--c-text-1);
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}
.select-wrap select option { background: var(--c-bg); color: var(--c-text-1); }
.select-wrap select:focus {
  border-color: var(--c-accent);
  background: var(--c-bg);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.10);
}
.select-wrap select:invalid { color: var(--c-text-3); }
.select-arrow {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--c-text-3);
  pointer-events: none;
}

.form-group textarea { resize: vertical; min-height: 110px; }

/* Submit button spinner */
.spinner {
  width: 18px; height: 18px;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success state */
.form-success {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.2rem 1.25rem;
  background: rgba(52, 199, 89, 0.07);
  border: 1px solid rgba(52, 199, 89, 0.22);
  border-radius: var(--radius-m);
}
.form-success svg {
  width: 22px; height: 22px;
  color: #34c759;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.form-success strong { display: block; color: #28a745; font-size: 0.95rem; margin-bottom: 0.2rem; }
.form-success p { font-size: 0.88rem; margin: 0; color: var(--c-text-2); }

/* ---- Security service card (full-width featured) ---- */
.service-card--security {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "badge badge"
    "icon  content";
  column-gap: 2rem;
  row-gap: 0;
  align-items: start;
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.05) 0%, var(--c-bg-alt) 55%);
  border-color: rgba(52, 199, 89, 0.18);
  position: relative;
}

.service-card--security::after { display: none; }

.service-card--security:hover {
  border-color: rgba(52, 199, 89, 0.32);
  box-shadow: var(--shadow-md);
}

.card-security-badge {
  grid-area: badge;
  display: inline-flex;
  align-items: center;
  font-family: var(--ff-head);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
  width: fit-content;
  background: rgba(52, 199, 89, 0.10);
  border: none;
  color: #28a745;
}

.service-card--security .card-icon--security {
  grid-area: icon;
  align-self: start;
  margin-top: 0.1rem;
  margin-bottom: 0;
  background: rgba(52, 199, 89, 0.08);
  border: none;
  color: #28a745;
}
.service-card--security:hover .card-icon--security {
  background: rgba(52, 199, 89, 0.14);
  box-shadow: none;
}

.security-card-content { grid-area: content; }
.security-card-content h3 { margin-bottom: 0.75rem; }
.security-card-content p  { font-size: 0.95rem; margin-bottom: 1.3rem; }

.security-card-content .card-features li::before { background: #28a745; }

/* ============================================================
   12. AUTOMATIONS
   ============================================================ */
.automations {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
}

.automations-subhead {
  font-family: var(--ff-head);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--c-text-1);
  margin: 0.5rem auto 0.5rem;
  max-width: none;
}

.automations-intro { margin-top: 0 !important; }

/* ---- Department Tabs ---- */
.dept-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.8rem;
}

.dept-tab {
  font-family: var(--ff-head);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.42rem 1.1rem;
  border-radius: 100px;
  border: 1px solid var(--c-border-mid);
  color: var(--c-text-2);
  background: transparent;
  cursor: pointer;
  transition: all var(--ease);
  letter-spacing: -0.01em;
}

.dept-tab:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: rgba(0, 113, 227, 0.05);
}

.dept-tab.active {
  background: var(--c-accent);
  border-color: transparent;
  color: #fff;
}

.dept-tab--security.active {
  background: #28a745;
  border-color: transparent;
  color: #fff;
}

.dept-tab--security:hover:not(.active) {
  border-color: #28a745;
  color: #28a745;
  background: rgba(40, 167, 69, 0.05);
}

.dept-hidden { display: none !important; }

/* 3-column grid */
.automations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ---- Base card ---- */
.auto-card {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  padding: 1.75rem 1.6rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), background var(--ease);
  display: flex;
  flex-direction: column;
}

.auto-card::before { display: none; }

.auto-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-mid);
  box-shadow: var(--shadow-md);
  background: var(--c-bg);
}

/* ---- Badge ---- */
.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--ff-head);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  margin-bottom: 0.85rem;
  width: fit-content;
  border: none;
}
.auto-badge svg { flex-shrink: 0; }

.auto-badge--priority {
  background: rgba(255, 149, 0, 0.10);
  color: #c96a00;
}

.auto-badge--ai {
  background: rgba(0, 113, 227, 0.08);
  color: var(--c-accent);
}

/* ---- Emoji icon ---- */
.auto-card-emoji {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 0.85rem;
  font-variant-emoji: emoji;
}

/* ---- Card title ---- */
.auto-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
  line-height: 1.3;
}

/* ---- Bullet list ---- */
.auto-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.auto-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--c-text-2);
  line-height: 1.55;
}

.auto-card-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

/* ---- AI card ---- */
.auto-card--ai {
  background: rgba(0, 113, 227, 0.04);
  border-color: rgba(0, 113, 227, 0.14);
}
.auto-card--ai::after { display: none; }
.auto-card--ai:hover {
  background: var(--c-bg);
  border-color: rgba(0, 113, 227, 0.22);
}
.auto-card--ai .auto-card-list li::before { background: var(--c-accent); }

/* ---- Security auto card ---- */
.auto-card--security {
  background: rgba(40, 167, 69, 0.04);
  border-color: rgba(40, 167, 69, 0.14);
}
.auto-card--security::after { display: none; }
.auto-card--security:hover {
  background: var(--c-bg);
  border-color: rgba(40, 167, 69, 0.22);
}
.auto-card--security .auto-card-list li::before { background: #28a745; }

.auto-badge--security {
  background: rgba(40, 167, 69, 0.10);
  color: #28a745;
}

/* ---- Section CTA ---- */
.automations-cta {
  text-align: center;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.automations-cta p {
  font-size: 0.875rem;
  color: var(--c-text-3);
  margin: 0;
}

/* ============================================================
   13. FOOTER
   ============================================================ */
.footer {
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--ff-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-text-1);
  margin-bottom: 0.4rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--c-text-3);
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.875rem;
  color: var(--c-text-2);
  transition: color var(--ease);
}
.footer-nav a:hover { color: var(--c-text-1); }

.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding-top: 1.5rem;
  text-align: center;
}
.footer-bottom p { font-size: 0.82rem; color: var(--c-text-3); }

/* ============================================================
   14. SCROLL ANIMATIONS
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   15. RESPONSIVE — TABLET  (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sec-py: 5rem; }

  .automations-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 700px;
    margin: 0 auto;
  }

  .steps-container {
    flex-direction: column;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
    gap: 0.5rem;
  }
  .step { padding: 1.5rem 0; width: 100%; }
  .step-divider {
    padding-top: 0;
    transform: rotate(90deg);
  }
}

/* ============================================================
   16. RESPONSIVE — MOBILE  (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --sec-py: 4rem; }

  body.menu-open { overflow: hidden; }

  .nav-toggle { display: flex; }

  /* Mobile overlay — position:absolute off the fixed navbar avoids
     the backdrop-filter containing-block bug in Chromium/Safari */
  .navbar { overflow: visible; }
  .nav-menu {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    z-index: 99;
    background: var(--c-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease);
    border-top: 1px solid var(--c-border);
  }
  .nav-menu.open { opacity: 1; pointer-events: auto; }
  .nav-link { font-size: 1.15rem; color: var(--c-text-1); }
  .nav-cta  { font-size: 1rem; padding: 0.65rem 1.8rem; }

  .services-grid    { grid-template-columns: 1fr; }
  .trust-grid       { grid-template-columns: 1fr; }
  .automations-grid { grid-template-columns: 1fr; }

  .service-card--security {
    grid-template-columns: 1fr;
    grid-template-areas:
      "badge"
      "icon"
      "content";
  }
  .trust-item    { flex-direction: column; text-align: center; align-items: center; }
  .trust-content { text-align: left; }

  .form-row { grid-template-columns: 1fr; gap: 1.2rem; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   17. RESPONSIVE — SMALL MOBILE  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root { --sec-py: 3.5rem; }

  .container { padding: 0 1.25rem; }
  .nav-container { padding: 0 1.25rem; }

  .contact-form-wrap { padding: 1.75rem 1.25rem; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-logo  { justify-content: center; }
  .footer-nav   { justify-content: center; gap: 1.5rem; }

  .step { padding: 1rem 0; }
  .step-icon { width: 64px; height: 64px; }
  .step-icon svg { width: 22px; height: 22px; }
}

/* ============================================================
   18. DARK MODE — COMPONENT OVERRIDES
   ============================================================ */

/* Mobile nav menu — scoped to mobile only; var(--c-bg) already handles the dark value */
@media (max-width: 768px) {
  [data-theme="dark"] .nav-menu {
    border-top-color: rgba(255, 255, 255, 0.06);
  }
}

/* Security card — tweak green tint for dark */
[data-theme="dark"] .service-card--security {
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.06) 0%, var(--c-bg-alt) 55%);
  border-color: rgba(52, 199, 89, 0.16);
}

/* Auto-card security in dark */
[data-theme="dark"] .auto-card--security {
  background: rgba(40, 167, 69, 0.06);
  border-color: rgba(40, 167, 69, 0.16);
}
[data-theme="dark"] .auto-card--security:hover {
  background: var(--c-bg-alt);
}

/* AI card in dark */
[data-theme="dark"] .auto-card--ai {
  background: rgba(10, 132, 255, 0.05);
  border-color: rgba(10, 132, 255, 0.15);
}
[data-theme="dark"] .auto-card--ai:hover {
  background: var(--c-bg-alt);
}

/* Form select options — inherit bg in dark */
[data-theme="dark"] .select-wrap select option {
  background: #2c2c2e;
  color: #f5f5f7;
}

/* Smooth transition for theme switch */
body,
.navbar,
.hero,
.section,
.service-card,
.trust-item,
.auto-card,
.contact-form-wrap,
.footer,
.step-icon,
.form-group input,
.form-group textarea,
.select-wrap select {
  transition: background-color 0.3s ease, background 0.3s ease,
              border-color 0.3s ease, color 0.3s ease;
}

/* nav-menu needs opacity for mobile open/close AND background for theme switch */
.nav-menu {
  transition: opacity var(--ease), background-color 0.3s ease, border-color 0.3s ease;
}
