/*
 * Stardust — EDS foundation
 * Tokens lifted verbatim from the prototype :root. All type families are system
 * stacks (SF Pro Display / SF Pro Text / SF Mono → system-ui), so there are NO
 * webfonts to self-host and NO @font-face / CLS machinery is required.
 */

:root {
  --ink: #0a1024;
  --ink-deep: #060a14;
  --ink-soft: #141b3a;
  --dust: #f5f0e6;
  --deep-ink: #1a1f38;
  --amber: #e8b95e;
  --amber-light: #ffd98a;
  --amber-deep: #854f17;
  --dust-72: rgb(245 240 230 / 72%);
  --dust-50: rgb(245 240 230 / 50%);
  --dust-30: rgb(245 240 230 / 30%);
  --dust-15: rgb(245 240 230 / 15%);
  --dust-08: rgb(245 240 230 / 8%);
  --display: "SF Pro Display", -apple-system, blinkmacsystemfont, system-ui, sans-serif;
  --text: "SF Pro Text", -apple-system, blinkmacsystemfont, system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 64px);
  --maxw: 1320px;
  --nav-height: 60px;
}

/* RESET */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  display: none;
  margin: 0;
  background: var(--ink-deep);
  color: var(--dust);
  font: 16px/1.6 var(--text);
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.appear { display: block; }

::selection {
  background: var(--amber);
  color: var(--ink);
}

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

/* TYPOGRAPHY — base scale (blocks override per-section where the prototype does) */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.022em;
  margin: 0;
  color: var(--dust);
}

h1 {
  font-size: clamp(52px, 6vw + 32px, 112px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(34px, 4vw + 20px, 96px);
  line-height: 0.98;
  letter-spacing: -0.032em;
}

h3 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.18;
}

p {
  margin: 0 0 20px;
  line-height: 1.6;
  max-width: 60ch;
  color: var(--dust-72);
}
p:last-child { margin-bottom: 0; }

em, .ital {
  color: var(--amber);
  font-style: italic;
}

strong {
  color: var(--dust);
  font-weight: 600;
}

a {
  color: var(--amber);
  text-decoration: none;
}

/* LINKS — prose links get a visible underline (affordance never colour-only) */
p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

/* SECTION SCAFFOLD — blocks paint their own full-bleed ground, so strip the
   boilerplate section max-width/padding and let each block own its width. */
main { display: block; }
main > .section { margin: 0; }

main > .section > div {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Shared container used by blocks to constrain content while the ground bleeds. */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

header { min-height: 0; }

/* BUTTONS — the boilerplate link decorator turns <strong><a> → .button.primary
   and <em><a> → .button.secondary. Repaint them in the Stardust idiom. */
.button-wrapper {
  display: inline-flex;
  margin: 0;
}

a.button:any-link {
  font: 600 14px/1 var(--text);
  letter-spacing: -0.005em;
  padding: 14px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
}

a.button.primary {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}

a.button.primary:hover,
a.button.primary:focus-visible {
  background: var(--amber-light);
  border-color: var(--amber-light);
  color: var(--ink);
}

a.button.secondary {
  background: transparent;
  color: var(--dust);
  border-color: var(--dust-15);
}

a.button.secondary:hover,
a.button.secondary:focus-visible {
  border-color: var(--amber);
  color: var(--dust);
  background: transparent;
}

/* Trailing chevron on primary buttons (matches the prototype .arrow). */
a.button.primary::after {
  content: "›";
  font-family: var(--mono);
  transition: transform 0.2s ease;
}

a.button.primary:hover::after { transform: translateX(3px); }

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  height: 100%;
  width: 100%;
}
