/* ==========================================================================
   IdealWebConstruct — Futuristic Dark Martech Theme (v2 — Refined)
   ========================================================================== */

/* ---------- Custom Properties ---------- */
/* Design Strategy (inspired by Marcelo Design X):
   - Solid accent colors only — no decorative gradients
   - Teal (#06b6d4) = Primary brand accent (trust, technology)
   - Amber (#f59e0b) = Action accent (CTAs, conversion)
   - Deep navy backgrounds + warm gray text = Authority + readability
   - Weight & size contrast for emphasis, not color variety */
:root {
  /* Backgrounds — deep navy undertone (authority, sophistication) */
  --bg-deep: #050510;
  --bg-primary: #0a0a1a;
  --bg-elevated: #10102a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.10);
  --border-accent: rgba(6, 182, 212, 0.30);

  /* Brand accent — teal (trust, technology, reliability) */
  --accent-teal: #06b6d4;

  /* Action accent — amber (CTAs, conversion) */
  --accent-amber: #f59e0b;
  --accent-warm: #fbbf24;

  /* Accent aliases — single solid-color system inspired by Marcelo Design X */
  --glow-subtle: rgba(6, 182, 212, 0.08);
  --glow-hover: rgba(6, 182, 212, 0.15);

  /* Text — warmer grays for approachability & readability */
  --text-primary: #eceef3;
  --text-secondary: #94a0b8;
  --text-dim: #6e7687;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --nav-height: 80px;
  --container-max: 1200px;
  --section-pad: clamp(80px, 14vw, 220px);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea {
  font: inherit;
  color: inherit;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 480px) {
  .container {
    padding: 0 28px;
  }
}

.gradient-text {
  color: var(--accent-teal);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent-teal);
  margin-bottom: 24px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent-teal);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  padding: 16px 36px;
  transition: all 0.35s var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
}

/* Primary CTA — solid amber for action & conversion */
.btn--primary {
  background: var(--accent-amber);
  color: #1a1000;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.18);
}

.btn--primary:hover {
  background: var(--accent-warm);
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.28);
  transform: translateY(-3px);
}

/* Ghost button — cool teal accent for trust & contrast with warm CTA */
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.12);
  transform: translateY(-2px);
}

.btn--small {
  padding: 12px 26px;
  font-size: 0.88rem;
}

.btn--full {
  width: 100%;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}

.nav--scrolled {
  background: rgba(4, 4, 12, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 var(--border-subtle), 0 8px 32px rgba(0,0,0,0.2);
}

.nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 28px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}

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

.nav__logo-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--accent-teal);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-teal);
  transition: width 0.3s var(--ease-out);
  border-radius: 1px;
}

.nav__links a:hover {
  color: var(--text-primary);
}

.nav__links a:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__links a.active {
  color: var(--text-primary);
}

.nav__cta {
  z-index: 1001;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 1001;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
}

.nav__toggle:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 4, 12, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
  }

  .nav__links.active {
    opacity: 1;
    pointer-events: all;
  }

  .nav__links a {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .nav__cta--desktop {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Mobile CTA inside overlay */
.nav__links .nav__cta--mobile {
  display: none;
}

@media (max-width: 767px) {
  .nav__links .nav__cta--mobile {
    display: inline-flex;
    margin-top: 8px;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--nav-height) 0 100px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
  will-change: transform;
}

.hero__orb--1 {
  width: 350px;
  height: 350px;
  background: var(--accent-teal);
  top: -15%;
  right: -8%;
  animation: floatOrb1 25s ease-in-out infinite;
}

.hero__orb--2 {
  width: 300px;
  height: 300px;
  background: var(--accent-teal);
  bottom: -15%;
  left: -12%;
  animation: floatOrb2 30s ease-in-out infinite;
  opacity: 0.18;
}

.hero__orb--3 {
  width: 220px;
  height: 220px;
  background: var(--accent-teal);
  top: 35%;
  left: 45%;
  animation: floatOrb3 20s ease-in-out infinite;
  opacity: 0.10;
}

/* Desktop: larger orbs + heavier blur */
@media (min-width: 768px) {
  .hero__orb {
    filter: blur(120px);
    opacity: 0.30;
  }

  .hero__orb--1 {
    width: 700px;
    height: 700px;
  }

  .hero__orb--2 {
    width: 600px;
    height: 600px;
  }

  .hero__orb--3 {
    width: 450px;
    height: 450px;
  }
}

@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-80px, 50px) scale(1.08); }
  66% { transform: translate(40px, -40px) scale(0.94); }
}

@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -50px) scale(1.1); }
  66% { transform: translate(-50px, 30px) scale(0.92); }
}

@keyframes floatOrb3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-100px, 50px); }
}

.hero__grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 48px 48px;
}

.hero__3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
}

.hero__title {
  font-size: clamp(2.8rem, 9vw, 7rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.15s forwards;
}

@media (min-width: 768px) {
  .hero__title {
    animation: fadeUp 1.1s var(--ease-out) 0.2s forwards;
  }
}

.hero__sub {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 44px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.3s forwards;
}

@media (min-width: 768px) {
  .hero__sub {
    margin: 0 auto 52px;
    animation: fadeUp 1s var(--ease-out) 0.5s forwards;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.45s forwards;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions .btn {
  flex: 1 1 100%;
}

@media (min-width: 520px) {
  .hero__actions {
    max-width: none;
  }

  .hero__actions .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 768px) {
  .hero__actions {
    animation: fadeUp 1s var(--ease-out) 0.8s forwards;
  }
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.4s forwards;
}

.hero__scroll span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: var(--accent-teal);
  opacity: 0.5;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================================================
   TECH MARQUEE — Scrolling tools ribbon
   ========================================================================== */
.marquee {
  padding: 28px 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
}

.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary), transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(90deg, transparent, var(--bg-primary));
}

.marquee__track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marqueeScroll 40s linear infinite;
}

.marquee__track:hover {
  animation-play-state: paused;
}

.marquee__item {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

.marquee__item:hover {
  color: var(--accent-teal);
}

.marquee__item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-teal);
  opacity: 0.4;
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about {
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 50%, transparent);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: start;
  }
}

.about__text p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 1.15rem;
  max-width: 600px;
  line-height: 1.85;
}

.about__pillars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pillar {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s, transform 0.4s;
  position: relative;
  overflow: hidden;
}

.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent-teal);
  transition: height 0.5s var(--ease-out);
  border-radius: 0 0 2px 0;
}

.pillar:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 40px rgba(6, 182, 212, 0.06);
  transform: translateX(4px);
}

.pillar:hover::before {
  height: 100%;
}

.pillar__icon {
  margin-bottom: 16px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.1);
}

.pillar h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.pillar p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services {
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
  position: relative;
}

.services > .container > .section-title {
  margin-bottom: 80px;
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  position: relative;
  padding: 40px 32px 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.4s, background 0.4s, transform 0.4s, box-shadow 0.4s;
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(6, 182, 212, 0.06);
}

.service-card__icon {
  margin-bottom: 24px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--glow-subtle);
  border: 1px solid rgba(6, 182, 212, 0.12);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.service-card:hover .service-card__icon {
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.18);
}

.service-card__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.service-card__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

a.service-card--link {
  display: block;
  cursor: pointer;
}

a.service-card--link:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(245, 158, 11, 0.08);
}

.service-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-amber);
  transition: gap 0.3s, color 0.3s;
}

.service-card:hover .service-card__cta {
  gap: 10px;
}

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process {
  padding: var(--section-pad) 0;
  background: var(--bg-deep);
  position: relative;
}

.process::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 50%, transparent);
}

.process > .container > .section-title {
  margin-bottom: 80px;
}

.process__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 720px;
}

@media (min-width: 768px) {
  .process__steps {
    max-width: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (min-width: 1024px) {
  .process__steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.process__step {
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.4s, background 0.4s, transform 0.4s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.process__step::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.process__step:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.process__step:hover::after {
  transform: scaleX(1);
}

.process__step-number {
  font-family: var(--font-mono);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--accent-teal);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 24px;
}

.process__step-content h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.process__step-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 50%, transparent);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}

@media (min-width: 768px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
  }
}

.contact__info p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 480px;
  line-height: 1.8;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-teal);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.contact__email:hover {
  color: var(--text-primary);
}

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

.contact__email svg {
  display: inline-block;
  flex-shrink: 0;
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

@media (min-width: 480px) {
  .contact__form {
    padding: 36px;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-teal);
  background: rgba(6, 182, 212, 0.02);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.08);
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: 56px 0 36px;
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
}

.footer__brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 14px;
  max-width: 300px;
}

.footer__nav {
  display: flex;
  gap: 32px;
}

.footer__nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.footer__nav a:hover {
  color: var(--accent-teal);
}

.footer__nav a:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer__bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.footer__bottom p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ==========================================================================
   FUNNEL ENGINEERING PAGE
   ========================================================================== */

/* Sub-page hero — shorter, no scroll indicator */
.hero--sub {
  min-height: 85vh;
}

.hero--sub .hero__scroll {
  display: none;
}

/* Platforms section */
.platforms {
  padding: var(--section-pad) 0;
  background: var(--bg-deep);
  position: relative;
}

.platforms::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 50%, transparent);
}

.platforms__intro {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 620px;
  margin-bottom: 56px;
  line-height: 1.8;
}

.platforms__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .platforms__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .platforms__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.platform-card {
  padding: 36px 30px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s, transform 0.4s;
}

.platform-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.06);
  transform: translateY(-4px);
}

.platform-card__name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.platform-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.platform-card__list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}

.platform-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-teal);
  opacity: 0.5;
}

.platform-card--more {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.platform-card__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Tech stack section */
.stack {
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
  position: relative;
}

.stack::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 50%, transparent);
}

.stack__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 640px) {
  .stack__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stack__group {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.stack__group-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.stack__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack__tag {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.3s;
}

.stack__tag:hover {
  border-color: var(--border-accent);
  color: var(--accent-teal);
  background: rgba(6, 182, 212, 0.04);
  transform: translateY(-2px);
}

/* 3-step process variant */
@media (min-width: 768px) {
  .process__steps--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .process__steps--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Performance / Why Us section */
.performance {
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
  position: relative;
}

.performance::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 50%, transparent);
}

.performance__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .performance__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.performance__item {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.4s, background 0.4s, transform 0.4s, box-shadow 0.4s;
}

.performance__item:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.performance__item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.performance__item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Select / Dropdown styling */
.form-group select {
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238892b0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}

.form-group select:focus {
  border-color: var(--accent-teal);
  background-color: rgba(6, 182, 212, 0.02);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.08);
}

.form-group select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ==========================================================================
   ANIMATIONS — Scroll Reveal
   ========================================================================== */
/* Scroll reveal — mobile-first (lightweight), then enhanced for desktop */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Desktop: add blur + scale for cinematic Apple-style reveal */
@media (min-width: 768px) {
  .reveal {
    transform: translateY(40px) scale(0.97);
    filter: blur(8px);
    transition:
      opacity 1s var(--ease-out),
      transform 1s var(--ease-out),
      filter 1s var(--ease-out);
  }

  .reveal.revealed {
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
  .reveal:nth-child(5) { transition-delay: 0.4s; }
  .reveal:nth-child(6) { transition-delay: 0.5s; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(32px) scale(0.97); filter: blur(6px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  }

  @keyframes fadeIn {
    from { opacity: 0; filter: blur(4px); }
    to { opacity: 1; filter: blur(0); }
  }
}

/* ==========================================================================
   LIGHT THEME — Auto-syncs with macOS / system appearance
   ========================================================================== */
@media (prefers-color-scheme: light) {
  :root {
    --bg-deep: #f5f6fa;
    --bg-primary: #ffffff;
    --bg-elevated: #edf0f7;
    --bg-card: rgba(0, 0, 0, 0.025);
    --bg-card-hover: rgba(0, 0, 0, 0.05);

    --border-subtle: rgba(0, 0, 0, 0.07);
    --border-light: rgba(0, 0, 0, 0.12);
    --border-accent: rgba(8, 145, 178, 0.30);

    --accent-teal: #0891b2;
    --accent-amber: #d97706;
    --accent-warm: #d97706;
    --glow-subtle: rgba(8, 145, 178, 0.06);
    --glow-hover: rgba(8, 145, 178, 0.12);

    --text-primary: #1a1a2e;
    --text-secondary: #4b5563;
    --text-dim: #6b7280;
  }

  /* Navigation */
  .nav--scrolled {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 0 var(--border-subtle), 0 4px 24px rgba(0, 0, 0, 0.06);
  }

  /* Hero orbs — softer on light backgrounds */
  .hero__orb {
    opacity: 0.18;
  }

  .hero__orb--3 {
    opacity: 0.10;
  }

  /* Grid overlay — dark dots instead of white */
  .hero__grid-overlay {
    background-image:
      radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.04) 1px, transparent 0);
  }

  /* Primary button — solid amber on light backgrounds */
  .btn--primary {
    color: #fff;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.12);
  }

  .btn--primary:hover {
    box-shadow: 0 8px 28px rgba(217, 119, 6, 0.22);
  }

  /* Ghost button */
  .btn--ghost {
    backdrop-filter: none;
  }

  .btn--ghost:hover {
    box-shadow: 0 0 20px rgba(8, 145, 178, 0.06);
  }

  /* Service card */
  .service-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 40px rgba(8, 145, 178, 0.04);
  }

  .service-card__icon {
    background: var(--glow-subtle);
    border-color: rgba(8, 145, 178, 0.14);
  }

  .service-card:hover .service-card__icon {
    box-shadow: 0 0 24px rgba(8, 145, 178, 0.12);
  }

  /* Pillar */
  .pillar:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
  }

  .pillar__icon {
    background: rgba(8, 145, 178, 0.07);
    border-color: rgba(8, 145, 178, 0.14);
  }

  /* Process step hover */
  .process__step:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
  }

  /* Contact form card */
  .contact__form {
    background: rgba(0, 0, 0, 0.015);
    border-color: rgba(0, 0, 0, 0.08);
  }

  /* Form inputs */
  .form-group input,
  .form-group textarea {
    background: rgba(0, 0, 0, 0.02);
  }

  .form-group input:focus,
  .form-group textarea:focus {
    background: rgba(8, 145, 178, 0.03);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.10);
  }

  /* Selection */
  ::selection {
    background: rgba(8, 145, 178, 0.20);
    color: var(--text-primary);
  }

  /* Select dropdown */
  .form-group select {
    background-color: rgba(0, 0, 0, 0.02);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234b5563' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .form-group select:focus {
    background-color: rgba(8, 145, 178, 0.03);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.10);
  }

  .form-group select option {
    background: #fff;
    color: var(--text-primary);
  }

  /* Platform card hover */
  .platform-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  }

  /* Stack tag hover */
  .stack__tag:hover {
    border-color: rgba(8, 145, 178, 0.30);
    background: rgba(8, 145, 178, 0.04);
  }

  /* Performance item hover */
  .performance__item:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  }

  /* Marquee */
  .marquee {
    background: var(--bg-deep);
    border-color: rgba(0, 0, 0, 0.06);
  }

  .marquee::before {
    background: linear-gradient(90deg, var(--bg-deep), transparent);
  }

  .marquee::after {
    background: linear-gradient(90deg, transparent, var(--bg-deep));
  }

  /* Scrollbar */
  ::-webkit-scrollbar-track {
    background: var(--bg-deep);
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.14);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.22);
  }
}

/* Mobile nav overlay — light mode */
@media (max-width: 767px) and (prefers-color-scheme: light) {
  .nav__links {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

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

  .hero__orb {
    animation: none;
  }

  .marquee__track {
    animation: none;
  }
}

/* ==========================================================================
   SELECTION & SCROLLBAR
   ========================================================================== */
::selection {
  background: rgba(6, 182, 212, 0.25);
  color: var(--text-primary);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}
