/* Virtual Application Core — Design Tokens & Landing */

:root {
  /* Colors */
  --surface: #051424;
  --surface-dim: #051424;
  --surface-bright: #2c3a4c;
  --surface-container-lowest: #010f1f;
  --surface-container-low: #0d1c2d;
  --surface-container: #122131;
  --surface-container-high: #1c2b3c;
  --surface-container-highest: #273647;
  --on-surface: #d4e4fa;
  --on-surface-variant: #b9ccb5;
  --outline: #849581;
  --outline-variant: #3b4b3a;
  --surface-tint: #00e55b;
  --primary: #edffe8;
  --on-primary: #003911;
  --primary-container: #00ff66;
  --on-primary-container: #007128;
  --secondary: #4edea3;
  --on-secondary: #003824;
  --secondary-container: #00a572;
  --background: #051424;
  --on-background: #d4e4fa;

  /* Typography */
  --font-headline: "Geist", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Spacing */
  --unit: 4px;
  --container-max: 1280px;
  --gutter: 24px;
  --margin-desktop: 64px;
  --margin-mobile: 20px;
  --stack-sm: 8px;
  --stack-md: 16px;
  --stack-lg: 32px;
  --stack-xl: 64px;

  /* Effects */
  --glass-bg: rgba(10, 18, 32, 0.72);
  --glass-border: linear-gradient(
    135deg,
    rgba(0, 255, 102, 0.28),
    rgba(59, 75, 58, 0.5) 40%,
    rgba(0, 229, 91, 0.12)
  );
  --glow-primary: 0 0 24px rgba(0, 255, 102, 0.35);
  --nav-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--on-surface-variant);
  background: var(--background);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Atmospheric background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 255, 102, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 30%, rgba(0, 165, 114, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 70%, rgba(0, 229, 91, 0.06), transparent 50%),
    var(--background);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  cursor: pointer;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--margin-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-inline: 32px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--margin-desktop);
  }
}

/* Typography */
.headline-xl {
  font-family: var(--font-headline);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--on-surface);
}

.headline-lg {
  font-family: var(--font-headline);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}

.headline-md {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--on-surface);
}

.body-lg {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--on-surface-variant);
}

.body-md {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--on-surface-variant);
}

.label-md {
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-container);
  color: var(--on-primary);
  box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.4);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary-container);
}

.btn-secondary:hover {
  background: rgba(0, 255, 102, 0.08);
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.15);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

/* Chip / Tag */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--secondary);
  background: rgba(0, 229, 91, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.22);
}

/* Glass Card */
.glass-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 255, 102, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(0, 255, 102, 0.08),
    0 0 40px rgba(0, 255, 102, 0.06);
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.02;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.glass-card > * {
  position: relative;
  z-index: 1;
}

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(5, 20, 36, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 102, 0.1) 20%,
    rgba(0, 255, 102, 0.35) 50%,
    rgba(0, 255, 102, 0.1) 80%,
    transparent
  );
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--stack-md);
}

.nav__brand {
  font-family: var(--font-headline);
  font-size: clamp(15px, 2.5vw, 18px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  white-space: nowrap;
}

.nav__links {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav__links a {
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--primary-container);
}

.nav__cta {
  flex-shrink: 0;
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-right: -8px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: var(--stack-md) var(--margin-mobile) var(--stack-lg);
  background: rgba(5, 20, 36, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 255, 102, 0.15);
}

.nav__mobile.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}

.nav__mobile a {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 500;
  color: var(--on-surface);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 900px) {
  .nav__links {
    display: flex;
  }

  .nav__toggle {
    display: none;
  }

  .nav__mobile {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .nav__toggle {
    display: none;
  }

  .nav__cta {
    display: inline-flex;
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: var(--stack-xl);
  text-align: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stack-md);
  max-width: 720px;
  margin-inline: auto;
}

.hero__brand {
  font-family: var(--font-headline);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-container);
  text-shadow: 0 0 24px rgba(0, 255, 102, 0.4);
}

.hero__title {
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  max-width: 18ch;
}

.hero__text {
  max-width: 42ch;
  font-size: 16px;
  color: var(--on-surface-variant);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin-top: var(--stack-sm);
}

.hero__visual {
  margin-top: var(--stack-xl);
  max-width: 420px;
  margin-inline: auto;
}

.hero__phone-wrap {
  padding: 28px 24px 20px;
}

@media (min-width: 768px) {
  .hero {
    padding-top: calc(var(--nav-height) + 72px);
    padding-bottom: 96px;
  }

  .hero__title {
    font-size: 40px;
    max-width: 22ch;
  }

  .hero__text {
    font-size: 18px;
  }

  .hero__actions {
    flex-direction: row;
    max-width: none;
    justify-content: center;
  }

  .hero__actions .btn {
    width: auto;
    min-width: 220px;
  }

  .hero__visual {
    max-width: 480px;
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: 56px;
  }
}

/* Phone mockup */
.phone {
  width: min(260px, 70vw);
  margin-inline: auto;
  background: linear-gradient(160deg, #0a1628 0%, #06101c 100%);
  border-radius: 28px;
  border: 2px solid rgba(0, 255, 102, 0.25);
  box-shadow:
    0 0 0 1px rgba(0, 255, 102, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 255, 102, 0.12);
  overflow: hidden;
  aspect-ratio: 9 / 17;
  position: relative;
}

.phone__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 18px;
  background: #010f1f;
  border-radius: 12px;
  z-index: 2;
}

.phone__screen {
  padding: 40px 14px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(0, 255, 102, 0.15), transparent 55%),
    #071422;
}

.phone__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 255, 102, 0.12);
  border: 1px solid rgba(0, 255, 102, 0.35);
  display: grid;
  place-items: center;
  color: var(--primary-container);
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.25);
}

.phone__icon svg {
  width: 18px;
  height: 18px;
}

.phone__status {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.04em;
}

.phone__chart {
  flex: 1;
  min-height: 100px;
  border-radius: 12px;
  background: rgba(1, 15, 31, 0.7);
  border: 1px solid rgba(0, 255, 102, 0.12);
  padding: 12px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone__chart-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: 0.02em;
}

.phone__chart svg {
  width: 100%;
  height: 70px;
  overflow: visible;
}

.phone__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.phone__metric {
  background: rgba(1, 15, 31, 0.65);
  border: 1px solid rgba(0, 255, 102, 0.12);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: left;
}

.phone__metric-value {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-container);
  text-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
  line-height: 1.2;
}

.phone__metric-label {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 500;
  color: var(--on-surface-variant);
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.phone__ring-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 4px 0;
}

.phone__ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    conic-gradient(var(--primary-container) var(--p, 70%), rgba(39, 54, 71, 0.8) 0);
  display: grid;
  place-items: center;
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.2);
}

.phone__ring::after {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #071422;
}

/* ========== EXPERTISE ========== */
.expertise {
  padding-block: var(--stack-xl);
}

.expertise__header {
  margin-bottom: var(--stack-lg);
}

.expertise__grid {
  display: grid;
  gap: var(--stack-md);
}

@media (min-width: 768px) {
  .expertise__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--gutter);
  }
}

@media (min-width: 1100px) {
  .expertise__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(18, 33, 49, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 255, 102, 0.12);
  box-shadow: inset 0 1px 0 rgba(0, 255, 102, 0.06);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  border-color: rgba(0, 255, 102, 0.35);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(0, 255, 102, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.25),
    0 0 24px rgba(0, 255, 102, 0.08);
}

.service-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.28);
  display: grid;
  place-items: center;
  color: var(--primary-container);
  margin-bottom: var(--stack-md);
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.12);
}

.service-card__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__title {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 8px;
}

.service-card__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--on-surface-variant);
}

/* ========== STATS ========== */
.stats {
  padding-block: var(--stack-xl);
  text-align: center;
}

.stats__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stack-xl);
}

@media (min-width: 768px) {
  .stats__grid {
    flex-direction: row;
    justify-content: center;
    gap: clamp(40px, 8vw, 96px);
  }
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stat__value {
  font-family: var(--font-headline);
  font-size: clamp(56px, 10vw, 80px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--primary-container);
  text-shadow:
    0 0 20px rgba(0, 255, 102, 0.55),
    0 0 48px rgba(0, 255, 102, 0.25);
}

.stat__label {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-surface);
}

/* ========== FOOTER ========== */
.footer {
  margin-top: var(--stack-xl);
  background: var(--surface-container);
  border-top: 1px solid rgba(0, 255, 102, 0.08);
  padding: var(--stack-xl) 0 var(--stack-lg);
  text-align: center;
}

.footer__brand {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: var(--stack-lg);
}

.footer__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--stack-xl);
}

.footer__nav a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: var(--primary-container);
}

.footer__copy {
  font-size: 13px;
  color: var(--outline);
}

@media (min-width: 640px) {
  .footer__nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 28px;
  }
}

/* ========== MOTION ========== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@keyframes chart-draw {
  from { stroke-dashoffset: 240; }
  to { stroke-dashoffset: 0; }
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(0, 255, 102, 0.4)); }
  50% { filter: drop-shadow(0 0 12px rgba(0, 255, 102, 0.8)); }
}

.phone__chart-line {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: chart-draw 1.8s ease-out 0.4s forwards, pulse-glow 2.4s ease-in-out 2s infinite;
}

@keyframes float-phone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero__phone-wrap .phone {
  animation: float-phone 5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .phone__chart-line,
  .hero__phone-wrap .phone {
    animation: none;
  }
  .phone__chart-line {
    stroke-dashoffset: 0;
  }
}
