/* Cube & Curve
   Symbol colors are set here. The files in assets/brand/ are not modified. */

:root {
  color-scheme: light dark;
  --bg: #e8eff4;
  --fg: #29485d;
  --frame: #29485d;
  --accent: #264d88;
  --muted: #3e5870;
  --line: #c5d3de;
  --select: #d5e3f0;
  --sans: Arial, Helvetica, sans-serif;
  --pad: clamp(1.25rem, 4vw, 2.75rem);
  --focus: var(--fg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #172b3b;
    --fg: #dcebf5;
    --frame: #dcebf5;
    --accent: #a4ddf0;
    --muted: #9bb6c8;
    --line: #2c4658;
    --select: #1e3d52;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
p,
ul,
address {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--select);
  color: var(--fg);
}

:focus {
  outline: none;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  transform: translateY(-150%);
  z-index: 5;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  font-weight: 600;
}

.skip:focus {
  transform: none;
  color: var(--bg);
  outline-color: var(--bg);
}

main:focus {
  outline: none;
}

.wrap {
  width: min(72rem, 100%);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
}

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

.symbol .frame {
  color: var(--frame);
  stroke: currentColor;
}

.symbol .curve {
  color: var(--accent);
  stroke: currentColor;
}

.brand {
  --mark: 2.25rem;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--mark) * 0.25);
  color: inherit;
  text-decoration: none;
  padding: 0.35rem 0;
  min-width: 0;
}

.brand-symbol {
  height: var(--mark);
  width: auto;
  flex: none;
}

.brand-name,
.home-brand h1 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.0375em;
  line-height: 1;
}

.brand-name {
  font-size: 1.125rem;
  white-space: nowrap;
}

.brand:hover .brand-name {
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

body.home main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 8vh, 4rem) var(--pad);
}

.home-brand {
  --mark: clamp(6rem, 24vw, 11rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--mark) * 0.25);
  text-align: center;
}

.home-symbol {
  height: var(--mark);
  width: auto;
}

.home-brand h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  text-wrap: balance;
}

.footer-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.15rem;
  min-width: 0;
}

.copyright {
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-mail {
  color: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.15rem;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}

.footer-nav a {
  color: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  padding: 0.35rem 0;
}

[aria-current="page"] {
  text-decoration-thickness: 2px;
}

.doc {
  max-width: 40rem;
  padding-block: clamp(2.75rem, 8vh, 5rem) 4.5rem;
}

.kicker {
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc h1 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.0375em;
  text-wrap: balance;
}

.updated {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.doc h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 2.4rem 0 0.75rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.doc p,
.doc li {
  text-wrap: pretty;
}

.doc p {
  margin: 0 0 1rem;
}

.doc ul {
  margin: 0.25rem 0 1rem;
  padding-left: 1.15rem;
}

.doc li {
  margin: 0.4rem 0;
  padding-left: 0.2rem;
}

.doc li::marker {
  color: var(--muted);
}

.doc a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.caps {
  font-size: 0.8125rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

@media (forced-colors: active) {
  .symbol .frame,
  .symbol .curve {
    stroke: CanvasText;
  }

  :focus-visible {
    outline-color: Highlight;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer {
    border-color: #ccc;
  }

  .skip {
    display: none;
  }

  a {
    text-decoration: underline;
  }
}
