/* ==========================================================================
   CloudHost.ke — Design Tokens
   Palette: deep infrastructure navy + signal teal (fiber pulse) + warm CTA amber
   Type: Space Grotesk (display) / IBM Plex Sans (body) / IBM Plex Mono (data, labels)
   Signature: the "backbone" — a node-and-line network spine used in hero + as
   a recurring divider motif through the page.
   ========================================================================== */

:root {
  /* Color */
  --ink:        #0A0F1C;   /* primary background */
  --ink-raised: #0F1729;   /* card / raised surface on dark */
  --paper:      #F6F4EF;   /* light section background */
  --paper-dim:  #EDEAE2;   /* light section raised */
  --line:       #1E293B;   /* hairline on dark */
  --line-light: #DEDACF;   /* hairline on light */
  --signal:     #29E0C2;   /* primary accent — fiber/signal teal */
  --signal-dim: #0F5B54;   /* muted teal for inactive nodes */
  --amber:      #FFB238;   /* warm CTA accent */
  --text-hi:    #F2F4F8;   /* high-emphasis text on dark */
  --text-lo:    #9AA5B8;   /* muted text on dark */
  --text-hi-p:  #14181F;   /* high-emphasis text on paper */
  --text-lo-p:  #5B6473;   /* muted text on paper */

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --max-w: 1600px;
  --gutter: clamp(20px, 5vw, 80px);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--text-hi);
  letter-spacing: -0.01em;
}

p { margin: 0; }

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

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(41, 224, 194, 0.18);
}

.section-label-light .eyebrow { color: var(--signal-dim); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--amber);
  color: #241300;
}
.btn-primary:hover { transform: translateY(-1px); background: #ffbf57; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-hi);
}
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }

.btn-ghost-light {
  background: transparent;
  border-color: var(--line-light);
  color: var(--text-hi-p);
}
.btn-ghost-light:hover { border-color: var(--signal-dim); color: var(--signal-dim); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 28, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.wordmark .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(41, 224, 194, 0.16);
}
.wordmark .tld { color: var(--signal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-lo);
}
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text-hi); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-hi);
  cursor: pointer;
  padding: 8px;
}

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

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 88px 0 60px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  max-width: 15ch;
}

.hero h1 .hl { color: var(--signal); }

.hero-sub {
  margin-top: 22px;
  font-size: 18px;
  color: var(--text-lo);
  max-width: 46ch;
  line-height: 1.65;
}

.hero-ctas {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 40px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-lo);
}
.hero-meta span { color: var(--text-hi); }

/* Backbone network graphic */
.backbone-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin: 0 auto;
}
.backbone-wrap svg { width: 100%; height: 100%; }

.node-core {
  fill: var(--ink-raised);
  stroke: var(--signal);
  stroke-width: 1.5;
}
.node-active {
  fill: var(--signal);
}
.node-dim {
  fill: var(--ink-raised);
  stroke: var(--line);
  stroke-width: 1.5;
}
.link-active {
  stroke: var(--signal);
  stroke-width: 1.4;
  stroke-dasharray: 3 5;
  animation: dash 22s linear infinite;
}
.link-dim {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}
.pulse {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.2;
  opacity: 0;
  transform-origin: center;
  animation: pulse 3.2s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.5); opacity: 0.55; }
  100% { transform: scale(2.6); opacity: 0; }
}
@keyframes dash {
  to { stroke-dashoffset: -400; }
}
.node-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  fill: var(--text-lo);
  letter-spacing: 0.04em;
}
.node-label.active-label { fill: var(--text-hi); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .backbone-wrap { max-width: 340px; margin-top: 12px; }
}

/* ==========================================================================
   Divider (backbone motif reused as section rule)
   ========================================================================== */
.spine-divider {
  height: 1px;
  background: var(--line);
  position: relative;
}
.spine-divider::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(41, 224, 194, 0.14);
}

/* ==========================================================================
   Trust bar
   ========================================================================== */
.trust-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-raised);
}
.trust-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 30px var(--gutter);
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trust-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--signal);
}
.trust-cap {
  font-size: 13px;
  color: var(--text-lo);
}
@media (max-width: 760px) {
  .trust-bar .container { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Generic section
   ========================================================================== */
.section {
  padding: 96px 0;
}
.section-light {
  background: var(--paper);
  color: var(--text-hi-p);
}
.section-light h2, .section-light h3 { color: var(--text-hi-p); }
.section-light p { color: var(--text-lo-p); }

.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.15;
}
.section-head p {
  margin-top: 14px;
  font-size: 16.5px;
  color: var(--text-lo);
  line-height: 1.65;
}
.section-light .section-head p { color: var(--text-lo-p); }

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--paper);
  padding: 30px 28px;
  transition: background 0.18s ease;
}
.service-card:hover { background: var(--paper-dim); }
.service-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  color: var(--signal-dim);
}
.service-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.service-card p {
  font-size: 14.5px;
  color: var(--text-lo-p);
  line-height: 1.55;
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Why us
   ========================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.why-item .why-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal);
  margin-bottom: 14px;
  display: block;
}
.why-item h3 {
  font-size: 17.5px;
  font-weight: 600;
  margin-bottom: 10px;
}
.why-item p {
  font-size: 14.5px;
  color: var(--text-lo);
  line-height: 1.6;
}
@media (max-width: 900px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 28px; }
}
@media (max-width: 560px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Plans
   ========================================================================== */
.plans-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-lo-p);
  background: var(--paper-dim);
  border: 1px dashed var(--line-light);
  border-radius: 6px;
  padding: 10px 16px;
  display: inline-block;
  margin-bottom: 40px;
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.plan-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.plan-card.featured {
  border-color: var(--signal-dim);
  box-shadow: 0 0 0 1px var(--signal-dim), 0 20px 40px -24px rgba(15, 91, 84, 0.35);
  position: relative;
}
.plan-featured-tag {
  position: absolute;
  top: -13px;
  left: 28px;
  background: var(--signal-dim);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 4px;
}
.plan-name {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-lo-p);
  margin-bottom: 14px;
}
.plan-price {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  color: var(--text-hi-p);
}
.plan-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-lo-p);
}
.plan-specs {
  list-style: none;
  padding: 0;
  margin: 26px 0 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-lo-p);
  flex-grow: 1;
}
.plan-specs li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.plan-specs li::before {
  content: '';
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--signal-dim);
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .plans-grid { grid-template-columns: 1fr; max-width: 420px; }
}

/* ==========================================================================
   Roadmap / backbone vision strip
   ========================================================================== */
.roadmap {
  background: var(--ink-raised);
  border-top: 1px solid var(--line);
}
.roadmap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.roadmap-copy h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 16px;
}
.roadmap-copy p {
  color: var(--text-lo);
  font-size: 16px;
  line-height: 1.65;
  max-width: 46ch;
}
.roadmap-phase {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--signal);
  border: 1px solid var(--signal-dim);
  padding: 8px 14px;
  border-radius: 20px;
}
.map-wrap { max-width: 460px; margin: 0 auto; }
@media (max-width: 900px) {
  .roadmap-grid { grid-template-columns: 1fr; }
  .map-wrap { max-width: 340px; }
}

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
  padding: 90px 0;
  text-align: center;
}
.cta-banner h2 {
  font-size: clamp(28px, 4vw, 42px);
  max-width: 20ch;
  margin: 0 auto 18px;
}
.cta-banner p {
  color: var(--text-lo);
  font-size: 17px;
  max-width: 48ch;
  margin: 0 auto 34px;
}
.cta-banner-btns {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cta-banner-alt {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-lo);
}
.cta-banner-alt a { color: var(--signal); }
.cta-banner-alt a:hover { text-decoration: underline; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--ink-raised);
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-brand .wordmark { margin-bottom: 14px; }
.footer-brand p {
  color: var(--text-lo);
  font-size: 14px;
  max-width: 32ch;
  line-height: 1.6;
}
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-lo);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-col a {
  font-size: 14.5px;
  color: var(--text-hi);
  opacity: 0.85;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.footer-col a:hover { opacity: 1; color: var(--signal); }

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-lo);
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Mobile nav drawer */
.mobile-drawer {
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--ink);
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  padding: 32px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}
.mobile-drawer .btn { margin-top: 12px; align-self: flex-start; }

@media (min-width: 861px) {
  .mobile-drawer { display: none; }
}

/* ==========================================================================
   Plans — full catalog additions (tabs, auto-fit grid, add-ons, secondary)
   ========================================================================== */
.plans-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  border-bottom: 1px solid var(--line-light);
  margin-bottom: 32px;
}
.plans-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-lo-p);
  padding: 6px 0 14px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.plans-tab[aria-selected="true"] { color: var(--text-hi-p); border-color: var(--signal-dim); }
.plans-tab:hover { color: var(--text-hi-p); }
.plans-panel[hidden] { display: none; }

.plans-grid--auto { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.plans-addons { margin-top: 64px; }
.plans-addons h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; color: var(--text-hi-p); }
.plans-addons > p { color: var(--text-lo-p); font-size: 15px; margin-bottom: 20px; }

.plans-secondary {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line-light);
}
.plans-secondary h3 { font-size: 17px; font-weight: 600; margin: 10px 0 8px; color: var(--text-lo-p); }
.plans-secondary > p { color: var(--text-lo-p); font-size: 15px; max-width: 60ch; margin-bottom: 20px; }
.plans-secondary .btn { margin-top: 20px; }

.addons-table {
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}
.addons-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-light);
  font-size: 14.5px;
  color: var(--text-lo-p);
}
.addons-row:last-child { border-bottom: none; }
.addons-row span:last-child {
  font-family: var(--font-mono);
  color: var(--text-hi-p);
  font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .addons-row { flex-direction: column; gap: 4px; }
}
