/* ============================================================
   D. & L. Koch Verlag — 2026 Redesign
   Design note: the publisher's own catalog language — cloth
   binding, foil stamping, thread-stitching, ISBN precision —
   is the material this design is built from. Two accent colors
   trace the house's two actual editorial lines (Medizingeschichte
   / Kulturgeschichte); the "colophon" label block, styled after
   a library catalog card, is the one signature motif, repeated
   everywhere a book appears.
   ============================================================ */

/* Google Fonts are loaded via <link rel="preconnect"/"stylesheet"> in generate.py's
   head() template (not @import here) — avoids the extra render-blocking round-trip
   an @import forces before the font request can even start. */

:root {
  /* paper */
  --paper: #ECEEEA;
  --paper-2: #E1E4DE;
  --paper-3: #D1D5CD;
  /* ink */
  --ink: #1C1E19;
  --ink-soft: #4B4F44;
  --ink-faint: #686B5D;  /* darkened from #8A8D7E — original read 2.9:1 on --paper, below WCAG AA */
  /* cloth accents — grounded in real binding colors used across the catalog */
  --green: #2E4A3B;      /* Ganzleinen green — Kulturgeschichte / Corps line */
  --green-tint: #7C9686;
  --green-wash: #E4E9E1;
  --oxblood: #6E2E2A;    /* Ganzleinen red — Medizingeschichte line */
  --oxblood-tint: #B98079;
  --oxblood-wash: #EFE3DF;
  --brass: #816430;      /* foil stamping — used sparingly, never as a fill; darkened from #9C7A34 (was 3.4:1 on --paper) */
  --brass-bright: #B4924A;

  --serif-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', serif;
  --serif-body: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --container: 1240px;
  --edge: clamp(20px, 5vw, 72px);

  --ease: cubic-bezier(.22,.61,.36,1);

  /* type scale — introduced for a bolder, more confident display moment
     (hero, section heads, card titles) without touching body copy */
  --fs-hero: clamp(44px, 6.4vw, 100px);
  --fs-h2: clamp(30px, 3.8vw, 52px);
  --fs-card-title: 20px;
  --fs-lede: 20px;
}

:root[data-theme="dark"] {
  --paper: #15170F;
  --paper-2: #1C1E15;
  --paper-3: #262A1C;
  --ink: #EDEAE0;
  --ink-soft: #B7B9A9;
  --ink-faint: #767A67;
  --green: #8CAB97;
  --green-tint: #4C6357;
  --green-wash: #1D251E;
  --oxblood: #CD948C;
  --oxblood-tint: #6B3E38;
  --oxblood-wash: #291D1A;
  --brass: #CBA85A;
  --brass-bright: #E0BE7A;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15170F;
    --paper-2: #1C1E15;
    --paper-3: #262A1C;
    --ink: #EDEAE0;
    --ink-soft: #B7B9A9;
    --ink-faint: #767A67;
    --green: #8CAB97;
    --green-tint: #4C6357;
    --green-wash: #1D251E;
    --oxblood: #CD948C;
    --oxblood-tint: #6B3E38;
    --oxblood-wash: #291D1A;
    --brass: #CBA85A;
    --brass-bright: #E0BE7A;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.scroll-lock { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--brass); color: var(--paper); }

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 12px 18px;
  border-radius: 2px;
  transition: top .2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}
.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;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brass);
}

/* ---------- header ---------- */
/* ---------- intro loader ---------- */
.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  animation: introFade 0.5s ease 1.35s forwards;
}
.intro-loader img {
  width: 64px;
  height: 64px;
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  animation: introMark 0.7s cubic-bezier(.22,.61,.36,1) 0.15s forwards;
}
:root[data-theme="dark"] .intro-loader img { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .intro-loader img { filter: invert(1); }
}
@keyframes introMark {
  0% { opacity: 0; transform: translateY(10px) scale(0.94); }
  55% { opacity: 1; transform: translateY(0) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes introFade {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-loader { display: none; }
  .hero-photo { animation: none !important; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--paper-3);
}
/* blur lives on a pseudo-element, not on .site-header itself — backdrop-filter on the
   header would otherwise become the containing block for its position:fixed .main-nav
   child (mobile menu), squashing it to the header's own ~65px height instead of the
   full viewport. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--edge);
  max-width: var(--container);
  margin: 0 auto;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: 21px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-mark {
  height: 32px;
  width: 32px;
  flex: none;
  object-fit: contain;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark:not(.brand-mark--footer) { filter: invert(1); }
}
:root[data-theme="dark"] .brand-mark:not(.brand-mark--footer) { filter: invert(1); }
.brand-mark--footer { filter: invert(1); height: 34px; width: 34px; }
.brand em {
  font-style: italic;
  font-weight: 440;
  color: var(--ink-soft);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.main-nav a {
  position: relative;
  padding-bottom: 3px;
  color: var(--ink-soft);
  transition: color .2s var(--ease);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--brass);
}
.nav-phone {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--paper-3);
  border-radius: 3px;
  width: 38px; height: 34px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span { width: 16px; height: 1px; background: var(--ink); display: block; }

@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 74px 0 0 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 34px var(--edge); gap: 26px; font-size: 15px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-toggle { display: flex; }
  .nav-phone { display: none; }
}

/* ---------- book search ---------- */
.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  flex: none;
  background: none;
  border: 1px solid var(--paper-3);
  border-radius: 3px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.search-toggle:hover { border-color: var(--ink); color: var(--ink); }
.search-toggle.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-3);
  box-shadow: 0 22px 44px -24px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.search-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.search-panel-inner {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 20px var(--edge) 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--paper-3);
  background: var(--paper-2);
  padding: 13px 16px;
  border-radius: 2px;
  color: var(--ink-faint);
  flex: none;
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--serif-body);
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.search-field input::placeholder { color: var(--ink-faint); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-close {
  border: none;
  background: none;
  color: var(--ink-faint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 2px 4px;
  flex: none;
}
.search-close:hover { color: var(--ink); }
.search-results {
  overflow-y: auto;
  max-height: min(58vh, 460px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 -10px;
  padding: 0 10px;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
  border-radius: 2px;
  color: inherit;
  text-decoration: none;
}
.search-result:hover, .search-result:focus-visible { background: var(--paper-2); }
.search-result-cover {
  width: 38px;
  height: 52px;
  flex: none;
  object-fit: cover;
  background: var(--paper-3);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.search-result-body { min-width: 0; flex: 1; }
.search-result-title {
  display: block;
  font-family: var(--serif-display);
  font-size: 15px;
  line-height: 1.28;
  color: var(--ink);
}
.search-result-title em { font-style: italic; font-weight: 400; color: var(--ink-soft); }
.search-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .03em;
  color: var(--ink-faint);
}
.search-result-cat--kultur { color: var(--green); }
.search-result-cat--medizin { color: var(--oxblood); }
.search-result-cat--other { color: var(--brass); }
.search-result-price {
  flex: none;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.search-hint, .search-empty {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  padding: 12px 8px 6px;
}
.search-empty a { color: var(--brass); border-bottom: 1px solid currentColor; }
@media (max-width: 560px) {
  .search-result-price { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 84px var(--edge) 96px;
  max-width: var(--container);
  margin: 0 auto;
  overflow: hidden;
}
.hero-span {
  position: absolute;
  top: -0.12em;
  right: -0.02em;
  font-family: var(--serif-display);
  font-weight: 300;
  font-size: clamp(120px, 20vw, 300px);
  color: var(--ink);
  opacity: 0.045;
  letter-spacing: -0.02em;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  white-space: nowrap;
}
.hero-eyebrow { margin-bottom: 28px; }
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 460;
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 15ch;
  margin: 0 0 28px;
}
.hero h1 i { font-style: italic; font-weight: 400; color: var(--green); }
.hero-lede {
  font-size: var(--fs-lede);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- home hero (photographic) ---------- */
.hero--home {
  max-width: none;
  padding: 0;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  color: var(--paper-2, #F1EEE4);
}
.hero-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 38%;
  z-index: 0;
  animation: heroPhotoIn 1.3s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes heroPhotoIn {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}
.hero--home::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(15,16,12,.94) 0%, rgba(15,16,12,.82) 32%, rgba(15,16,12,.42) 62%, rgba(15,16,12,.18) 100%),
    linear-gradient(0deg, rgba(10,11,8,.55) 0%, rgba(10,11,8,0) 34%);
}
.hero--home .hero-span {
  z-index: 1;
  color: #fff;
  opacity: 0.07;
  top: auto;
  bottom: -0.1em;
}
.hero--home .hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px var(--edge) 68px;
  width: 100%;
}
.hero--home .hero-eyebrow { color: rgba(241,238,228,.75); }
.hero--home .hero-eyebrow::before { background: var(--brass-bright, var(--brass)); }
.hero--home h1 { color: #fff; }
.hero--home h1 i { color: var(--green-tint); }
.hero--home .hero-lede { color: rgba(241,238,228,.82); }
.hero--home .btn-primary { background: #fff; color: #16180F; border-color: #fff; }
.hero--home .btn-primary:hover { background: var(--green-tint); border-color: var(--green-tint); color: #10140F; }
.hero--home .btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.hero--home .btn-ghost:hover { border-color: var(--brass-bright, var(--brass)); color: var(--brass-bright, var(--brass)); }
@media (max-width: 720px) {
  .hero--home { min-height: 560px; align-items: center; }
  .hero--home .hero-inner { padding-top: 120px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:active { transform: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--green); border-color: var(--green); }
.btn-primary:active { background: color-mix(in srgb, var(--green) 80%, black); border-color: color-mix(in srgb, var(--green) 80%, black); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn-ghost:active { background: var(--paper-3); }
.btn-arrow::after { content: "\2192"; transition: transform .2s var(--ease); }
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- section scaffolding ---------- */
section { padding: 88px var(--edge); }
.section-inner { max-width: var(--container); margin: 0 auto; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--serif-display);
  font-weight: 460;
  font-size: var(--fs-h2);
  line-height: 1.05;
  margin: 14px 0 0;
  max-width: 18ch;
}
.section-note { max-width: 34ch; color: var(--ink-soft); font-size: 15px; }
hr.rule { border: none; border-top: 1px solid var(--paper-3); margin: 0; }

/* ---------- about / schwerpunkte ---------- */
.about { background: var(--paper-2); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
}
.focus-card {
  background: var(--paper-2);
  padding: 44px;
  position: relative;
}
.focus-card .eyebrow { margin-bottom: 20px; }
.focus-card h3 {
  font-family: var(--serif-display);
  font-weight: 460;
  font-size: 28px;
  margin: 0 0 16px;
}
.focus-card p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 18px; }
.focus-card .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: 20px;
  display: inline-block;
}
.focus-card--kultur { border-top: 3px solid var(--green); }
.focus-card--kultur .tag { color: var(--green); }
.focus-card--medizin { border-top: 3px solid var(--oxblood); }
.focus-card--medizin .tag { color: var(--oxblood); }
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- book grid ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
}
.book-card {
  background: var(--paper);
  padding: 34px 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background .25s var(--ease);
}
.book-card:hover { background: var(--paper-2); }
.book-card .spine {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s var(--ease);
}
.book-card:hover .spine { transform: scaleY(1); }
.book-card--kultur .spine { background: var(--green); }
.book-card--medizin .spine { background: var(--oxblood); }
.book-card--other .spine { background: var(--brass); }
.cover-frame {
  aspect-ratio: 3/4;
  margin-bottom: 22px;
  overflow: hidden;
  background: var(--paper-3);
  box-shadow:
    0 1px 1px rgba(0,0,0,.18),
    0 10px 16px -10px rgba(0,0,0,.32),
    0 28px 40px -24px rgba(0,0,0,.28);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.cover-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.book-card:hover .cover-frame {
  transform: rotate(-.6deg);
  box-shadow:
    0 1px 1px rgba(0,0,0,.2),
    0 14px 20px -10px rgba(0,0,0,.36),
    0 34px 50px -22px rgba(0,0,0,.32);
}
.book-card:hover .cover-frame img { transform: scale(1.035); }
.book-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.book-card--kultur .book-kicker { color: var(--green); }
.book-card--medizin .book-kicker { color: var(--oxblood); }
.book-card--other .book-kicker { color: var(--brass); }
.book-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: var(--fs-card-title);
  line-height: 1.2;
  margin: 0 0 8px;
}
.book-author { color: var(--ink-faint); font-size: 13.5px; margin-bottom: auto; padding-bottom: 18px; }
.colophon-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  border-top: 1px solid var(--paper-3);
  padding-top: 12px;
  letter-spacing: 0.01em;
}
.colophon-line b { color: var(--ink); font-weight: 500; }

/* ---------- book detail ---------- */
.book-detail { padding-top: 56px; }
.crumb {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 36px;
  display: block;
}
.crumb:hover { color: var(--brass); }
.detail-heading { margin-bottom: 44px; max-width: 760px; }
.detail-heading .book-kicker { font-size: 12px; margin-bottom: 14px; }
.detail-heading h1 {
  font-family: var(--serif-display);
  font-weight: 460;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin: 0 0 10px;
}
.detail-author {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 760px;
}
.detail-cover .frame {
  box-shadow:
    0 1px 1px rgba(0,0,0,.18),
    0 16px 24px -14px rgba(0,0,0,.32),
    0 40px 70px -30px rgba(0,0,0,.38);
  overflow: hidden;
}
.detail-cover .frame-square {
  width: 100%;
  aspect-ratio: 1 / 1;
}
.detail-cover .frame-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 820px) {
  .detail-heading { max-width: none; }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    max-width: none;
    align-items: start;
  }
  .detail-cover { position: sticky; top: 100px; }
}
.colophon-card {
  border: 1px solid var(--paper-3);
  padding: 28px 30px;
  margin-bottom: 40px;
  background: var(--paper-2);
  position: relative;
}
.colophon-card::before, .colophon-card::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid var(--brass);
  opacity: .8;
}
.colophon-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.colophon-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.colophon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 28px;
  font-family: var(--mono);
  font-size: 13px;
}
.colophon-grid dt { color: var(--ink-faint); letter-spacing: .06em; text-transform: uppercase; font-size: 10.5px; margin-bottom: 5px; }
.colophon-grid dd { margin: 0; color: var(--ink); line-height: 1.5; }
.price-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px dashed var(--paper-3);
}
.price-row b { color: var(--ink); font-size: 15px; }
.order-sum {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px dashed var(--paper-3);
  padding-top: 16px;
}
.order-sum b { color: var(--ink); font-size: 17px; transition: color .2s var(--ease); }
.detail-body .desc { color: var(--ink-soft); font-size: 16.5px; margin-bottom: 36px; }
.detail-body .desc p { margin: 0 0 16px; }
.detail-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- forms ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 820px) {
  .contact-grid { grid-template-columns: 1.3fr 1fr; gap: 56px; }
}
.form-panel {
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  padding: 40px;
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: 2px;
  padding: 13px 14px;
  font-family: var(--serif-body);
  font-size: 15px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brass); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.checkline { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-soft); }
.checkline input { width: 16px; height: 16px; margin-top: 3px; }

.form-note {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 1.4em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.form-note.is-visible { opacity: 1; transform: translateY(0); }
.form-note.is-success { color: var(--green); }
.form-note.is-success::before {
  content: "\2713";
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: 50%;
  width: 16px; height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex: none;
}
.form-note.is-error { color: var(--oxblood); }
.form-note.is-error::before {
  content: "!";
  font-weight: 700;
  border: 1px solid currentColor;
  border-radius: 50%;
  width: 16px; height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex: none;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 72px var(--edge) 30px;
}
:root[data-theme="dark"] .site-footer { background: var(--paper-2); border-top: 1px solid var(--paper-3); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-footer { background: var(--paper-2); border-top: 1px solid var(--paper-3); }
}
.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif-display);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin: 0 0 18px;
}
.footer-col p, .footer-col a { color: color-mix(in srgb, var(--paper) 78%, transparent); font-size: 14.5px; display: block; margin-bottom: 10px; }
.footer-col a:hover { color: var(--paper); }
.footer-note { color: color-mix(in srgb, var(--paper) 60%, transparent); font-size: 13px; max-width: 40ch; line-height: 1.6; }
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  border-top: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
}
.footer-bottom a:hover { color: var(--paper); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- legal pages ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 100px var(--edge) 60px; }
.legal h1 { font-family: var(--serif-display); font-size: clamp(30px,4vw,44px); margin-bottom: 40px; }
.legal h2 { font-family: var(--serif-display); font-size: 21px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 15.5px; }
.legal a { color: var(--brass); border-bottom: 1px solid currentColor; }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- catalog filter bar ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 44px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.filter-bar button {
  background: transparent;
  border: 1px solid var(--paper-3);
  color: var(--ink-soft);
  padding: 9px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.filter-bar button:hover { border-color: var(--ink); color: var(--ink); }
.filter-bar button.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- misc ---------- */
.hairline { height: 1px; background: var(--paper-3); border: none; }
.newsletter-form .form-note { flex-basis: 100%; margin-top: 4px; }
