/* ============================================================
   Fortune Machine Computer — futuristic interactive homepage
   ============================================================ */

:root {
  --bg: #050014;
  --bg-2: #0a0422;
  --violet: #7c4dff;
  --cyan: #4de8ff;
  --pink: #ff5df0;
  --text: #eef0ff;
  --muted: #9aa0c9;
  --line: rgba(140, 130, 255, 0.16);
  --glass: rgba(20, 14, 52, 0.45);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow-violet: 0 0 24px rgba(124, 77, 255, 0.45);
  --glow-cyan: 0 0 24px rgba(77, 232, 255, 0.35);
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(124, 77, 255, 0.55); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--violet), var(--cyan)); border-radius: 8px; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

/* ---------------- Boot loader ---------------- */
#boot-loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; gap: 14px; justify-items: center;
  background: var(--bg);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
#boot-loader p { font-family: var(--font-display); letter-spacing: 0.5em; color: var(--muted); font-weight: 600; margin-left: 0.5em; }
.loader-core { position: relative; width: 56px; height: 56px; }
.loader-core span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--violet);
  border-right-color: var(--cyan);
  animation: spin 1s linear infinite;
}
.loader-core::after {
  content: ""; position: absolute; inset: 14px; border-radius: 50%;
  background: radial-gradient(circle, var(--violet) 0%, transparent 70%);
  opacity: 0.7; animation: pulse 1.4s ease-in-out infinite;
}
body.scene-ready #boot-loader { opacity: 0; visibility: hidden; pointer-events: none; }
body.no-webgl #boot-loader p::after { content: " — loading interface…"; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.1); opacity: 0.9; } }

/* ---------------- 3D scene + atmosphere ---------------- */
#scene-host { position: fixed; inset: 0; z-index: 0; }
#scene-host canvas { display: block; width: 100%; height: 100%; }

.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 30%, transparent 40%, rgba(5, 0, 20, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 0, 20, 0.35) 0%, transparent 25%, transparent 70%, rgba(5, 0, 20, 0.75) 100%);
}
.grid-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 77, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 77, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 32%, black 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 32%, black 20%, transparent 78%);
}

/* ---------------- Page layout ---------------- */
.page-wrap { position: relative; z-index: 2; }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px clamp(20px, 4vw, 48px);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s, padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8, 3, 28, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
  padding-top: 12px; padding-bottom: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-glyph { display: grid; place-items: center; filter: drop-shadow(0 0 10px rgba(124, 77, 255, 0.6)); }
.brand-text {
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.16em; font-size: 15px;
  display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap;
}
.brand-accent { color: var(--muted); font-weight: 500; }

.site-nav { display: flex; gap: clamp(16px, 3vw, 36px); }
.site-nav a {
  position: relative; color: var(--muted); font-size: 15px; font-weight: 500;
  transition: color 0.25s;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width 0.3s var(--ease);
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { width: 100%; }
.nav-cta { display: inline-flex; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--violet), #a04dff 55%, var(--cyan));
  box-shadow: var(--glow-violet), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(124, 77, 255, 0.65), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(124, 77, 255, 0.6); box-shadow: 0 0 26px rgba(124, 77, 255, 0.25); }

/* ---------------- Hero ---------------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 140px clamp(20px, 6vw, 80px) 90px;
  position: relative;
}
.hero-inner { max-width: 860px; }
.eyebrow {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.32em; color: var(--cyan); text-transform: uppercase;
  margin-bottom: 22px; display: flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 44px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan)); }

.hero-title {
  font-family: var(--font-display); font-size: clamp(2.7rem, 7vw, 5.2rem);
  font-weight: 700; line-height: 1.03; letter-spacing: -0.02em;
  text-shadow: 0 10px 60px rgba(5, 0, 20, 0.8);
}
.grad {
  background: linear-gradient(100deg, var(--violet), var(--cyan) 60%, var(--pink));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub {
  margin-top: 26px; max-width: 58ch; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem);
}
.hero-cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; }
.hero-badges { margin-top: 46px; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.hero-badges li { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: 0.04em; }
.dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.dot-violet { background: var(--violet); color: var(--violet); }
.dot-cyan { background: var(--cyan); color: var(--cyan); }
.dot-pink { background: var(--pink); color: var(--pink); }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 46px; border: 1.5px solid var(--line); border-radius: 999px;
  display: flex; justify-content: center; padding-top: 9px;
  transition: border-color 0.3s;
}
.scroll-cue:hover { border-color: rgba(124, 77, 255, 0.7); }
.scroll-cue-line {
  width: 3px; height: 10px; border-radius: 3px;
  background: linear-gradient(180deg, var(--violet), var(--cyan));
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

/* ---------------- Sections ---------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(90px, 12vh, 150px) clamp(20px, 4vw, 48px); }
.section-head { margin-bottom: clamp(40px, 6vh, 64px); }
.section-title {
  font-family: var(--font-display); font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  font-weight: 700; letter-spacing: -0.015em; line-height: 1.12;
}

/* ---------------- Glass cards ---------------- */
.glass-card, .cap-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.glass-card:hover, .cap-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 77, 255, 0.5);
  box-shadow: var(--glow-violet);
}

.about-grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.about-lead { font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: #dde0ff; line-height: 1.6; }
.about-cards { display: grid; gap: 18px; }
.glass-card h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.glass-card h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: linear-gradient(135deg, var(--violet), var(--cyan)); box-shadow: 0 0 10px var(--violet); }
.glass-card p, .cap-card p { color: var(--muted); font-size: 15px; }

/* ---------------- Capabilities ---------------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cap-card { position: relative; overflow: hidden; }
.cap-card::before {
  content: ""; position: absolute; top: -60px; right: -60px; width: 140px; height: 140px;
  border-radius: 50%; background: radial-gradient(circle, rgba(124, 77, 255, 0.28), transparent 70%);
  transition: transform 0.5s var(--ease);
}
.cap-card:hover::before { transform: scale(1.6); }
.cap-icon { font-size: 22px; color: var(--cyan); text-shadow: 0 0 14px var(--cyan); }
.cap-card h3 { font-family: var(--font-display); font-size: 19px; margin: 14px 0 10px; }

/* ---------------- Process ---------------- */
.process-list { display: grid; gap: 16px; counter-reset: none; }
.process-step {
  display: grid; grid-template-columns: 88px 1fr; gap: 22px; align-items: start;
  padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(124, 77, 255, 0.08), rgba(255, 255, 255, 0.02));
  transition: border-color 0.35s, transform 0.35s var(--ease);
}
.process-step:hover { border-color: rgba(77, 232, 255, 0.45); transform: translateX(8px); }
.step-num {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.process-step h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 6px; }
.process-step p { color: var(--muted); font-size: 15px; }

/* ---------------- Contact ---------------- */
.section-contact { text-align: center; }
.section-contact .eyebrow { justify-content: center; }
.section-contact .eyebrow::before { display: none; }
.section-contact .section-head { margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 20px; justify-content: center; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 44px 28px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.contact-card:hover { transform: translateY(-6px); border-color: rgba(77, 232, 255, 0.55); box-shadow: var(--glow-cyan); }
.contact-icon {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; color: #fff; margin-bottom: 10px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow: var(--glow-violet);
}
.contact-card h3 { font-family: var(--font-display); font-size: 20px; }
.contact-card p { font-size: 20px; font-weight: 600; color: var(--text); }
.contact-hint { color: var(--muted); font-size: 13.5px; }
.contact-note { margin-top: 30px; color: var(--muted); font-size: 14px; letter-spacing: 0.06em; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px clamp(20px, 4vw, 48px); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.footer-tag { color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--muted); font-size: 14px; transition: color 0.25s; }
.footer-links a:hover { color: var(--cyan); }

/* ---------------- WhatsApp float ---------------- */
.wa-float {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s var(--ease);
}
.wa-float:hover { transform: scale(1.1) translateY(-3px); }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.6);
  animation: waPulse 2.2s var(--ease) infinite;
}
@keyframes waPulse { 0% { transform: scale(1); opacity: 1; } 70% { transform: scale(1.55); opacity: 0; } 100% { transform: scale(1.55); opacity: 0; } }

/* ---------------- Scroll reveal ---------------- */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------------- Accessibility & motion ---------------- */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

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

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cap-grid, .contact-grid { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 56px 1fr; padding: 20px; }
  .hero { padding-top: 120px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}
