/*
  Arid Forge stylesheet. No frameworks, no web fonts, no JavaScript.
  Colours are variables at the top: change a value and the whole site follows.
  Veld palette by default, dark veld when the visitor's device prefers dark,
  and "night" (the logo's signal green on black) for the workshop.
*/

:root {
  --bone: #f1e9d8;
  --sage: #dfe3cc;
  --sand: #e9d9b8;
  --card: #f8f2e4;
  --ink: #261f19;
  --ink-soft: #62574a;
  --accent: #9c4a26;
  --accent-ink: #f8f2e4;
  --line: #cdbf9f;
  --band: var(--bone);
  --heading: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --gutter: 20px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bone: #19140f;
    --sage: #1c2017;
    --sand: #231b13;
    --card: #211a14;
    --ink: #ede2cc;
    --ink-soft: #b3a68f;
    --accent: #e08a58;
    --accent-ink: #19140f;
    --line: #3a3025;
  }
}

/* The workshop look: the logo's signal green on near black, with a faint grid like its radar roundel. */
.tone-night,
body.theme-night {
  --bone: #04130b;
  --sage: #04130b;
  --sand: #04130b;
  --card: #072015;
  --ink: #d3ecdd;
  --ink-soft: #8fb3a0;
  --accent: #55fa7b;
  --accent-ink: #04130b;
  --line: rgba(85, 250, 123, 0.28);
  --band: #04130b;
}

.tone-bone { --band: var(--bone); }
.tone-sage { --band: var(--sage); }
.tone-sand { --band: var(--sand); }

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--heading); line-height: 1.15; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 6.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.mono, .kicker, .tag { font-family: var(--mono); }
.mono { font-size: 0.9rem; }
.small { font-size: 0.8rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

.kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* Header */
body.theme-night, .site-head { background: var(--bone); }
.site-head { border-bottom: 1px solid var(--line); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; font-family: var(--heading); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.08em; text-transform: uppercase; }
.brand img { width: 44px; height: 44px; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; }
nav a { color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
nav a:hover { border-bottom-color: var(--accent); }

/* Hero */
.hero { position: relative; min-height: min(78vh, 640px); display: flex; align-items: flex-end; color: #f6eedd; overflow: hidden; background: #2b2118; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(25, 18, 12, 0.15) 0%, rgba(25, 18, 12, 0.55) 55%, rgba(25, 18, 12, 0.88) 100%); }
.hero-copy { position: relative; width: 100%; padding-top: 5rem; padding-bottom: 3rem; }
.hero .kicker { color: #f0c27a; }
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: 1.2rem; max-width: 36rem; }
.hero-note { font-family: var(--mono); font-size: 0.9rem; border-left: 3px solid #f0c27a; padding-left: 0.8rem; max-width: 34rem; margin-top: 1.5rem; }

/* Bands and splits */
.band { background: var(--band, var(--bone)); color: var(--ink); padding: 4rem 0; }
.band.alt { background: var(--sand); }
.band.tone-night {
  background-color: #04130b;
  background-image:
    linear-gradient(rgba(85, 250, 123, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 250, 123, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}
body.theme-night .band, body.theme-night { background-color: #04130b; background-image: linear-gradient(rgba(85, 250, 123, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(85, 250, 123, 0.05) 1px, transparent 1px); background-size: 32px 32px; }
body.theme-night .band, body.theme-night .band.alt { background-color: transparent; }
body.theme-night .band.alt { background-color: rgba(85, 250, 123, 0.04); }
.tone-night h2, .tone-night h1, body.theme-night h1, body.theme-night h2 { color: var(--accent); }

.split { display: grid; gap: 2rem; align-items: center; }
.split figure { margin: 0; }
.split img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
@media (min-width: 760px) {
  .split { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
  .split.flip .copy { order: 2; }
}

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }

.tag { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.15rem 0.6rem; border: 1px solid currentColor; border-radius: 999px; color: var(--ink-soft); }
.tag::before { content: ""; display: inline-block; width: 0.45em; height: 0.45em; margin-right: 0.5em; border-radius: 50%; background: currentColor; }
.tag-available, .tag-for-sale { color: #3f6a2a; }
.tag-ask, .tag-when-ready, .tag-when-available { color: #8a6416; }
.tag-sold { color: #8a3a2a; }
.tag-prototype { color: #7b5a96; }
.tag-free-stl { color: #2a6a78; }
@media (prefers-color-scheme: dark) {
  .tag-available, .tag-for-sale { color: #9bd07a; }
  .tag-ask, .tag-when-ready, .tag-when-available { color: #e6bd5c; }
  .tag-sold { color: #e68a76; }
  .tag-prototype { color: #c8a6e0; }
  .tag-free-stl { color: #7fd0e0; }
}
body.theme-night .tag, .tone-night .tag { color: var(--accent); }

.facts { list-style: none; padding: 0; margin: 0 0 1.6rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facts li { font-family: var(--mono); font-size: 0.82rem; padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 3px; background: var(--card); }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; padding: 0.75rem 1.3rem; border-radius: 3px; font-weight: 600; }
.btn:hover { filter: brightness(1.1); }
.textlink { font-family: var(--mono); font-size: 0.9rem; margin-right: 1.2rem; }

/* Page heads (workshop and contact) */
.page-head { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.page-head .lede { font-size: 1.2rem; max-width: 40rem; color: var(--ink-soft); margin-bottom: 0; }

/* Workshop */
.empty { padding: 2rem; border: 1px dashed var(--line); border-radius: 4px; color: var(--ink-soft); font-family: var(--mono); }
.cards, .builds, .mats { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 1.2rem; }
.build, .mat { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1.2rem; }
.build p, .mat p { margin: 0; color: var(--ink-soft); }
.mat-name { display: block; font-size: 1.3rem; color: var(--accent); margin-bottom: 0.3rem; font-weight: 700; }
.mats { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Contact */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-list { margin: 0; }
.contact-list dt { font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-top: 1.4rem; }
.contact-list dd { margin: 0.3rem 0 0; font-size: 1.15rem; }
.plain { padding-left: 1.2rem; }
.plain li { margin-bottom: 0.5rem; }

/* FAQ */
.narrow { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); padding: 1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.faq details p { margin: 0.8rem 0 0; color: var(--ink-soft); }

/* Footer */
.site-foot { background: var(--bone); border-top: 1px solid var(--line); padding: 2rem 0; color: var(--ink-soft); }
.site-foot p { margin: 0 0 0.4rem; }
.site-foot a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
