/* astaroa.com. One stylesheet, no framework.

   Colours are the palette proposed on HQ's logo page, with the pairs used for
   text measured against WCAG 2.2 AA (4.5:1 for text, 3:1 for large text and
   controls). Light: ink #12242F on paper #F7F5F1 is 14.6:1; links #0B7A70 on
   paper 4.8:1; secondary text #5B6B75 on paper 5.1:1. Dark: paper on ink is
   14.6:1; links #5ED2C5 on ink 8.7:1; secondary #A9B6BE on ink 7.7:1. The
   proposed accent #0E9B8E itself is 3.2:1 on paper, so it is used only where
   3:1 is enough: rules, focus rings and the rings beside the lead.

   The header, the lead and the page titles sit on a band of the ink colour
   in both schemes, with the dark pairs above. In dark mode the band is a
   deeper #0B1720 so that it still reads as a band against the page. */

@font-face { font-family: "Astaroa Sans"; src: url("fonts/astaroa-sans-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Astaroa Sans"; src: url("fonts/astaroa-sans-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Astaroa Sans"; src: url("fonts/astaroa-sans-black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: #F7F5F1; --ink: #12242F; --ink-2: #5B6B75; --rule: #8A99A3;
  --accent: #0E9B8E; --link: #0B7A70; --button: #0B7A70; --button-text: #F7F5F1;
  --field: #FFFFFF; --note: #ECE9E2; --card: #FFFFFF; --card-rule: #E2DED6;
  --wide: 72rem; --measure: 42rem;
  --band: #12242F; --band-ink: #F7F5F1; --band-ink-2: #A9B6BE; --band-link: #5ED2C5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12242F; --ink: #F7F5F1; --ink-2: #A9B6BE; --rule: #5B6B75;
    --link: #5ED2C5; --button: #5ED2C5; --button-text: #12242F;
    --field: #1B3140; --note: #1B3140; --card: #182D3B; --card-rule: #274253;
    --band: #0B1720;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font-family: "Astaroa Sans", "Lato", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem; line-height: 1.6; font-kerning: normal;
}
.wrap { width: min(100% - 3rem, var(--wide)); margin-inline: auto; }
.narrow { max-width: var(--measure); }
main { flex: 1; padding-bottom: 5rem; }

/* Header */
.skip { position: absolute; left: -100vw; top: 0.5rem; padding: 0.5rem 0.75rem; background: var(--ink); color: var(--paper); }
.skip:focus { left: 0.5rem; z-index: 10; }
.site-header { background: var(--band); color: var(--band-ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.6rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 900; font-size: 1.6rem; letter-spacing: -0.01em; color: inherit; text-decoration: none; }
.brand .mark { width: 1.5em; height: 1.5em; flex: none; }
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2rem; align-items: center; }
.site-header nav a { color: inherit; text-decoration: none; font-weight: 700; padding-block: 0.25rem; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--band-link); }
.site-header nav .cta a { background: var(--band-link); color: var(--band); padding: 0.55rem 1.1rem; border-radius: 999px; border: 0; }
.site-header nav .cta a:hover { filter: brightness(1.08); }

/* Bands */
.band { background: var(--band); color: var(--band-ink); }
.band .prose a { color: var(--band-link); }

/* Home */
.hero { padding-block: clamp(1.5rem, 5vw, 4rem) clamp(4rem, 9vw, 8rem); margin-bottom: -3rem; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center; }
.hero .art { color: var(--band-link); justify-self: end; width: min(100%, 28rem); }
.hero .art .figure { display: block; width: 100%; height: auto; }
@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .art { width: 13rem; margin-top: -1.5rem; margin-right: -3rem; margin-bottom: -2rem; }
}
.hero .prose > .lead {
  font-size: clamp(2.4rem, 1.2rem + 5vw, 5.25rem); line-height: 1.02; font-weight: 900;
  letter-spacing: -0.03em; margin: 0; max-width: 16ch; text-wrap: balance;
}
.hero .prose > .lead::before { content: ""; display: block; width: 4.5rem; height: 6px; background: var(--band-link); margin-bottom: 2rem; border-radius: 3px; }
.cards { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--card-rule); border-radius: 14px; padding: 2rem 2rem 1.5rem; display: flex; flex-direction: column; }
.card h2 { margin: 0 0 0.75rem; font-size: 1.35rem; }
.card p { margin: 0 0 1rem; color: var(--ink-2); }
.card p:last-child { margin-top: auto; margin-bottom: 0; }
.foot { margin-top: 4rem; }
.foot blockquote { margin: 0; }

/* Pages */
.page-head { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.4rem, 1.2rem + 4vw, 4rem); line-height: 1.05; font-weight: 900; letter-spacing: -0.03em; margin: 0; }
.page-head h1::after { content: ""; display: block; width: 4.5rem; height: 6px; background: var(--band-link); margin-block: 1.5rem 0; border-radius: 3px; }
.narrow.prose { margin-top: 3rem; }
.narrow.prose > p:first-child { font-size: 1.35rem; line-height: 1.45; }

/* Text */
.prose h2 { font-size: 1.6rem; line-height: 1.25; margin: 2.75rem 0 0.9rem; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
.prose .muted, .prose small { color: var(--ink-2); }
.prose .more { font-weight: 700; text-decoration: none; }
.prose .more::after { content: " \2192"; }
.prose .more:hover { text-decoration: underline; }
.prose .person { margin: 1.75rem 0; padding: 1.5rem; background: var(--card); border: 1px solid var(--card-rule); border-radius: 14px; }
.prose .person h3 { margin-top: 0; }
.prose .person p { margin-bottom: 0.5rem; }
.prose .person p:last-child { margin-bottom: 0; }
.prose img.inline-text { height: 1.2em; width: auto; vertical-align: -0.213em; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--rule); background: var(--note); color: var(--ink); border-radius: 0 10px 10px 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote.alert::before { content: attr(data-alert); display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 0.25rem; }

/* Form */
form { margin-top: 1.5rem; }
label { display: block; font-weight: 700; margin: 1.1rem 0 0.35rem; }
label.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; margin-top: 1.25rem; }
label.check input { margin-top: 0.35em; flex: none; width: 1.1rem; height: 1.1rem; accent-color: var(--link); }
input[type="text"], input[type="email"], textarea { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--rule); border-radius: 8px; padding: 0.7rem 0.9rem; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button { font: inherit; font-weight: 700; color: var(--button-text); background: var(--button); border: 0; border-radius: 999px; padding: 0.8rem 1.8rem; margin-top: 1.5rem; cursor: pointer; }
button:hover { filter: brightness(1.08); }
.form-status { padding: 0.9rem 1.1rem; border-radius: 8px; border-left: 3px solid var(--accent); background: var(--note); }
.form-status.bad { border-left-color: #B3261E; }

/* Footer */
.site-footer { background: var(--band); color: var(--band-ink-2); font-size: 0.95rem; }
.site-footer .wrap { padding-block: 2.5rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer .brand { font-size: 1.2rem; color: var(--band-ink); }
.site-footer a { color: inherit; }

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .wrap { width: min(100% - 2.5rem, var(--wide)); }
  .site-header nav ul { gap: 1.25rem; }
  .site-header { background: var(--band); color: var(--band-ink); }
.site-header .wrap { padding-block: 1.1rem; }
  .card { padding: 1.5rem; }
}
@media print { .site-header nav, .skip, form { display: none; } }
