/* =========================================================
   Patriot Firewall — landing page
   Tokens lifted from ios/vpn/ContentView.swift (enum Theme)
   Dark intel aesthetic. Headlines in Hepta Slab — a revival
   of 19th-century American wood-type slabs (newspaper
   headline / stencil weight), roman only. Mono for intel
   labels, system sans for body and buttons.
   Direct-response layout: one message per section, one CTA
   phrase, three deliberate placements.
   ========================================================= */

/* Palette is pulled straight off the app icon: navy field #112773,
   flag red #db1c2e. The darks are the same navy hue (226°) held at
   low lightness so the page reads blue, not black. */
:root {
  --bg:        #0a1330;   /* icon navy, darkened */
  --bg-2:      #0d1a3e;
  --panel:     #16224c;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.06);

  --red:       #d81f33;   /* icon red — fills: buttons, strip, brackets */
  --red-hot:   #ea2a40;   /* hover */
  --red-tx:    #f5384c;   /* same hue, lifted for text contrast on navy */
  --blue:      #5a85f7;   /* icon navy lifted to work as an accent */
  --green:     #4cd985;   /* Theme.green */
  --cream:     #f7f5ed;   /* Theme.cream */
  --navy:      #112773;   /* app icon field */

  --tx:        rgba(255,255,255,.92);
  --tx-2:      rgba(255,255,255,.58);
  --tx-3:      rgba(255,255,255,.36);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --pad: 20px;
  --r:   16px;
  --dock-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }

/* scrollbar-gutter keeps the page from jumping sideways on desktop when the
   capture sheet locks scrolling behind it. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--dock-h);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; }

.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; top: 8px; left: 8px; z-index: 999;
  background: var(--red); color: #fff; padding: 10px 16px;
  border-radius: 8px; width: auto; height: auto; clip: auto;
}

.wrap { width: 100%; max-width: 620px; margin-inline: auto; padding-inline: var(--pad); }

/* ---------------- alert strip ---------------- */

.alert {
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em;
  text-align: center;
  line-height: 1.45;
  padding: 8px 14px;
  padding-top: max(8px, env(safe-area-inset-top));
}

/* ---------------- sticky bar ---------------- */

.bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 12px var(--pad);
  background: rgba(10,19,48,.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.bar.is-stuck { border-bottom-color: var(--line); background: rgba(10,19,48,.94); }
.bar__logo { text-decoration: none; display: flex; align-items: center; gap: 12px; }
/* Decorative stars flank the lockup; the anchor's aria-label carries the name. */
.bar__logo::before,
.bar__logo::after {
  content: "★";
  color: var(--tx);
  font-size: 11px; line-height: 1;
}

.lockup { display: grid; gap: 2px; text-align: center; }
.lockup__a {
  font-size: 14px; font-weight: 800; letter-spacing: .34em;
  text-indent: .34em; color: var(--tx); line-height: 1;
}
.lockup__b {
  font-size: 8px; font-weight: 700; letter-spacing: .45em;
  text-indent: .45em; color: var(--red-tx); line-height: 1;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .02em;
  text-decoration: none;
  padding: 16px 26px;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 26px -8px rgba(216,31,51,.75);
  transition: transform .15s ease, background .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.btn:active { transform: scale(.97); }
@media (hover: hover) {
  .btn:hover { background: var(--red-hot); box-shadow: 0 10px 30px -8px rgba(234,42,64,.9); }
}

.btn--lg { width: 100%; max-width: 400px; padding: 17px 28px; font-size: 19px; }

/* Hero + conversion buttons breathe so the eye can't miss them. */
.btn--pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 26px -8px rgba(216,31,51,.75), 0 0 0 0 rgba(216,31,51,.45); }
  50%      { box-shadow: 0 8px 26px -8px rgba(216,31,51,.75), 0 0 0 14px rgba(216,31,51,0); }
}

.btn__apple { width: 22px; height: 22px; fill: currentColor; flex: none; }
.btn__text  { display: grid; text-align: left; line-height: 1.15; }
.btn__text small { font-size: 11px; font-weight: 600; opacity: .82; letter-spacing: .04em; }

.sec .btn { margin-top: 30px; width: 100%; max-width: 400px; }

/* ---------------- shared type ---------------- */

.kicker {
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--red-tx);
  margin: 0 0 14px;
}

/* Product-name reveal at the offer — the one label that earns its spot. */
.chapter {
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--red-tx);
  margin: 0 0 14px;
}
.chapter::before, .chapter::after { content: " ★ "; opacity: .7; }

.star { color: var(--red-tx); }
.hl { font-style: normal; color: var(--red-tx); font-weight: 750; }

h1 {
  font-size: clamp(34px, 9.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -.025em;
  font-weight: 800;
  margin: 0 0 18px;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--red-tx); }

h2 {
  font-size: clamp(27px, 7vw, 36px);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 800;
  margin: 0 0 16px;
  text-wrap: balance;
}
h2 em { font-style: normal; color: var(--red-tx); }
.h2--sm { font-size: clamp(22px, 5.6vw, 28px); }

.lede { font-size: 18px; color: var(--tx-2); margin: 0 0 28px; }
.lede strong { color: var(--tx); font-weight: 700; }

.body { font-size: 17px; color: var(--tx-2); margin: 0 0 8px; }
.body strong { color: var(--tx); }
.body--big {
  font-size: clamp(19px, 5vw, 23px);
  line-height: 1.45;
  color: var(--tx);
  margin: 0 0 18px;
  text-wrap: balance;
}
.body--big em { font-style: normal; color: var(--red-tx); }
.body--price { margin-top: 34px; }

.micro {
  font-family: var(--mono);
  font-size: 12px; color: var(--tx-3);
  margin: 14px 0 0; letter-spacing: .04em;
}
.caption { font-size: 13px; color: var(--tx-3); margin: 12px 0 0; }

/* ---------------- sections ---------------- */

/* Direct-response layout: everything centered, one column. */
.sec { padding: 64px 0; border-top: 1px solid var(--line-2); text-align: center; }
.sec--alt { background: var(--bg-2); }

/* ---------------- hero ---------------- */

.hero { position: relative; padding: 44px 0 8px; overflow: hidden; text-align: center; }
.hero::before {
  content: "";
  position: absolute; inset: -20% -40% auto -40%; height: 520px;
  background:
    radial-gradient(60% 60% at 30% 0%, rgba(17,39,115,.8), transparent 70%),
    radial-gradient(50% 50% at 82% 12%, rgba(216,31,51,.22), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }

/* ---------------- device shot ---------------- */

.shot { margin: 0; padding: 0; }
.shot img {
  width: 100%; max-width: 340px;
  margin-inline: auto;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.4);
}
/* Screenshots are cropped mid-UI; fade the cut edge instead of hard-stopping. */
.shot--fade img {
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  box-shadow: none;
}
.shot--hero { margin-top: 38px; }
.shot--hero img { max-width: 320px; }
.sec .shot { margin-top: 30px; }

/* ---------------- statement lists ---------------- */

/* Pain points: red ✕. Offer stack: green ✓. Big, centered, punchy. */
.truths, .checks {
  list-style: none;
  margin: 30px 0 0; padding: 0;
  display: grid; gap: 0;
}
.truths li, .checks li {
  font-size: clamp(18px, 4.8vw, 21px);
  line-height: 1.45;
  color: var(--tx-2);
  padding: 18px 4px;
  border-top: 1px solid var(--line-2);
  text-wrap: balance;
}
.truths li:last-child, .checks li:last-child { border-bottom: 1px solid var(--line-2); }
.truths b, .checks b { color: var(--tx); font-weight: 750; }

.truths li::before, .checks li::before {
  display: block;
  font-size: 15px; font-weight: 800;
  margin-bottom: 6px;
}
.truths li::before { content: "✕"; color: var(--red-tx); }
.checks li::before { content: "✓"; color: var(--green); }

/* Pull quote framed with the app icon's red corner brackets. */
.pull {
  position: relative;
  margin: 34px 0 0;
  padding: 26px 40px;
  font-size: 19px; font-weight: 650; line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--tx);
}
.pull::before, .pull::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: 22px;
  border: 3px solid var(--red);
  opacity: .85;
}
.pull::before { left: 0; border-right: 0; }
.pull::after  { right: 0; border-left: 0; }
.pull em { display: block; margin-top: 10px; font-style: normal; color: var(--red-tx); }

/* ---------------- intercept feed ---------------- */

.feed {
  margin-top: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  text-align: left;
}
.feed__head {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .16em; color: var(--tx-2);
  padding: 14px 16px 10px;
}
.feed__live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  color: var(--green); letter-spacing: .14em;
}
.feed__live i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: blip 2.2s ease-in-out infinite;
}
@keyframes blip { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

.feed__list { list-style: none; margin: 0; padding: 0; }
.feed__list li {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border-top: 1px solid var(--line-2);
  animation: slot .45s ease both;
}
@keyframes slot { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }

.feed__main { flex: 1; min-width: 0; }
.feed__name {
  font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed__time {
  font-family: var(--mono);
  font-size: 9.5px; color: var(--tx-3);
  letter-spacing: .06em; margin-top: 4px;
}
.feed__geo { text-align: center; flex: none; width: 60px; }
.feed__flag { font-size: 20px; line-height: 1.1; }
.feed__cc {
  font-family: var(--mono);
  font-size: 7.5px; font-weight: 600;
  letter-spacing: .1em; color: var(--tx-3);
}
.feed__x {
  flex: none;
  font-family: var(--mono);
  font-size: 8px; font-weight: 700; letter-spacing: .11em;
  /* 8px on a red-tinted chip — lifted past --red-tx to stay legible */
  color: #ff5063;
  background: rgba(216,31,51,.13);
  border: 1px solid rgba(216,31,51,.34);
  border-radius: 999px;
  padding: 4px 8px;
}

.sec .feed + .caption + .body { margin-top: 24px; }

/* ---------------- faq ---------------- */

.faq { margin-top: 30px; border-top: 1px solid var(--line); text-align: left; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px 34px 18px 0;
  font-size: 16.5px; font-weight: 650; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%; translate: 0 -50%;
  color: var(--red-tx); font-size: 22px; font-weight: 400; line-height: 1;
  transition: rotate .2s ease;
}
.faq details[open] summary::after { content: "–"; }
.faq p { margin: -4px 0 20px; color: var(--tx-2); font-size: 15.5px; }

/* ---------------- final close ---------------- */

.sec--final {
  padding: 76px 0;
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(216,31,51,.14), transparent 65%),
    var(--bg);
}
.sec--final::before {
  content: "★ ★ ★";
  display: block; color: var(--red-tx);
  font-size: 11px; letter-spacing: .5em; margin-bottom: 20px;
}
.sec--final h2 { margin-bottom: 26px; }
.sec--final .btn { margin-inline: auto; }

/* ---------------- email capture sheet ---------------- */

/* Phone-first: a bottom sheet, thumb-height, pinned to the edge the
   thumb already lives at. --kb is the on-screen keyboard height, measured
   in app.js from visualViewport, so the field and the send button stay
   above the iOS keyboard instead of hiding behind it. */
.sheet {
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - var(--kb, 0px) - 20px);
  margin: auto auto 0;
  margin-bottom: var(--kb, 0px);
  padding: 0;
  border: 0;
  background: none;
  color: var(--tx);
  overflow: visible;
  translate: 0 100%;
  transition: translate .3s cubic-bezier(.2,.8,.3,1), margin-bottom .2s ease;
}
.sheet.is-open { translate: 0; }

.sheet::backdrop { background: rgba(4,8,22,0); transition: background .3s ease; }
.sheet.is-open::backdrop {
  background: rgba(4,8,22,.74);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* Page behind the sheet holds still while the sheet is up. */
html.is-locked, html.is-locked body { overflow: hidden; overscroll-behavior: none; }

.sheet__card {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, var(--panel), var(--bg-2) 70%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 26px var(--pad) max(24px, env(safe-area-inset-bottom));
  text-align: center;
  box-shadow: 0 -24px 70px -24px rgba(0,0,0,.95);
}

.sheet__close {
  position: absolute; top: 8px; right: 8px;
  width: 44px; height: 44px;      /* full tap target, small glyph */
  display: grid; place-items: center;
  background: none; border: 0; padding: 0;
  color: var(--tx-3); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sheet__close svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}
@media (hover: hover) { .sheet__close:hover { color: var(--tx); } }

.sheet__eyebrow {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--red-tx);
  margin: 0 0 10px;
}
.sheet__title {
  font-size: clamp(25px, 6.4vw, 30px);
  line-height: 1.1; letter-spacing: -.02em; font-weight: 800;
  margin: 0 0 10px;
  text-wrap: balance;
}
.sheet__sub {
  font-size: 15.5px; line-height: 1.5; color: var(--tx-2);
  margin: 0 0 20px;
  text-wrap: balance;
}
.sheet__sub b { color: var(--tx); font-weight: 700; overflow-wrap: anywhere; }

.sheet__input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--tx);
  /* 17px: anything under 16 makes iOS Safari zoom the page on focus. */
  font: inherit; font-size: 17px;
  padding: 16px;
  text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.sheet__input::placeholder { color: var(--tx-3); }
.sheet__input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(90,133,247,.2);
}
.sheet__input.is-ok    { border-color: rgba(76,217,133,.6); }
.sheet__input.is-bad   { border-color: var(--red-tx); box-shadow: 0 0 0 3px rgba(245,56,76,.15); }

.sheet .btn { width: 100%; margin-top: 12px; cursor: pointer; }
.sheet.is-busy .js-submit { opacity: .65; pointer-events: none; }

.sheet__msg {
  font-family: var(--mono);
  font-size: 12.5px; line-height: 1.4;
  margin: 12px 0 0; min-height: 1.4em;
  color: var(--tx-3);
}
.sheet__msg.bad { color: var(--red-tx); }

.sheet__micro {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .04em; color: var(--tx-3);
  margin: 10px 0 0;
}

/* Confirmation swaps in place of the form, same card, no reflow jump. */
.sheet__done { display: none; }
.sheet.is-done .sheet__form { display: none; }
.sheet.is-done .sheet__done { display: block; }
.sheet__seal {
  font-size: 30px; line-height: 1; color: #fff;
  margin: 4px 0 14px;
  text-shadow: 0 0 22px rgba(255,255,255,.55);
}

/* Queue position — a ticket-counter block under the title. */
.sheet__queue {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 14px;
  margin: 0 0 18px;
}
.sheet__queue-pre,
.sheet__queue-label {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--tx-3);
}
.sheet__queue-num {
  font-family: var(--mono);
  font-size: 44px; font-weight: 800; line-height: 1.15;
  letter-spacing: .04em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(247,245,237,.25);
}

/* Share row — the only actions in the done state. */
.sheet__share {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.share {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 4px 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--tx-2);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.share svg { width: 20px; height: 20px; fill: currentColor; }
.share--copy svg {
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round;
}
@media (hover: hover) {
  .share:hover { color: var(--tx); border-color: rgba(255,255,255,.22); }
}
.share.is-copied {
  color: var(--green);
  border-color: rgba(76,217,133,.5);
}

@media (min-width: 700px) {
  /* Centred card off the phone; the slide-up becomes a short lift. */
  .sheet { margin: auto; translate: 0 14px; }
  .sheet__card {
    border-radius: 22px;
    border-bottom: 1px solid var(--line);
    padding: 34px 34px 30px;
  }
}

/* ---------------- footer ---------------- */

.foot {
  border-top: 1px solid var(--line);
  /* Bottom padding clears the fixed mobile dock, which reappears
     once the final CTA scrolls out of view. */
  padding: 40px 0 108px;
  text-align: center;
}
.lockup--foot { margin-bottom: 20px; }
.foot__nav { display: flex; justify-content: center; gap: 22px; margin-bottom: 22px; }
.foot__nav a { color: var(--tx-2); text-decoration: none; font-size: 14px; }
@media (hover: hover) { .foot__nav a:hover { color: var(--tx); } }
.foot__legal { font-size: 11.5px; line-height: 1.6; color: var(--tx-3); margin: 0 0 10px; }

/* ---------------- sticky dock ---------------- */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  padding: 10px var(--pad);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(10,19,48,.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--line);
  translate: 0 130%;
  transition: translate .3s cubic-bezier(.2,.8,.3,1);
}
.dock.is-up { translate: 0; }
.btn--dock { width: 100%; font-size: 16px; padding: 14px 20px; gap: 9px; }
/* Slightly smaller than the in-page glyph so the one-line dock stays compact. */
.btn--dock .btn__apple { width: 19px; height: 19px; }

/* ---------------- reveal ---------------- */

.rv { opacity: 0; transform: translateY(16px); }
.rv.in { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.3,1); }

/* ---------------- breakpoints ---------------- */

@media (min-width: 700px) {
  :root { --pad: 32px; }
  .wrap { max-width: 680px; }
  .sec { padding: 88px 0; }
  .hero { padding-top: 64px; }
  .shot--hero img, .shot img { max-width: 340px; }
  .lede { font-size: 19px; }
  /* dock is a mobile affordance only */
  .dock { display: none; }
  body { padding-bottom: 0; }
  .foot { padding-bottom: 44px; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .rv { opacity: 1; transform: none; }
  .dock { translate: 0; }
}
