/* ============================================================
   EM8 TELECOMS — shared stylesheet
   Palette: exchange ink / cool paper / fibre teal / signal amber
   Type:    Archivo (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
  --ink: #0e1b2c;
  --ink-2: #16273d;
  --ink-3: #1f3450;
  --paper: #f5f8f9;
  --white: #ffffff;
  --line: #d9e1e6;
  --line-dark: #2a3f5c;
  --fibre: #12b8b3;
  --fibre-dim: #0d8c88;
  --signal: #ffb33c;
  --slate: #52657a;
  --slate-light: #8fa0b3;
  --radius: 10px;
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--fibre-dim); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Type scale ---------- */
h1, h2, h3 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fibre-dim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--fibre);
}

.lead { font-size: 1.15rem; color: var(--slate); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--fibre); color: var(--ink); }
.btn-primary:hover { background: #17d4ce; }

.btn-ghost { border-color: var(--line-dark); color: var(--white); }
.btn-ghost:hover { border-color: var(--fibre); color: var(--fibre); }

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-3); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--white);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand .tld {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--fibre);
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--slate-light);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-links a.active { color: var(--fibre); }
.nav-links .btn { padding: 9px 18px; font-size: 0.88rem; }
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover,
.nav-links a.btn-primary.active { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--white);
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* faint route-map grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.16;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero h1 em {
  font-style: normal;
  color: var(--fibre);
}
.hero .lead { color: var(--slate-light); margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Subpage hero (shorter, no board) */
.hero-sub { padding: 72px 0; }
.hero-sub .lead { margin-bottom: 0; }

/* ---------- Status board (signature) ---------- */
.status-board {
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.status-board .board-title {
  display: flex;
  justify-content: space-between;
  color: var(--slate-light);
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  text-transform: uppercase;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 6px;
}
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(217, 225, 230, 0.12);
  color: #cfdbe4;
}
.status-row:last-child { border-bottom: none; }
.status-row .val {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fibre);
  box-shadow: 0 0 0 0 rgba(18, 184, 179, 0.5);
  animation: pulse 2.4s infinite;
}
.dot.amber { background: var(--signal); box-shadow: 0 0 0 0 rgba(255, 179, 60, 0.5); animation-delay: 0.6s; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(18, 184, 179, 0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(18, 184, 179, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 184, 179, 0); }
}

/* Fibre pulse divider */
.fibre-line {
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.fibre-line::after {
  content: "";
  position: absolute;
  top: 0; left: -20%;
  width: 20%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--fibre), transparent);
  animation: travel 4s linear infinite;
}
@keyframes travel {
  to { left: 120%; }
}

@media (prefers-reduced-motion: reduce) {
  .dot, .fibre-line::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.tight { padding: 60px 0; }
.section-head { max-width: 700px; margin-bottom: 48px; }
.section-head p { color: var(--slate); margin-top: 14px; }

.on-dark { background: var(--ink); color: var(--white); }
.on-dark h2, .on-dark h3 { color: var(--white); }
.on-dark p { color: var(--slate-light); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card-grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; border-color: var(--fibre); transform: translateY(-3px); }

.card .svc-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--fibre-dim);
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--slate); font-size: 0.95rem; }
.card .card-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fibre-dim);
}

/* Feature list cards on dark */
.on-dark .card {
  background: var(--ink-2);
  border-color: var(--line-dark);
}
.on-dark .card p { color: var(--slate-light); }

/* ---------- Spec table ---------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.spec-table th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  background: var(--paper);
  font-weight: 500;
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td .mono { color: var(--fibre-dim); font-size: 0.85rem; text-transform: none; letter-spacing: 0.02em; }

/* ---------- Checklist ---------- */
.check-list { list-style: none; }
.check-list li {
  padding: 10px 0 10px 32px;
  position: relative;
  color: var(--ink-2);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 14px; height: 8px;
  border-left: 2.5px solid var(--fibre);
  border-bottom: 2.5px solid var(--fibre);
  transform: rotate(-45deg);
}
.on-dark .check-list li { color: #cfdbe4; }

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: left;
}
.stat .num {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  color: var(--fibre);
  display: block;
}
.stat .lbl {
  font-size: 0.85rem;
  color: var(--slate-light);
  letter-spacing: 0.04em;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: var(--slate-light); }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }
label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  display: block;
  margin-bottom: 7px;
}
input, select, textarea {
  width: 100%;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--fibre);
  box-shadow: 0 0 0 3px rgba(18, 184, 179, 0.15);
}
textarea { resize: vertical; min-height: 130px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--slate-light);
  padding: 64px 0 36px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.site-footer h4 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
  font-weight: 500;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--slate-light); }
.site-footer a:hover { color: var(--fibre); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 44px; }
  .card-grid, .card-grid.two { grid-template-columns: 1fr 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .card-grid, .card-grid.two, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 26px;
    gap: 18px;
    border-bottom: 1px solid var(--line-dark);
  }
  .nav-links.open { display: flex; }
  .hero { padding: 64px 0 72px; }
  section { padding: 60px 0; }
  .cta-band { padding: 36px 28px; }
}
