/* ==========================================================================
   ATT Elektrik Otomasyon — Design System & Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand colors (from logo) */
  --navy-950: #05070d;
  --navy-900: #090d18;
  --navy-850: #0c1120;
  --navy-800: #10172a;
  --navy-700: #182036;
  --navy-600: #2a3352;
  --navy-500: #3f4a6e;

  --red-700: #7e161a;
  --red-600: #a01e22;
  --red-500: #c4272c;
  --red-400: #e0454a;
  --red-glow: rgba(196, 39, 44, 0.35);

  --white: #ffffff;
  --off-white: #f5f6fa;
  --gray-100: #edeff4;
  --gray-200: #e2e5ec;
  --gray-300: #d2d6e0;
  --gray-500: #6b7280;
  --gray-600: #545b6b;
  --gray-700: #383e4c;

  --text-on-dark: #f3f5f9;
  --text-muted-on-dark: #9aa3b8;
  --text-on-light: #10152a;
  --text-muted-on-light: #5b6273;

  /* Typography */
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Layout */
  --container-max: 1240px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur-base: 300ms;
  --dur-slow: 550ms;

  --shadow-sm: 0 2px 10px rgba(5, 7, 13, 0.06);
  --shadow-md: 0 12px 32px rgba(5, 7, 13, 0.12);
  --shadow-lg: 0 24px 64px rgba(5, 7, 13, 0.22);
  --shadow-red: 0 12px 32px rgba(160, 30, 34, 0.28);
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body, h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

html, body {
  min-height: 100dvh;
}

body {
  background: var(--off-white);
  color: var(--text-on-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-on-light);
}

.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--text-on-dark); }

::selection { background: var(--red-600); color: #fff; }

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-7); }
}

section { position: relative; }

.section-pad { padding-block: var(--space-9); }
@media (max-width: 767px) {
  .section-pad { padding-block: var(--space-8); }
}

.dark-section {
  background: var(--navy-950);
  color: var(--text-on-dark);
}

/* ==========================================================================
   Typography helpers
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-500);
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-600);
  box-shadow: 0 0 0 4px rgba(160, 30, 34, 0.18);
}

h2.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  margin-top: var(--space-3);
}

.section-lede {
  max-width: 640px;
  font-size: 1.08rem;
  color: var(--text-muted-on-light);
  margin-top: var(--space-4);
}

.dark .section-lede { color: var(--text-muted-on-dark); }

.section-head {
  max-width: 760px;
  margin-bottom: var(--space-8);
}
.section-head.center { margin-inline: auto; text-align: center; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--dur-base) var(--ease-out); }

.btn-primary {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(160, 30, 34, 0.38); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.32); transform: translateY(-2px); }

.btn-outline-dark {
  background: transparent;
  color: var(--text-on-light);
  border: 1.5px solid var(--gray-300);
}
.btn-outline-dark:hover { border-color: var(--navy-900); background: var(--navy-900); color: #fff; transform: translateY(-2px); }

.btn-block { width: 100%; justify-content: center; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding-block: var(--space-4);
  transition: padding var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.site-header.is-scrolled {
  padding-block: var(--space-2);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 rgba(16, 21, 42, 0.06), var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.brand img { height: 64px; width: auto; transition: height var(--dur-base) var(--ease-out); }
.site-header.is-scrolled .brand img { height: 52px; }
.brand .logo-scrolled { display: none; }
.site-header.is-scrolled .brand .logo-top { display: none; }
.site-header.is-scrolled .brand .logo-scrolled { display: block; }
/* Mobile menu overlay is always dark, regardless of scroll state — keep the light logo visible above it */
.nav-open .brand .logo-top { display: block !important; }
.nav-open .brand .logo-scrolled { display: none !important; }

.main-nav { display: flex; align-items: center; gap: var(--space-6); }

.nav-mobile-panel { display: none; }

.nav-links { display: flex; align-items: center; gap: var(--space-5); }
.nav-links a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-on-dark);
  padding-block: 4px;
  transition: color var(--dur-fast) var(--ease-out);
}
.is-scrolled .nav-links a { color: var(--text-on-light); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--red-600);
  transition: right var(--dur-base) var(--ease-out);
}
.nav-links a:hover { color: var(--red-500); }
.nav-links a:hover::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: var(--space-4); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-on-dark);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-pill);
  padding: 6px 6px;
}
.is-scrolled .lang-switch { color: var(--text-on-light); border-color: var(--gray-300); }
.lang-switch a { padding: 4px 9px; border-radius: var(--radius-pill); transition: background var(--dur-fast), color var(--dur-fast); }
.lang-switch a.active { background: var(--red-600); color: #fff; }
.lang-switch a:not(.active):hover { background: rgba(160,30,34,0.12); color: var(--red-500); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  z-index: 2;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  width: 22px; height: 2px;
  background: var(--text-on-dark);
  border-radius: 2px;
  position: relative;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), background var(--dur-base);
}
.is-scrolled .nav-toggle span, .is-scrolled .nav-toggle span::before, .is-scrolled .nav-toggle span::after { background: var(--text-on-light); }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); background: var(--text-on-dark); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); background: var(--text-on-dark); }

@media (max-width: 960px) {
  .nav-links, .nav-actions .btn-primary { display: none; }
  .main-nav {
    display: contents;
  }
  .nav-toggle { display: flex; }
  .nav-mobile-panel {
    position: fixed;
    inset: 0;
    height: 100dvh;
    background: var(--navy-950);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--space-4);
    padding: 132px var(--space-6) var(--space-7);
    overflow-y: auto;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow) var(--ease-out), visibility 0s var(--dur-slow);
    z-index: 1;
  }
  .nav-open .nav-mobile-panel {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow) var(--ease-out), visibility 0s;
  }
  .nav-mobile-panel a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-on-dark);
  }
  .nav-mobile-panel .btn-primary { margin-top: var(--space-4); }
  .nav-mobile-panel .lang-switch { color: var(--text-on-dark); border-color: rgba(255,255,255,0.22); flex-shrink: 0; margin-bottom: var(--space-4); }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background: radial-gradient(120% 90% at 85% -10%, rgba(160, 30, 34, 0.22), transparent 55%),
              radial-gradient(80% 60% at 10% 110%, rgba(63, 74, 110, 0.28), transparent 60%),
              var(--navy-950);
  color: var(--text-on-dark);
  overflow: hidden;
  padding-top: 120px;
  padding-bottom: var(--space-8);
}

.hero-grid-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--navy-950) 100%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-8);
  align-items: center;
}

@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffb3b3;
  background: rgba(196, 39, 44, 0.14);
  border: 1px solid rgba(196, 39, 44, 0.35);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #ff6a6f; box-shadow: 0 0 10px 2px rgba(255,106,111,0.7); animation: pulse-dot 2.2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  margin-top: var(--space-5);
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  color: #fff;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #ff8a8f, var(--red-500) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  margin-top: var(--space-5);
  max-width: 560px;
  font-size: 1.15rem;
  color: var(--text-muted-on-dark);
}

.hero-actions {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-brand-tags {
  margin-top: var(--space-7);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.hero-brand-tags span.label { font-size: 0.8rem; color: var(--text-muted-on-dark); font-family: var(--font-mono); }
.tag-chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-on-dark);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  background: rgba(255,255,255,0.05);
}

.hero-stats {
  margin-top: var(--space-8);
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: var(--space-7);
}
@media (max-width: 560px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
}
.hero-stats .stat-num {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.hero-stats .stat-label { font-size: 0.85rem; color: var(--text-muted-on-dark); margin-top: 2px; }

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-lg);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,7,13,0) 40%, rgba(5,7,13,0.85) 100%);
}
.hero-visual-badge {
  position: absolute;
  left: var(--space-5);
  bottom: var(--space-5);
  right: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: rgba(9, 13, 24, 0.55);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.hero-visual-badge .knx-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.22);
  animation: pulse-dot 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
.hero-visual-badge p { font-size: 0.85rem; color: var(--text-on-dark); }
.hero-visual-badge strong { display: block; font-family: var(--font-heading); font-size: 0.95rem; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-5);
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted-on-dark);
}
.scroll-cue .line { width: 1px; height: 34px; background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent); overflow: hidden; position: relative; }
.scroll-cue .line::after {
  content: '';
  position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, transparent, var(--red-500), transparent);
  animation: scroll-run 1.8s ease-in-out infinite;
}
@keyframes scroll-run { to { top: 100%; } }

/* ==========================================================================
   Brand / partner marquee strip
   ========================================================================== */

.brand-strip {
  background: var(--navy-900);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-block: var(--space-6);
  overflow: hidden;
}
.brand-strip-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted-on-dark);
  margin-bottom: var(--space-5);
}
.marquee { display: flex; width: max-content; gap: var(--space-9); animation: marquee-scroll 28s linear infinite; }
.marquee-track { display: flex; gap: var(--space-9); flex-shrink: 0; }
.marquee:hover { animation-play-state: paused; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.brand-logo-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-on-dark);
  opacity: 0.55;
  white-space: nowrap;
  transition: opacity var(--dur-base);
}
.brand-logo-item:hover { opacity: 1; }
.brand-logo-item svg { width: 26px; height: 26px; color: var(--red-500); }
.brand-logo-item small { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; color: var(--text-muted-on-dark); letter-spacing: 0.06em; }

/* ==========================================================================
   About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-9);
  align-items: center;
}
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: var(--space-7); }
}

.about-collage {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4);
}
.about-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.about-collage .tile-a { aspect-ratio: 3/4; }
.about-collage .tile-b { aspect-ratio: 3/4; margin-top: var(--space-7); }
.about-collage .float-card {
  position: absolute;
  left: -18px;
  bottom: -18px;
  background: var(--navy-950);
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: 260px;
}
@media (max-width: 560px) { .about-collage .float-card { position: static; margin-top: var(--space-4); max-width: none; } }
.about-collage .float-card .num { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--red-400); }
.about-collage .float-card p { font-size: 0.85rem; color: var(--text-muted-on-dark); }

.about-copy p.lead {
  font-size: 1.15rem;
  color: var(--text-on-light);
  margin-top: var(--space-5);
  line-height: 1.7;
}

.about-stats {
  margin-top: var(--space-7);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  border-top: 1px solid var(--gray-200);
  padding-top: var(--space-6);
}
@media (max-width: 560px) { .about-stats { grid-template-columns: repeat(2, 1fr); } }
.about-stats .stat-num {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy-950);
}
.about-stats .stat-label { font-size: 0.85rem; color: var(--text-muted-on-light); margin-top: 4px; }

/* ==========================================================================
   Services (bento)
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 960px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card.featured { background: var(--navy-950); border-color: var(--navy-700); color: var(--text-on-dark); }
.service-card.featured h3, .service-card.featured p { color: var(--text-on-dark); }
.service-card.featured .service-icon { background: rgba(196,39,44,0.16); color: #ff8a8f; }

.service-icon {
  width: 58px; height: 58px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(160,30,34,0.08);
  color: var(--red-600);
  margin-bottom: var(--space-5);
  transition: transform var(--dur-base) var(--ease-out);
}
.service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); }
.service-icon svg { width: 28px; height: 28px; }

.service-card h3 { font-size: 1.3rem; margin-bottom: var(--space-3); }
.service-card p { color: var(--text-muted-on-light); font-size: 0.97rem; }
.service-card .tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-5); }
.service-card .tag-row span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gray-300);
  color: var(--text-muted-on-light);
}
.service-card.featured .tag-row span { border-color: rgba(255,255,255,0.22); color: var(--text-muted-on-dark); }

.service-card .corner-index {
  position: absolute;
  top: var(--space-5);
  right: var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-300);
}
.service-card.featured .corner-index { color: var(--navy-600); }

/* ==========================================================================
   Automation feature (KNX / ABB / Optimus) — dark showcase
   ========================================================================== */

.automation-section {
  background: var(--navy-950);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}
.automation-section .grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 30%, transparent 75%);
}

.automation-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-9);
  align-items: center;
}
@media (max-width: 960px) { .automation-grid { grid-template-columns: 1fr; gap: var(--space-7); } }

.automation-copy .benefit-list { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.benefit-list li { display: flex; align-items: flex-start; gap: var(--space-3); }
.benefit-list .check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.14);
  color: #4ade80;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.benefit-list .check svg { width: 14px; height: 14px; }
.benefit-list strong { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 1.02rem; }
.benefit-list span.desc { color: var(--text-muted-on-dark); font-size: 0.92rem; }

.brand-partner-row {
  margin-top: var(--space-7);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 640px) { .brand-partner-row { grid-template-columns: 1fr; } }
.partner-card {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: rgba(255,255,255,0.03);
  transition: border-color var(--dur-base), transform var(--dur-base);
}
.partner-card:hover { border-color: rgba(196,39,44,0.5); transform: translateY(-4px); }
.partner-card .p-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; }
.partner-card .p-desc { font-size: 0.8rem; color: var(--text-muted-on-dark); margin-top: 4px; }

/* KNX network diagram visual */
.knx-diagram {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin-inline: auto;
}
.knx-diagram svg { width: 100%; height: 100%; }
.knx-diagram .node-dot { fill: #ff8a8f; }
.knx-diagram .pulse-ring {
  fill: none;
  stroke: rgba(196,39,44,0.55);
  stroke-width: 1.5;
  transform-origin: center;
  transform-box: fill-box;
  animation: knx-pulse 2.6s ease-out infinite;
}
.knx-diagram .bus-line {
  fill: none;
  stroke: rgba(255,255,255,0.28);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}
.knx-diagram .bus-line.flow {
  stroke: var(--red-500);
  stroke-dasharray: 4 400;
  stroke-dashoffset: 0;
  animation: knx-flow 5s linear infinite;
}
@keyframes knx-pulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}
@keyframes knx-flow {
  from { stroke-dashoffset: 400; }
  to { stroke-dashoffset: 0; }
}
.knx-diagram .node-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-muted-on-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Why us
   ========================================================================== */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
@media (max-width: 960px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }

.why-item {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--gray-200);
  transition: box-shadow var(--dur-base), transform var(--dur-base);
}
.why-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-4px); }
.why-item .service-icon { width: 46px; height: 46px; margin-bottom: var(--space-4); }
.why-item .service-icon svg { width: 22px; height: 22px; }
.why-item h4 { font-size: 1.05rem; margin-bottom: 6px; }
.why-item p { font-size: 0.9rem; color: var(--text-muted-on-light); }

/* ==========================================================================
   Process timeline
   ========================================================================== */

.process-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-4);
}
@media (max-width: 900px) {
  .process-track { grid-template-columns: 1fr; gap: var(--space-6); }
}

.process-line {
  position: absolute;
  top: 27px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.process-line-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--red-600), var(--red-400));
  transform-origin: left;
}
@media (max-width: 900px) {
  .process-line { top: 0; bottom: 0; left: 27px; right: auto; width: 2px; height: auto; }
  .process-line-fill { width: 100%; height: 0%; }
}

.process-step { position: relative; z-index: 1; }
@media (max-width: 900px) { .process-step { display: flex; gap: var(--space-5); } }

.process-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: var(--space-4);
  transition: border-color var(--dur-base), color var(--dur-base), background var(--dur-base);
  flex-shrink: 0;
}
.process-step.is-active .process-num { border-color: var(--red-600); background: var(--red-600); color: #fff; }
.process-step h4 { font-size: 1.05rem; margin-bottom: 6px; }
.process-step p { font-size: 0.88rem; color: var(--text-muted-on-light); }

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.filter-btn {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gray-300);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted-on-light);
  transition: all var(--dur-fast) var(--ease-out);
}
.filter-btn:hover { border-color: var(--navy-900); color: var(--navy-900); }
.filter-btn.is-active { background: var(--navy-950); border-color: var(--navy-950); color: #fff; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
@media (max-width: 960px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--navy-900);
}
.gallery-item.is-hidden { display: none; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,7,13,0) 45%, rgba(5,7,13,0.92) 100%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .overlay .cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff9a9e;
  display: block;
  margin-bottom: 4px;
}
.gallery-item .overlay p { color: #fff; font-size: 0.9rem; font-weight: 600; }
.gallery-item .expand-icon {
  position: absolute; top: var(--space-3); right: var(--space-3);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: all var(--dur-base) var(--ease-out);
}
.gallery-item:hover .expand-icon { opacity: 1; transform: scale(1); }
.gallery-item .expand-icon svg { width: 16px; height: 16px; color: #fff; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,7,13,0.92);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out), visibility 0s var(--dur-base);
  padding: var(--space-5);
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity var(--dur-base) var(--ease-out); }
.lightbox figure { max-width: min(90vw, 900px); max-height: 82vh; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.lightbox figcaption { color: var(--text-muted-on-dark); text-align: center; margin-top: var(--space-4); font-size: 0.9rem; }
.lightbox-close, .lightbox-nav {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(196,39,44,0.5); transform: scale(1.06); }
.lightbox-close { top: var(--space-5); right: var(--space-5); }
.lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-nav.prev { left: var(--space-5); top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: var(--space-5); top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   CTA banner
   ========================================================================== */

.cta-banner {
  background: linear-gradient(120deg, var(--navy-950) 0%, var(--navy-850) 55%, #1a0d0f 130%);
  color: #fff;
  border-radius: var(--radius-lg);
  margin-inline: var(--space-5);
  padding: var(--space-9) var(--space-7);
  text-align: center;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) { .cta-banner { margin-inline: var(--space-7); } }
.cta-banner::before {
  content: '';
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,39,44,0.35), transparent 70%);
  top: -220px; right: -120px;
}
.cta-banner h2 { position: relative; z-index: 1; font-size: clamp(1.9rem, 4vw, 2.7rem); max-width: 720px; margin-inline: auto; }
.cta-banner p { position: relative; z-index: 1; margin-top: var(--space-4); color: var(--text-muted-on-dark); max-width: 560px; margin-inline: auto; }
.cta-banner .hero-actions { position: relative; z-index: 1; justify-content: center; margin-top: var(--space-6); }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-9);
}
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; gap: var(--space-7); } }

.contact-info-list { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); }
.contact-info-item { display: flex; gap: var(--space-4); align-items: flex-start; }
.contact-info-item .service-icon { width: 46px; height: 46px; flex-shrink: 0; margin-bottom: 0; }
.contact-info-item .service-icon svg { width: 20px; height: 20px; }
.contact-info-item strong { display: block; font-family: var(--font-heading); font-size: 1rem; }
.contact-info-item span, .contact-info-item a { font-size: 0.92rem; color: var(--text-muted-on-light); }
.contact-info-item a:hover { color: var(--red-600); }

.contact-map {
  margin-top: var(--space-6);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  aspect-ratio: 16/10;
  filter: grayscale(0.25) contrast(1.05);
}
.contact-map iframe { width: 100%; height: 100%; border: 0; }

.contact-form-card {
  background: var(--navy-950);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: var(--space-5); }
.field label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 8px; color: var(--text-muted-on-dark); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: #fff;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.32); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red-500); background: rgba(255,255,255,0.07); outline: none; }
.field textarea { min-height: 120px; resize: vertical; }
.field-note { font-size: 0.78rem; color: var(--text-muted-on-dark); margin-top: var(--space-2); }
.form-status { margin-top: var(--space-4); font-size: 0.9rem; display: none; }
.form-status.is-visible { display: block; }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #ff8a8f; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--navy-950);
  color: var(--text-muted-on-dark);
  padding-top: var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--space-7);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 96px; width: auto; margin-bottom: var(--space-4); }
.footer-brand p { max-width: 320px; font-size: 0.92rem; }
.footer-social { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.footer-social a:hover { background: var(--red-600); border-color: var(--red-600); transform: translateY(-3px); }
.footer-social svg { width: 17px; height: 17px; }

.footer-col h5 { font-family: var(--font-heading); color: #fff; font-size: 0.95rem; margin-bottom: var(--space-4); }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a, .footer-col li { font-size: 0.9rem; transition: color var(--dur-fast); }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-block: var(--space-5);
  font-size: 0.82rem;
}
.footer-bottom .legal-links { display: flex; gap: var(--space-4); }

/* ==========================================================================
   Reveal animation base states (GSAP hooks)
   ========================================================================== */

[data-reveal] { opacity: 0; }
.no-js [data-reveal] { opacity: 1; }
.no-js .hero-flicker { opacity: 1; }

/* ==========================================================================
   Misc utilities
   ========================================================================== */

.text-red { color: var(--red-600); }
.mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Next-gen electric interactions
   ========================================================================== */

/* Hero headline "power-on" flicker (plays once on load) */
@keyframes power-on-flicker {
  0%   { opacity: 0; filter: brightness(2.2) blur(3px); text-shadow: 0 0 40px rgba(255,255,255,0.85); }
  6%   { opacity: 1; }
  11%  { opacity: 0.15; filter: brightness(1); }
  16%  { opacity: 1; text-shadow: 0 0 26px rgba(255,138,143,0.7); }
  22%  { opacity: 0.35; }
  28%  { opacity: 1; filter: brightness(1.5); text-shadow: 0 0 18px rgba(255,138,143,0.55); }
  100% { opacity: 1; filter: brightness(1); text-shadow: none; }
}
.hero-flicker { opacity: 0; }
.hero-flicker.is-lit {
  opacity: 1;
  animation: power-on-flicker 1.2s steps(1, end) both;
}

/* Magnetic buttons */
.btn-magnetic { will-change: transform; }

/* Click "spark" burst */
.spark-burst {
  position: fixed;
  z-index: 400;
  pointer-events: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--red-400) 60%, transparent 75%);
  box-shadow: 0 0 10px 2px rgba(196,39,44,0.7);
  transform: translate(-50%, -50%);
  animation: spark-fly 550ms cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes spark-fly {
  0%   { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--sx), var(--sy)) scale(0.2); }
}

/* Circuit-trace hover border for cards */
@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.service-card, .why-item, .partner-card {
  position: relative;
}
.service-card::before, .why-item::before, .partner-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--angle), transparent 0 78%, #ff9a9e 88%, var(--red-500) 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
}
.service-card:hover::before, .why-item:hover::before, .partner-card:hover::before {
  opacity: 1;
  animation: circuit-trace 2.2s linear infinite;
}
@keyframes circuit-trace { to { --angle: 360deg; } }

/* Fixed scroll "voltage" meter (desktop only) */
.scroll-voltage {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  z-index: 90;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}
.scroll-voltage-fill {
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 0%;
  background: linear-gradient(180deg, #ff9a9e, var(--red-600));
  box-shadow: 0 0 14px 2px rgba(196,39,44,0.55);
  border-radius: 999px;
}
.scroll-voltage-spark {
  position: absolute;
  left: 50%;
  bottom: 0%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(255,255,255,0.85);
  transform: translate(-50%, 50%);
}
@media (max-width: 1100px), (pointer: coarse) {
  .scroll-voltage { display: none; }
}

/* Cursor spark trail over dark sections (desktop, fine pointer only) */
.cursor-spark {
  position: fixed;
  top: 0; left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,39,44,0.55), rgba(196,39,44,0) 70%);
  filter: blur(1px);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 95;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  transform: translate(-50%, -50%);
}
.cursor-spark.is-visible { opacity: 1; }
@media (pointer: coarse) {
  .cursor-spark { display: none; }
}

/* KNX diagram: traveling energy packets + node arrival glow */
.knx-packet {
  offset-path: var(--path);
  offset-rotate: 0deg;
  fill: #fff;
  filter: drop-shadow(0 0 6px rgba(255,138,143,0.95));
  animation: knx-packet-travel 3s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes knx-packet-travel {
  0%   { offset-distance: 0%; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
.knx-diagram .node-dot.outer {
  transform-box: fill-box;
  transform-origin: center;
  animation: knx-node-arrive 3s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes knx-node-arrive {
  0%, 85%  { filter: drop-shadow(0 0 0 rgba(196,39,44,0)); }
  92%      { filter: drop-shadow(0 0 9px rgba(255,138,143,0.95)); }
  100%     { filter: drop-shadow(0 0 0 rgba(196,39,44,0)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-flicker { opacity: 1 !important; animation: none !important; }
  .scroll-voltage, .cursor-spark { display: none !important; }
  .service-card::before, .why-item::before, .partner-card::before { animation: none !important; }
}
