/* ============================================================
   bastian.css — Bastian public site
   ------------------------------------------------------------
   Bastian is the sibling product to PsiGuard, and this sheet
   is the deliberate sibling of PsiGuard's site.css: identical
   type scale, spacing, radii, shadows, components and SVG-icon
   style, so the two products read as the work of one team.

   The ONE intentional difference is brand colour — PsiGuard's
   purple/pink gradient becomes Bastian's blue/cyan. Everything
   else is shared on purpose. Class names match site.css
   (site-*, hero-*, section-*, triptych, feature, cta-strip)
   so markup ports cleanly between the two sites.

   Bastian-only additions live at the bottom (section 15):
   a numbered "how it works" sequence and a compact FAQ list,
   both built from the same tokens. Light-mode only.
   ============================================================ */


/* ============================================================
   1 · DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand */
  --blue:        #0077cc;
  --blue-soft:   rgba(0, 119, 204, 0.10);
  --cyan:          #06b6d4;
  --gradient:      linear-gradient(135deg, #0077cc 0%, #06b6d4 100%);
  --gradient-soft: linear-gradient(135deg, rgba(0, 119, 204,0.06) 0%, rgba(6, 182, 212,0.04) 100%);

  /* Surface */
  --bg:            #ffffff;
  --bg-soft:       #fafbfc;
  --bg-tint:       #f4faff;       /* very faint lilac wash for hero */
  --bg-band:       #0f172a;        /* dark band, for the CTA strip */

  /* Text */
  --text:          #0f172a;
  --text-soft:     #475569;
  --text-muted:    #94a3b8;
  --text-on-dark:  #f8fafc;
  --text-on-dark-soft: rgba(248, 250, 252, 0.78);

  /* Borders & shadows */
  --border:          #e6e8ee;
  --border-soft:     rgba(15, 23, 42, 0.06);
  --shadow-xs:       0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:       0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md:       0 12px 40px -8px rgba(15, 23, 42, 0.10);
  --shadow-lg:       0 32px 90px -24px rgba(30, 20, 60, 0.20);

  /* Geometry */
  --radius-sm:       10px;
  --radius:          16px;
  --radius-lg:       24px;
  --radius-pill:     999px;

  /* Layout */
  --content-max:     1200px;
  --content-narrow:  920px;
  --gutter:          clamp(20px, 5vw, 56px);
  --section-y:       clamp(80px, 12vw, 160px);
  --nav-h:           64px;

  /* Type scale */
  --display:         clamp(2.4rem, 5.8vw, 4.75rem);
  --h2:              clamp(1.875rem, 3.8vw, 2.75rem);
  --h3:              1.375rem;
  --eyebrow:         0.8125rem;
  --body-lg:         clamp(1.0625rem, 1.6vw, 1.25rem);
  --body:            1.0625rem;
  --small:           0.875rem;

  /* Motion */
  --ease:            cubic-bezier(.2, .8, .2, 1);
  --t-fast:          120ms;
  --t-base:          200ms;
}

/* ============================================================
   2 · RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}
html {
  /* The 2px brand bar sits at the very top of the document.
     Padding here keeps anchor jumps from hiding under the
     sticky nav. */
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
               system-ui, sans-serif;
  font-size:   var(--body);
  line-height: 1.6;
  color:       var(--text);
  background:  var(--bg);
  /* The faint top brand bar */
  border-top:  2px solid transparent;
  background-image:
    linear-gradient(var(--bg), var(--bg)),
    var(--gradient);
  background-origin: border-box;
  background-clip:   padding-box, border-box;
}
img, svg, video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ============================================================
   3 · LAYOUT CONTAINERS
   ============================================================ */
.site-container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left:  var(--gutter);
  padding-right: var(--gutter);
}
.site-container--narrow {
  max-width: var(--content-narrow);
}


/* ============================================================
   4 · NAVBAR (matches partials/_nav.html)
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.site-nav__logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.0625rem;
  color: var(--text);
}
.site-nav__mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gradient);
  color: white;
  font-size: 0.95rem;
  line-height: 1;
}
.site-nav__beta {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.site-nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  white-space: nowrap;            /* never break a link mid-word ("Sign in", "Get started") */
  transition: color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.site-nav__link:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}
.site-nav__link.is-current {
  color: var(--text);
}
.site-nav__link--cta {
  margin-left: 4px;
  padding: 9px 18px;
  color: white;
  background: var(--gradient);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 119, 204, 0.20);
}
.site-nav__link--cta:hover {
  color: white;
  background: var(--gradient);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 119, 204, 0.28);
}
/* The default rules above only paint :link and :hover. Some browsers
   apply a :visited / :active color of their own that bleeds through
   on the gradient background. Force white in every interactive state. */
.site-nav__link--cta,
.site-nav__link--cta:link,
.site-nav__link--cta:visited,
.site-nav__link--cta:hover,
.site-nav__link--cta:active,
.site-nav__link--cta:focus,
.site-nav__link--cta:focus-visible,
.site-nav__link--cta.is-current {
  color: #ffffff;
}

/* Hamburger toggle — hidden on desktop, shown on mobile (see media query). */
.site-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease);
}
.site-nav__toggle:hover { border-color: #cbd5e1; }
.site-nav__toggle-bars,
.site-nav__toggle-bars::before,
.site-nav__toggle-bars::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t-base) var(--ease),
              opacity var(--t-base) var(--ease);
}
.site-nav__toggle-bars { position: relative; }
.site-nav__toggle-bars::before { position: absolute; top: -6px; left: 0; }
.site-nav__toggle-bars::after  { position: absolute; top:  6px; left: 0; }
/* Open: the three bars fold into an X. */
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars { background: transparent; }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars::after  { top: 0; transform: rotate(-45deg); }

/* Mobile: below 560px the links move into a tap-to-open dropdown instead of
   crowding the row. The panel is positioned against .site-nav (sticky, so it
   is the containing block) and drops just below the bar. */
@media (max-width: 560px) {
  .site-nav__toggle { display: inline-flex; }

  .site-nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px var(--gutter) 16px;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
            backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--t-base) var(--ease),
                transform var(--t-base) var(--ease),
                visibility var(--t-base) var(--ease);
  }
  .site-nav__links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .site-nav__links .site-nav__link {
    justify-content: center;
    padding: 12px 14px;
    font-size: 1rem;
  }
  .site-nav__links .site-nav__link--cta {
    margin-left: 0;
    margin-top: 4px;
  }
}


/* ============================================================
   5 · HERO
   ============================================================ */
.hero {
  position: relative;
  padding-top:    clamp(64px, 10vw, 120px);
  padding-bottom: clamp(64px, 10vw, 120px);
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(6, 182, 212, 0.10), transparent 60%),
    radial-gradient(900px 480px at 10% 0%, rgba(0, 119, 204, 0.10), transparent 60%),
    var(--bg-tint);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: var(--eyebrow);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--blue);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
}
.hero__eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 119, 204, 0.15);
}
.hero__title {
  font-size: var(--display);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 22px;
  color: var(--text);
}
.hero__title em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__sub {
  font-size: var(--body-lg);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 38ch;
  margin: 0 0 32px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.btn--primary {
  color: white;
  background: var(--gradient);
  box-shadow: 0 8px 24px -8px rgba(0, 119, 204, 0.5);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(0, 119, 204, 0.6);
}
.btn--secondary {
  color: var(--text);
  background: white;
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn--secondary:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.btn__arrow {
  transition: transform var(--t-fast) var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(2px); }


/* ============================================================
   6 · SCREENSHOT FRAME
   ------------------------------------------------------------
   Reusable browser-window-style frame for demo screenshots
   and videos. Replace the inner .screenshot__body content
   with <img>, <video>, or a real component when you have
   real assets.
   ============================================================ */
.screenshot {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.screenshot__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: #f7f7fb;
  border-bottom: 1px solid var(--border);
}
.screenshot__dots {
  display: inline-flex;
  gap: 6px;
}
.screenshot__dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #e2e2ea;
}
.screenshot__dots span:nth-child(1) { background: #ff6058; }
.screenshot__dots span:nth-child(2) { background: #ffbd2e; }
.screenshot__dots span:nth-child(3) { background: #28c942; }
.screenshot__url {
  flex: 1;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.01em;
}
.screenshot__body {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
}
.screenshot__body--media {
  /* For when you swap in a real <img> or <video> — the
     aspect-ratio still holds the frame shape. */
  padding: 0;
}
.screenshot__body--media > img,
.screenshot__body--media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.screenshot__placeholder {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}
.screenshot__placeholder-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--blue);
}
.screenshot__placeholder-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.screenshot__placeholder-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Subtle floating decoration behind the hero screenshot */
.hero__screenshot {
  position: relative;
}
.hero__screenshot::before {
  content: "";
  position: absolute;
  inset: -20px -16px -16px -20px;
  background: var(--gradient);
  filter: blur(60px);
  opacity: 0.12;
  z-index: -1;
  border-radius: 32px;
}


/* ============================================================
   7 · PROOF STRIP (under the hero)
   ------------------------------------------------------------
   Three outcome words. No symbols, no signal names — describes
   what PsiGuard catches, not how. The visual rhythm (thin
   bordered band under the hero) is what matters here.
   ============================================================ */
.proof-strip {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 26px 0;
  background: white;
}
.proof-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 56px);
}
.proof-strip__label {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.proof-strip__items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}
.proof-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
.proof-strip__item svg {
  color: var(--blue);
  flex-shrink: 0;
}


/* ============================================================
   8 · SECTIONS (alternating text / screenshot)
   ============================================================ */
.section {
  padding: var(--section-y) 0;
}
.section--soft {
  background: var(--bg-soft);
}
.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.section__grid--reverse .section__copy { order: 2; }
.section__grid--reverse .section__media { order: 1; }
@media (max-width: 900px) {
  .section__grid { grid-template-columns: 1fr; gap: 48px; }
  .section__grid--reverse .section__copy,
  .section__grid--reverse .section__media { order: 0; }
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.section__title {
  font-size: var(--h2);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text);
}
.section__lede {
  font-size: var(--body-lg);
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0 0 24px;
  max-width: 52ch;
}
.section__points {
  list-style: none;
  margin: 0;
  padding: 0;
}
.section__points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}
.section__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gradient-soft);
  border: 1.5px solid var(--blue);
}


/* ============================================================
   9 · SECTION HEADS + LEDGER (benefit list)
   ------------------------------------------------------------
   .triptych__head is the centred eyebrow + title used here and
   on the pricing page. .ledger is a quiet term/description list
   (same divided-list family as the FAQ) for the benefits block.
   ============================================================ */
.triptych__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(48px, 8vw, 80px);
}
.triptych__head .section__title { margin-bottom: 14px; }
.triptych__head .section__lede {
  margin-left: auto;
  margin-right: auto;
  max-width: 60ch;
}

.ledger {
  margin: 0;
}
.ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
  gap: clamp(16px, 5vw, 64px);
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--border-soft);
}
.ledger__row:last-child {
  border-bottom: 1px solid var(--border-soft);
}
.ledger__term {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.ledger__desc {
  font-size: var(--body);
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0;
  max-width: 60ch;
}
@media (max-width: 720px) {
  .ledger__row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 22px 0;
  }
}


/* ============================================================
   10 · BETA / HONESTY CARD
   ============================================================ */
.beta-note {
  padding: var(--section-y) 0;
}
.beta-note__card {
  position: relative;
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(0, 119, 204, 0.04), rgba(6, 182, 212, 0.03));
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
@media (max-width: 720px) {
  .beta-note__card { grid-template-columns: 1fr; }
}
.beta-note__pill {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.beta-note__title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 14px;
}
.beta-note__body {
  font-size: var(--body-lg);
  color: var(--text-soft);
  margin: 0;
  line-height: 1.55;
  max-width: 60ch;
}
.beta-note__body strong { color: var(--text); font-weight: 600; }


/* ============================================================
   11 · CTA STRIP
   ============================================================ */
.cta-strip {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
  background:
    radial-gradient(800px 360px at 20% 30%, rgba(6, 182, 212, 0.30), transparent 60%),
    radial-gradient(800px 360px at 80% 70%, rgba(0, 119, 204, 0.35), transparent 60%),
    var(--bg-band);
  color: var(--text-on-dark);
  overflow: hidden;
  text-align: center;
}
.cta-strip__title {
  font-size: clamp(1.875rem, 4.5vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-weight: 700;
  margin: 0 0 18px;
  color: white;
}
.cta-strip__sub {
  font-size: var(--body-lg);
  color: var(--text-on-dark-soft);
  margin: 0 auto 36px;
  max-width: 52ch;
}
.cta-strip .btn--primary {
  /* On the dark band, a white button reads cleaner than the gradient. */
  background: white;
  color: var(--text);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4);
}
.cta-strip .btn--primary:hover {
  background: white;
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.5);
}
.cta-strip .btn--secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.30);
}
.cta-strip .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}


/* ============================================================
   12 · FOOTER
   ============================================================ */
.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.875rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 600;
}
.site-footer__brand-mark {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--gradient);
  color: white;
  font-size: 0.75rem;
}
.site-footer__links {
  display: flex;
  gap: 20px;
}
.site-footer__links a {
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
}
.site-footer__links a:hover { color: var(--text); }


/* ============================================================
   13 · ENTRANCE ANIMATIONS
   ------------------------------------------------------------
   Quiet, single-shot reveal on the hero — no scroll-trigger
   loops or distracting micro-interactions. Respects users
   who've asked the OS for reduced motion.
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: rise 600ms var(--ease) both;
}
.reveal-1 { animation-delay: 60ms; }
.reveal-2 { animation-delay: 160ms; }
.reveal-3 { animation-delay: 260ms; }
.reveal-4 { animation-delay: 360ms; }
.reveal-5 { animation-delay: 460ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-1, .reveal-2, .reveal-3, .reveal-4, .reveal-5 {
    animation: none;
  }
  .btn,
  .btn__arrow { transition: none; }
}


/* ============================================================
   14 · APP NAVBAR (authenticated surfaces)
   ------------------------------------------------------------
   Used by /home, /chat, /dashboard. Lives in partials/_app_nav.html.
   Builds on .site-nav (the public-nav shell — sticky, blurred,
   brand-mark) and adds primary product links + usage chip +
   account menu. Public marketing pages keep using .site-nav
   alone via partials/_nav.html.
   ============================================================ */

.app-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 28px;
}
.app-nav__links .site-nav__link {
  font-size: 0.9375rem;
}
.app-nav__links .site-nav__link.is-current {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}
@media (max-width: 720px) {
  /* On narrow screens the primary links collapse into the account menu;
     keeping them inline would crowd the brand + usage chip. */
  .app-nav__links { display: none; }
}

.app-nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ---------- Usage chip ---------- */
.app-nav__usage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-soft);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.app-nav__usage:hover {
  border-color: #cbd5e1;
  color: var(--text);
}
.app-nav__usage-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.12);
  flex-shrink: 0;
}
.app-nav__usage.is-warn .app-nav__usage-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.app-nav__usage.is-danger .app-nav__usage-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
@media (max-width: 520px) {
  .app-nav__usage { display: none; }
}

/* ---------- Account menu (native <details>/<summary>) ---------- */
.app-nav__account {
  position: relative;
}
.app-nav__account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-soft);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.app-nav__account-trigger::-webkit-details-marker,
.app-nav__account-trigger::marker { display: none; content: ""; }
.app-nav__account-trigger:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-xs);
}
.app-nav__account[open] .app-nav__account-trigger {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.10);
}
.app-nav__account-trigger svg {
  transition: transform var(--t-fast) var(--ease);
}
.app-nav__account[open] .app-nav__account-trigger svg {
  transform: rotate(180deg);
}
.app-nav__avatar {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.app-nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 60;
  animation: appNavMenuIn 180ms var(--ease);
}
@keyframes appNavMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.app-nav__menu-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 4px;
}
.app-nav__menu-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.app-nav__menu-email {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-nav__menu-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.app-nav__menu-item:hover,
.app-nav__menu-item:focus-visible {
  color: var(--text);
  background: var(--bg-soft);
  outline: none;
}
.app-nav__menu-item--danger { color: #b91c1c; }
.app-nav__menu-item--danger:hover {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.06);
}

@media (prefers-reduced-motion: reduce) {
  .app-nav__menu,
  .app-nav__account-trigger svg { animation: none; transition: none; }
}


/* ============================================================
   15 · BASTIAN-ONLY COMPONENTS
   ------------------------------------------------------------
   Two pieces PsiGuard's site doesn't have, built from the same
   tokens so they sit flush with .triptych__head / .ledger:
     · .flow  — the "how it works" sequence as one connected
                line. Numbers carry order; the connector shows
                it's a flow, not a set.
     · .faq   — a quiet divided list, same rhythm as the
                news list on PsiGuard's updates page.
   ============================================================ */

/* ---------- How it works (a single connected flow) ----------
   Three beats on one line, joined by a gradient connector that
   sits behind the nodes. Folds to a slim vertical timeline on
   narrow screens. Equal-width beats + padding (no grid gap) keep
   the connector math simple: each line runs from one node centre
   to the next. */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.flow__beat {
  flex: 1 1 0;
  position: relative;
  text-align: center;
  padding: 0 14px;
}
.flow__beat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;                 /* node is 36px tall → centre at 18px, line 2px */
  left: 50%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, rgba(6, 182, 212, 0.35) 100%);
  z-index: 0;
}
.flow__node {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 18px -6px rgba(0, 119, 204, 0.45);
}
.flow__label {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--text);
}
.flow__line {
  font-size: 0.9375rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 34ch;
}
@media (max-width: 720px) {
  .flow { flex-direction: column; }
  .flow__beat {
    text-align: left;
    padding: 0 0 30px 46px;
  }
  .flow__beat:last-child { padding-bottom: 0; }
  .flow__node {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
  }
  .flow__beat:not(:last-child)::after {
    top: 40px;               /* just below the node */
    left: 17px;              /* centred under the node */
    width: 2px;
    height: calc(100% - 40px);
    background: linear-gradient(180deg, var(--blue) 0%, rgba(6, 182, 212, 0.35) 100%);
  }
  .flow__line { margin-left: 0; }
}

/* ---------- FAQ (quiet divided list) ---------- */
.faq {
  max-width: var(--content-narrow);
  margin: 0 auto;
}
.faq__item {
  padding: 24px 0;
  border-top: 1px solid var(--border-soft);
}
.faq__item:last-child {
  border-bottom: 1px solid var(--border-soft);
}
.faq__q {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--text);
}
.faq__a {
  font-size: 0.9375rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
  max-width: 64ch;
}
.faq__a a { color: var(--blue); font-weight: 600; }
.faq__a a:hover { text-decoration: underline; }

/* ---------- Footer "powered by" pill ---------- */
.site-footer__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: var(--radius-pill);
}
.site-footer__pill a { color: var(--blue); }
.site-footer__pill a:hover { text-decoration: underline; }


/* ============================================================
   16 · LEGAL / PROSE  (privacy, terms, and future legal pages)
   ------------------------------------------------------------
   A single narrow reading column with a calm heading hierarchy,
   built from the same tokens. Shared so every legal page reads
   identically.
   ============================================================ */
.legal-main {
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(56px, 8vw, 88px);
}
.legal {
  max-width: 760px;
  margin: 0 auto;
}
.legal__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin: 14px 0 6px;
}
.legal__updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 32px;
}
.legal h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 42px 0 14px;
}
.legal h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin: 26px 0 10px;
}
.legal p {
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0 0 14px;
}
.legal ul {
  margin: 12px 0 18px;
  padding-left: 22px;
  color: var(--text-soft);
  line-height: 1.6;
}
.legal li { margin: 7px 0; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--blue); font-weight: 500; }
.legal a:hover { text-decoration: underline; }
.legal hr { border: none; border-top: 1px solid var(--border-soft); margin: 40px 0; }
.legal__fine { font-size: 0.875rem; color: var(--text-muted); }
.legal__highlight {
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
  padding: 16px 20px;
  margin: 22px 0;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  line-height: 1.6;
}
.legal__highlight strong { color: var(--text); }
