/* Calm: the site's shared look. Modeled on Zen and Dia: Outfit throughout, soft blue and gold glows, pill buttons,
   and quiet muted text. Dark and light both exist: the page follows the visitor's computer until they choose one
   with the header's Light/Dark button, which sets data-theme on <html>.
   The three parts of Bastion each have a color, used for their dots and glows:
   Privacy blue, Security gold, Personalization sage. */
:root {
  --bg: #10131c;
  --nav-bg: rgba(16, 19, 28, 0.82);
  --panel: #171b27;
  --panel-2: #1d2231;
  --line: #262c3d;
  --text: #e9ecf4;
  --muted: #a2a9bb;
  --blue: #8db0e0;
  --gold: #e3b54f;
  --gold-line: rgba(227, 181, 79, 0.5);
  --sage: #9fcbb6;
  --glow-blue: rgba(61, 95, 143, 0.5);
  --glow-gold: rgba(201, 143, 42, 0.32);
  --glow-sage: rgba(78, 140, 112, 0.34);
  --hero-glow: rgba(61, 95, 143, 0.55);
  --hero-glow-2: rgba(201, 143, 42, 0.12);
  --cta: #eef2fa;
  --on-cta: #10131c;
  --card-border: #262c3d;
  --card-shadow: 0 26px 52px -28px rgba(0, 0, 0, 0.75);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #edf0f5;
    --nav-bg: rgba(237, 240, 245, 0.86);
    --panel: #ffffff;
    --panel-2: #f1f4f8;
    --line: #d6dbe4;
    --text: #151a25;
    --muted: #535d70;
    --blue: #3561a3;
    --gold: #8f6107;
    --gold-line: rgba(143, 97, 7, 0.45);
    --sage: #2c7253;
    --glow-blue: rgba(96, 142, 214, 0.45);
    --glow-gold: rgba(230, 168, 45, 0.38);
    --glow-sage: rgba(96, 178, 138, 0.4);
    --hero-glow: rgba(96, 142, 214, 0.55);
    --hero-glow-2: rgba(230, 168, 45, 0.24);
    --card-border: #d3d9e3;
    --card-shadow: 0 1px 2px rgba(20, 30, 50, 0.07), 0 22px 46px -20px rgba(20, 30, 50, 0.32);
    --cta: #151a25;
    --on-cta: #ffffff;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #edf0f5;
  --nav-bg: rgba(237, 240, 245, 0.86);
  --panel: #ffffff;
  --panel-2: #f1f4f8;
  --line: #d6dbe4;
  --text: #151a25;
  --muted: #535d70;
  --blue: #3561a3;
  --gold: #8f6107;
  --gold-line: rgba(143, 97, 7, 0.45);
  --sage: #2c7253;
  --glow-blue: rgba(96, 142, 214, 0.45);
  --glow-gold: rgba(230, 168, 45, 0.38);
  --glow-sage: rgba(96, 178, 138, 0.4);
  --hero-glow: rgba(96, 142, 214, 0.55);
  --hero-glow-2: rgba(230, 168, 45, 0.24);
  --card-border: #d3d9e3;
  --card-shadow: 0 1px 2px rgba(20, 30, 50, 0.07), 0 22px 46px -20px rgba(20, 30, 50, 0.32);
  --cta: #151a25;
  --on-cta: #ffffff;
  color-scheme: light;
}
/* In light mode the drawn Bastion windows use Bastion's own light colors (src/renderer/styles/tokens.css). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .bx.dark {
    --bx-bg: #f7f8fa;
    --bx-panel: #eceff3;
    --bx-bar: #e8ebef;
    --bx-field: #ffffff;
    --bx-line: #d5dae1;
    --bx-edge: #b4bcc7;
    --bx-text: #1d232b;
    --bx-text-2: #5c6673;
    --bx-accent: #3d5f8f;
    --bx-on-accent: #ffffff;
    --bx-tint: rgba(61, 95, 143, 0.12);
    --bx-warn: #9a5b12;
    --bx-ok: #2e7d4f;
    --bx-danger: #b3261e;
    --bx-skel: #e3e7ec;
  }
  :root:not([data-theme="dark"]) .bx.dark .bx-article .img {
    background: linear-gradient(160deg, #c9d6ea 0%, #dfe6f1 45%, #e8dccb 100%);
  }
}
:root[data-theme="light"] .bx.dark {
  --bx-bg: #f7f8fa;
  --bx-panel: #eceff3;
  --bx-bar: #e8ebef;
  --bx-field: #ffffff;
  --bx-line: #d5dae1;
  --bx-edge: #b4bcc7;
  --bx-text: #1d232b;
  --bx-text-2: #5c6673;
  --bx-accent: #3d5f8f;
  --bx-on-accent: #ffffff;
  --bx-tint: rgba(61, 95, 143, 0.12);
  --bx-warn: #9a5b12;
  --bx-ok: #2e7d4f;
  --bx-danger: #b3261e;
  --bx-skel: #e3e7ec;
}
:root[data-theme="light"] .bx.dark .bx-article .img {
  background: linear-gradient(160deg, #c9d6ea 0%, #dfe6f1 45%, #e8dccb 100%);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem / 1.65 var(--font);
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  font-weight: 500;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2.8rem, 6.4vw, 5rem);
  line-height: 1.02;
  font-weight: 400;
}
h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  font-weight: 400;
}
h3 {
  font-size: 1.2rem;
  line-height: 1.3;
}
p {
  margin: 0;
}
.muted {
  color: var(--muted);
}
section[id] {
  scroll-margin-top: 84px;
}

/* The parts of Bastion: a class on any element sets --c for the dots and glows inside it. */
.privacy {
  --c: var(--blue);
  --c-glow: var(--glow-blue);
}
.security {
  --c: var(--gold);
  --c-glow: var(--glow-gold);
}
.personal {
  --c: var(--sage);
  --c-glow: var(--glow-sage);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--muted);
}
.tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--blue));
  flex: none;
}

/* Header: pinned to the top. On phones the section links move into a menu under the menu button. */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top, 0px);
  transition: border-color 0.2s;
}
.nav.scrolled,
.nav.open {
  border-bottom-color: var(--line);
}
.nav.open {
  background: var(--bg);
}
.nav .bar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.15rem;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
}
.links {
  display: flex;
  gap: 26px;
  font-size: 0.97rem;
}
.links a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.3s;
}
.links a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
  transform: scale(0);
  transition: transform 0.3s;
}
.links a:hover,
.links a.on {
  color: var(--text);
}
.links a.on::before {
  transform: scale(1);
}
/* How far down the page the reader is, in the color of the part they're reading. */
.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: calc(var(--p, 0) * 100%);
  background: var(--c, var(--blue));
  transition: background 0.4s;
  pointer-events: none;
}
.tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover {
  background: var(--panel-2);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.theme-btn .sun,
.theme-btn[data-mode="dark"] .moon {
  display: none;
}
.theme-btn[data-mode="dark"] .sun {
  display: block;
}
.menu-btn {
  display: none;
}
.menu-btn .x,
.nav.open .menu-btn .lines {
  display: none;
}
.nav.open .menu-btn .x {
  display: block;
}
.menu {
  display: none;
}
@media (max-width: 760px) {
  .links {
    display: none;
  }
  .menu-btn {
    display: grid;
  }
  .nav .bar {
    gap: 12px;
    height: 64px;
  }
  .tools {
    gap: 8px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
  }
  .nav .btn.sm {
    padding: 8px 14px;
    font-size: 0.88rem;
  }
  .brand {
    font-size: 1.05rem;
    gap: 8px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .menu:not([hidden]) {
    display: grid;
    padding-block: 4px 18px;
  }
  .menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 2px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--line);
  }
  .menu a::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
  }
}
@media (max-width: 374px) {
  .brand .name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font: 500 1rem / 1 var(--font);
  text-decoration: none;
  background: var(--cta);
  color: var(--on-cta);
  border: 1px solid var(--cta);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  filter: brightness(0.94);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn.sm {
  padding: 9px 18px;
  font-size: 0.92rem;
}

/* Opening */
.hero {
  text-align: center;
  padding-block: 72px 48px;
  display: grid;
  gap: 22px;
  justify-items: center;
}
.hero .lede {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 40rem;
  font-weight: 300;
}
.glow {
  position: relative;
}
.glow::before {
  content: "";
  position: absolute;
  inset: 8% 10% 20%;
  background: radial-gradient(closest-side, var(--hero-glow), var(--hero-glow-2) 60%, transparent);
  filter: blur(30px);
  pointer-events: none;
}
.glow > * {
  position: relative;
}

/* The name-first opening of the protection versions: the product name, its protection line (the slogan), and a short lede. */
.vhero {
  text-align: center;
  padding-block: 64px 40px;
  display: grid;
  gap: 16px;
  justify-items: center;
}
.vhero .name {
  font-size: clamp(3.2rem, 8.4vw, 6.8rem);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.vhero .slogan {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.25;
  font-weight: 300;
  letter-spacing: -0.01em;
  max-width: 26em;
  text-wrap: balance;
}
.vhero .lede {
  color: var(--muted);
  font-weight: 300;
  font-size: 1.12rem;
  max-width: 40rem;
}

section {
  padding-block: 88px;
}

/* Download */
footer {
  border-top: 1px solid var(--line);
  padding-block: 64px 96px;
}
/* The last section: the Mac download under a small sparkling crest, then the legal notices in quieter type, then
   the copyright. */
.get {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding-bottom: 64px;
}
.get .emblem {
  width: 88px;
  margin-bottom: 10px;
}
.get .emblem img {
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}
.get .free {
  color: var(--muted);
  font-weight: 300;
  font-size: 1.15rem;
}
.get .btn {
  margin-top: 12px;
}
.get .req {
  color: var(--muted);
  font-weight: 300;
  font-size: 0.94rem;
}
.legal {
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.legal > h2 {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 44px;
}
.terms div {
  min-width: 0;
}
.terms h3 {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.terms p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
  font-weight: 300;
}
.base {
  display: flex;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}
@media (max-width: 960px) {
  .terms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .terms {
    grid-template-columns: 1fr;
  }
}

/* Scroll effects. calm.js adds .fx to <html> unless the visitor asked for less motion; anything marked data-fx
   then rises into place as it scrolls into view (it rests faintly visible below the fold until then), and
   --d staggers neighbors. Without .fx everything simply shows. */
html.fx [data-fx] {
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}
html.fx [data-fx]:not(.in) {
  opacity: 0.12;
  transform: translateY(26px);
}
html.fx [data-fx="pic"]:not(.in) {
  transform: translateY(56px);
}
html.fx [data-fx="left"]:not(.in) {
  transform: translateX(-36px);
}
html.fx [data-fx="right"]:not(.in) {
  transform: translateX(36px);
}
@keyframes ping {
  from {
    box-shadow: 0 0 0 0 var(--c);
  }
  to {
    box-shadow: 0 0 0 12px transparent;
  }
}
html.fx .tag.in::before {
  animation: ping 1.4s ease-out 0.35s 2;
}
