@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

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

html, body { margin: 0; padding: 0; overscroll-behavior-y: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Galaxy background: nebula glow plus a canvas starfield (galaxy.js) */
.galaxy {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 18% 22%, var(--nebula-violet), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 30%, var(--nebula-blue), transparent 70%),
    radial-gradient(ellipse 55% 45% at 70% 85%, var(--nebula-magenta), transparent 70%),
    radial-gradient(ellipse 30% 20% at 45% 50%, var(--nebula-core), transparent 70%),
    radial-gradient(ellipse at 50% 40%, var(--bg), var(--bg-deep));
}
.galaxy-stars { position: absolute; inset: 0; width: 100%; height: 100%; }

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

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 46px; width: auto; display: block; }
/* The Customer login button in the banner: a pill in the theme's accent, not a text link */
.site-header .nav-login { color: var(--accent-contrast); border-radius: 999px; padding: 8px 18px; font-size: 15px; white-space: nowrap; text-decoration: none; }
.site-header .nav-login:hover { color: var(--accent-contrast); }
.site-header .wrap { justify-content: space-between; }

/* Main */
main { flex: 1; padding: 48px 0 64px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(32px, 6vw, 48px); font-weight: 900; margin: 0 0 16px; }
h2 { font-size: 24px; font-weight: 800; margin: 40px 0 12px; }
h3 { font-size: 19px; font-weight: 800; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 16px; }
li { margin-bottom: 6px; }
.lead { font-size: 20px; color: var(--text-muted); max-width: 640px; }
.muted { color: var(--text-muted); }

.hero { text-align: center; padding: 8px 0 0; }
.hero h1 { margin: 0; }
.hero .lead { margin: 28px auto 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 44px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px; box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card a, .doc a { overflow-wrap: anywhere; }
/* Whole card is one link; other links inside it stay clickable above the overlay */
.card-link { position: relative; transition: border-color .2s, transform .2s; }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-link .stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link a:not(.stretch) { position: relative; z-index: 1; }

.pill {
  display: inline-block; font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--pill-bg); color: var(--pill-text);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 10px;
}

.button {
  display: inline-block; background: var(--accent); color: var(--accent-contrast);
  font-weight: 800; text-decoration: none; border-radius: 12px; padding: 12px 20px;
}
.button:hover { background: var(--accent-hover); color: var(--accent-contrast); }

.callout {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; margin: 20px 0;
}

.doc {
  max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.doc .updated { color: var(--text-muted); font-size: 15px; margin-bottom: 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0 32px; color: var(--text-muted); font-size: 15px; background: var(--header-bg); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* Wider screens: use the room, sized so the home page fits one screen (phones and tablets keep the layout above) */
@media (min-width: 900px) {
  main { padding: clamp(16px, 3vh, 36px) 0 clamp(16px, 3vh, 40px); }
  .lead { font-size: 19px; max-width: 760px; text-wrap: balance; }
  .hero .lead { margin-top: clamp(8px, 1.5vh, 20px); }
  .cards { gap: 20px; margin-top: clamp(20px, 4vh, 44px); }
  .card { padding: 22px; }
  .card h2, .card h3 { font-size: 24px; }
  .card p { font-size: 17px; }
  .brand img { height: 52px; }
}
@media (min-width: 900px) and (max-height: 820px) {
  .lead { font-size: 17px; }
  .card { padding: 18px 20px; }
  .card h2, .card h3 { font-size: 21px; }
  .card p { font-size: 15px; line-height: 1.5; }
  .site-footer { padding: 14px 0 18px; }
}

/* Contact form */
.form label { display: block; font-weight: 800; margin: 18px 0 6px; }
.form input, .form textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-alt);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
}
.form input:focus-visible, .form textarea:focus-visible { border-color: var(--accent); }
.form textarea { resize: vertical; min-height: 140px; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form + .callout, .form ~ .muted { margin-top: 24px; }
.form .button { margin-top: 8px; border: 0; font: inherit; font-weight: 800; cursor: pointer; }
.form .button:disabled { opacity: 0.6; cursor: default; }
.form-status { color: var(--error); min-height: 1.6em; margin: 14px 0 0; }
