/* Home-only: hero, state card, facts, doors.
   Shared chrome lives in site.css. */

/* ---- Hero ---- */
.hero {
  padding: var(--space-7) 0 var(--space-8);
}
.hero-inner { display: grid; gap: var(--space-6); }

/* The state card. Not a picture of a block page — the visitor's own
   network, read live from our own edge (same origin, no third party, no
   IP in the DOM). Two facts, both on the one axis this product moves. */
.state {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
}
.state-caption {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--whisper);
}
/* On-state. data-on is set for IP-mine and for a probe hit.
   The foot copy differs: IP-mine is "one of ours"; probe is exempt. */
.state-on-badge {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal);
  display: none;
}
.state-on-badge::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.4em;
  vertical-align: -0.05em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='10' height='7' rx='1'/%3E%3Cpath d='M5 7V5a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='10' height='7' rx='1'/%3E%3Cpath d='M5 7V5a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.state[data-on] .state-on-badge {
  display: block;
}
/* Where the network puts the visitor, at display scale. The claim is what
   the page is *told*, not where they are — which stays true behind a
   corporate egress or a coarse mobile geo. City when the edge has one,
   country alone when it does not. */
.state-place {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--paper);
  margin-top: var(--space-4);
  /* Two line boxes. The HTML generic wraps to two lines, so a
     one-line country (the /api/where-miss path) would shrink the
     card after first paint without this. Three-line cities may
     still grow. */
  min-height: calc(2 * 1.05em);
  text-wrap: balance;
}
/* The second network fact, as a readout row. Mono and hairline-ruled so it
   reads as a value the machine already has, not as marketing. */
.state-rows {
  margin-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.state-rows > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.state-rows dt {
  font-size: var(--fs-meta);
  color: var(--whisper);
  flex: 0 0 auto;
}
.state-rows dd {
  margin: 0 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--paper);
  text-align: left;
  /* Intrinsic width. If the name cannot sit beside the label, the
     whole dd wraps to the next line instead of squeezing mid-word. */
  flex: 0 0 auto;
  max-width: 100%;
}
.state-note {
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--paper);
  margin-top: var(--space-5);
  /* Clearance above the cyan rule. .state-foot uses margin-top:auto
     only from 1024, so this is the only gap — flex margins do not
     collapse, and a second margin on the foot doubled it below 1024. */
  margin-bottom: var(--space-5);
  max-width: 38ch;
}
/* Cyan means access. The caps line is the claim; the sentence under
   it says exactly what is swapped, so the claim cannot be read wider
   than it is true. */
.state-foot {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal);
  padding-top: var(--space-4);
  border-top: 2px solid var(--signal);
}
.state-foot-sub {
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--paper);
  margin-top: var(--space-3);
  max-width: 38ch;
}
/* Below ~360, stack label over value. At 390 the UNE EPM row still
   fits on one line; a longer carrier name wraps as a whole via
   flex-wrap above, not mid-word. */
@media (max-width: 359px) {
  .state-rows > div {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
  .state-rows dd {
    text-align: left;
    flex: 1 1 auto;
    margin-left: 0;
  }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-display-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink);
  text-wrap: balance;
}
.hero .lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: 36rem;
  margin-top: var(--space-5);
}
/* One primary. The other two doors are text links — the doors section below
   gives them their own space, and three equal boxes here reads as indecision. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-6);
}
.hero-actions .btn-primary { min-width: min(100%, 240px); }
.hero-alts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
}
.hero-alts a {
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.hero-alts a:hover { text-decoration: underline; }
.since {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--restricted);
  margin-top: var(--space-6);
}

@media (max-width: 767px) {
  .hero { padding: var(--space-6) 0 var(--space-7); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-alts { justify-content: flex-start; }
  /* Source order puts the card after the copy, so the phone fold opens
     on the headline. */
  .state { margin-top: var(--space-4); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .state { padding: var(--space-6); }
  .state-note { max-width: 46ch; }
}

/* Two cells from 1024. The card holds the right column at full height, so
   the fold is a composition instead of a left column against a void. */
@media (min-width: 1024px) {
  .hero { padding: var(--space-9) 0 var(--space-9); }
  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: var(--space-8);
    align-items: stretch;
  }
  .hero-copy { grid-column: 1; grid-row: 1; }
  .hero-inner .state { grid-column: 2; grid-row: 1; padding: var(--space-6); }
  .state-foot { margin-top: auto; }
}

/* ---- Facts ---- */
.facts {
  padding: 0;
}
.facts-grid {
  display: grid;
  gap: var(--space-6);
  border-top: 1px solid var(--slab);
  padding-top: var(--space-7);
}
.facts h3 {
  font-family: var(--font-display);
  font-size: var(--fs-head-m);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}
.facts p { color: var(--ink); }
@media (min-width: 768px) {
  .facts-grid { grid-template-columns: 1fr 1fr 1fr; gap: var(--space-6); }
}

/* ---- Doors ---- */
.doors {
  padding: var(--section-y) 0;
  background: var(--paper);
}
.doors h2 {
  font-family: var(--font-display);
  font-size: var(--fs-display-l);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.doors > .wrap > .lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: 36rem;
  margin: var(--space-4) 0 var(--space-7);
}
.door-grid {
  display: grid;
  gap: var(--space-4);
  align-items: stretch;
}
.door {
  border: 1.5px solid var(--slab);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.door-ext {
  background: var(--slab);
  border-color: var(--slab);
}
.door-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--restricted);
}
.door h3 {
  font-family: var(--font-display);
  font-size: var(--fs-head-m);
  font-weight: 600;
  line-height: 1.2;
}
.door ul { list-style: none; display: grid; gap: var(--space-2); }
.door li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
}
.door .platform {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink);
  min-width: 0;
}
.door .platform b { font-weight: 600; }
.door .platform span {
  display: block;
  font-size: 0.875rem;
  color: var(--restricted);
  font-weight: 400;
}
.door .text-link {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.door .text-link:hover { text-decoration: underline; }
.door p { margin: 0; }
/* Equal-height cells with unequal content: anchor the action to the bottom edge
   so the card reads as composed rather than as a card with a hole in it. */
.door > p:last-child { margin-top: auto; }

/* The extension is the recommendation, so it gets its own full-width band and
   the other two share the row below. Sizing it 2fr in a three-up row left it
   stretched and hollow — the width has to be filled, not just claimed. */
@media (min-width: 768px) {
  .door-grid {
    grid-template-columns: 1fr 1fr;
  }
  .door-ext { grid-column: 1 / -1; }
  .door-ext ul { grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space-8); }
}

