:root {
  color-scheme: dark;
  font-family: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, color-mix(in srgb, var(--accent) var(--page-glow-opacity), transparent), transparent 36rem),
    var(--page);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--text);
}

a:focus-visible {
  border-radius: 0.2rem;
  outline: 0.18rem solid var(--gold);
  outline-offset: 0.22rem;
}

.shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  border-bottom: 1px solid var(--line);
}

/* Cormorant Garamond SemiBold, subset to Latin. SIL OFL 1.1; see fonts/OFL.txt. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/CormorantGaramond-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* The header lockup: the mark, then the name. */
.brand {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand .wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.12rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  /* Tracking applies after the last letter too; cancel it so the closing
     bracket sits as far from the S as the opening one does from the T. */
  margin-right: -0.22em;
}

.brand-mark {
  /* The 96 box; the stone inside it is 68u, so this renders ~1.42rem of mark. */
  width: 2rem;
  height: 2rem;
}

nav {
  display: flex;
  gap: 1.25rem;
}

nav a {
  color: var(--text-secondary);
  font-size: 0.94rem;
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--text);
}

main {
  padding: clamp(3rem, 8vw, 6.5rem) 0 5rem;
}

/* The landing page: no top bar, everything centred under the mark. */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(3rem, 9vw, 5.75rem) 0 0;
  text-align: center;
}

.hero .mark {
  width: clamp(7rem, 20vw, 11rem);
  height: clamp(7rem, 20vw, 11rem);
  margin: 0;
}

.hero-wordmark {
  margin: 1.35rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 7.5vw, 4.125rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  /* Tracking applies after the last letter too; nudge back so the word sits centred. */
  padding-left: 0.22em;
  color: var(--text);
}

.tagline {
  max-width: none;
  margin: 1.6rem 0 0;
  font-size: clamp(1.2rem, 3.4vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.hero .lede {
  max-width: 31rem;
  margin: 0.9rem 0 0;
}

.download {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  margin-top: 2rem;
  padding: 0 1.6rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.download svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: var(--on-gold);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.downloads .download {
  margin-top: 0;
}

/* Gold is rationed: the Mac download is the quiet second choice. */
.download-secondary {
  background: transparent;
  color: var(--accent-text-strong);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.download-secondary svg {
  stroke: var(--accent-text-strong);
}

.requirement {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.6rem;
}

.hero-links a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: var(--accent-text);
  font-weight: 650;
  text-decoration: none;
}

.hero-links span {
  color: var(--line-strong);
}

/* What it does. Plain text, not cards: four boxes read as a feature dump. */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.1rem;
  margin-top: clamp(3rem, 7vw, 4.6rem);
  padding-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
}

.features h2 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
}

.features p {
  margin: 0.4rem 0 0;
  color: var(--text-secondary);
}

/* The mark on its own: the logo, above each page's eyebrow. The wordmark
   lives in the header, so the two never repeat each other. */
.mark {
  display: block;
  width: 4.8rem;
  height: 4.8rem;
  margin: 0 0 1.5rem -0.7rem;
}

/* Seven bands of cut stone with one gold seam. The fills are the only place
   the brand palette appears on the site; the geometry lives in every
   page's inline SVG and in docs/BRAND.md. */
.stone {
  fill: var(--brand-stone);
}

.shade {
  fill: var(--brand-shade);
}

.vein {
  fill: var(--brand-vein);
}

.seam {
  fill: var(--brand-seam);
}

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

h1,
h2 {
  line-height: 1.16;
  text-wrap: balance;
}

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.35rem, 8vw, 4.6rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

h2 {
  margin: 2.6rem 0 0.7rem;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 620;
  letter-spacing: -0.018em;
}

p,
ul {
  color: var(--text-secondary);
}

.lede {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  font-size: clamp(1.08rem, 2.5vw, 1.24rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3.25rem;
}

.card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: rgba(19, 27, 56, 0.76);
}

.card h2 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.3rem;
  padding: 0 1rem;
  border: 1px solid var(--accent-text);
  border-radius: 999px;
  text-decoration: none;
}

.document {
  max-width: 42rem;
}

.document h1 {
  max-width: none;
  font-size: clamp(2.25rem, 7vw, 3.65rem);
}

.document .updated {
  margin-top: 0.8rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.document section {
  padding-top: 0.2rem;
}

.document li + li {
  margin-top: 0.55rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 2.25rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.86rem;
}

.site-footer p {
  margin: 0;
  color: inherit;
}

@media (max-width: 38rem) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    justify-content: center;
    padding: 1.1rem 0;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 160ms ease;
  }
}
