/* ---------------------------------------------------------------------- */
/* Fonts — Libre Baskerville, self-hosted (no external request at runtime, */
/* no Node/build step — see README "Architecture & key decisions").       */
/* SIL Open Font License; files under assets/fonts/.                      */
/* ---------------------------------------------------------------------- */

@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/libre-baskerville-400.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/libre-baskerville-700.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Baskerville";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/libre-baskerville-400italic.woff2") format("woff2");
}

/* ---------------------------------------------------------------------- */
/* Design tokens — dark, editorial, photography-led                       */
/* ---------------------------------------------------------------------- */

:root {
  --color-bg: #0b0b0a;
  --color-bg-elevated: #131211;
  --color-bg-overlay: rgba(11, 11, 10, 0.86);
  --color-fg: #ece7df;
  --color-fg-muted: #a39a8d;
  --color-fg-subtle: #6f675c;
  --color-border: #262420;
  --color-border-strong: #3a3630;
  --color-accent: #c8a367;
  --color-accent-fg: #14120d;
  --color-danger: #e5977e;
  --color-danger-bg: #2a1712;
  --color-danger-border: #4a281f;

  --font-display: "Libre Baskerville", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-text: "Libre Baskerville", Georgia, "Iowan Old Style", "Palatino Linotype", serif;

  --width-content: 1440px;
  --width-prose: 68ch;

  --ease-editorial: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 180ms;
  --duration-base: 320ms;
  --duration-slow: 900ms;

  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2.0625rem;
  --text-4xl: 2.625rem;
  --text-5xl: 3.5rem;

  --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-16: 4rem;
  --space-24: 6rem;
}

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

html,
body {
  overflow-x: hidden;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-text);
  background: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Shared wrappers for generated photo variants (see App\View::picture()).
   .media-contain never crops (box ratio == image ratio); .media-fill covers
   an externally-sized container (e.g. the hero banner). Both show the
   photo's blur placeholder as a background until the real image paints. */
.media-contain,
.media-fill {
  display: block;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.media-contain {
  width: 100%;
}

.media-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-contain img,
.media-fill img {
  width: 100%;
  height: 100%;
}

.media-contain img {
  object-fit: contain;
}

.media-fill img {
  object-fit: cover;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
}

::selection {
  background: var(--color-accent);
  color: var(--color-accent-fg);
}

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

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--color-accent);
  color: var(--color-accent-fg);
  padding: 0.6rem 1rem;
  border-radius: 2px;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: top var(--duration-fast) var(--ease-editorial);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.page-heading {
  font-size: var(--text-2xl);
  color: var(--color-fg);
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .page-heading {
    font-size: var(--text-3xl);
    margin-bottom: 3.5rem;
  }
}

.text-muted {
  color: var(--color-fg-muted);
}

.text-subtle {
  color: var(--color-fg-subtle);
}

/* Prose — rendered Markdown bodies */
.prose {
  max-width: var(--width-prose);
  color: var(--color-fg);
  line-height: 1.75;
}

.prose p {
  margin: 1.25em 0;
}

.prose h1,
.prose h2 {
  font-size: var(--text-2xl);
  margin: 2em 0 0.75em;
}

.prose h3 {
  font-size: var(--text-xl);
  margin: 1.75em 0 0.5em;
}

.prose a {
  color: var(--color-accent);
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin: 1.25em 0;
  padding-left: 1.5em;
}

.prose li {
  margin-top: 0.4em;
}

.prose blockquote {
  border-left: 2px solid var(--color-border-strong);
  padding-left: 1.25em;
  margin: 1.25em 0;
  color: var(--color-fg-muted);
  font-style: italic;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2em 0;
}

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