/* =====================================================================
   VOIP.SO — public marketing site.
   Carrier-grade / network-native: a dark instrument-lit canvas, hard
   edges, and real telecom artifacts (routes, prefixes, rates, ports)
   used as the imagery. No gradient hero, no glass cards.
   ===================================================================== */

/* ---- Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in oklch, var(--ink-950) 88%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--ink-700) 60%, transparent);
  /* A 6px blur here is structural (keeping the nav legible over moving
     content), not the decorative glass-card look the brief ruled out. */
  backdrop-filter: saturate(140%) blur(6px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: 4.25rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 1.85rem; height: 1.85rem; border-radius: var(--r-sm); }
.brand__word {
  font-size: 1.14rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  font-stretch: 108%;
  color: var(--paper);
}
.brand__word .dot { color: var(--brand-400); }

.nav { display: none; align-items: center; gap: 0.15rem; margin-inline-start: auto; }
@media (min-width: 1024px) { .nav { display: flex; } }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-md);
  color: var(--ink-200);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out-quart), background-color var(--dur-fast) var(--ease-out-quart);
}
.nav__link:hover { color: var(--paper); background: color-mix(in oklch, var(--ink-800) 75%, transparent); text-decoration: none; }
.nav__link[aria-current='page'] { color: var(--paper); background: color-mix(in oklch, var(--ink-800) 90%, transparent); }

/* Dropdown escapes any clipping ancestor by being positioned against the
   nav item with the popover-style pattern rather than inside overflow. */
.nav__group { position: relative; }
.nav__panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: var(--z-dropdown);
  min-width: 20rem;
  padding: var(--sp-2);
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 1px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease-out-quart),
              transform var(--dur-fast) var(--ease-out-quart),
              visibility var(--dur-fast);
}
.nav__group:hover .nav__panel,
.nav__group:focus-within .nav__panel,
.nav__panel[data-open='true'] { opacity: 1; visibility: visible; transform: none; }

.nav__item {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.15rem var(--sp-3);
  padding: 0.6rem 0.7rem;
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--paper);
}
.nav__item:hover { background: var(--ink-800); text-decoration: none; }
.nav__item svg { grid-row: span 2; color: var(--brand-400); margin-top: 0.15rem; }
.nav__item b { font-size: var(--fs-sm); font-weight: 600; }
.nav__item span { font-size: var(--fs-xs); color: var(--ink-300); line-height: 1.45; }

.header__actions { display: flex; align-items: center; gap: var(--sp-2); margin-inline-start: auto; flex: 0 0 auto; }
@media (min-width: 1024px) { .header__actions { margin-inline-start: var(--sp-4); } }

/* Below 420px the brand, "Sign in", "Create account" and the menu button
   together exceed the viewport. "Sign in" is dropped rather than shrunk:
   it is already the first item inside the mobile drawer, so nothing
   becomes unreachable, and the primary action keeps its full label. */
@media (max-width: 419px) {
  .header__actions .btn--ghost { display: none; }
  .header__actions { gap: 0.35rem; }
  .site-header__inner { gap: var(--sp-3); }
  .brand__word { font-size: 1.02rem; }
  .brand__mark { width: 1.6rem; height: 1.6rem; }
}

.nav-toggle {
  display: inline-grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }

.mobile-nav {
  display: none;
  padding: var(--sp-4) 0 var(--sp-6);
  border-top: 1px solid var(--ink-800);
}
.mobile-nav[data-open='true'] { display: block; }
.mobile-nav__link {
  display: block;
  padding: 0.7rem 0.25rem;
  color: var(--ink-200);
  font-size: var(--fs-body);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--ink-800) 80%, transparent);
}
.mobile-nav__link:hover { color: var(--paper); }
.mobile-nav__section { padding-top: var(--sp-4); font-size: var(--fs-xs); font-weight: 650; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-400); }

/* ---- Hero -----------------------------------------------------------
   The network IS the visual. Canvas renders PoPs at true coordinates
   with packets traversing great-circle arcs, drawn from the same
   dataset the coverage table renders. */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink-950);
  padding-block: clamp(3.5rem, 2rem + 7vw, 7.5rem) clamp(3rem, 2rem + 5vw, 6rem);
}

/* The single large-area gradient in the whole design: a field glow that
   makes the canvas read as lit from within. Capped at 0.12 alpha. */
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  z-index: -2;
  background: radial-gradient(ellipse 60% 100% at 62% 20%, rgb(var(--brand-600-rgb) / 0.12), transparent 70%);
  pointer-events: none;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
  /* Fades the map out behind the headline so the type stays at full
     contrast without a scrim rectangle over the artwork. The stops are
     tuned so the routes stay legible on the right two-thirds. */
  mask-image: linear-gradient(to right, transparent 0%, rgb(0 0 0 / 0.28) 22%, #000 46%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgb(0 0 0 / 0.28) 22%, #000 46%);
}
@media (max-width: 1023px) {
  .hero__canvas {
    opacity: 0.65;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
  }
}

.hero__grid {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--sp-8); }
}

.hero__content { max-width: 40rem; }
.hero__title { margin-bottom: var(--sp-4); }
.hero__title .accent { color: var(--brand-400); }
.hero__lead { margin-bottom: var(--sp-6); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-5); }

.hero__reassure {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  font-size: var(--fs-sm); color: var(--ink-300);
}
.hero__reassure li { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero__reassure svg { color: var(--success-dark); flex: 0 0 auto; }

/* Live route strip — real telecom data as the supporting visual, in
   place of the big-number hero-metric template. */
.route-strip {
  border: 1px solid color-mix(in oklch, var(--ink-700) 80%, transparent);
  border-radius: var(--r-lg);
  background: color-mix(in oklch, var(--ink-900) 78%, transparent);
  overflow: hidden;
}
.route-strip__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 0.7rem var(--sp-4);
  border-bottom: 1px solid color-mix(in oklch, var(--ink-700) 70%, transparent);
}
.route-strip__title { font-size: var(--fs-xs); font-weight: 650; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-300); }
.route-strip table { font-size: var(--fs-xs); }
.route-strip th {
  padding: 0.45rem var(--sp-4);
  text-align: left; font-weight: 600; color: var(--ink-400);
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  border-bottom: 1px solid color-mix(in oklch, var(--ink-800) 90%, transparent);
  background: transparent; position: static;
}
.route-strip td {
  padding: 0.5rem var(--sp-4);
  border-bottom: 1px solid color-mix(in oklch, var(--ink-800) 70%, transparent);
  color: var(--ink-200);
}
.route-strip tr:last-child td { border-bottom: 0; }
.route-strip .rate { font-family: var(--font-mono); color: var(--paper); text-align: right; font-variant-numeric: tabular-nums; }
.route-strip .prefix { font-family: var(--font-mono); color: var(--brand-400); }

/* ---- Band system ----------------------------------------------------
   Full-bleed horizontal bands rather than a card grid. Rhythm is
   deliberately uneven: dense technical bands against open statements. */

.band { background: var(--bg); }
.band--dark { background: var(--ink-950); }
.band--panel { background: var(--ink-900); }
.band--light { background: var(--paper); }
.band--white { background: var(--surface); }
.band + .band--light, .band + .band--white { border-top: 1px solid var(--ink-100); }

.band__head { max-width: 44rem; margin-bottom: var(--sp-6); }
.band__head--center { margin-inline: auto; text-align: center; }
.band__title { font-size: var(--fs-h2); margin-bottom: var(--sp-3); }
.band__lead { color: var(--text-body); font-size: var(--fs-lead); text-wrap: pretty; }

/* ---- Service entries -------------------------------------------------
   Not an identical icon-heading-paragraph card grid: each entry is a
   full-width row with its own spec list, and the rows alternate. */

.service-row {
  display: grid;
  gap: var(--sp-5);
  padding-block: var(--sp-6);
  border-top: 1px solid var(--border);
  align-items: start;
}
@media (min-width: 900px) {
  .service-row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-8); }
}
.service-row:first-child { border-top: 0; padding-top: 0; }

.service-row__title {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--fs-h3); margin-bottom: var(--sp-3);
}
.service-row__title svg { color: var(--accent-text); flex: 0 0 auto; }
.service-row__body { color: var(--text-body); max-width: 54ch; text-wrap: pretty; }
.service-row__link { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: var(--sp-4); font-weight: 600; font-size: var(--fs-sm); }
.service-row__link svg { transition: transform var(--dur-fast) var(--ease-out-quart); }
.service-row__link:hover svg { transform: translateX(3px); }

/* ---- Pricing --------------------------------------------------------- */

.plans { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.plan {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.plan--featured {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 1px var(--brand-600);
  position: relative;
}
.plan__flag {
  position: absolute;
  top: -0.7rem; left: var(--sp-5);
  padding: 0.15rem 0.6rem;
  background: var(--brand-600);
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.02em;
}
.plan__name { font-size: var(--ui-h2); font-weight: 700; color: var(--text); }
.plan__tagline { font-size: var(--fs-sm); color: var(--text-muted); }
.plan__price { display: flex; align-items: baseline; gap: 0.3rem; }
.plan__amount { font-size: 2.5rem; font-weight: 750; letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.plan__period { font-size: var(--fs-sm); color: var(--text-muted); }
.plan__features { display: grid; gap: var(--sp-2); font-size: var(--fs-sm); }
.plan__features li { display: grid; grid-template-columns: 1.1rem 1fr; gap: var(--sp-2); align-items: start; }
.plan__features svg { color: var(--success-text); margin-top: 0.22rem; }

/* ---- Coverage / rate table ------------------------------------------- */

.rate-table td.dest { color: var(--text); font-weight: 500; }
.rate-table .flag { font-size: 1.05em; margin-right: 0.4rem; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
  margin-bottom: var(--sp-5);
}
.filter-bar .field { flex: 1 1 12rem; }

/* ---- Statement band --------------------------------------------------
   One idea per fold, generous space. Deliberate contrast against the
   dense technical bands above and below it. */

.statement { padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
.statement__quote {
  font-size: clamp(1.5rem, 1.15rem + 1.8vw, 2.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--paper);
  max-width: 24ch;
  text-wrap: balance;
}
.statement__body { margin-top: var(--sp-5); color: var(--ink-200); max-width: 48ch; line-height: var(--lh-dark); }

/* ---- PoP list -------------------------------------------------------- */

.pops { display: grid; gap: 1px; background: color-mix(in oklch, var(--ink-700) 55%, transparent); border: 1px solid color-mix(in oklch, var(--ink-700) 55%, transparent); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 640px) { .pops { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pops { grid-template-columns: repeat(3, 1fr); } }

.pop {
  display: grid;
  gap: 0.3rem;
  padding: var(--sp-4);
  background: var(--ink-900);
}
.pop__city { display: flex; align-items: center; gap: var(--sp-2); font-weight: 650; color: var(--paper); }
.pop__code { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--brand-400); }
.pop__meta { font-size: var(--fs-xs); color: var(--ink-300); }

/* ---- CTA band -------------------------------------------------------- */

.cta-band {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  background: var(--brand-600);
  color: #fff;
}
.cta-band h2 { color: #fff; font-size: var(--fs-h2); margin-bottom: var(--sp-3); text-wrap: balance; }
.cta-band p { color: rgb(255 255 255 / 0.9); max-width: 52ch; }
.cta-band .btn--primary { --btn-bg: #fff; --btn-fg: var(--brand-700); --btn-border: #fff; }
.cta-band .btn--primary:hover { --btn-bg: var(--paper); --btn-border: var(--paper); }
.cta-band .btn--secondary { --btn-fg: #fff; --btn-border: rgb(255 255 255 / 0.5); }
.cta-band .btn--secondary:hover { --btn-bg: rgb(255 255 255 / 0.12); --btn-border: #fff; }

/* ---- Footer ---------------------------------------------------------- */

.site-footer {
  background: var(--ink-950);
  color: var(--ink-300);
  padding-block: var(--sp-8) var(--sp-5);
  border-top: 1px solid var(--ink-800);
}
.footer__grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
}
.footer__brand { grid-column: 1 / -1; max-width: 22rem; }
@media (min-width: 1024px) { .footer__brand { grid-column: span 2; } }
.footer__title { font-size: var(--fs-xs); font-weight: 650; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-400); margin-bottom: var(--sp-3); }
.footer__list { display: grid; gap: 0.55rem; font-size: var(--fs-sm); }
.footer__list a { color: var(--ink-200); text-decoration: none; }
.footer__list a:hover { color: var(--paper); text-decoration: underline; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  align-items: center; justify-content: space-between;
  margin-top: var(--sp-7); padding-top: var(--sp-4);
  border-top: 1px solid var(--ink-800);
  font-size: var(--fs-xs);
}
.footer__contact { display: grid; gap: 0.35rem; font-size: var(--fs-sm); font-style: normal; }
.footer__contact a { color: var(--ink-200); text-decoration: none; }
.footer__contact a:hover { color: var(--paper); text-decoration: underline; }

/* ---- Hero arrival ----------------------------------------------------
   One orchestrated arrival on the hero only. Content is visible by
   default and the animation moves it *from* an offset — a headless
   render or a background tab still shows a complete page. */

@media (prefers-reduced-motion: no-preference) {
  .arrive { animation: arrive var(--dur-slow) var(--ease-out-expo); }
  .arrive-1 { animation-delay: 60ms; }
  .arrive-2 { animation-delay: 140ms; }
  .arrive-3 { animation-delay: 220ms; }
  .arrive-4 { animation-delay: 300ms; }
}

/* Transform only — deliberately no opacity, and no `backwards` fill.
   An opacity-from-zero reveal with a delay holds the content invisible
   until the animation runs, so a headless render, a background tab or a
   browser that skips animations ships a blank hero. The movement is the
   reveal; the content is never hidden to achieve it. */
@keyframes arrive {
  from { transform: translateY(0.75rem); }
  to   { transform: none; }
}

/* =====================================================================
   Authentication
   Split screen: form on light, brand argument on the dark canvas. The
   panel is dropped, not stacked, below 900px — on a phone the form is
   the only thing that matters and scrolling past a pitch to reach a
   password field is hostile.
   ===================================================================== */

.auth-body { background: var(--paper); }

.auth { display: grid; min-height: 100vh; min-height: 100dvh; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
}

.auth__form {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--sp-6);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
}
@media (min-width: 640px)  { .auth__form { padding: var(--sp-6) var(--sp-7) var(--sp-5); } }
@media (min-width: 1280px) { .auth__form { padding: var(--sp-7) var(--sp-9) var(--sp-6); } }

.auth__main { display: grid; align-content: center; justify-items: start; }
.auth__card { width: 100%; max-width: 27rem; }
.auth__card--wide { max-width: 34rem; }

.auth__title { font-size: var(--fs-h1); margin-bottom: var(--sp-2); }
.auth__sub   { color: var(--text-muted); margin-bottom: var(--sp-6); max-width: 44ch; }

.auth__fields { display: grid; gap: var(--sp-4); }
.auth__split  { display: grid; gap: var(--sp-4); }
@media (min-width: 560px) { .auth__split { grid-template-columns: 1fr 1fr; } }

.auth__actions { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }

.auth__alt {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.auth__foot {
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  align-items: center; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--text-muted);
}
.auth__foot nav { display: flex; gap: var(--sp-4); }
.auth__foot a { color: var(--text-muted); text-decoration: none; }
.auth__foot a:hover { color: var(--text); text-decoration: underline; }

.auth__panel { display: none; background: var(--ink-950); position: relative; overflow: hidden; }
@media (min-width: 900px) { .auth__panel { display: grid; align-content: center; } }

.auth__panel::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 70% 25%, rgb(var(--brand-600-rgb) / 0.14), transparent 70%);
  pointer-events: none;
}
.auth__panel-inner { position: relative; padding: var(--sp-8) var(--sp-7); max-width: 32rem; }

.auth__quote {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.025em;
  color: var(--paper);
  text-wrap: balance;
  margin-bottom: var(--sp-5);
}
.auth__points { display: grid; gap: var(--sp-4); }
.auth__point { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.25rem var(--sp-3); }
.auth__point svg, .auth__point i { grid-row: span 2; color: var(--brand-400); margin-top: 0.15rem; }
.auth__point b { color: var(--paper); font-size: var(--fs-sm); font-weight: 650; }
.auth__point span { color: var(--ink-300); font-size: var(--fs-sm); line-height: 1.55; }

/* Password strength meter. Width and colour both move, and the label is
   read out — colour alone would be meaningless to a colour-blind user. */
.pw-meter { display: grid; gap: 0.35rem; margin-top: 0.15rem; }
.pw-meter__track { height: 4px; border-radius: var(--r-full); background: var(--ink-100); overflow: hidden; }
.pw-meter__bar {
  height: 100%; width: 0; border-radius: var(--r-full);
  background: var(--danger-fill);
  transition: width var(--dur-base) var(--ease-out-quart), background-color var(--dur-base) var(--ease-out-quart);
}
.pw-meter[data-level='2'] .pw-meter__bar { width: 45%; background: var(--warning-fill); }
.pw-meter[data-level='3'] .pw-meter__bar { width: 72%; background: var(--info-fill); }
.pw-meter[data-level='4'] .pw-meter__bar { width: 100%; background: var(--success-fill); }
.pw-meter[data-level='1'] .pw-meter__bar { width: 22%; }
.pw-meter__label { font-size: var(--fs-xs); color: var(--text-muted); }
