/* Eggxiety site. Tokens are the app's Duck Egg / Nightlight roles (docs/design.md). */
@font-face { font-family: "Young Serif"; src: url("/fonts/YoungSerif-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/HankenGrotesk-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/HankenGrotesk-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/HankenGrotesk-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --ground: #E3ECE6; --surface: #EEF3EF; --raised: #F7FAF7; --border: #C5D2C9; --rule: #A9BBAF;
  --text: #1E2A23; --text-2: #4A5A50; --muted: #57665C;
  --action: #2F4A3B; --on-action: #F4F7F2; --accent: #E2A92E; --accent-text: #7F5C05;
  --egg-shell: #BFDCD4; --egg-speckle: #6E8A80; --egg-lit: #E2EEE7; --pip-shadow: #B9CFD6;
  --twig: #8C7558; --glow: transparent;
  --speckle: url("/eggxiety/img/speckle.svg");
  --serif: "Young Serif", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --gutter: 24px;
  --fast: 150ms; --base: 280ms; --slow: 600ms;
  --standard: cubic-bezier(.215, .61, .355, 1);   /* easeOutCubic */
  --emphasized: cubic-bezier(.645, .045, .355, 1); /* easeInOutCubic */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
body {
  margin: 0; min-height: 100vh; background: var(--ground) var(--speckle); color: var(--text);
  font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3 { font: 400 1em/1.2 var(--serif); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), 1080px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--raised); padding: 8px 16px; border-radius: 999px; }
.skip:focus { left: 8px; z-index: 10; }

/* Header: wordmark left, two quiet links right. */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }
.wordmark { font: 400 22px/1 var(--serif); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; }
.top nav { display: flex; gap: 8px; }
.top nav a { font: 500 15px/1 var(--sans); color: var(--text-2); text-decoration: none; padding: 0 12px; min-height: 48px; display: inline-flex; align-items: center; }
.top nav a:hover { color: var(--text); text-decoration: underline; }
.top nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Light / dark toggle (theme.js). Shows the moon in light mode, the sun at night. */
.theme { width: 48px; height: 48px; display: inline-grid; place-items: center; border: 0; border-radius: 999px; background: none; color: var(--text-2); cursor: pointer; padding: 0; }
.theme:hover { color: var(--text); background: var(--surface); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme .sun { display: none; }
.theme[hidden] { display: none; }
.theme-corner { position: fixed; top: 16px; right: 16px; z-index: 5; }

.voice { font: 400 22px/1.35 var(--serif); }
.caption { font: 400 15px/1.4 var(--sans); color: var(--text-2); }
.rule { height: 6px; background: url("/eggxiety/img/rule.svg") center / 100% 6px no-repeat; border: 0; margin: 0; }

/* The egg (design/tools/egg.mjs). */
.egg .egg-shadow { fill: var(--pip-shadow); }
.egg .egg-crack { fill: none; stroke: var(--egg-speckle); stroke-width: 1.4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
