:root {
  --bg: #f1eee8;
  --surface: #fffdf9;
  --surface-2: #e7e0d6;
  --ink: #191815;
  --muted: #716b63;
  --line: rgba(25, 24, 21, .14);
  --accent: #b84b36;
  --accent-dark: #923624;
  --green: #2e5043;
  --sand: #d8c4a3;
  --blue: #3c596f;
  --shadow: 0 24px 70px rgba(45, 35, 24, .11);
  --radius: 20px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 4%, rgba(184, 75, 54, .08), transparent 28rem),
    var(--bg);
  font-family: var(--sans);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.05; }
h1 { margin-bottom: 1.2rem; font-size: clamp(3.2rem, 7vw, 6.8rem); letter-spacing: -.055em; }
h2 { margin-bottom: 1rem; font-size: clamp(2.3rem, 4.5vw, 4.3rem); letter-spacing: -.04em; }
h3 { margin-bottom: .45rem; }
p { color: var(--muted); }
::selection { color: white; background: var(--accent); }

.site-header, .simple-header {
  position: relative;
  z-index: 50;
  display: flex;
  width: min(calc(100% - 3rem), var(--max));
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 auto;
}
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 0 max(1.5rem, calc((100vw - var(--max)) / 2));
  background: rgba(241, 238, 232, .88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--serif);
}
.main-nav { display: flex; gap: 1.8rem; font-size: .88rem; font-weight: 700; }
.main-nav a:hover { color: var(--accent); }
.admin-link, .primary-button, .secondary-button, .quiet-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
}
.admin-link { color: white; background: var(--ink); }
.primary-button { color: white; background: var(--accent); border: 0; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.secondary-button { background: transparent; border: 1px solid var(--line); }
.secondary-button:hover { color: white; background: var(--ink); }
.quiet-button { background: transparent; border: 1px solid var(--line); }
.text-link { font-weight: 700; border-bottom: 1px solid currentColor; }
.menu-toggle { display: none; }

.hero {
  display: grid;
  width: min(calc(100% - 3rem), var(--max));
  min-height: calc(100vh - 78px);
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  margin: 0 auto;
  padding: 5rem 0;
}
.eyebrow {
  margin-bottom: .8rem;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero-lead { max-width: 690px; font-size: clamp(1.05rem, 1.7vw, 1.28rem); }
.hero-actions { display: flex; align-items: center; gap: 1.3rem; margin: 2rem 0 3rem; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.hero-facts div { display: grid; }
.hero-facts dt { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.hero-facts dd { margin: .2rem 0 0; font-family: var(--serif); font-size: 1.1rem; }
.hero-art { position: relative; }
.hero-art::before {
  position: absolute;
  inset: -6% 9% 4% -4%;
  z-index: -1;
  content: "";
  background: var(--sand);
  transform: rotate(-4deg);
}
.hero-art img { width: 100%; box-shadow: var(--shadow); transform: rotate(2deg); }
.notice-strip { padding: 1rem 1.5rem; color: white; background: var(--ink); text-align: center; }
.notice-strip p { margin: 0; color: rgba(255,255,255,.76); }
.notice-strip strong { color: white; }

.content-section, .resources-section {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
  padding: 7rem 0;
}
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.2rem; }
.section-heading h2 { margin-bottom: 0; }
.content-search { display: grid; gap: .35rem; color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.content-search input {
  width: min(320px, 70vw);
  padding: .75rem .9rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  text-transform: none;
}
.content-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,75,54,.12); }
.filter-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.3rem; }
.filter { padding: .52rem .9rem; background: transparent; border: 1px solid var(--line); border-radius: 999px; }
.filter.active, .filter:hover { color: white; background: var(--ink); }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.loading-card, .empty-card { grid-column: 1 / -1; padding: 3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.post-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 35px rgba(40,33,25,.04); }
.post-media { display: grid; grid-template-columns: 1fr; background: var(--surface-2); }
.post-media.multiple { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, 220px); }
.post-media button { overflow: hidden; padding: 0; background: transparent; border: 0; }
.post-media.multiple button:first-child { grid-row: 1 / 3; }
.post-media img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; transition: transform .45s ease; }
.post-media.multiple img { min-height: 0; }
.post-media button:hover img { transform: scale(1.035); }
.post-content { padding: 1.45rem; }
.post-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.official-author { display: flex; align-items: center; gap: .65rem; }
.official-author img { width: 40px; height: 40px; border-radius: 50%; }
.official-author div { display: grid; }
.official-author strong { font-size: .88rem; }
.official-author span, .post-date { color: var(--muted); font-size: .7rem; }
.category-label { display: inline-flex; margin-bottom: .55rem; padding: .32rem .55rem; color: var(--green); background: #dce9e2; border-radius: 5px; font-size: .63rem; font-weight: 800; text-transform: uppercase; }
.post-content h3 { font-family: var(--serif); font-size: 1.75rem; line-height: 1.15; }
.post-content > p { margin-bottom: 1rem; }
.post-technique { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.post-technique span { padding: .3rem .5rem; color: var(--muted); background: var(--bg); border-radius: 5px; font-size: .68rem; }
.read-button { padding: 0; color: var(--accent); background: transparent; border: 0; font-weight: 700; }
.post-body { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); white-space: pre-line; }
.attachment-list { display: grid; gap: .4rem; margin-top: 1rem; }
.attachment-list a { padding: .55rem .7rem; background: var(--bg); border-radius: 6px; font-size: .75rem; font-weight: 700; }
.feature-section {
  display: grid;
  width: min(calc(100% - 3rem), var(--max));
  overflow: hidden;
  grid-template-columns: 1.05fr .95fr;
  align-items: stretch;
  margin: 1rem auto 7rem;
  color: white;
  background: var(--green);
  border-radius: var(--radius);
}
.feature-copy { padding: clamp(2rem, 6vw, 5rem); }
.feature-copy .eyebrow { color: #e6c19f; }
.feature-copy p { color: rgba(255,255,255,.72); }
.feature-section > img { width: 100%; height: 100%; object-fit: cover; }
.feature-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.feature-meta span { padding: .35rem .58rem; background: rgba(255,255,255,.1); border-radius: 5px; font-size: .7rem; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.resource-grid article { min-height: 260px; padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.resource-grid article > span { color: var(--accent); font-family: var(--serif); font-size: 2rem; }
.resource-grid h3 { margin-top: 2.5rem; font-family: var(--serif); font-size: 1.45rem; }
.manifest-section { padding: 8rem max(1.5rem, calc((100vw - 900px) / 2)); background: #e5ded4; text-align: center; }
.manifest-section blockquote { margin: 1.2rem 0 2rem; font-family: var(--serif); font-size: clamp(2rem, 5vw, 4rem); font-style: italic; line-height: 1.18; }
.manifest-section > p:last-child { max-width: 760px; margin: 0 auto; }
.site-footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding: 4rem max(1.5rem, calc((100vw - var(--max)) / 2));
  color: white;
  background: var(--ink);
}
.site-footer p { color: rgba(255,255,255,.5); }
.site-footer > div { display: grid; align-content: start; gap: .5rem; }
.site-footer > div:not(:first-child) a { color: rgba(255,255,255,.58); font-size: .85rem; }
.site-footer .brand { margin-bottom: .7rem; }

.lightbox { width: min(1000px, calc(100% - 2rem)); padding: 1rem; background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox::backdrop { background: rgba(15,14,12,.82); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; background: var(--surface-2); }
.lightbox p { margin: .7rem 0 0; font-family: var(--serif); font-size: 1.2rem; }
.lightbox-close { position: absolute; top: 1.4rem; right: 1.4rem; z-index: 2; display: grid; width: 40px; height: 40px; place-items: center; color: white; background: rgba(20,19,17,.75); border: 0; border-radius: 50%; font-size: 1.4rem; }

/* Admin */
.admin-body { min-height: 100vh; background: #e9e4dc; }
.simple-header { min-height: 74px; }
.admin-main { width: min(calc(100% - 2rem), 900px); margin: 0 auto; padding: 4rem 0 7rem; }
.admin-intro { max-width: 720px; margin-bottom: 2.5rem; }
.admin-intro h1, .code-card h1 { font-size: clamp(3rem, 7vw, 5.2rem); }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 1.3rem; padding: 0; list-style: none; }
.stepper li { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .75rem; font-weight: 700; }
.stepper li::after { height: 1px; flex: 1; content: ""; background: var(--line); }
.stepper li:last-child::after { display: none; }
.stepper li span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.stepper li.active { color: var(--ink); }
.stepper li.active span, .stepper li.complete span { color: white; background: var(--accent); border-color: var(--accent); }
.admin-card { padding: clamp(1.4rem, 4vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-card[hidden] { display: none; }
.admin-card-heading { display: grid; grid-template-columns: 54px 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.card-number { display: grid; width: 54px; height: 54px; place-items: center; color: white; background: var(--green); border-radius: 50%; font-family: var(--serif); font-size: 1.2rem; }
.admin-card-heading h2 { margin-bottom: .25rem; font-size: clamp(1.9rem, 4vw, 3rem); }
.admin-card-heading p { margin: 0; }
.admin-form { display: grid; gap: 1rem; }
.admin-form label:not(.checkbox-label):not(.file-zone) { display: grid; gap: .38rem; font-size: .78rem; font-weight: 700; }
.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%;
  padding: .82rem .9rem;
  color: var(--ink);
  background: #f7f4ee;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}
.admin-form textarea { resize: vertical; }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,75,54,.12); }
.admin-form > .primary-button { justify-self: start; }
.form-status { min-height: 1.4rem; margin: 0; color: var(--green); font-size: .78rem; }
.form-status.error { color: #a53025; }
.code-help { margin-bottom: 1.3rem; padding: 1.2rem; background: #eee8de; border-radius: 10px; }
.code-help p { margin-bottom: .65rem; }
.code-help p:not(:first-child) { margin-top: 1rem; }
.compact-form { grid-template-columns: 1fr auto; align-items: end; }
.compact-form .form-status { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.file-zone { display: grid; gap: .3rem; padding: 1.5rem; background: #f7f4ee; border: 1px dashed #b7aa9b; border-radius: 10px; cursor: pointer; }
.file-zone span { font-weight: 700; }
.file-zone small { color: var(--muted); }
.file-zone input { margin-top: .6rem; padding: 0; background: transparent; border: 0; }
.file-list { display: grid; gap: .4rem; }
.file-item { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .7rem; background: #f7f4ee; border-radius: 6px; font-size: .75rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: .65rem; color: var(--muted); font-size: .75rem; cursor: pointer; }
.checkbox-label input { width: 17px; margin-top: .25rem; accent-color: var(--accent); }
.publish-actions { display: flex; justify-content: space-between; gap: 1rem; padding-top: .5rem; }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; max-width: min(380px, calc(100% - 2rem)); padding: .85rem 1rem; color: white; background: var(--ink); border-radius: 9px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .25s ease; }
.toast.show { opacity: 1; transform: none; }

.code-page { display: grid; min-height: calc(100vh - 74px); place-items: center; padding: 3rem 1rem 6rem; }
.code-card { width: min(100%, 650px); padding: clamp(1.5rem, 5vw, 3rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.revealed-code { margin-top: 1.5rem; padding: 1.5rem; color: white; background: var(--green); border-radius: 12px; text-align: center; }
.revealed-code span { display: block; color: rgba(255,255,255,.65); font-size: .7rem; text-transform: uppercase; }
.revealed-code strong { display: block; margin: .7rem 0 1rem; font-family: var(--serif); font-size: clamp(2rem, 8vw, 4rem); letter-spacing: .08em; }
.revealed-code .secondary-button { color: white; border-color: rgba(255,255,255,.35); }
.revealed-code .secondary-button:hover { color: var(--ink); background: white; }
.revealed-code p { margin: 1rem 0 0; color: rgba(255,255,255,.6); font-size: .75rem; }

@media (max-width: 900px) {
  .main-nav { position: fixed; inset: 78px 0 auto; display: none; padding: 1rem 1.5rem; background: var(--bg); border-bottom: 1px solid var(--line); }
  .main-nav.open { display: grid; gap: 1rem; }
  .menu-toggle { display: block; padding: .55rem .8rem; background: transparent; border: 1px solid var(--line); border-radius: 999px; }
  .admin-link { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-art { width: min(100%, 650px); margin: 0 auto; }
  .post-grid { grid-template-columns: 1fr; }
  .feature-section { grid-template-columns: 1fr; }
  .feature-section > img { max-height: 450px; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-grid article { min-height: 220px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .site-header, .simple-header { width: calc(100% - 2rem); min-height: 68px; }
  .site-header { width: 100%; padding: 0 1rem; }
  .brand > span:last-child { font-size: .9rem; }
  .hero, .content-section, .resources-section, .feature-section { width: calc(100% - 2rem); }
  .hero { padding: 3.5rem 0 5rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-facts { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .content-search, .content-search input { width: 100%; }
  .post-media.multiple { grid-template-columns: 1fr 1fr; grid-template-rows: 300px 150px; }
  .post-media.multiple button:first-child { grid-column: 1 / -1; grid-row: auto; }
  .feature-copy { padding: 1.6rem; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > div:first-child { grid-column: auto; }
  .stepper { gap: .35rem; }
  .stepper li { gap: .3rem; font-size: .62rem; }
  .stepper li::after { display: none; }
  .admin-main { padding-top: 2.5rem; }
  .admin-card-heading { grid-template-columns: 42px 1fr; }
  .card-number { width: 42px; height: 42px; }
  .compact-form, .form-grid { grid-template-columns: 1fr; }
  .compact-form .form-status { grid-column: auto; }
  .publish-actions { align-items: stretch; flex-direction: column-reverse; }
  .simple-header .text-link { font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
