/* ============================================================
   edgefy.io — design system
   Techy / futuristic · dark · telecom edge infrastructure
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- Tokens ---- */
:root {
  /* surfaces — deep telecom navy */
  --bg:        oklch(0.175 0.038 264);
  --bg-2:      oklch(0.205 0.040 264);
  --surface:   oklch(0.235 0.042 264);
  --surface-2: oklch(0.275 0.044 264);
  --border:    oklch(0.32 0.040 264);
  --border-2:  oklch(0.40 0.045 264);

  /* text */
  --text:      oklch(0.98 0.005 264);
  --text-dim:  oklch(0.74 0.030 264);
  --text-faint:oklch(0.56 0.030 264);

  /* accents — royal blue family */
  --primary:      oklch(0.55 0.20 264);
  --primary-dim:  oklch(0.48 0.17 264);
  --primary-deep: oklch(0.40 0.14 264);
  --primary-bright: oklch(0.66 0.18 264);
  --violet:       oklch(0.66 0.14 248);
  --violet-dim:   oklch(0.56 0.13 248);

  --primary-glow: oklch(0.55 0.20 264 / 0.20);
  --violet-glow:  oklch(0.66 0.14 248 / 0.16);

  /* type */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 48px);

  /* shadow */
  --shadow-1: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-2: 0 18px 40px -20px oklch(0 0 0 / 0.7);
  --shadow-glow: 0 0 0 1px oklch(0.55 0.20 264 / 0.30), 0 20px 60px -24px oklch(0.55 0.20 264 / 0.5);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

/* background ambience */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 78% -8%, var(--violet-glow), transparent 60%),
    radial-gradient(1100px 700px at 8% 0%, var(--primary-glow), transparent 55%);
  pointer-events: none;
  animation: glowBreathe 14s ease-in-out infinite alternate;
}
@keyframes glowBreathe { from { opacity: 0.6; } to { opacity: 1; } }
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(oklch(1 0 0 / 0.022) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  pointer-events: none;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.06; letter-spacing: -0.02em; }
.display {
  font-size: clamp(2.7rem, 6.2vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}
.h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--text-dim); }
.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
}

.gradient-text {
  background: linear-gradient(100deg, var(--text) 30%, var(--primary) 70%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1340px; }
section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 140px); }
.center { text-align: center; }
.stack-sm > * + * { margin-top: 14px; }
.measure { max-width: 640px; }
.measure.center { margin-inline: auto; }

/* divider line */
.hr { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); border: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 0.96rem;
  font-family: var(--font-body);
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px -10px var(--primary), inset 0 1px 0 oklch(1 0 0 / 0.25);
}
.btn-primary:hover { box-shadow: 0 12px 30px -8px var(--primary), inset 0 1px 0 oklch(1 0 0 / 0.5); transform: translateY(-1px); }
.btn-ghost {
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border-2);
  color: var(--text);
}
.btn-ghost:hover { background: oklch(1 0 0 / 0.08); border-color: var(--primary-dim); }
.btn-lg { padding: 16px 28px; font-size: 1.02rem; }
.btn-arrow svg { transition: transform .2s ease; }
.btn-arrow:hover svg { transform: translateX(3px); }

/* ---- Pill / tag ---- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.03);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ---- Card ---- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s;
}
.card:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.card-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: oklch(0.6 0.19 264 / 0.12);
  border: 1px solid oklch(0.6 0.19 264 / 0.3);
  color: var(--primary);
  margin-bottom: 18px;
}
.card-icon.violet { background: var(--violet-glow); border-color: oklch(0.66 0.14 248 / 0.3); color: var(--violet); }

/* ---- Reveal animation (pure CSS, plays on load; never leaves content hidden) ---- */
.reveal { animation: revealIn .72s cubic-bezier(.2,.7,.2,1) both; }
@keyframes revealIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.reveal[data-d="1"] { animation-delay: .08s; }
.reveal[data-d="2"] { animation-delay: .16s; }
.reveal[data-d="3"] { animation-delay: .24s; }
.reveal[data-d="4"] { animation-delay: .32s; }
/* JS adds .in for IntersectionObserver paths; harmless no-op here. */
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: oklch(0.165 0.013 250 / 0.78);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(150deg, var(--primary-bright), var(--primary));
  position: relative; box-shadow: 0 6px 16px -6px var(--primary), inset 0 1px 0 oklch(1 0 0 / 0.25);
  flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; top: 50%; left: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 8px oklch(1 0 0 / 0.6);
}
.brand b { color: var(--primary); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-size: 0.94rem; color: var(--text-dim);
  font-weight: 500; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: oklch(1 0 0 / 0.05); }
.nav-links a.active { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border); align-items: center; justify-content: center; }

/* mobile menu */
.mobile-menu {
  display: none;
  position: fixed; inset: 70px 0 0; z-index: 99;
  background: oklch(0.165 0.013 250 / 0.97);
  backdrop-filter: blur(16px);
  padding: 24px var(--gutter);
  flex-direction: column; gap: 6px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a { padding: 16px 8px; font-size: 1.15rem; font-family: var(--font-display); border-bottom: 1px solid var(--border); }
.mobile-menu .btn { margin-top: 18px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding-block: 64px 36px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer h5 { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-faint); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 11px; }
.footer-links a { color: var(--text-dim); font-size: 0.94rem; transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 0.86rem; }
.footer-bottom .mono { font-family: var(--font-mono); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* ---- Status dot ---- */
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 var(--primary); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(0.6 0.19 264 / 0.5); }
  70% { box-shadow: 0 0 0 9px oklch(0.6 0.19 264 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.6 0.19 264 / 0); }
}
