/* ═══════════════════════════════════════════════════
   AOVIUM — Precision-Industrial Design System
   ═══════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --color-bg:         #000000;
  --color-bg-raised:  #080808;
  --color-surface:    #111111;
  --color-surface-2:  #1a1a1a;
  --color-border:     rgba(255, 255, 255, 0.08);
  --color-border-h:   rgba(255, 255, 255, 0.14);

  --color-text:       #ffffff;
  --color-text-2:     #999999;
  --color-text-3:     #555555;

  --color-accent:     #ffffff;
  --color-accent-dim: rgba(255, 255, 255, 0.06);
  --color-amber:      #999999;

  --font-display:     'General Sans', sans-serif;
  --font-body:        'Satoshi', sans-serif;

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

  --container:        1200px;
  --gap:              clamp(1.5rem, 4vw, 3rem);
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-2);
  background: var(--color-bg);
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
code { font-family: 'SF Mono', 'Fira Code', monospace; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ── Section Primitives ── */
.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 14, 20, 0.7);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-2);
}

.nav__links a {
  transition: color 0.2s;
  position: relative;
}

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

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

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

.nav__cta {
  background: var(--color-accent);
  color: #000000 !important;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: all 0.25s var(--ease-out);
}

.nav__cta:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 1);
}

.nav__cta::after { display: none !important; }

/* Mobile toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px; height: 20px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
}

.nav__toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}

.nav__toggle[aria-expanded="true"] span:first-child {
  transform: translateY(9px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-9px) rotate(-45deg);
}

.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 1rem var(--gap) 1.5rem;
  gap: 0.25rem;
  border-top: 1px solid var(--color-border);
}

.nav__mobile a {
  display: block;
  padding: 0.65rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-2);
  transition: color 0.2s;
}

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

.nav__mobile.open { display: flex; }

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem var(--gap) 4rem;
  overflow: hidden;
}

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

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 40%, rgba(255, 255, 255, 0.02), transparent);
  pointer-events: none;
}

#grid-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

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

/* ── Logo Shard Animation ── */
.hero__logo {
  margin: 0 auto 2.5rem;
  width: 120px;
  height: 114px;
}

.hero-mark { width: 100%; height: 100%; }

.shard {
  opacity: 0;
  animation: shard-in 0.9s var(--ease-out) forwards;
}

.shard--1 { transform-origin: 528px 427px; animation-delay: 0.1s; --tx: -60px; --ty: -80px; --r: -12deg; }
.shard--2 { transform-origin: 897px 631px; animation-delay: 0.2s; --tx: 70px;  --ty: -50px; --r: 15deg; }
.shard--3 { transform-origin: 216px 971px; animation-delay: 0.3s; --tx: -50px; --ty: 60px;  --r: -8deg; }
.shard--4 { transform-origin: 778px 1045px; animation-delay: 0.4s; --tx: 0;    --ty: 70px;  --r: 4deg; }

@keyframes shard-in {
  0% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

/* ── Hero Text ── */
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  color: var(--color-text);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero__title-line { display: block; }

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-2);
  max-width: 540px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

/* ── Proof Tags ── */
.hero__proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.proof-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-3);
}

.proof-sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-text-3);
  flex-shrink: 0;
}

/* ── Buttons ── */
.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  border: none;
}

.btn--primary {
  background: var(--color-accent);
  color: #000000;
}

.btn--primary:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-2);
  border: 1px solid var(--color-border-h);
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: var(--color-text-3);
  background: rgba(255, 255, 255, 0.03);
}

/* ── Scroll Indicator ── */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50%      { opacity: 0.8; transform: scaleY(1); }
}

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal-up 0.7s var(--ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   SERVICES
   ═══════════════════════════════════════════════════ */
.services {
  padding: 7rem 0;
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-h) 20%, var(--color-border-h) 80%, transparent);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2.25rem 2rem;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.service-card:hover {
  border-color: var(--color-border-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.service-card:hover::before { transform: scaleX(1); }

.service-card__icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-dim);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  color: var(--color-accent);
}

.service-card__icon svg { width: 22px; height: 22px; }

.service-card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

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

/* ═══════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════ */
.about {
  padding: 7rem 0;
  background: var(--color-bg-raised);
  position: relative;
}

.about::before,
.about::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-h) 20%, var(--color-border-h) 80%, transparent);
}

.about::before { top: 0; }
.about::after  { bottom: 0; }

.about__layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about__body p {
  margin-bottom: 1.25rem;
  font-size: 1.025rem;
  line-height: 1.75;
}

.about__body p:last-child { margin-bottom: 0; }

.about__stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--color-border);
  padding-left: 2.5rem;
}

.stat {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.stat:last-child { border-bottom: none; }

.stat__accent {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
  letter-spacing: 0.05em;
}

.stat__label {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.stat__detail {
  font-size: 0.875rem;
  color: var(--color-text-2);
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════
   CAPABILITIES
   ═══════════════════════════════════════════════════ */
.capabilities {
  padding: 7rem 0;
  position: relative;
}

.cap__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cap-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2.25rem 2rem;
}

.cap-block__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 0.75rem;
}

.cap-block__title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 32px; height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.cap-list li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--color-text-2);
  border-bottom: 1px solid var(--color-border);
  line-height: 1.5;
}

.cap-list li:last-child { border-bottom: none; }

.cap-list--codes li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.cap-list--codes code {
  font-size: 0.8rem;
  color: var(--color-accent);
  background: var(--color-accent-dim);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
  font-weight: 500;
}

.cap-list--diff li {
  border-bottom: none;
  padding: 0.75rem 0;
}

.cap-list--diff strong {
  display: block;
  color: var(--color-text);
  font-size: 0.925rem;
  margin-bottom: 0.2rem;
}

.cap-list--diff span {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════ */
.contact {
  padding: 7rem 0;
  background: var(--color-bg-raised);
  position: relative;
}

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

.contact__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact__desc {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-text-2);
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.5rem 2rem;
}

.contact-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-item:last-child { border-bottom: none; }

.contact-item__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-3);
  margin-bottom: 0.4rem;
}

.contact-item__value {
  display: block;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
}

a.contact-item__value {
  color: var(--color-accent);
  transition: color 0.2s;
}

a.contact-item__value:hover { color: rgba(255, 255, 255, 0.7); }

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-3);
}

.footer__brand svg { color: var(--color-text-3); }

.footer__copy {
  font-size: 0.8rem;
  color: var(--color-text-3);
}

/* ═══════════════════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════════════════ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-reveal { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .shard { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .services__grid,
  .cap__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero__logo {
    width: 90px;
    height: 86px;
  }

  .services__grid,
  .cap__grid {
    grid-template-columns: 1fr;
  }

  .about__layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about__stats {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
  }

  .contact__layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer__inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__proof { gap: 0.6rem; }
  .proof-sep { display: none; }
  .proof-tag {
    background: var(--color-surface);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
  }
  .hero__actions { flex-direction: column; align-items: stretch; }
}
