:root {
  --bg: #020403;
  --surface: rgba(8, 18, 11, .72);
  --text: #f1fff4;
  --muted: #89a18e;
  --line: rgba(255, 255, 255, .1);
  --acid: #7dff50;
  --emerald: #19d75b;
  --lime: #b3ff5a;
  --forest: #0a913d;
  --green: #55ff8c;
  --danger: #ff687d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, sans-serif;
}

body::before { content: ""; position: fixed; inset: 0; z-index: -4; pointer-events: none; background-image: linear-gradient(rgba(47,255,104,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(47,255,104,.028) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%); mask-image: linear-gradient(to bottom, black, transparent 85%); }

a { color: inherit; text-decoration: none; }
button { font: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
#particles, .noise, .aurora, .cursor-glow { position: fixed; inset: 0; pointer-events: none; }
#particles { z-index: -3; }
.noise { z-index: -1; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.aurora { z-index: -2; filter: blur(90px); opacity: .17; border-radius: 50%; }
.aurora-one { width: 55vw; height: 55vw; left: -20vw; top: -25vw; background: var(--forest); animation: float 14s ease-in-out infinite alternate; }
.aurora-two { width: 45vw; height: 45vw; left: auto; top: 25vh; right: -18vw; background: var(--emerald); animation: float 17s ease-in-out infinite alternate-reverse; }
.cursor-glow { width: 380px; height: 380px; inset: -190px auto auto -190px; border-radius: 50%; background: radial-gradient(circle, rgba(43, 255, 96, .14), transparent 65%); z-index: -1; transition: transform .08s linear; }

.nav { height: 92px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; font-family: "Space Grotesk", sans-serif; font-size: 19px; font-weight: 700; letter-spacing: .08em; }
.brand-logo { width: 50px; height: 50px; object-fit: cover; border-radius: 12px; filter: saturate(1.25) contrast(1.15); box-shadow: 0 0 24px rgba(42,255,94,.18); }
.brand-name span { color: var(--acid); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.facebook-link { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; color: #c6d7ca; font-size: 11px; font-weight: 700; transition: border-color .25s, color .25s, transform .25s; }
.facebook-link b { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: #061008; background: var(--acid); font-family: Arial, sans-serif; font-size: 14px; }
.facebook-link:hover { color: var(--acid); border-color: rgba(125,255,80,.45); transform: translateY(-2px); }
.system-state { display: flex; align-items: center; gap: 9px; padding: 10px 14px; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.state-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffd15c; box-shadow: 0 0 14px currentColor; animation: pulse 1.4s infinite; }
.system-state.all-online .state-dot { background: var(--green); }
.system-state.some-offline .state-dot { background: var(--danger); }

.hero { min-height: 630px; position: relative; display: flex; flex-direction: column; justify-content: center; padding-bottom: 70px; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; color: #b4bad0; font-size: 11px; font-weight: 700; letter-spacing: .24em; }
.eyebrow span { width: 31px; height: 1px; background: linear-gradient(90deg, var(--acid), transparent); }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; margin: 0; }
h1 { max-width: 750px; font-size: clamp(58px, 7.5vw, 102px); line-height: .82; letter-spacing: -.065em; }
h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px rgba(125,255,80,.7); text-shadow: 0 0 42px rgba(29,255,91,.22); }
h1 strong { color: var(--acid); font-weight: 700; text-shadow: 0 0 42px rgba(66,255,107,.25); }
.hero-copy { max-width: 540px; margin: 34px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; margin-top: 31px; }
.primary-button, .ghost-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 21px; border-radius: 14px; border: 1px solid transparent; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .25s, box-shadow .25s, border-color .25s; }
.primary-button { gap: 30px; color: #020603; background: linear-gradient(115deg, var(--lime), var(--emerald)); box-shadow: 0 12px 38px rgba(57, 255, 107, .18); }
.ghost-button { color: #dce0ee; background: rgba(255,255,255,.04); border-color: var(--line); }
.primary-button:hover, .ghost-button:hover { transform: translateY(-3px); }
.ghost-button:hover { border-color: rgba(255,255,255,.25); }
.hero-orbit { position: absolute; right: -4px; top: 50%; width: 440px; height: 440px; transform: translateY(-55%); display: grid; place-items: center; opacity: .94; }
.hero-logo-wrap { width: 268px; height: 268px; position: relative; overflow: hidden; border: 1px solid rgba(111,255,81,.18); border-radius: 34px; background: #000; box-shadow: 0 0 90px rgba(38,255,91,.14), inset 0 0 30px rgba(255,255,255,.025); transform: rotate(-2deg); }
.hero-logo-wrap img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.28) contrast(1.12); }
.hero-logo-wrap::after { content: "D4 / 2026"; position: absolute; right: 15px; top: 14px; color: rgba(174,255,187,.48); font-family: monospace; font-size: 9px; letter-spacing: .15em; }
.scan-line { position: absolute; left: 0; right: 0; top: -12px; height: 2px; background: var(--acid); box-shadow: 0 0 16px var(--acid); opacity: .55; animation: scan 4s ease-in-out infinite; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; animation: spin 13s linear infinite; }
.orbit-a { inset: 28px; }
.orbit-b { inset: 78px; animation-direction: reverse; animation-duration: 8s; border-style: dashed; }
.orbit span { position: absolute; top: 50%; left: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 18px var(--acid); }
.orbit-b span { top: 7%; left: 75%; background: var(--emerald); box-shadow: 0 0 18px var(--emerald); }

.services { padding: 80px 0 110px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.section-number { color: var(--acid); font-size: 10px; font-weight: 700; letter-spacing: .2em; }
.section-heading h2 { margin-top: 8px; font-size: clamp(35px, 5vw, 58px); letter-spacing: -.045em; }
.section-heading p { max-width: 290px; margin: 0 0 5px; color: var(--muted); font-size: 13px; }
.card-grid { display: grid; grid-template-columns: minmax(0, 560px); justify-content: center; gap: 18px; margin-top: 26px; }
.service-card { --accent: var(--emerald); min-height: 470px; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(145deg, rgba(16,39,21,.72), rgba(4,10,6,.78)); box-shadow: 0 22px 60px rgba(0,0,0,.3); transform-style: preserve-3d; transition: border-color .35s, box-shadow .35s, transform .15s linear; }
.service-card::before { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -100px; border-radius: 50%; background: var(--accent); filter: blur(80px); opacity: .13; transition: opacity .35s; }
.service-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 28px 80px rgba(0,0,0,.35), 0 0 35px color-mix(in srgb, var(--accent) 12%, transparent); }
.service-card:hover::before { opacity: .28; }
.card-lime { --accent: var(--lime); }
.card-forest { --accent: #35bd62; }
.card-shine { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.13), transparent 32%); transition: opacity .3s; pointer-events: none; }
.service-card:hover .card-shine { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.app-number { color: #686e86; font-family: "Space Grotesk"; font-size: 12px; }
.status { display: flex; align-items: center; gap: 7px; color: #ffd15c; font-size: 9px; letter-spacing: .13em; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status.online { color: var(--green); }
.status.offline { color: var(--danger); }
.app-icon { width: 76px; height: 76px; display: grid; place-items: center; margin-top: 50px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 22px; color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: inset 0 0 25px color-mix(in srgb, var(--accent) 7%, transparent); font-size: 29px; transform: translateZ(22px); }
.card-content { margin-top: auto; }
.port { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.card-content h3 { margin-top: 7px; font-size: 52px; letter-spacing: -.04em; }
.card-content p { min-height: 42px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.launch-link { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.launch-link span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #090b17; background: var(--accent); transition: transform .3s; }
.launch-link:hover span { transform: rotate(45deg) scale(1.08); }

footer { display: flex; align-items: center; gap: 18px; padding: 0 0 34px; color: #666d84; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.footer-line { flex: 1; height: 1px; background: var(--line); }
footer p { margin: 0; }
footer span, footer a { color: var(--acid); }
footer a { transition: opacity .2s; }
footer a:hover { opacity: .7; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .3s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
@keyframes float { to { transform: translate(8vw, 8vh) scale(1.12); } }
@keyframes bars { to { height: 20%; } }
@keyframes scan { 0%, 100% { top: -12px; opacity: 0; } 15%, 85% { opacity: .55; } 50% { top: calc(100% + 12px); } }

@media (max-width: 900px) {
  .hero-orbit { right: -100px; opacity: .35; }
  .hero-copy { max-width: 460px; }
  .card-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 390px; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 26px, 1180px); }
  .nav { height: 76px; }
  .system-state span:last-child { display: none; }
  .facebook-link span { display: none; }
  .hero { min-height: 590px; padding-bottom: 45px; }
  h1 { font-size: clamp(57px, 19vw, 82px); }
  .hero-orbit { width: 260px; height: 260px; right: -100px; top: 33%; }
  .hero-actions { align-items: stretch; flex-direction: column; width: min(100%, 300px); }
  .section-heading { align-items: start; flex-direction: column; gap: 18px; }
  .section-heading p { margin: 0; }
  .services { padding-top: 55px; }
  footer { flex-wrap: wrap; }
  .footer-line { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
