/* AureliusOS website: page layout.
   Every value is a token from aureliusos.css (AureliusOS Design System v2). */

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

html {
  background-color: var(--aos-ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  font-family: var(--font-body);
  color: var(--aos-on-dark);
  -webkit-font-smoothing: antialiased;
}

/* The radial gradient fills the whole viewport behind every page, footer included,
   and stays in place while a long page scrolls. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--aos-gradient-radial);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---- Home: the wordmark centred on the ink, as on the Core hosts ---- */

.home {
  display: grid;
  place-items: center;
  padding: var(--space-md);
}

.home__mark {
  margin: 0;
  line-height: 0;
}

.home__mark img {
  width: min(420px, 72vw);
  animation: arrive 900ms var(--ease-out) both;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- Footer menu, centred over the gradient ---- */

.site-footer {
  display: flex;
  justify-content: center;
  padding: var(--space-md) var(--space-md) max(var(--space-md), env(safe-area-inset-bottom));
}

/* Plain text straight on the gradient, at the user's request (2026-10-05). On narrow
   screens the gradient's green sits behind it, where its contrast is below AA. */
.footer-menu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.footer-menu li + li::before {
  content: '|';
  content: '|' / '';
  padding: 0 var(--space-sm);
  color: var(--aos-on-dark-3);
}

.footer-menu a {
  color: var(--aos-on-dark-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.footer-menu a[aria-current='page'] {
  color: var(--aos-on-dark);
}

.footer-menu a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (hover: hover) and (pointer: fine) {
  .footer-menu a {
    transition: color var(--dur-fast) var(--ease-out);
  }
  .footer-menu a:hover {
    color: var(--aos-on-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

/* Narrow screens: the name on its own line, the three links under it. */
@media (max-width: 559px) {
  .footer-menu ul {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
  }
  .footer-menu .footer-menu__home {
    grid-column: 1 / -1;
    text-align: center;
  }
  .footer-menu .footer-menu__home + li::before {
    content: none;
  }
}

/* ---- Not found ---- */

.notfound {
  display: grid;
  justify-items: center;
  gap: var(--space-md);
  text-align: center;
}

.notfound img {
  width: min(240px, 56vw);
  margin-bottom: var(--space-sm);
}

.notfound h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--aos-on-dark);
}

.notfound p {
  margin: 0;
  font-size: var(--fs-body);
}

.notfound a {
  color: var(--aos-on-dark);
  text-underline-offset: 2px;
  border-radius: var(--radius-sm);
}

.notfound a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---- Terms and Privacy: the document on a white card, never on the gradient ---- */

.site--doc {
  grid-template-rows: auto 1fr auto;
}

.doc-header {
  display: flex;
  justify-content: center;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}

.doc-header a {
  display: block;
  border-radius: var(--radius-sm);
}

.doc-header a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.doc-header img {
  width: 180px;
}

.doc-main {
  padding: 0 var(--space-md);
}

.doc {
  max-width: var(--w-narrow);
  margin: 0 auto;
  padding: var(--space-xl);
  background: var(--aos-surface);
  border-radius: var(--radius-card);
}

.doc h1 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-xs);
}

.doc__meta {
  font-size: var(--fs-sm);
  color: var(--aos-text-3);
}

.doc__intro {
  font-size: var(--fs-lead);
  line-height: var(--lh-normal);
  color: var(--aos-text-2);
}

.doc__toc {
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  background: var(--aos-bg-sunk);
  border-radius: var(--radius-md);
}

.doc__toc h2 {
  margin: 0 0 var(--space-sm);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--aos-text-2);
}

.doc__toc ol {
  display: grid;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
}

.doc__toc a {
  color: var(--aos-text-2);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .doc__toc a:hover {
    color: var(--aos-text);
    text-decoration: underline;
  }
}

.doc section {
  scroll-margin-top: var(--space-lg);
}

.doc section h2 {
  font-size: var(--fs-h4);
  margin: var(--space-lg) 0 var(--space-sm);
}

/* The brand's triangle bullet (.aos-tri-list), positioned so a list item can hold inline markup. */
.doc ul {
  display: grid;
  gap: var(--space-xs);
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}

.doc ul li {
  position: relative;
  padding-left: var(--space-md);
}

.doc ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(0.8em - 5px);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--aos-ink);
}

@media (max-width: 639px) {
  .doc-header {
    padding-top: var(--space-lg);
  }
  .doc {
    padding: var(--space-lg) var(--space-md);
  }
  .doc h1 {
    font-size: var(--fs-h3);
  }
}

/* ---- Contact form, on the white card ---- */

.form {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.field {
  display: grid;
  gap: var(--space-xs);
}

.field label {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--aos-text);
}

.field__optional {
  font-weight: 400;
  color: var(--aos-text-3);
}

.field input,
.field textarea {
  width: 100%;
  padding: var(--space-sm);
  font: inherit;
  font-size: var(--fs-body);
  color: var(--aos-text);
  background: var(--aos-surface);
  border: var(--border-hairline-strong);
  border-radius: var(--radius-sm);
}

.field textarea {
  min-height: 168px;
  line-height: var(--lh-body);
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--aos-green);
  box-shadow: var(--focus-ring);
}

.field [aria-invalid='true'] {
  border-color: var(--aos-negative);
}

.field__error {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--aos-negative);
}

.form-alert {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--aos-negative-tint);
  border-radius: var(--radius-sm);
}

.form-alert p {
  margin: 0;
  color: var(--aos-text);
}

.form__note {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--aos-text-3);
}

/* Hidden from people and from assistive technology; only bots fill it in. */
.form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  justify-self: start;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1;
  color: var(--aos-on-dark);
  background: var(--aos-ink);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (hover: hover) and (pointer: fine) {
  .button {
    transition: background-color var(--dur-press) var(--ease-out);
  }
  .button:hover {
    background: var(--aos-teal);
  }
}

@media print {
  html {
    background: none;
  }
  body {
    display: block;
  }
  body::before,
  .doc-header,
  .doc__toc,
  .site-footer {
    display: none;
  }
  .doc-main {
    padding: 0;
  }
  .doc {
    max-width: none;
    padding: 0;
  }
}
