/* ============================================================
   Init3 v2 — Vercel-inspired design
   Light, dense, monochrome. Inter + Fira Code, self-hosted.
   ============================================================ */

/* ---------- Fonts (self-hosted, same files as v1) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/fira-code-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/fira-code-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-hover: #f5f5f5;

  --border: #eaeaea;
  --border-strong: #d9d9d9;

  --text: #000000;
  --muted: #666666;
  --faint: #9a9a9a;

  --accent: #0a7d3a;
  --accent-deep: #065f2c;
  --accent-soft: #e8f7ee;
  --grad-text: linear-gradient(90deg, #0a7d3a, #059669 55%, #0e7a99);

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 56px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: var(--accent-soft); color: var(--accent-deep); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono { font-family: var(--font-mono); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container-narrow { max-width: 720px; }

.section { padding: 5.5rem 1.5rem; scroll-margin-top: var(--nav-h); }
.section-alt { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

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

.section-head {
  max-width: 100%;
  margin-bottom: 2.75rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.9rem;
  max-width: 780px;
}
.section-sub {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 100%;
}

.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn svg { transition: transform 0.2s; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--text);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover { background: #1a1a1a; }

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: var(--bg-subtle); border-color: var(--border-strong); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.nav.is-scrolled { box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06); }

.nav-inner {
  max-width: 1100px;
  margin-inline: auto;
  height: var(--nav-h);
  padding-inline: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.6rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-burger span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  padding: 2rem;
}
.mobile-link {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), color 0.2s;
}
.mobile-menu.is-open .mobile-link { opacity: 1; transform: none; }
.mobile-menu.is-open .mobile-link:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu.is-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.is-open .mobile-link:nth-child(3) { transition-delay: 0.14s; }
.mobile-menu.is-open .mobile-link:nth-child(4) { transition-delay: 0.18s; }
.mobile-menu.is-open .mobile-cta { transition-delay: 0.22s; }
.mobile-link:hover { color: var(--accent); }

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s;
}
.menu-backdrop.is-open { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--nav-h) + 3.5rem) 1.5rem 4rem;
  scroll-margin-top: var(--nav-h);
}
.hero-copy { text-align: center; max-width: 780px; margin-inline: auto; }

.hero-title {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 1.2rem;
}
.hero-sub {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 1.9rem;
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Spec panel */
.panel {
  max-width: 920px;
  margin: 3.25rem auto 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.panel-title { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid #cfe9da;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(10, 125, 58, 0.4);
  animation: pulse 2.2s ease-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(10, 125, 58, 0.4); }
  70%  { box-shadow: 0 0 0 6px rgba(10, 125, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(10, 125, 58, 0); }
}

.panel-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.spec-col, .status-col {
  padding: 0.3rem 1.1rem;
}
.status-col {
  border-left: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.spec-row {
  display: flex;
  gap: 1.25rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.spec-row:last-child { border-bottom: none; }
.spec-row dt {
  flex-shrink: 0;
  min-width: 96px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
}
.spec-row dd { color: var(--text); font-size: 0.85rem; line-height: 1.55; }

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
}
.status-row .s-label { font-size: 0.72rem; color: var(--muted); }

.regions { display: flex; gap: 0.4rem; }
.region {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  padding: 0.24rem 0.5rem;
  border-radius: 6px;
}
.region .dot { width: 5px; height: 5px; animation: none; box-shadow: none; }

.s-value { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600; }
.s-value.accent { color: var(--accent); }

.s-bar {
  width: 130px;
  height: 6px;
  border-radius: 99px;
  background: #e4e4e4;
  overflow: hidden;
}
.s-bar-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  animation: grow 1.4s var(--ease) both;
  transform-origin: left;
}
@keyframes grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.s-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid #cfe9da;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
}

/* Hero stats */
.hero-stats {
  max-width: 920px;
  margin: 1.5rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}
.hstat {
  padding: 1.15rem 1rem;
  text-align: center;
  border-left: 1px solid var(--border);
}
.hstat:first-child { border-left: none; }
.hstat-value {
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.15rem;
}
.hstat-unit { font-size: 0.7em; font-weight: 500; color: var(--accent); }
.hstat-label { color: var(--faint); font-size: 0.78rem; }

/* ---------- Marquee band ---------- */
.marquee {
  overflow: hidden;
  padding: 1.05rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track i {
  color: var(--accent);
  font-style: normal;
  opacity: 0.7;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.card {
  position: relative;
  background: var(--bg);
  padding: 1.5rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  transition: background 0.25s;
}
.card:hover { background: var(--bg-subtle); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  color: var(--faint);
}
.card-num { font-size: 0.7rem; color: var(--faint); }

.card-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}
.card-text {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
  flex: 1;
}

.card-cta {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-subtle);
}
.card-cta:hover { background: var(--bg-hover); }
.card-cta .card-head { color: var(--accent); margin-bottom: 0; }
.card-cta .card-num { color: var(--accent); }
.card-cta-body { flex: 1; }
.card-cta .card-link { margin-top: 0; flex-shrink: 0; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}
.card-link svg { transition: transform 0.2s; }
.card-link:hover svg { transform: translateX(3px); }

/* ---------- Infrastructure tech grid ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.tcell {
  background: var(--bg);
  padding: 1.5rem 1.4rem;
  transition: background 0.25s;
}
.tcell:hover { background: var(--bg-subtle); }
.tcell-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--td);
  margin-bottom: 1rem;
}
.tcell-name { font-weight: 600; font-size: 0.98rem; margin-bottom: 0.25rem; }
.tcell-desc { color: var(--muted); font-size: 0.82rem; line-height: 1.6; }

/* ---------- Form ---------- */
.form {
  padding: 2rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.04);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.62rem 0.8rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 125, 58, 0.12);
}
.field.is-invalid input, .field.is-invalid textarea {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.form-note {
  font-size: 0.76rem;
  color: var(--muted);
  min-height: 1.2em;
}
.form-note.is-success { color: var(--accent); }
.form-note.is-error { color: #dc2626; }

#submitBtn.is-loading { opacity: 0.6; pointer-events: none; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 2.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
}
.footer-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer-copy { color: var(--faint); font-size: 0.8rem; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .panel-body { grid-template-columns: 1fr; }
  .status-col { border-left: none; border-top: 1px solid var(--border); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 54px; }
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-burger { display: flex; }
  .section { padding: 3.5rem 1.25rem; }
  .hero { padding: calc(var(--nav-h) + 2.5rem) 1.25rem 3rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hstat:nth-child(3) { border-left: none; }
  .hstat { border-top: 1px solid var(--border); }
  .hstat:nth-child(1), .hstat:nth-child(2) { border-top: none; }
  .services { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .card-cta { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .card-cta .card-link { margin-top: 0.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form { padding: 1.5rem 1.2rem; }
  .s-bar { width: 100px; }
}

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