
:root {
  --ground: #4A1F22;
  --ground-deep: #381417;
  --ground-elevated: #5A272B;
  --cream: #F6EFE6;
  --cream-muted: #D8CEBF;
  --cream-faint: rgba(246, 239, 230, 0.75);
  --accent-gold: #D4A359;
  --accent-gold-hover: #E3B368;
  --border-subtle: rgba(246, 239, 230, 0.16);
  --border-strong: rgba(212, 163, 89, 0.40);
  --border-focus: #D4A359;
  --shadow-flat: 0 2px 4px rgba(20, 7, 8, 0.35);
  --shadow-raised: 0 12px 28px rgba(18, 6, 7, 0.45);
  --shadow-deep: 0 24px 48px rgba(12, 4, 5, 0.60);

  --jofa-609: "Fraunces", Georgia, serif;
  --jofa-6b3: "Barlow Semi Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --jofa-192: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--2: clamp(0.72rem, 0.68rem + 0.2vw, 0.82rem);
  --step--1: clamp(0.85rem, 0.80rem + 0.25vw, 0.96rem);
  --jofa-723: clamp(1.00rem, 0.94rem + 0.3vw, 1.125rem);
  --jofa-df4: clamp(1.18rem, 1.08rem + 0.5vw, 1.35rem);
  --jofa-c1f: clamp(1.42rem, 1.25rem + 0.85vw, 1.72rem);
  --jofa-1a0: clamp(1.75rem, 1.48rem + 1.35vw, 2.25rem);
  --jofa-512: clamp(2.20rem, 1.78rem + 2.1vw, 3.10rem);
  --jofa-d1c: clamp(2.80rem, 2.15rem + 3.25vw, 4.25rem);
  --jofa-950: clamp(3.40rem, 2.50rem + 4.5vw, 5.75rem);

  --space-3xs: clamp(0.25rem, 0.22rem + 0.15vw, 0.35rem);
  --space-2xs: clamp(0.50rem, 0.45rem + 0.25vw, 0.65rem);
  --space-xs: clamp(0.75rem, 0.70rem + 0.25vw, 0.95rem);
  --space-s: clamp(1.00rem, 0.90rem + 0.5vw, 1.35rem);
  --space-m: clamp(1.50rem, 1.30rem + 1.0vw, 2.00rem);
  --space-l: clamp(2.00rem, 1.70rem + 1.5vw, 3.00rem);
  --space-xl: clamp(3.00rem, 2.50rem + 2.5vw, 4.50rem);
  --space-2xl: clamp(4.00rem, 3.20rem + 4.0vw, 6.50rem);
  --space-3xl: clamp(5.50rem, 4.20rem + 6.5vw, 9.00rem);

  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-micro: 120ms;
  --duration-short: 180ms;
  --duration-base: 260ms;
  --duration-long: 420ms;

  --measure-narrow: 56ch;
  --measure-prose: 68ch;
  --measure-wide: 84ch;
  --container-max: 1280px;
}

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: 240ms var(--ease-out) both vt-fade-out; }
  ::view-transition-new(root) { animation: 280ms var(--ease-out) both vt-fade-in; }
  ::view-transition-group(site-logo) {
    animation-duration: 320ms;
    animation-timing-function: var(--ease-out);
  }
}

@keyframes vt-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.99);
  }
}

@keyframes vt-fade-in {
  from {
    opacity: 0;
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

html {
  background-color: var(--ground);
  color: var(--cream);
  font-family: var(--jofa-6b3);
  font-size: 100%;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--ground);
  color: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

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

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

ul,
ol { list-style: none; }

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--jofa-609);
  font-weight: 700;
  line-height: 1.1;
  color: var(--cream);
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

p {
  color: var(--cream);
  font-size: var(--jofa-723);
  line-height: 1.65;
  margin-bottom: var(--space-s);
}

p:last-child { margin-bottom: 0; }

small {
  font-size: var(--step--1);
  color: var(--cream-muted);
}

strong,
b {
  font-weight: 600;
  color: var(--cream);
}

em,
i { font-style: italic; }

code,
kbd,
samp,
pre {
  font-family: var(--jofa-192);
  font-size: 0.9em;
}

:focus { outline: none; }

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

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 1000;
  background-color: var(--accent-gold);
  color: var(--ground-deep);
  font-family: var(--jofa-192);
  font-weight: 600;
  font-size: var(--step--1);

  padding: var(--space-2xs) var(--space-s);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--duration-short) var(--ease-out);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.0rem, 4vw, 2.5rem);
  padding-right: clamp(1.0rem, 4vw, 2.5rem);
}

.container-narrow {
  width: 100%;
  max-width: var(--measure-prose);
  margin-left: auto;

  margin-right: auto;
  padding-left: clamp(1.0rem, 4vw, 2.0rem);
  padding-right: clamp(1.0rem, 4vw, 2.0rem);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.prose {
  font-size: var(--jofa-723);
  line-height: 1.7;
  color: var(--cream);
  max-width: var(--measure-prose);
}

.prose p { margin-bottom: var(--space-m); }

.prose strong {
  color: var(--cream);
  font-weight: 600;
}

.prose a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration-micro) var(--ease-out);
}

.prose a:hover { color: var(--accent-gold-hover); }

.prose hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-xl) 0;
}

.prose ul,
.prose ol {
  margin-bottom: var(--space-m);

  padding-left: var(--space-m);
}

.prose ul { list-style: disc; }

.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: var(--space-2xs);
  padding-left: var(--space-3xs);
}

.mono-spec {
  font-family: var(--jofa-192);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  color: var(--accent-gold);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--jofa-192);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-3xs) var(--space-xs);
  background-color: var(--ground-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
}

.flow > * + * { margin-top: var(--space-s); }

.flow-loose > * + * { margin-top: var(--space-m); }

.flow-tight > * + * { margin-top: var(--space-xs); }

@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;
    scroll-behavior: auto !important;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; }
}
