:root {
  --color-charcoal-ash: #111214;
  --color-basalt: #1b1d20;
  --color-basalt-raised: #24272a;
  --color-stone-line: #45484a;
  --color-ash-primary: #e2ded4;
  --color-ash-secondary: #aba9a2;
  --color-ash-muted: #777874;
  --color-ember: #d9652b;
  --color-ember-bright: #f08a42;
  --color-ember-deep: #8f351e;
  --color-fog: #9ea19c;
  --color-focus-halo: #f6c27d;

  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: clamp(1.75rem, 3vw, 2rem);
  --text-3xl: clamp(2.125rem, 4.5vw, 2.75rem);
  --text-4xl: clamp(2.5rem, 6vw, 4rem);

  --leading-xs: 1rem;
  --leading-sm: 1.25rem;
  --leading-base: 1.5625rem;
  --leading-lg: 1.6875rem;
  --leading-xl: 1.8125rem;
  --leading-2xl: 2.25rem;
  --leading-3xl: 1.05;
  --leading-4xl: 1;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-14: 3.5rem;
  --space-18: 4.5rem;

  --container-max: 77.5rem;
  --container-pad: 1.5rem;
  --container-pad-mobile: 1rem;

  --radius-none: 0;
  --radius-sm: 0.125rem;
  --radius-md: 0.25rem;

  --border-default: 1px solid var(--color-stone-line);
  --border-ember: 2px solid var(--color-ember);

  --shadow-raised: 0 8px 24px rgb(0 0 0 / 0.32);
  --shadow-ember: 0 0 18px rgb(217 101 43 / 0.16);
  --shadow-inset: inset 0 0 0 1px rgb(0 0 0 / 0.28);

  --transition-fast: 140ms ease;
  --transition-standard: 220ms ease;
  --focus-ring: 0 0 0 2px var(--color-charcoal-ash), 0 0 0 5px var(--color-focus-halo);
}

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

html {
  min-width: 0;
  background: var(--color-charcoal-ash);
  color-scheme: dark;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--color-charcoal-ash);
  background-image:
    radial-gradient(circle at 50% 120%, rgb(158 161 156 / 0.07), transparent 42rem),
    linear-gradient(180deg, rgb(255 255 255 / 0.012), transparent 22rem);
  color: var(--color-ash-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: var(--leading-base);
  overflow-wrap: break-word;
}

::selection {
  background: var(--color-ember);
  color: var(--color-charcoal-ash);
}

:where(main, header, footer, section, article, aside, nav, div, form, fieldset, figure) {
  min-width: 0;
}

:where(img, picture, svg, video, canvas, iframe, embed, object) {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

img {
  object-fit: cover;
}

svg {
  fill: currentColor;
}

iframe {
  border: 0;
}

a {
  color: var(--color-ember-bright);
  text-decoration-color: rgb(240 138 66 / 0.62);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
  transition:
    color var(--transition-fast),
    text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-ember-bright);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  text-transform: none;
}

button {
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: var(--radius-sm);
  color: inherit;
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--color-basalt);
  color: var(--color-ash-primary);
  padding: 0.625rem 0.75rem;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-ash-muted);
  opacity: 1;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--color-ash-secondary);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-ember-bright);
  background: var(--color-basalt-raised);
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.125rem;
  min-width: 1.125rem;
  min-height: 1.125rem;
  accent-color: var(--color-ember);
}

fieldset {
  margin: 0 0 var(--space-6);
  padding: var(--space-4);
  border: var(--border-default);
}

legend {
  padding: 0 var(--space-2);
  color: var(--color-ash-primary);
  font-weight: 600;
}

label {
  display: inline-block;
  margin-block-end: var(--space-2);
  color: var(--color-ash-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: var(--leading-sm);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block: 0 var(--space-4);
  color: var(--color-ash-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-4xl);
  line-height: var(--leading-4xl);
}

h2 {
  font-size: var(--text-3xl);
  line-height: var(--leading-3xl);
}

h3 {
  font-size: var(--text-2xl);
  line-height: var(--leading-2xl);
}

h4 {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
}

h5 {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
}

h6 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  line-height: var(--leading-sm);
}

p {
  margin-block: 0 var(--space-4);
  color: var(--color-ash-secondary);
  line-height: var(--leading-base);
}

strong,
b {
  color: var(--color-ash-primary);
  font-weight: 700;
}

small {
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

hr {
  height: 1px;
  margin-block: var(--space-8);
  border: 0;
  background: var(--color-stone-line);
}

blockquote {
  margin: 0 0 var(--space-6);
  padding: var(--space-4) var(--space-5);
  border-inline-start: 2px solid var(--color-ember);
  background: rgb(36 39 42 / 0.56);
  color: var(--color-ash-secondary);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
}

blockquote > :last-child {
  margin-block-end: 0;
}

figure {
  margin: 0 0 var(--space-6);
}

figcaption {
  margin-block-start: var(--space-2);
  color: var(--color-ash-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

pre {
  max-width: 100%;
  margin: 0 0 var(--space-6);
  overflow: auto;
  border: var(--border-default);
  background: var(--color-basalt);
  color: var(--color-ash-primary);
  padding: var(--space-4);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

code,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  border: 1px solid rgb(69 72 74 / 0.75);
  background: var(--color-basalt-raised);
  padding: 0.1em 0.3em;
  color: var(--color-ash-primary);
}

pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  margin: 0 0 var(--space-6);
  border-collapse: collapse;
  border: var(--border-default);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

th,
td {
  border: 1px solid var(--color-stone-line);
  padding: var(--space-3);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  background: var(--color-basalt-raised);
  color: var(--color-ash-primary);
  font-weight: 700;
}

td {
  color: var(--color-ash-secondary);
}

ul,
ol {
  margin-block: 0 var(--space-5);
  padding-inline-start: 1.3rem;
}

li {
  overflow-wrap: anywhere;
}

main ul:not([class]),
main ol:not([class]),
article ul:not([class]),
article ol:not([class]) {
  display: grid;
  gap: var(--space-2);
}

dl {
  margin: 0 0 var(--space-6);
}

dt {
  color: var(--color-ash-primary);
  font-weight: 700;
}

dd {
  margin: 0 0 var(--space-3);
  color: var(--color-ash-secondary);
}

details {
  margin: 0 0 var(--space-4);
  border: var(--border-default);
  background: var(--color-basalt);
}

summary {
  min-height: 44px;
  cursor: pointer;
  padding: var(--space-3) var(--space-4);
  color: var(--color-ash-primary);
  font-weight: 700;
}

details > :not(summary) {
  padding-inline: var(--space-4);
}

details > :last-child {
  padding-block-end: var(--space-4);
}

.container {
  width: min(100%, var(--container-max));
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-18);
}

.surface {
  border: var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--color-basalt);
  box-shadow: var(--shadow-inset);
}

.surface-raised {
  border: var(--border-default);
  border-radius: var(--radius-md);
  background: var(--color-basalt-raised);
  box-shadow: var(--shadow-raised), var(--shadow-inset);
}

.panel {
  border: var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--color-basalt);
  box-shadow: var(--shadow-inset);
  padding: var(--space-5);
}

.panel > :last-child {
  margin-block-end: 0;
}

.archive-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--color-stone-line);
  background: var(--color-stone-line);
}

.archive-wall > * {
  min-width: 0;
  background: var(--color-basalt);
}

.stack {
  display: grid;
  gap: var(--space-4);
}

.stack-compact {
  display: grid;
  gap: var(--space-3);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.cluster > * {
  min-width: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  color: var(--color-ash-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.meta > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-end: var(--space-2);
  color: var(--color-ember-bright);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: var(--leading-xs);
  text-transform: uppercase;
}

.eyebrow::before {
  width: 0.5rem;
  height: 2px;
  flex: 0 0 auto;
  background: var(--color-ember);
  content: "";
}

.button {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--color-basalt-raised);
  color: var(--color-ash-primary);
  padding: 0.625rem 0.875rem;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: var(--leading-sm);
  text-align: center;
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.button:hover {
  border-color: var(--color-ember);
  background: var(--color-ember-deep);
  color: #fff;
}

.button:active {
  background: var(--color-basalt);
  box-shadow: none;
}

.button-primary {
  border-color: var(--color-ember);
  background: var(--color-ember);
  color: var(--color-charcoal-ash);
}

.button-primary:hover {
  border-color: var(--color-ember-bright);
  background: var(--color-ember-bright);
  color: var(--color-charcoal-ash);
  box-shadow: var(--shadow-ember);
}

.button-secondary {
  background: var(--color-basalt);
}

.image-frame {
  overflow: hidden;
  border: var(--border-default);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.35);
}

.image-frame > img,
.image-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rule-ember {
  width: 2.5rem;
  height: 2px;
  margin-block: 0 var(--space-4);
  border: 0;
  background: var(--color-ember);
}

.muted {
  color: var(--color-ash-muted);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: var(--space-3);
  left: var(--space-3);
  transform: translateY(-200%);
  border: var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--color-ember);
  color: var(--color-charcoal-ash);
  padding: var(--space-3) var(--space-4);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 56.25rem) {
  .section {
    padding-block: var(--space-14);
  }

  .container {
    padding-inline: var(--container-pad-mobile);
  }
}

@media (max-width: 45rem) {
  h1 {
    font-size: clamp(2.5rem, 11vw, 3rem);
    line-height: 1;
  }

  h2 {
    font-size: clamp(2rem, 9vw, 2.5rem);
  }

  h3 {
    font-size: clamp(1.625rem, 7vw, 2rem);
  }

  .section {
    padding-block: var(--space-10);
  }

  .panel {
    padding: var(--space-4);
  }

  .archive-wall {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}