/* Feed the Raccoon: colour tokens and base styles.
   Plain CSS, no external requests. Sizes in rem so the browser's text size setting is respected. */

:root {
  --bg: #FBF4E4;
  --ink: #2B1D14;
  --soft: #5A4535;
  --accent: #A3401C;
  --link: #1E5546;
  --edge: #B99B76;
  --control-edge: #86664A;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1E1915;
    --ink: #F4EADB;
    --soft: #D3C3AC;
    --accent: #F2A65A;
    --link: #A8D5B0;
    --edge: #5E4E3F;
    --control-edge: #9A7F62;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1E1915;
  --ink: #F4EADB;
  --soft: #D3C3AC;
  --accent: #F2A65A;
  --link: #A8D5B0;
  --edge: #5E4E3F;
  --control-edge: #9A7F62;
  color-scheme: dark;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html {
  font-size: 112.5%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  line-height: 1.55;
}

h1, h2, h3 {
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--edge);
}

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

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 1rem;
  border-bottom: 2px solid var(--edge);
}

.site-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.9rem;
  border: 2px solid var(--control-edge);
  border-radius: 999px;
  color: var(--link);
}

button, .button {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 1.25rem;
  font: inherit;
  color: var(--bg);
  background: var(--accent);
  border: 2px solid var(--control-edge);
  border-radius: 999px;
  cursor: pointer;
}

main {
  overflow-wrap: anywhere;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.project-card {
  padding: 1rem;
  border: 2px solid var(--edge);
  border-radius: 0.5rem;
}

.plate {
  margin: 1.5rem 0;
  padding: 0.5rem;
  background: #FBF4E4;
  border: 2px solid var(--control-edge);
  border-radius: 0.5rem;
  forced-color-adjust: none;
}

.plate img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.plate figcaption {
  overflow-wrap: anywhere;
  margin-top: 0.5rem;
  color: #5A4535;
  font-size: 0.875rem;
}

.video {
  margin: 1.5rem 0;
}

.video-poster {
  position: relative;
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0;
  border: 2px solid var(--control-edge);
  border-radius: 0.5rem;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
}

.video-poster img {
  display: block;
  width: 100%;
  height: auto;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: bold;
}

.video-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 0.5rem;
}

.video-watch {
  margin: 0.75rem 0 0;
}

.site-footer {
  overflow-wrap: anywhere;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem;
  border-top: 2px solid var(--edge);
  color: var(--soft);
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .site-nav a, button, .project-card, .plate {
    border: 2px solid CanvasText;
  }

  .site-header {
    border-bottom: 2px solid CanvasText;
  }

  .site-footer {
    border-top: 2px solid CanvasText;
  }

  :focus-visible {
    outline: 3px solid Highlight;
  }
}
