/* Blue Guard site styles. One sheet for every page, so the nav, footer, type,
   and spacing are identical everywhere. Dark first; light adapts.

   Nothing here loads from a third party. The type is the system stack, which
   means no webfont request, no Google Fonts, and no way for a font host to see
   who read this page. That is a privacy decision before it is a speed one. */

:root {
  color-scheme: dark light;

  /* Surfaces and text. */
  --bg: #05070d;
  --text: #f5f6f8;
  --secondary: rgba(235, 240, 250, 0.62);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --surface: #111318;
  --sheet: #1a1c22;
  --control: rgba(255, 255, 255, 0.1);
  --control-hover: rgba(255, 255, 255, 0.16);
  --control-active: rgba(255, 255, 255, 0.22);

  /* The one accent, matching the app's SBAccent: #0072E0.
     --accent is the brand value. It carries icons, fills, and focus rings,
     where the WCAG bar is 3:1, and it measures 4.30:1 on this background.
     --accent-text is the same hue lifted in lightness for small text, where
     the bar is 4.5:1: #2E8FEE measures 6.02:1 on the page and 5.56:1 on a
     card. Every number here was measured, not estimated. */
  --accent: #0072e0;
  --accent-text: #2e8fee;
  --on-accent: #ffffff;

  --shadow: rgba(0, 0, 0, 0.55);
  --shadow-lift: rgba(0, 0, 0, 0.7);

  /* Type scale. One ramp, used everywhere, so nothing is sized by hand. */
  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1rem;
  --step-2: 1.0625rem;
  --step-3: 1.1875rem;
  --step-4: clamp(1.375rem, 2.5vw, 1.5rem);
  --step-5: clamp(1.75rem, 4vw, 2.25rem);
  --step-6: clamp(2.125rem, 5.5vw, 2.875rem);
  --step-7: clamp(2.5rem, 7vw, 4rem);

  /* Spacing scale, on a 4px grid. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.75rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius-card: 1.5rem;
  --radius-sheet: 1.5rem;
  --radius-pill: 999px;

  --measure: 40rem;
  --page: 64rem;

  --ease: cubic-bezier(0.32, 0.72, 0.35, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --text: #101318;
    --secondary: rgba(22, 30, 44, 0.62);
    --border: rgba(10, 20, 40, 0.1);
    --border-strong: rgba(10, 20, 40, 0.18);
    --surface: #ffffff;
    --sheet: #ffffff;
    --control: rgba(10, 20, 40, 0.07);
    --control-hover: rgba(10, 20, 40, 0.12);
    --control-active: rgba(10, 20, 40, 0.18);

    /* #0072E0 measures 4.33:1 on this background, which clears the 3:1 bar for
       icons, fills, and focus rings but not the 4.5:1 bar for small text. Links
       and inline emphasis take --accent-text: #0066CC, the same hue at a lower
       lightness, measuring 5.15:1 on the page and 5.57:1 on a card. */
    --accent: #0072e0;
    --accent-text: #0066cc;

    --shadow: rgba(20, 35, 60, 0.12);
    --shadow-lift: rgba(20, 35, 60, 0.2);
  }
}

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

html {
  /* Anchor targets clear the sticky nav rather than hiding under it. */
  scroll-padding-top: 5rem;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
    "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--step-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* The footer sits at the bottom on short pages instead of floating mid-screen. */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

body > footer {
  margin-top: auto;
}

img {
  max-width: 100%;
  height: auto;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A keyboard user should not have to tab the whole nav on every page. */

.skip {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -150%;
  z-index: 20;
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--step-0);
  font-weight: 600;
  text-decoration: none;
  transition: translate 0.2s var(--ease);
}

.skip:focus-visible {
  translate: -50% 0;
}

/* Nav: one floating pill, identical on every page. */

.sitenav {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-4);
}

.navpill {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px var(--shadow);
}

.menu {
  list-style: none;
  display: flex;
  align-items: center;
}

.menu a {
  display: flex;
  align-items: center;
  /* 44px, the minimum comfortable touch target. */
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--secondary);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.menu a:hover {
  color: var(--text);
  background: var(--control);
}

.menu a:active {
  background: var(--control-active);
}

.menu a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* Hero. */

.hero {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 4.5rem) var(--space-5) clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Reserving the box stops the icon shifting the headline as it decodes. */

.hero-icon {
  width: clamp(5.5rem, 13vw, 7rem);
  aspect-ratio: 1;
  height: auto;
  filter: drop-shadow(0 16px 32px var(--shadow));
}

.hero h1 {
  margin-top: var(--space-6);
  font-size: var(--step-7);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.sub {
  margin-top: var(--space-5);
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  color: var(--secondary);
  max-width: 32rem;
  text-wrap: pretty;
}

/* The one call to action. White on the brand fill measures 4.68:1, which clears
   the 4.5:1 bar even read as normal text. */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin-top: var(--space-6);
  padding: 0 var(--space-6);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    filter 0.2s var(--ease),
    scale 0.2s var(--ease);
}

.cta:hover {
  filter: brightness(1.08);
}

.cta:active {
  scale: 0.98;
}

/* Until the listing exists there is no address to point at, so this is a
   disabled span rather than a link that goes nowhere. Swap it for an <a
   class="cta"> when App Store Connect issues the address. */

.cta--pending {
  background: var(--control);
  color: var(--text);
  border: 1px solid var(--border-strong);
  cursor: default;
}

.cta--pending:hover {
  filter: none;
}

.cta--pending:active {
  scale: 1;
}

.cta-note {
  margin-top: var(--space-3);
  font-size: var(--step-0);
  color: var(--secondary);
}

/* Layout. */

main {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5) var(--space-9);
}

.section-head {
  max-width: var(--measure);
  margin: 0 auto var(--space-6);
  text-align: center;
}

.section-head h2 {
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

.section-head p {
  margin-top: var(--space-3);
  color: var(--secondary);
  text-wrap: pretty;
}

/* Feature cards. Rows size to their own content: `1fr` would make every row as
   tall as the tallest on the page and leave the short cards hollow. */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.card {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 12px 32px var(--shadow);
}

.card-icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent);
}

.card-title {
  margin-top: var(--space-4);
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
  text-wrap: balance;
}

.card-lede {
  margin-top: var(--space-2);
  margin-bottom: var(--space-5);
  font-size: var(--step-1);
  color: var(--secondary);
  text-wrap: pretty;
}

.kw {
  color: var(--accent-text);
  font-weight: 600;
}

/* A labelled control rather than a bare plus in a circle. The icon alone left
   the reader to guess, and left the bottom of every short card hollow. */

.card-more {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.5rem;
  padding: 0 var(--space-4);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--control);
  color: var(--text);
  font-family: inherit;
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.card-more:hover {
  background: var(--control-hover);
}

.card-more:active {
  background: var(--control-active);
}

.card-more svg {
  flex: none;
  color: var(--accent-text);
}

/* Detail sheets: native <dialog>. */

.sheet {
  margin: auto;
  width: min(42rem, calc(100% - 2rem));
  max-height: min(85svh, 48rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.75rem, 5vw, 3rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  background: var(--sheet);
  color: var(--text);
  box-shadow: 0 32px 80px var(--shadow-lift);
}

.sheet::backdrop {
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.sheet[open] {
  animation: sheet-in 0.45s var(--ease);
}

.sheet[open]::backdrop {
  animation: backdrop-in 0.35s ease;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: var(--control);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.sheet-close:hover {
  background: var(--control-hover);
}

.sheet-close:active {
  background: var(--control-active);
}

.sheet-title {
  font-size: var(--step-6);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  padding-right: 3rem;
  text-wrap: balance;
}

.sheet-body {
  margin-top: var(--space-5);
}

.sheet-body h4 {
  font-size: var(--step-2);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.sheet-body p {
  font-size: var(--step-2);
  color: var(--secondary);
  margin-top: var(--space-1);
  text-wrap: pretty;
}

.sheet-body p + h4 {
  margin-top: var(--space-5);
}

.sheet-body a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.06em;
  font-weight: 500;
}

.sheet-body a:hover {
  text-decoration-thickness: 0.12em;
}

/* FAQ. */

.faq {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: clamp(2.5rem, 6vw, 4rem);
}

.faq h1 {
  font-size: var(--step-6);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.faq-lede {
  margin-top: var(--space-4);
  color: var(--secondary);
  text-wrap: pretty;
}

.faq dl {
  margin-top: var(--space-6);
}

.qa {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
}

.qa dt {
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.qa dd {
  margin-top: var(--space-2);
  color: var(--secondary);
  text-wrap: pretty;
}

.qa a,
.policy a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.06em;
}

.qa a:hover,
.policy a:hover {
  text-decoration-thickness: 0.12em;
}

/* Documents: the privacy policy, the terms, support, and the 404. */

.policy {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: var(--space-8);
}

.policy header {
  margin-bottom: var(--space-8);
}

.policy h1 {
  font-size: var(--step-6);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
}

.policy-lede {
  margin-top: var(--space-4);
  color: var(--secondary);
  text-wrap: pretty;
}

.effective {
  font-size: var(--step-0);
  color: var(--secondary);
  margin-top: var(--space-4);
}

.policy section {
  margin-bottom: var(--space-7);
}

.policy h2 {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: var(--space-3);
}

.policy p {
  text-wrap: pretty;
}

.policy p + p {
  margin-top: var(--space-4);
}

.policy ul {
  list-style: none;
  margin-top: var(--space-4);
}

.policy li {
  padding-left: var(--space-5);
  position: relative;
  margin-top: var(--space-2);
}

.policy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: var(--secondary);
}

/* Footer: one quiet legal bar, identical on every page. */

.sitefoot {
  border-top: 1px solid var(--border);
}

/* The trademark disclaimer is the smallest text on the site and the text an App
   Store reviewer reads most carefully, so it takes the full secondary colour,
   which measures 4.60:1. Fading it further drops it below the body-text bar. */

.sitefoot-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) var(--space-6);
  font-size: var(--step--1);
  color: var(--secondary);
  line-height: 1.55;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.foot-links a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.foot-links a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.foot-disclaimer {
  margin-top: var(--space-2);
  max-width: 52rem;
}

/* Focus: one ring, on everything focusable, always visible against both
   backgrounds. #0072E0 measures 4.33:1 in light and 4.30:1 in dark, against a
   3:1 bar for a non-text indicator. */

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
}

.card-more:focus-visible,
.cta:focus-visible {
  outline-offset: 4px;
}

/* Tablet: two columns are still comfortable here, but the page needs to stop
   hugging the edges before the columns collapse. */

@media (max-width: 60rem) {
  main {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .card {
    padding: var(--space-5);
  }
}

/* Phone. */

@media (max-width: 44rem) {
  .cards {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .menu a {
    padding: 0 var(--space-3);
    font-size: 0.78125rem;
  }

  .navpill {
    padding: var(--space-1);
  }

  .policy header {
    margin-bottom: var(--space-7);
  }
}

/* Very narrow phones: the four-item nav is the first thing to run out of room. */

@media (max-width: 22rem) {
  .menu a {
    padding: 0 var(--space-2);
  }
}

/* Reveal: a quiet fade-up entrance. Pure CSS, so it never depends on JS timing
   and always resolves to the visible state. */

.reveal {
  animation: reveal-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--reveal-delay, 0s);
}

/* Stagger steps live here rather than in a style attribute on the element, so
   the Content-Security-Policy can refuse inline styles outright. */

.reveal-1 {
  --reveal-delay: 0.08s;
}

.reveal-2 {
  --reveal-delay: 0.16s;
}

.reveal-3 {
  --reveal-delay: 0.24s;
}

.reveal-4 {
  --reveal-delay: 0.3s;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
