/* =============================================
   MONTYHO TECHNOLOGY — STYLESHEET (modern redesign 2026)
   ============================================= */

/* --- Variables --- */
:root {
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-xl:   32px;
  --transition:  0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h:       68px;
  --container:   1240px;
  --pad:         clamp(1.25rem, 5vw, 2rem);
}

/* Dark theme (default) */
:root,
[data-theme="dark"] {
  --bg-0:        #04080f;
  --bg-1:        #070d1e;
  --bg-card:     rgba(10, 17, 38, 0.75);
  --bg-card-solid: #0a1126;
  --bg-card-h:   rgba(14, 23, 50, 0.85);
  --bg-alt:      #060b17;
  --cyan:        #00d4ff;
  --cyan-dim:    rgba(0, 212, 255, 0.12);
  --cyan-glow:   rgba(0, 212, 255, 0.3);
  --cyan-soft:   rgba(0, 212, 255, 0.06);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167, 139, 250, 0.12);
  --purple-glow: rgba(167, 139, 250, 0.25);
  --green:       #34d399;
  --green-dim:   rgba(52, 211, 153, 0.12);
  --orange:      #fbbf24;
  --orange-dim:  rgba(251, 191, 36, 0.12);
  --blue:        #60a5fa;
  --blue-dim:    rgba(96, 165, 250, 0.12);
  --teal:        #2dd4bf;
  --teal-dim:    rgba(45, 212, 191, 0.12);
  --text-1:      #f0f6ff;
  --text-2:      #94a3c4;
  --text-3:      #4d6180;
  --border:      rgba(255, 255, 255, 0.06);
  --border-h:    rgba(0, 212, 255, 0.4);
  --border-card: rgba(255, 255, 255, 0.08);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.5);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.6);
  --shadow-lg:   0 24px 64px rgba(0,0,0,0.7);
  --surface:     rgba(255, 255, 255, 0.04);
  --surface-h:   rgba(255, 255, 255, 0.07);
  --noise-opacity: 0.035;
  --glow-primary: 0 0 60px rgba(0,212,255,0.12);
}

/* Light theme */
[data-theme="light"] {
  --bg-0:        #f5f8fd;
  --bg-1:        #edf2fa;
  --bg-card:     rgba(255, 255, 255, 0.8);
  --bg-card-solid: #ffffff;
  --bg-card-h:   rgba(248, 251, 255, 0.95);
  --bg-alt:      #eef3fb;
  --cyan:        #0099cc;
  --cyan-dim:    rgba(0, 153, 204, 0.1);
  --cyan-glow:   rgba(0, 153, 204, 0.2);
  --cyan-soft:   rgba(0, 153, 204, 0.05);
  --purple:      #7c3aed;
  --purple-dim:  rgba(124, 58, 237, 0.1);
  --purple-glow: rgba(124, 58, 237, 0.18);
  --green:       #059669;
  --green-dim:   rgba(5, 150, 105, 0.1);
  --orange:      #d97706;
  --orange-dim:  rgba(217, 119, 6, 0.1);
  --blue:        #2563eb;
  --blue-dim:    rgba(37, 99, 235, 0.1);
  --teal:        #0d9488;
  --teal-dim:    rgba(13, 148, 136, 0.1);
  --text-1:      #0a1628;
  --text-2:      #4a6080;
  --text-3:      #7a90aa;
  --border:      rgba(0, 0, 0, 0.07);
  --border-h:    rgba(0, 153, 204, 0.5);
  --border-card: rgba(0, 0, 0, 0.06);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.05);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.09);
  --shadow-lg:   0 24px 64px rgba(0,0,0,0.12);
  --surface:     rgba(0, 0, 0, 0.03);
  --surface-h:   rgba(0, 0, 0, 0.05);
  --noise-opacity: 0.02;
  --glow-primary: 0 0 60px rgba(0,153,204,0.1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.6;
  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; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }

/* --- Noise texture overlay (subtle film grain) --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  line-height: 1.13;
  font-weight: 700;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p  { color: var(--text-2); line-height: 1.8; }

/* Gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout --- */
.container {
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section { padding-block: clamp(5rem, 10vw, 8rem); }
.section--alt { background: var(--bg-alt); }

/* --- Section headers --- */
.section__header {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.section__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 100px;
  padding: 0.4em 1.1em;
  margin-bottom: 1.4rem;
}
.section__tag::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
.section__title {
  color: var(--text-1);
  margin-bottom: 1.1rem;
}
.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.8;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 0.88em 2.1em;
  border-radius: var(--radius-md);
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Primary button — solid with shimmer */
.btn--primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #00a8cc 100%);
  color: #050c1e;
  box-shadow: 0 0 30px rgba(0,212,255,0.35), 0 4px 16px rgba(0,0,0,0.3);
  font-weight: 700;
}
.btn--primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transition: left 0.55s ease;
}
.btn--primary:hover::before { left: 150%; }
.btn--primary:hover {
  box-shadow: 0 0 50px rgba(0,212,255,0.55), 0 8px 24px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* Outline button — animated gradient border */
.btn--outline {
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1.5px solid rgba(0,212,255,0.4);
  backdrop-filter: blur(8px);
}
.btn--outline:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0,212,255,0.2), inset 0 0 12px rgba(0,212,255,0.05);
  transform: translateY(-2px);
}
.btn--full { width: 100%; justify-content: center; }

/* --- Reveal animation (with blur) --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(4px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
[data-reveal-delay="100"]  { transition-delay: 0.1s; }
[data-reveal-delay="150"]  { transition-delay: 0.15s; }
[data-reveal-delay="200"]  { transition-delay: 0.2s; }
[data-reveal-delay="300"]  { transition-delay: 0.3s; }
[data-reveal-delay="400"]  { transition-delay: 0.4s; }
[data-reveal-delay="500"]  { transition-delay: 0.5s; }

/* =============================================
   CURSOR GLOW
   ============================================= */
.cursor-glow {
  position: fixed;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.055) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  top: 0; left: 0;
}
[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(0,153,204,0.06) 0%, transparent 70%);
}

/* =============================================
   HEADER / NAV
   ============================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background var(--transition), box-shadow var(--transition), border-bottom var(--transition), backdrop-filter var(--transition);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.header.scrolled {
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .header,
:root .header {
  background: rgba(4, 8, 15, 0.7);
}
[data-theme="dark"] .header.scrolled,
:root .header.scrolled {
  background: rgba(4, 8, 15, 0.88);
}
[data-theme="light"] .header {
  background: rgba(245, 248, 253, 0.75);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
[data-theme="light"] .header.scrolled {
  background: rgba(245, 248, 253, 0.92);
}
.nav {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 2rem;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  color: var(--text-1);
  transition: opacity var(--transition);
}
.nav__logo:hover { opacity: 0.8; }
.nav__logo-icon {
  width: 32px; height: 32px;
  color: var(--cyan);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(0,212,255,0.5));
}
.nav__logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.nav__logo-text strong { font-weight: 800; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}
.nav__link {
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 0.45em 0.9em;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.01em;
}
.nav__link:hover, .nav__link.active {
  color: var(--text-1);
  background: var(--surface-h);
}
.nav__link.active { color: var(--cyan); }
.nav__link--cta {
  color: var(--cyan);
  border: 1.5px solid rgba(0,212,255,0.35);
  margin-left: 0.5rem;
  background: var(--cyan-soft);
}
.nav__link--cta:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(0,212,255,0.2);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Theme toggle */
.theme-toggle {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--cyan);
  background: var(--surface-h);
}
.theme-toggle svg {
  width: 17px; height: 17px;
  transition: transform 0.4s ease, opacity 0.25s ease;
}
.theme-toggle__sun { display: block; }
.theme-toggle__moon { display: none; }
[data-theme="light"] .theme-toggle__sun { display: none; }
[data-theme="light"] .theme-toggle__moon { display: block; }

/* Language switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.2em 0.45em;
}
.lang-btn {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-3);
  padding: 0.22em 0.52em;
  border-radius: 100px;
  transition: var(--transition);
}
.lang-btn.active {
  background: var(--cyan);
  color: #050c1e;
}
.lang-btn:hover:not(.active) { color: var(--text-1); }
.lang-divider { color: var(--border); font-size: 0.75rem; user-select: none; }

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: var(--transition);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Multi-layer ambient background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 15% 30%, rgba(0,212,255,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 60% 80% at 85% 75%, rgba(167,139,250,0.06) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 50% 110%, rgba(0,212,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* Subtle grid pattern */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}

[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse 80% 70% at 15% 30%, rgba(0,153,204,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 60% 80% at 85% 75%, rgba(124,58,237,0.06) 0%, transparent 65%);
}
[data-theme="light"] .hero::after {
  background-image:
    linear-gradient(rgba(0,153,204,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,153,204,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__container {
  position: relative;
  z-index: 1;
  padding-block: 5rem 3rem;
}
.hero__content { max-width: 720px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 100px;
  padding: 0.5em 1.2em;
  margin-bottom: 1.8rem;
  backdrop-filter: blur(8px);
}
.hero__badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse-dot 2.2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--cyan);
}
.hero__title {
  color: var(--text-1);
  margin-bottom: 1.6rem;
  font-weight: 800;
  line-height: 1.07;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--cyan) 0%, #7dd3fc 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 6s ease-in-out infinite;
  position: relative;
}
.hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--text-2);
  max-width: 540px;
  margin-bottom: 2.75rem;
  line-height: 1.85;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-3);
  animation: bounce 2.8s ease-in-out infinite;
  z-index: 1;
  transition: color var(--transition);
}
.hero__scroll svg { width: 28px; height: 28px; }
.hero__scroll:hover { color: var(--cyan); }

/* =============================================
   CARDS — Glass morphism base
   ============================================= */
.scard {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--transition-slow), border-color var(--transition), box-shadow var(--transition-slow), background var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Inner glow on hover */
.scard::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--card-dim, rgba(0,212,255,0.08)) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.scard:hover::before { opacity: 1; }

/* Top accent shimmer line */
.scard::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  opacity: 0;
  transition: opacity var(--transition);
}
.scard:hover::after { opacity: 1; }

.scard:hover {
  transform: translateY(-6px);
  background: var(--bg-card-h);
}

/* Color variants */
.scard--cyan   { --card-color: var(--cyan);   --card-dim: var(--cyan-dim); }
.scard--purple { --card-color: var(--purple);  --card-dim: var(--purple-dim); }
.scard--green  { --card-color: var(--green);   --card-dim: var(--green-dim); }
.scard--orange { --card-color: var(--orange);  --card-dim: var(--orange-dim); }
.scard--blue   { --card-color: var(--blue);    --card-dim: var(--blue-dim); }
.scard--teal   { --card-color: var(--teal);    --card-dim: var(--teal-dim); }

.scard--cyan:hover   { border-color: rgba(0,212,255,0.35);   box-shadow: 0 24px 64px rgba(0,212,255,0.1),  var(--shadow-md); }
.scard--purple:hover { border-color: rgba(167,139,250,0.35); box-shadow: 0 24px 64px rgba(167,139,250,0.1), var(--shadow-md); }
.scard--green:hover  { border-color: rgba(52,211,153,0.35);  box-shadow: 0 24px 64px rgba(52,211,153,0.1), var(--shadow-md); }
.scard--orange:hover { border-color: rgba(251,191,36,0.35);  box-shadow: 0 24px 64px rgba(251,191,36,0.1), var(--shadow-md); }
.scard--blue:hover   { border-color: rgba(96,165,250,0.35);  box-shadow: 0 24px 64px rgba(96,165,250,0.1), var(--shadow-md); }
.scard--teal:hover   { border-color: rgba(45,212,191,0.35);  box-shadow: 0 24px 64px rgba(45,212,191,0.1), var(--shadow-md); }

.scard--cyan::after   { background: linear-gradient(90deg, transparent 0%, var(--cyan)   40%, var(--purple) 60%, transparent 100%); }
.scard--purple::after { background: linear-gradient(90deg, transparent 0%, var(--purple)  50%, transparent 100%); }
.scard--green::after  { background: linear-gradient(90deg, transparent 0%, var(--green)   50%, transparent 100%); }
.scard--orange::after { background: linear-gradient(90deg, transparent 0%, var(--orange)  50%, transparent 100%); }
.scard--blue::after   { background: linear-gradient(90deg, transparent 0%, var(--blue)    50%, transparent 100%); }
.scard--teal::after   { background: linear-gradient(90deg, transparent 0%, var(--teal)    50%, transparent 100%); }

.scard__icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--card-dim, var(--cyan-dim));
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--card-color, var(--cyan));
  flex-shrink: 0;
  transition: box-shadow var(--transition), transform var(--transition);
}
.scard:hover .scard__icon {
  box-shadow: 0 0 20px var(--card-dim, var(--cyan-dim));
  transform: scale(1.07);
}
.scard__icon svg { width: 26px; height: 26px; }
.scard__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
}
.scard__desc {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.75;
  flex: 1;
}
.scard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.scard__tags li {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.18em 0.6em;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.scard:hover .scard__tags li {
  color: var(--text-2);
  background: var(--surface-h);
}

/* =============================================
   SERVICES
   ============================================= */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

/* =============================================
   TECHNOLOGIES
   ============================================= */
.tech__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* =============================================
   PROCESS
   ============================================= */
.process__steps {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
}
.process__steps::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 28px;
  bottom: 28px;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), rgba(0,212,255,0.08));
}
.process__step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.75rem;
  padding-bottom: 2.5rem;
  position: relative;
}
.process__step:last-child { padding-bottom: 0; }
.process__num {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cyan);
  background: var(--bg-0);
  border: 1.5px solid rgba(0,212,255,0.35);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.process__step:hover .process__num {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0,212,255,0.3);
  transform: scale(1.08);
}
.process__body {
  padding-top: 0.9rem;
}
.process__body h3 {
  font-size: 1.12rem;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}
.process__body p {
  font-size: 0.91rem;
  color: var(--text-2);
  line-height: 1.78;
}

/* =============================================
   ABOUT
   ============================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}
.about__content p { margin-bottom: 1rem; font-size: 0.94rem; }
.section__header .about__years { justify-content: center; }

/* Years badge */
.about__years {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}
.about__years-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about__years-num sup {
  font-size: 0.5em;
  vertical-align: super;
}
.about__years-label {
  font-size: 0.95rem;
  color: var(--text-2);
  font-weight: 500;
  max-width: 140px;
  line-height: 1.4;
}

.about__highlights { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.about__highlight {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.91rem;
  color: var(--text-2);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.about__highlight:hover {
  background: var(--cyan-soft);
  color: var(--text-1);
}
.about__highlight svg {
  width: 17px; height: 17px;
  color: var(--cyan);
  flex-shrink: 0;
  background: var(--cyan-dim);
  border-radius: 50%;
  padding: 2px;
  transition: box-shadow var(--transition);
}
.about__highlight:hover svg {
  box-shadow: 0 0 10px rgba(0,212,255,0.35);
}

/* Circuit SVG */
.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.circuit-svg {
  width: min(420px, 100%);
  filter: drop-shadow(0 0 40px rgba(0,212,255,0.12));
  transition: filter var(--transition-slow);
}
.about__visual:hover .circuit-svg {
  filter: drop-shadow(0 0 60px rgba(0,212,255,0.2));
}
.circuit-pulse {
  animation: circuit-expand 3s ease-in-out infinite;
}
.circuit-pulse--2 {
  animation-delay: 1.5s;
}

/* =============================================
   PORTFOLIO
   ============================================= */
.portfolio__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

/* --- 3D viewer --- */
.portfolio__viewer {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
.portfolio__model-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.portfolio__model-wrap:hover {
  border-color: var(--border-h);
  box-shadow: 0 0 40px rgba(0,212,255,0.08);
}
.portfolio__model-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.portfolio__model-label svg {
  width: 16px; height: 16px;
  color: var(--cyan);
  flex-shrink: 0;
}
.portfolio__model-label span {
  flex: 1;
}
.portfolio__expand-btn {
  display: none; /* shown by JS when model loads */
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-3);
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.portfolio__expand-btn svg {
  width: 14px; height: 14px;
  color: inherit;
}
.portfolio__expand-btn:hover {
  color: var(--cyan);
  border-color: var(--border-h);
  background: var(--cyan-soft);
}
.portfolio__model {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgba(0,212,255,0.04) 0%, transparent 70%),
    radial-gradient(ellipse at 65% 35%, rgba(167,139,250,0.06) 0%, transparent 50%);
}
.portfolio__model canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.portfolio__model-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.portfolio__model-fallback img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.5));
}
.portfolio__model-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.35em 1em;
  pointer-events: none;
  transition: color var(--transition), border-color var(--transition);
}
.portfolio__model-wrap:hover .portfolio__model-hint {
  color: var(--cyan);
  border-color: var(--border-h);
}

/* --- Specs --- */
.portfolio__specs-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 1.4rem;
}
.portfolio__specs-grid {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.portfolio__spec {
  display: flex;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.portfolio__spec:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  box-shadow: 0 0 24px rgba(0,212,255,0.05);
}
.portfolio__spec-icon {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--cyan);
  background: var(--cyan-dim);
  border-radius: var(--radius-sm);
}
.portfolio__spec-icon svg {
  width: 18px; height: 18px;
}
.portfolio__spec-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.portfolio__spec-text strong {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
}
.portfolio__spec-text span {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
}

/* --- Tags --- */
.portfolio__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
}
.portfolio__tags li {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 100px;
  padding: 0.35em 0.9em;
}

/* --- Lightbox overlay --- */
.portfolio__lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 8, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding:
    max(clamp(1rem, 4vw, 3rem), env(safe-area-inset-top))
    max(clamp(1rem, 4vw, 3rem), env(safe-area-inset-right))
    max(clamp(1rem, 4vw, 3rem), env(safe-area-inset-bottom))
    max(clamp(1rem, 4vw, 3rem), env(safe-area-inset-left));
}
.portfolio__lightbox.is-open {
  display: flex;
}
.portfolio__lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.portfolio__lightbox-inner canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.portfolio__lightbox-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  z-index: 10;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card-solid);
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.portfolio__lightbox-close svg {
  width: 18px; height: 18px;
}
.portfolio__lightbox-close:hover {
  color: var(--cyan);
  border-color: var(--border-h);
  background: var(--cyan-soft);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .portfolio__grid {
    grid-template-columns: 1fr;
  }
  .portfolio__viewer {
    position: static;
    order: -1;
  }
  .portfolio__lightbox {
    padding:
      max(0.75rem, env(safe-area-inset-top))
      max(0.5rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom))
      max(0.5rem, env(safe-area-inset-left));
  }
}

/* =============================================
   CONTACT
   ============================================= */
.contact__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 820px;
  margin-inline: auto;
  margin-bottom: 3rem;
}
.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
  color: var(--text-1);
  backdrop-filter: blur(12px);
}
a.contact__item:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,212,255,0.1), var(--shadow-sm);
}
.contact__item-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cyan-dim);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  flex-shrink: 0;
  transition: box-shadow var(--transition), transform var(--transition);
}
a.contact__item:hover .contact__item-icon {
  box-shadow: 0 0 16px rgba(0,212,255,0.25);
  transform: scale(1.08);
}
.contact__item-icon svg { width: 20px; height: 20px; }
.contact__item-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.25rem;
}
.contact__item-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-1);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: 3.5rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  align-items: start;
}
.footer__brand .nav__logo { margin-bottom: 0.75rem; }
.footer__brand p {
  font-size: 0.84rem;
  color: var(--text-3);
  max-width: 260px;
  line-height: 1.65;
}
.footer__links, .footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer__links a, .footer__contact a {
  font-size: 0.87rem;
  color: var(--text-3);
  transition: color var(--transition), padding-left var(--transition);
}
.footer__links a:hover, .footer__contact a:hover {
  color: var(--cyan);
  padding-left: 4px;
}
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
}
.footer__bottom p {
  font-size: 0.78rem;
  color: var(--text-3);
  text-align: center;
}

/* =============================================
   BACK TO TOP
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(0,212,255,0.35);
  border-radius: 50%;
  color: var(--cyan);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.9);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(12px);
}
[data-theme="dark"] .back-to-top, :root .back-to-top {
  background: rgba(4, 8, 15, 0.85);
}
[data-theme="light"] .back-to-top {
  background: rgba(245, 248, 253, 0.9);
}
.back-to-top svg { width: 17px; height: 17px; }
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.back-to-top:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0,212,255,0.3);
}

/* =============================================
   SECURITY
   ============================================= */
.security__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.security__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 100px;
  padding: 0.28em 0.85em;
}
.security__badge--purple {
  color: var(--purple);
  background: var(--purple-dim);
  border-color: rgba(167,139,250,0.25);
}
.security__checks {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.security__checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}
.security__checks li::before {
  content: '✓';
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
  width: 18px; height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: 0.1em;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.25);
}
.security__checks--purple li::before {
  color: var(--purple);
  background: var(--purple-dim);
  border-color: rgba(167,139,250,0.25);
}

/* =============================================
   SECTION DIVIDER
   ============================================= */
.section-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}
.section-divider svg {
  display: block;
  width: 100%;
  height: 40px;
}
.section-divider--flip { transform: scaleY(-1); }

/* =============================================
   KEYFRAMES
   ============================================= */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 currentColor; }
  50%       { opacity: 0.6; transform: scale(0.75); }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(9px); }
}
@keyframes circuit-expand {
  0%   { transform: scale(1);   opacity: 0.5; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(1);   opacity: 0; }
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
@keyframes shimmer {
  0%   { left: -100%; }
  100% { left: 150%; }
}

/* =============================================
   PAGE LOAD TRANSITION
   ============================================= */
body.is-loading {
  overflow: hidden;
}
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.page-loader__bar {
  width: 140px; height: 2px;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}
.page-loader__bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 2px;
  animation: loader-bar 0.8s ease forwards;
}
@keyframes loader-bar {
  from { transform: translateX(-100%); }
  to   { transform: translateX(300%); }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .tech__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__visual { order: -1; }
  .circuit-svg { width: min(300px, 80%); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .security__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-0);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 1.5rem var(--pad) 2rem;
    border-bottom: 1px solid var(--border);
    gap: 0.2rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 999;
  }
  .nav__menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .nav__link {
    padding: 0.75em 1em;
    width: 100%;
    font-size: 1rem;
  }
  .nav__link--cta { margin-left: 0; margin-top: 0.5rem; text-align: center; }
  .nav__toggle { display: flex; }
  .services__grid { grid-template-columns: 1fr; }
  .tech__grid { grid-template-columns: 1fr; }
  .process__steps::before { display: none; }
  .contact__cards { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__brand { grid-column: auto; }
  .nav__right { gap: 0.35rem; }
  .lang-divider { display: none; }
  .lang-btn { font-size: 0.65rem; padding: 0.15em 0.3em; }
  .lang-switch { gap: 0; background: none; border: none; padding: 0; }
  .cursor-glow { display: none; }
}

@media (max-width: 500px) {
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .services__grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  html { scroll-behavior: auto; }
  .hero__title em { animation: none; }
  .cursor-glow { display: none; }
}
