/*
  Company site design system. One stylesheet, no scripts, no third-party assets.
  Order: tokens, base, layout, header, hero, buttons, cards, forms, footer, small screens.
*/

/* ---------- Tokens ---------- */
:root {
  --navy-950: #071226;
  --navy-900: #0b1b34;
  --navy-800: #112a4d;
  --navy-700: #1b3d6e;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #e8efff;
  --accent-on-dark: #8db3ff;
  --ink: #0f1b2d;
  --text: #2a3a50;
  --muted: #566379;
  --line: #dde3ec;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --ok: #0f7a4d;
  --ok-soft: #e3f6ec;
  --on-dark: #e6edf8;
  --on-dark-muted: #a9b8cf;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 27, 52, 0.06);
  --shadow-md: 0 8px 28px rgba(11, 27, 52, 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 72rem;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent-strong); text-underline-offset: 0.18em; }
a:hover { color: var(--navy-700); }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
img,
svg { max-width: 100%; }
[id] { scroll-margin-top: 5.5rem; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  overflow-wrap: anywhere;
}

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
}

.skip:focus { top: 0.75rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0 4rem; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: 1.5rem; }
.narrow { max-width: 50rem; }
.muted { color: var(--muted); }

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover { color: #ffffff; }
.brand img { display: block; width: 2rem; height: 2rem; }

.nav { display: flex; align-items: center; gap: 0.25rem; }

.nav a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--on-dark);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.09); color: #ffffff; }
.nav a.btn { margin-left: 0.6rem; background: var(--accent); color: #ffffff; }
.nav a.btn:hover,
.nav a.btn[aria-current="page"] { background: var(--accent-strong); }

.menu { display: none; position: relative; }

.menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  cursor: pointer;
  list-style: none;
}

.menu summary::-webkit-details-marker { display: none; }

.burger,
.burger::before,
.burger::after { display: block; width: 1.15rem; height: 2px; border-radius: 2px; background: #ffffff; content: ""; }

.burger { position: relative; }
.burger::before { position: absolute; top: -6px; }
.burger::after { position: absolute; top: 6px; }
.menu[open] .burger { background: transparent; }
.menu[open] .burger::before { top: 0; transform: rotate(45deg); }
.menu[open] .burger::after { top: 0; transform: rotate(-45deg); }

.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  display: flex;
  flex-direction: column;
  min-width: 14rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md);
}

.menu-list a {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--on-dark);
  font-weight: 500;
  text-decoration: none;
}

.menu-list a:hover,
.menu-list a[aria-current="page"] { background: rgba(255, 255, 255, 0.09); color: #ffffff; }

/* ---------- Hero ---------- */
.hero,
.page-hero {
  color: var(--on-dark);
  background:
    radial-gradient(52rem 26rem at 82% 25%, rgba(37, 99, 235, 0.32), transparent 70%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
}

.hero { padding: 6rem 0 6.5rem; }
.page-hero { padding: 3.75rem 0 4rem; }
.hero h1,
.page-hero h1 { max-width: 20ch; color: #ffffff; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
.hero .lead,
.page-hero .lead { max-width: 44rem; color: var(--on-dark); }
.hero code,
.page-hero code { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.18); color: #ffffff; }
.lead { font-size: 1.2rem; line-height: 1.55; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-on-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-dark { color: var(--accent-strong); }
.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn-accent { background: var(--accent); color: #ffffff; }
.btn-accent:hover { background: var(--accent-strong); color: #ffffff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.35); color: #ffffff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.92rem; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.card h2,
.card h3 { margin-bottom: 0.5rem; }
.card > :last-child { margin-bottom: 0; }

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-tile svg { width: 1.4rem; height: 1.4rem; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.82rem;
  font-weight: 600;
}

.pill::before { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); content: ""; }
.meta { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.93rem; }
.people { margin: 0; padding: 0; list-style: none; }
.people li { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }

.avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--navy-800);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- Forms ---------- */
.auth { padding: 4rem 0 5rem; background: var(--bg-alt); }

.auth-card {
  max-width: 26rem;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-md);
}

.auth-card h1 { margin-bottom: 0.25rem; font-size: 1.75rem; }
.auth-card .btn { margin-top: 1.5rem; }
label { display: block; margin: 1.1rem 0 0.35rem; color: var(--ink); font-size: 0.9rem; font-weight: 600; }

input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #76849b;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

input:focus { border-color: var(--accent); outline: 3px solid rgba(37, 99, 235, 0.25); outline-offset: 0; }
.form-note { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-muted); font-size: 0.93rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.foot-brand .brand { margin-bottom: 0.9rem; }
.foot-brand p { max-width: 22rem; }
.site-footer h2 { margin: 0 0 0.9rem; color: #ffffff; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 0.55rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.foot-bottom p { margin: 0; }

/* ---------- Small screens ---------- */
/* Seven links and the portal button need the wide layout; below it the phone menu takes over. */
@media (max-width: 62rem) {
  .nav { display: none; }
  .menu { display: block; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 48rem) {
  .grid-2,
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 3.5rem 0 4rem; }
  .page-hero { padding: 2.75rem 0 3rem; }
  .section { padding: 3rem 0; }
  .lead { font-size: 1.08rem; }
  .actions .btn { flex: 1 1 100%; }
  .auth { padding: 2.5rem 0 3.5rem; }
  .auth-card { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
