/* savedears — shared tokens, type and chrome */

:root {
  --night: #172846;
  --night-deep: #101d35;
  --panel: #1e3254;
  --line: #2f4670;
  --mist: #9db2cf;
  --white: #f5f8fc;
  --membrane: #e6ecf3;
  --membrane-ink: #1a2b47;
  --membrane-soft: #c9d4e2;
  --signal: #ef4b3f;
  --signal-soft: #ff8a7f;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --step-3: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  --step-4: clamp(2.6rem, 1.2rem + 6.4vw, 7rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1280px;
  --measure: 36em;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--white);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); font-weight: 300; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); font-weight: 300; }
h3 { font-size: var(--step-1); font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }

p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--signal); }

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--white);
  color: var(--night);
  font-family: var(--display);
  font-size: var(--step--1);
}
.skip:focus { top: 1rem; }

/* Header */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark svg { width: 26px; height: 26px; flex: none; }

.site-nav { display: flex; gap: 1.6rem; font-family: var(--display); font-size: var(--step--1); }
.site-nav a { text-decoration: none; opacity: 0.8; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-decoration-color: var(--signal); }

.site-nav { align-items: center; }
.site-nav a { white-space: nowrap; }

.lang-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid rgba(245, 248, 252, 0.28);
  border-radius: 999px;
}
.lang-switch button {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  opacity: 0.75;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}
.lang-switch button:hover { opacity: 1; }
.lang-switch button[aria-pressed="true"] { background: var(--white); color: var(--night); opacity: 1; }

@media (max-width: 860px) {
  .site-nav .nav-extra { display: none; }
}

@media (max-width: 560px) {
  .site-nav { gap: 0.9rem; }
  .masker-page .site-nav a[aria-current="page"] { display: none; }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover { background: rgba(245, 248, 252, 0.1); }

.btn-signal {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
}
.btn-signal:hover { background: #d93b30; border-color: #d93b30; }

.btn .dot {
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

/* Footer */

.site-footer {
  background: var(--night-deep);
  color: var(--mist);
  font-size: var(--step--1);
  padding-block: 3.5rem 3rem;
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem 4rem;
}

.site-footer p { max-width: 40em; }
.site-footer strong { color: var(--white); font-weight: 600; }
.site-footer .wordmark { color: var(--white); margin-bottom: 1rem; }

@media (max-width: 760px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
