/* Allied Auth website. No web fonts, no framework: the system font stack and
   one small stylesheet keep the pages fast. Light and dark follow the
   visitor's system setting. */

:root {
  color-scheme: light dark;
  --bg: #f7f6f1;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --text: #15201b;
  --muted: #4a5750;
  --border: #dfdcd0;
  --link: #0d5a39;
  --brand: #0e5c3b;
  --brand-ink: #ffffff;
  --gold: #b48c2a;
  --glow: rgba(14, 92, 59, 0.10);
  --focus: #b48c2a;
  --radius: 14px;
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1310;
    --surface: #111c17;
    --surface-2: #15241d;
    --text: #e8eee9;
    --muted: #a8b5ad;
    --border: #24352c;
    --link: #e3c56f;
    --brand: #e0bf5f;
    --brand-ink: #14110a;
    --gold: #e0bf5f;
    --glow: rgba(224, 191, 95, 0.10);
    --focus: #e3c56f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--surface); color: var(--text); padding: 0.6rem 1rem;
  border: 2px solid var(--focus); border-radius: 8px;
}
.skip:focus { top: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem;
}
.brand img { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 0.25rem 1.1rem; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; padding: 0.35rem 0; }
.nav a:hover { color: var(--link); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--link); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.55rem 1.15rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 2px solid var(--brand);
  line-height: 1.2;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--brand); text-decoration: none; }
.nav .btn { padding: 0.4rem 1rem; min-height: 40px; color: var(--brand-ink); }
.nav .btn:hover { color: var(--brand-ink); text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Hero */
.hero { padding: 3.5rem 0 3rem; }
.hero .wrap { display: grid; gap: 2rem; align-items: center; grid-template-columns: 1.25fr 0.75fr; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 1rem; letter-spacing: -0.02em; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0; max-width: 38rem; }
.hero-mark {
  justify-self: center; width: min(280px, 70vw); aspect-ratio: 1;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.hero-mark img { width: 82%; height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,0.18)); }
.signed-in-note { margin: 1rem 0 0; color: var(--muted); font-size: 0.95rem; }
.signed-in-note[hidden] { display: none; }

.page-head { padding: 3rem 0 1rem; }
.page-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.6rem); line-height: 1.15; margin: 0 0 0.75rem; letter-spacing: -0.015em; }

/* Sections */
section { padding: 2.5rem 0; }
section + section { border-top: 1px solid var(--border); }
h2 { font-size: 1.65rem; line-height: 1.25; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.12rem; margin: 0 0 0.35rem; }
p { margin: 0 0 1rem; }
.section-intro { color: var(--muted); max-width: 44rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.25rem 1rem;
}
.card p { color: var(--muted); margin-bottom: 0.5rem; }
.card .tag {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0.05rem 0.6rem;
}
.card-accent { border-top: 3px solid var(--gold); }

.app-card a.app-name { font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.app-card a.app-name:hover { text-decoration: underline; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.75rem; }
.steps li { counter-increment: step; position: relative; padding: 0.9rem 1rem 0.9rem 3.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.steps li::before {
  content: counter(step); position: absolute; left: 1rem; top: 0.95rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 0.9rem;
}

.prose { max-width: 46rem; }
.prose h2 { margin-top: 0.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.callout { background: var(--surface-2); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1.1rem; margin: 0.6rem 0; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 0.5rem; }
details p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; margin-top: 2rem; color: var(--muted); font-size: 0.95rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.site-footer h2 { font-size: 0.95rem; color: var(--text); margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.3rem 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--link); }
.fineprint { margin-top: 1.5rem; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 2rem 0 2rem; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-mark { order: -1; width: 150px; }
  .site-header .wrap { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .nav { gap: 0.25rem 0.9rem; }
  section { padding: 2rem 0; }
}
.spaced { margin-top: 1.75rem; }
