/* ============================================================================
   Cellular Defense — marketing site
   ----------------------------------------------------------------------------
   Design note: the product's claim is "inspect the artifact yourself", so the
   artifact is the design. Page chrome is deep indigo (the sealed envelope);
   every surface that represents a *document* is pale slide-stock (the contents,
   once you hold the key). That inversion is the whole visual idea — keep it.

   Fonts are system stacks on purpose: the production CSP is `default-src 'self'`
   and the placeholder ships zero external requests. Do not add a webfont link.
   ========================================================================== */

:root {
  --ink:        #0C0F1F;
  --ink-2:      #141830;
  --ink-3:      #1C2140;
  --line:       #262C4E;
  --slide:      #E7E9E1;
  --slide-2:    #CFD3C6;
  --slide-ink:  #1A1D2B;
  --seal:       #37DCC4;
  --seal-dim:   #1E7F72;
  --advisory:   #E3A33F;
  --text:       #DCDFEC;
  --muted:      #7E849F;

  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gut: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

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

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

a { color: var(--seal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #6BEBD8; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;
  background: var(--seal);
  color: var(--ink);
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

/* ── Masthead ───────────────────────────────────────────────────────────── */

.mast {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 15, 31, 0.92);
  backdrop-filter: blur(8px);
}
.mast__in {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 60px;
  flex-wrap: wrap;
}
.mast__brand {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
}
.mast__dot {
  width: 9px; height: 9px;
  background: var(--seal);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(55, 220, 196, 0.16);
  flex: none;
}
.mast__nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.mast__link {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.mast__link:hover, .mast__link[aria-current="page"] { color: var(--text); }
.mast__cta {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--seal);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 3px;
}
.mast__cta:hover { background: #6BEBD8; color: var(--ink); }

/* ── Hero: the artifact is the headline ─────────────────────────────────── */

.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* The envelope. Deep, sealed, monospaced — a file, rendered as a file. */
.env {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}
.env__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.env__name { color: var(--text); text-transform: none; letter-spacing: 0.04em; }
.env__size { margin-left: auto; }
.env__body {
  margin: 0;
  padding: 1.15rem 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.775rem;
  line-height: 1.85;
  overflow-x: auto;
  color: #A8AEC9;
  tab-size: 2;
}
.env__body .k { color: #C6CBE4; }
.env__body .n { color: var(--advisory); }
.env__body .s { color: #8FE3D4; }

/* Sealed values: present, verifiable, unreadable. */
.sealed {
  display: inline-block;
  vertical-align: -2px;
  height: 0.72em;
  border-radius: 2px;
  background: repeating-linear-gradient(
    -45deg,
    var(--seal-dim) 0 3px,
    rgba(30, 127, 114, 0.35) 3px 6px
  );
  border: 1px solid rgba(55, 220, 196, 0.35);
}
.sealed--xl { width: 15ch; }
.sealed--lg { width: 11ch; }
.sealed--md { width: 8ch; }
.sealed--sm { width: 5ch; }

/* Absent values: the point of the whole page. */
.absent {
  color: var(--advisory);
  border-bottom: 1px dashed rgba(227, 163, 63, 0.5);
  font-style: normal;
}

.hero__say { padding-top: 0.5rem; }
.hero h1 {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 3.6vw, 2.55rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: #fff;
}
.hero h1 em { font-style: normal; color: var(--seal); }
.hero__lede { font-size: 1.075rem; color: #B9BED4; margin: 0 0 1.75rem; }
.hero__acts { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border-radius: 3px;
  border: 1px solid transparent;
  display: inline-block;
}
.btn--go { background: var(--seal); color: var(--ink); font-weight: 600; }
.btn--go:hover { background: #6BEBD8; color: var(--ink); }
.btn--quiet { border-color: var(--line); color: var(--text); }
.btn--quiet:hover { border-color: var(--seal); color: var(--seal); }

.hero__foot {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── Generic band ───────────────────────────────────────────────────────── */

.band { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.band--slide { background: var(--slide); color: var(--slide-ink); border-top-color: var(--slide-2); }
.band--slide .eyebrow { color: #6C7183; }
.band--slide a { color: #0F7A6B; }

.band__head { max-width: 42rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
/* h1 and h2 share this treatment: secondary pages open the intro band with the
   page's only h1, while mid-page bands are h2s. Same look, correct outline. */
.band__head h1,
.band__head h2 {
  font-family: var(--mono);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 0.85rem;
  color: #fff;
}
/* The intro band on a secondary page carries the page title — give it a touch
   more presence than a mid-page section heading. */
.hero .band__head h1 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
.band--slide .band__head h1,
.band--slide .band__head h2 { color: #0E1120; }
.band__head p { margin: 0; color: #B0B5CC; font-size: 1.03rem; }
.band--slide .band__head p { color: #4A4F62; }

/* ── The ledger: what a .cell hides, and what it doesn't ────────────────── */

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--slide-2); border-radius: 6px; overflow: hidden; background: #fff; }
.ledger__col { padding: 1.5rem 1.6rem; }
.ledger__col + .ledger__col { border-left: 1px solid var(--slide-2); }
.ledger__cap {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--slide-2);
}
.ledger__cap--no { color: #0F7A6B; }
.ledger__cap--yes { color: #A9701C; }
.ledger__list { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.ledger__list li { padding: 0.42rem 0 0.42rem 1.3rem; position: relative; color: #33384A; }
.ledger__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.95em;
  width: 0.6rem; height: 1px;
  background: currentColor;
  opacity: 0.45;
}
.ledger__note { margin: 1.4rem 0 0; font-size: 0.9rem; color: #5A5F72; }

/* ── Asymmetry: two parties, opposite needs ─────────────────────────────── */

.asym { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.asym__side { background: var(--ink-2); padding: 1.75rem 1.7rem; }
.asym__who {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}
.asym__side--send .asym__who { color: var(--seal); }
.asym__side--recv .asym__who { color: var(--advisory); }
.asym__side h3 { font-family: var(--mono); font-size: 1.08rem; font-weight: 600; margin: 0 0 0.8rem; color: #fff; letter-spacing: -0.01em; }
.asym__side p { margin: 0 0 0.9rem; color: #ADB2C9; font-size: 0.97rem; }
.asym__side p:last-child { margin-bottom: 0; }
.asym__rule { margin: 2rem 0 0; padding: 1.15rem 1.4rem; border-left: 2px solid var(--seal); background: var(--ink-2); color: #C4C9DE; font-size: 0.99rem; }

/* ── Feature rows ───────────────────────────────────────────────────────── */

.rows { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.row { background: var(--ink); display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); padding: 1.7rem 0; }
.row__tag { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--seal); padding-top: 0.2rem; }
.row__say h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.5rem; color: #fff; }
.row__say p { margin: 0; color: #A9AEC6; font-size: 0.99rem; }

/* ── Segments ───────────────────────────────────────────────────────────── */

.segs { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.seg { border: 1px solid var(--slide-2); background: #fff; border-radius: 6px; padding: 1.4rem 1.5rem; }
.seg h3 { font-family: var(--mono); font-size: 0.95rem; font-weight: 600; margin: 0 0 0.6rem; color: #0E1120; letter-spacing: -0.01em; }
.seg p { margin: 0; font-size: 0.94rem; color: #4A4F62; }

/* ── Close ──────────────────────────────────────────────────────────────── */

.close__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.close__item h3 { font-family: var(--mono); font-size: 0.9rem; font-weight: 600; margin: 0 0 0.5rem; color: #fff; }
.close__item p { margin: 0; font-size: 0.94rem; color: #A9AEC6; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; font-size: 0.88rem; color: var(--muted); }
.foot__in { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: baseline; }
.foot__nav { display: flex; gap: 1.25rem; margin-left: auto; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ── Dev-instance ribbon. Remove `is-dev` on the body when promoting. ────── */

.devflag { display: none; }
body.is-dev .devflag {
  display: block;
  background: var(--advisory);
  color: #241905;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.4rem 1rem;
}

/* ── Motion: one orchestrated reveal, not scattered effects ─────────────── */

@keyframes seal-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.env { animation: seal-in 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero__say > * { animation: seal-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero__say > :nth-child(1) { animation-delay: 0.10s; }
.hero__say > :nth-child(2) { animation-delay: 0.16s; }
.hero__say > :nth-child(3) { animation-delay: 0.22s; }
.hero__say > :nth-child(4) { animation-delay: 0.28s; }
.hero__say > :nth-child(5) { animation-delay: 0.34s; }

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

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: 1fr; }
  .ledger__col + .ledger__col { border-left: 0; border-top: 1px solid var(--slide-2); }
  .asym { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 0.6rem; padding: 1.4rem 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .mast__in { min-height: 54px; padding-block: 0.5rem; }
  .mast__nav { gap: 1rem; }
  .env__body { font-size: 0.71rem; }
}
