/* Team Saint — shared styles for the public pages: design tokens, page chrome (backdrop,
   header, footer), buttons and the page hero. Page-specific styles live in their own stylesheet.
   Visual language follows home.css: near-black canvas, lavender / purple / blue glow,
   Georgia titles with wide tracking, DM Mono micro-labels and glass pills. */

:root {
  color-scheme: dark;
  --bg: #030303;
  --fg: #f1f0ef;
  --muted: #a7a6a7;
  --dim: #8a8791;
  --accent: #d8c6e8;
  --signal: #9b88ff;
  --blue: #61baff;
  --danger: #ff8a98;
  --success: #8be9b5;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .26);
  --glass: rgba(225, 223, 230, .08);
  --glass-strong: rgba(235, 231, 245, .16);
  --serif: Georgia, 'Times New Roman', serif;
  --mono: 'DM Mono', 'Courier New', monospace;
  --sans: 'Manrope', Arial, sans-serif;
  --gutter: clamp(18px, 4vw, 56px);
  --nav-h: 64px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Keep the scrollbar's space reserved, so the header sits in the same place on short and long pages. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

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

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0710;
  font: 500 10px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: top .2s var(--ease);
}

.skip-link:focus { top: 14px; }

/* ---------- Atmosphere ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(62% 46% at 6% -6%, rgba(155, 136, 255, .2), transparent 70%),
    radial-gradient(46% 42% at 104% 102%, rgba(97, 186, 255, .13), transparent 70%),
    var(--bg);
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: 18px;
  background:
    linear-gradient(90deg, rgba(201, 188, 255, .27), transparent 24px) left top / 44px 1px no-repeat,
    linear-gradient(rgba(201, 188, 255, .27), transparent 24px) left top / 1px 44px no-repeat,
    linear-gradient(270deg, rgba(104, 177, 255, .23), transparent 24px) right top / 44px 1px no-repeat,
    linear-gradient(rgba(104, 177, 255, .23), transparent 24px) right top / 1px 44px no-repeat,
    linear-gradient(90deg, rgba(201, 188, 255, .18), transparent 24px) left bottom / 44px 1px no-repeat,
    linear-gradient(0deg, rgba(201, 188, 255, .18), transparent 24px) left bottom / 1px 44px no-repeat,
    linear-gradient(270deg, rgba(104, 177, 255, .18), transparent 24px) right bottom / 44px 1px no-repeat,
    linear-gradient(0deg, rgba(104, 177, 255, .18), transparent 24px) right bottom / 1px 44px no-repeat;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
}

/* ---------- Shared bits ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 500 9px var(--mono);
  letter-spacing: .3em;
  color: #cfcdd3;
  text-transform: uppercase;
}

.signal-dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
  animation: signal-pulse 1.8s ease-in-out infinite;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: var(--glass);
  color: var(--fg);
  font: 500 10px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background .24s, border-color .24s, transform .24s, color .24s;
}

.pill:hover {
  background: var(--glass-strong);
  border-color: rgba(255, 255, 255, .55);
  transform: translateY(-1px);
}

.pill:disabled { opacity: .5; cursor: progress; transform: none; }

.pill-quiet { border-color: var(--line); background: transparent; color: var(--muted); }
.pill-quiet:hover { color: var(--fg); }

.pill-solid { background: var(--accent); border-color: var(--accent); color: #0b0710; }
.pill-solid:hover { background: #ebdff5; border-color: #ebdff5; }

.pill-danger { color: var(--danger); border-color: rgba(255, 138, 152, .4); background: transparent; }
.pill-danger:hover { background: rgba(255, 138, 152, .12); border-color: rgba(255, 138, 152, .75); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, .7);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}

.brand { display: flex; align-items: center; gap: 12px; justify-self: start; }
.brand-mark { width: 26px; height: 26px; object-fit: contain; opacity: .95; }
.brand-name { font: 400 13px var(--serif); letter-spacing: .34em; }

/* The nav sits in the middle grid column, so it is centred in the page whatever the side columns hold. */
.site-nav { display: flex; justify-content: center; gap: 2px; }

.site-nav a {
  position: relative;
  padding: 10px 13px;
  font: 500 10px var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
}

.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, var(--signal), var(--blue));
  box-shadow: 0 0 8px rgba(115, 144, 255, .55);
}

.header-actions { display: flex; align-items: center; justify-self: end; gap: 8px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(56px, 11vh, 112px) var(--gutter) clamp(36px, 6vh, 60px);
  isolation: isolate;
}

.hero-emblem {
  position: absolute;
  z-index: -1;
  right: max(0px, calc(var(--gutter) - 24px));
  top: 50%;
  width: min(44vw, 440px);
  transform: translateY(-50%);
  opacity: .08;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
}

.hero .eyebrow { margin-bottom: 26px; }

.hero h1 {
  margin: 0 0 0 .05em;
  font: 400 clamp(44px, 8.4vw, 104px) / 1 var(--serif);
  letter-spacing: .3em;
  text-shadow: 0 1px 24px rgba(0, 0, 0, .8);
  animation: appear .8s var(--ease) both;
}

.hero-sub {
  margin: 20px 0 0;
  font: 500 10px var(--mono);
  letter-spacing: .66em;
  color: #d0ced0;
  text-shadow: 0 1px 12px #000;
}

.hero-copy { margin: 28px 0 0; max-width: 44ch; color: var(--muted); font-size: 15px; line-height: 1.65; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 20px clamp(28px, 5vw, 64px); margin: 44px 0 0; padding: 0; }
.hero-stats div { display: flex; flex-direction: column; gap: 8px; }
.hero-stats dt { order: 2; font: 500 9px var(--mono); letter-spacing: .28em; color: var(--dim); text-transform: uppercase; }
.hero-stats dd { margin: 0; font: 400 clamp(24px, 3.2vw, 36px) / 1 var(--serif); letter-spacing: .04em; }

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 22px var(--gutter) 26px;
  border-top: 1px solid var(--line);
  color: rgba(200, 201, 214, .7);
  font: 500 9px var(--mono);
  letter-spacing: .16em;
}

.site-footer p { margin: 0; }
.site-footer a { transition: color .2s; }
.site-footer a:hover { color: var(--fg); }

/* ---------- Motion ---------- */

@keyframes appear { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes signal-pulse { 0%, 100% { opacity: .55; box-shadow: 0 0 5px var(--signal); } 50% { opacity: 1; box-shadow: 0 0 12px var(--signal); } }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .site-nav a { padding: 10px 9px; letter-spacing: .14em; }
  .site-nav a[aria-current="page"]::after { left: 9px; right: 9px; }
}

/* The header wraps onto two rows: brand + actions, then the page links. */
@media (max-width: 860px) {
  :root { --nav-h: 0px; }

  .site-header { position: relative; display: flex; height: auto; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; padding-bottom: 0; }
  .header-actions { margin-left: auto; }

  .site-nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 calc(var(--gutter) - 9px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: 0 0 auto; }
  .site-nav a[aria-current="page"]::after { bottom: 0; }
}

@media (max-width: 560px) {
  .hero-sub { letter-spacing: .5em; }
  .hero-stats { gap: 18px 30px; }
}

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

  .signal-dot { animation: none; }
}
