/* ===== Fandre Technologies — styles ===== */

:root {
  --bg: #070b12;
  --bg-alt: #0c121d;
  --surface: #111a28;
  --surface-2: #16223440;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(120, 170, 255, 0.35);
  --text: #eaf0f8;
  --text-dim: #9aa7bd;
  --text-faint: #647189;
  --accent: #4f8cff;
  --accent-2: #38e0c8;
  --accent-grad: linear-gradient(120deg, #4f8cff, #38e0c8);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 18px;
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--accent) var(--bg);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 10px;
  border: 3px solid var(--bg);
}
::selection { background: rgba(56, 224, 200, 0.28); color: #fff; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', sans-serif; line-height: 1.08; letter-spacing: -0.02em; }

.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.eyebrow.center { justify-content: center; }
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(56, 224, 200, 0.15);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(56,224,200,0.12); }
  50% { box-shadow: 0 0 0 6px rgba(56,224,200,0.04); }
}

.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-mark.sm { width: 22px; height: 22px; }

/* ===== SCROLL PROGRESS ===== */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  z-index: 200;
  background: var(--accent-grad);
  box-shadow: 0 0 12px rgba(79, 140, 255, 0.6);
  transition: width 0.1s linear;
}

/* ===== KONAMI MATRIX OVERLAY ===== */
#matrix {
  position: fixed; inset: 0; z-index: 300;
  pointer-events: none; opacity: 0;
  transition: opacity 0.6s ease;
}
#matrix.on { opacity: 0.9; }

/* ===== NAV ===== */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, backdrop-filter 0.3s;
}
#nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 11, 18, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 0.98rem; }
.nav-brand-text { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; }
.nav-brand-thin { font-weight: 500; color: var(--text-dim); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.9rem; color: var(--text-dim); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 9px 19px; border-radius: 999px;
  background: var(--accent-grad); color: #05131f !important; font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(79,140,255,0.6); }

/* ===== BUTTONS ===== */
.btn {
  position: relative; display: inline-block; padding: 14px 28px;
  border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  cursor: pointer; overflow: hidden;
}
.btn-primary { background: var(--accent-grad); color: #05131f; box-shadow: 0 14px 34px -12px rgba(79, 140, 255, 0.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(79, 140, 255, 0.75); }
/* sheen sweep */
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-18deg); transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 140%; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--border-bright); transform: translateY(-2px); }
.btn-lg { padding: 17px 36px; font-size: 1.05rem; font-family: var(--mono); letter-spacing: -0.01em; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; padding: 120px 0 90px;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(120,160,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 35% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 35% 40%, #000 30%, transparent 75%);
}
.hero-spotlight {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 30%) var(--my, 35%), rgba(56,224,200,0.10), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.hero:hover .hero-spotlight { opacity: 1; }
.hero-fade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 22% 42%, rgba(79,140,255,0.16), transparent 70%),
    linear-gradient(180deg, transparent 55%, var(--bg) 96%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 52px; align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-title { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; margin-bottom: 24px; }
#morph { display: inline-block; }
.hero-sub { font-size: clamp(1.02rem, 1.8vw, 1.24rem); color: var(--text-dim); max-width: 600px; font-weight: 300; }
.hero-sub.center { margin: 0 auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }
.hero-trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 44px;
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint);
}
.hero-trust i { width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); opacity: 0.6; }

/* ===== TERMINAL ===== */
.terminal {
  background: rgba(8, 12, 20, 0.82);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 70px -28px rgba(0,0,0,0.8), 0 0 0 1px rgba(79,140,255,0.06);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 15px; background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.term-title { margin-left: 8px; font-family: var(--mono); font-size: 0.72rem; color: var(--text-faint); }
.term-body {
  padding: 18px 18px 22px; min-height: 312px;
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.85;
}
#term { white-space: pre-wrap; word-break: break-word; color: #cdd7e6; }
.term-body .pr { color: var(--accent); font-weight: 600; }
.term-body .cmd { color: #eaf0f8; }
.term-body .ok { color: #52e0b8; }
.term-body .ok::before { content: "✓ "; }
.term-body .arr { color: #7fb0ff; }
.term-body .arr::before { content: "→ "; }
.term-body .dim { color: var(--text-faint); }
.term-cursor {
  display: inline-block; width: 8px; height: 1.05em; vertical-align: -2px;
  background: var(--accent-2); margin-left: 1px; animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 14px; display: grid; place-items: start center; padding-top: 8px;
}
.scroll-cue span { width: 4px; height: 8px; border-radius: 4px; background: var(--accent-2); animation: scrollPulse 1.7s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100% { opacity: 0.4; transform: translateY(0); } 50% { opacity: 1; transform: translateY(7px); } }

/* ===== SECTIONS ===== */
.section { padding: 120px 0; position: relative; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(1.95rem, 4vw, 2.95rem); font-weight: 700; margin-bottom: 52px; }

/* ===== CARDS ===== */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 32px; overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
  transition: transform 0.18s ease, border-color 0.28s;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, rgba(79,140,255,0.14), transparent 45%);
  opacity: 0; transition: opacity 0.3s;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(170px circle at var(--cx, 50%) var(--cy, 50%), rgba(120,170,255,0.12), transparent 55%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { border-color: var(--border-bright); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card-icon {
  position: relative; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px; background: rgba(79,140,255,0.12);
  border: 1px solid rgba(79,140,255,0.2); color: var(--accent-2); margin-bottom: 22px;
}
.card-icon svg { width: 24px; height: 24px; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { position: relative; font-size: 1.26rem; margin-bottom: 10px; }
.card p { position: relative; color: var(--text-dim); font-size: 0.98rem; }

/* ===== STEPS ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step { padding-top: 20px; border-top: 2px solid var(--border); position: relative; }
.step::after { content: ""; position: absolute; top: -2px; left: 0; width: 46px; height: 2px; background: var(--accent-grad); }
.step-num { font-family: var(--mono); font-size: 0.95rem; font-weight: 600; color: var(--accent); }
.step h3 { font-size: 1.3rem; margin: 14px 0 8px; }
.step p { color: var(--text-dim); }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: start; }
.prose { color: var(--text-dim); margin-bottom: 18px; max-width: 56ch; }
.about-stats { display: flex; flex-direction: column; gap: 16px; }
.stat {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 18px 22px; transition: transform 0.25s, border-color 0.25s;
}
.stat:hover { transform: translateX(4px); border-left-color: var(--accent-2); }
.stat-key { display: block; font-family: 'Space Grotesk', sans-serif; font-weight: 600; margin-bottom: 4px; }
.stat-val { color: var(--text-dim); font-size: 0.95rem; }

/* ===== CONTACT ===== */
.section-contact { text-align: center; background: var(--bg-alt); border-top: 1px solid var(--border); overflow: hidden; }
.contact-glow {
  position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px; pointer-events: none;
  background: radial-gradient(circle, rgba(56,224,200,0.13), rgba(79,140,255,0.07) 40%, transparent 70%);
}
.contact-inner { position: relative; }
.contact-inner .section-title { margin-bottom: 20px; }
.section-contact .btn { margin-top: 34px; }

/* ===== FOOTER ===== */
.footer { padding: 38px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.95rem; }
.footer-copy { color: var(--text-faint); font-size: 0.85rem; font-family: var(--mono); }

/* ===== REVEAL ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: 100%; }
  .terminal { max-width: 540px; }
}
@media (max-width: 860px) {
  .nav-brand-thin { display: none; }
  .nav-links { gap: 18px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 38px; }
  .section { padding: 84px 0; }
}
@media (max-width: 540px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-trust { gap: 10px; }
  .term-body { min-height: 270px; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span, .eyebrow-dot, .term-cursor { animation: none; }
  html { scroll-behavior: auto; }
}
