/* ========================================================================
 * Johann von Goisern - Base Styles (V1)
 * Tokens, base, layout, components, pages.
 * Vanilla CSS, keine Utility-Frameworks, keine externen Fonts.
 * ==================================================================== */

/* --- Tokens ------------------------------------------------------------ */
:root {
  --c-ink:        #0e0e0e;
  --c-ink-2:      #1c1c1c;
  --c-paper:      #f5f2ec;
  --c-paper-2:    #eeeae1;
  --c-border:     #d8d3c7;
  --c-muted:      #6b6b6b;
  --c-terracotta: #c1553b;
  --c-ocker:      #c9a24a;
  --c-forest:     #3f6a4d;
  --c-night:      #243447;
  --c-accent:     var(--c-terracotta);
  --c-focus:      var(--c-ocker);

  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
             Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --step--1: clamp(0.85rem, 0.83rem + 0.10vw, 0.92rem);
  --step-0:  clamp(1.00rem, 0.98rem + 0.10vw, 1.06rem);
  --step-1:  clamp(1.15rem, 1.10rem + 0.30vw, 1.30rem);
  --step-2:  clamp(1.35rem, 1.25rem + 0.60vw, 1.65rem);
  --step-3:  clamp(1.75rem, 1.50rem + 1.20vw, 2.35rem);
  --step-4:  clamp(2.10rem, 1.80rem + 1.60vw, 3.10rem);
  --step-5:  clamp(2.80rem, 2.20rem + 3.20vw, 4.40rem);

  --container: 1240px;
  --pad-x-mobile: 20px;
  --pad-x-desktop: 32px;
  --gap: 24px;
  --gap-lg: 40px;

  --radius: 4px;
  --shadow-1: 0 8px 24px rgba(14, 14, 14, 0.06);
  --shadow-2: 0 12px 40px rgba(14, 14, 14, 0.10);

  --header-height: 72px;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dt, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* --- Base --------------------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.display, .h1, .h2, .h3, .h4, .h5 {
  font-family: var(--f-serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.display { font-size: var(--step-5); }
.h1 { font-size: var(--step-4); }
.h2 { font-size: var(--step-3); }
.h3 { font-size: var(--step-2); line-height: 1.2; }
.h4 { font-size: var(--step-1); line-height: 1.25; }
.h5 { font-size: var(--step-0); font-family: var(--f-sans); font-weight: 600; letter-spacing: 0; }
.lead { font-size: var(--step-1); color: var(--c-ink-2); max-width: 62ch; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--step--1);
  color: var(--c-muted);
  font-weight: 500;
}
.meta { color: var(--c-muted); font-size: var(--step--1); }

a { transition: color .15s var(--ease-out); }
a:hover { color: var(--c-accent); }
a:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  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: -9999px; top: 0;
  padding: 12px 16px; background: var(--c-ink); color: var(--c-paper);
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --- Layout ------------------------------------------------------------- */
.container {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding-inline: var(--pad-x-mobile);
}
@media (min-width: 720px) {
  .container { padding-inline: var(--pad-x-desktop); }
}
.main { min-height: calc(100vh - var(--header-height)); padding-top: var(--header-height); }
.section { padding: 64px 0; }
.section--intro { padding-top: 40px; }
.section--tone { background: var(--c-paper-2); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--gap); margin-bottom: 32px; }
.section__intro { color: var(--c-ink-2); max-width: 68ch; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Header / Nav ------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  background: var(--c-ink); color: var(--c-paper);
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.site-header__inner {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: var(--gap);
  min-height: var(--header-height);
}
.site-header__brand img {
  filter: brightness(0) invert(1);
  width: 160px; height: auto;
}
.site-nav { display: none; }
@media (min-width: 1024px) { .site-nav { display: block; } }
.site-nav__list {
  display: flex; gap: 26px; justify-content: center;
}
.site-nav__list a {
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s var(--ease-out);
}
.site-nav__list a:hover, .site-nav__list a:focus-visible { border-color: var(--c-accent); color: var(--c-paper); }
.site-header__meta { display: flex; gap: 12px; align-items: center; justify-content: end; }
.site-header__burger {
  background: transparent; border: 1px solid rgba(255,255,255,0.2);
  color: var(--c-paper); padding: 8px 10px; border-radius: var(--radius);
  cursor: pointer;
}
@media (min-width: 1024px) { .site-header__burger { display: none; } }
.lang-switcher select {
  background: transparent; color: var(--c-paper);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 26px 6px 10px; border-radius: var(--radius);
  font-size: var(--step--1);
}
.lang-switcher select option { color: var(--c-ink); }

/* Mobile-Nav Overlay */
.mobile-nav {
  position: fixed; inset: 0;
  background: rgba(14, 14, 14, 0.86);
  z-index: 150;
  display: flex; align-items: stretch; justify-content: end;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav__panel {
  background: var(--c-ink); color: var(--c-paper);
  width: min(88vw, 380px);
  padding: 24px;
  display: flex; flex-direction: column;
}
.mobile-nav__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.mobile-nav__title { font-family: var(--f-serif); font-size: var(--step-2); margin: 0; }
.mobile-nav__close {
  background: transparent; border: 1px solid rgba(255,255,255,0.2);
  color: var(--c-paper); padding: 8px 10px; border-radius: var(--radius); cursor: pointer;
}

/* Nav-Icon Geometrie (kein SVG, unabhaengig von globalem svg-Styling) */
.nav-icon {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  color: var(--c-paper);
}
.nav-icon--burger {
  width: 22px;
  height: 16px;
}
.nav-icon--burger .nav-icon__bar {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.nav-icon--burger .nav-icon__bar:nth-child(1) { top: 0; }
.nav-icon--burger .nav-icon__bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-icon--burger .nav-icon__bar:nth-child(3) { bottom: 0; }
.nav-icon--close {
  width: 18px;
  height: 18px;
}
.nav-icon--close::before,
.nav-icon--close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.nav-icon--close::before { transform: translateY(-50%) rotate(45deg); }
.nav-icon--close::after  { transform: translateY(-50%) rotate(-45deg); }

.mobile-nav__list li { border-bottom: 1px solid rgba(255,255,255,0.08); }
.mobile-nav__list a { display: block; padding: 14px 0; font-size: var(--step-1); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: var(--radius);
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out), border-color .15s var(--ease-out);
  cursor: pointer;
}
.btn + .btn { margin-inline-start: 8px; }
.btn--primary { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }
.btn--primary:hover { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-ink); color: var(--c-paper); }

/* --- Hero --------------------------------------------------------------- */
.hero { padding: 40px 0 64px; }
.hero__grid {
  display: grid; gap: var(--gap-lg);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; }
}
.hero__copy > * + * { margin-top: 20px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__image img { border-radius: var(--radius); box-shadow: var(--shadow-2); }
.hero--editorial { background: linear-gradient(180deg, var(--c-paper) 0%, var(--c-paper-2) 100%); }

/* --- Cards -------------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.card__figure { margin: 0; aspect-ratio: 4/3; overflow: hidden; background: var(--c-paper-2); }
.card__figure img { width: 100%; height: 100%; object-fit: cover; }
.card__figure--product { aspect-ratio: 4/3; background: var(--c-paper-2); }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.card__excerpt { color: var(--c-muted); font-size: var(--step--1); }
.card--chapter .card__body { min-height: 120px; }
.card-grid { padding: 0; }

.link-more { text-decoration: underline; text-underline-offset: 4px; }

/* --- Collections row --------------------------------------------------- */
.collection-row {
  display: grid; gap: var(--gap-lg);
  grid-template-columns: 1fr;
  align-items: center; padding: 40px 0;
  border-top: 1px solid var(--c-border);
}
.collection-row:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
  .collection-row { grid-template-columns: 1fr 1fr; }
  .collection-row:nth-child(even) .collection-row__figure { order: 2; }
}
.collection-row__figure img { border-radius: var(--radius); }

/* --- Filters + chips --------------------------------------------------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; margin-bottom: 24px;
}
.filters__group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters__group--chips { flex: 1; }
.filters input[type="search"], .filters select {
  padding: 10px 14px; border: 1px solid var(--c-border); border-radius: var(--radius);
  background: #fff; font-size: var(--step-0); min-width: 220px;
}
.filters .btn { padding: 10px 18px; }
.chip {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--c-border); font-size: var(--step--1);
  background: #fff; color: var(--c-ink); text-decoration: none;
}
.chip.is-active { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.results-count { color: var(--c-muted); font-size: var(--step--1); margin: 6px 0 18px; }

/* --- Product detail ---------------------------------------------------- */
.product-detail { display: grid; gap: var(--gap-lg); grid-template-columns: 1fr; }
@media (min-width: 900px) { .product-detail { grid-template-columns: 1.1fr 1fr; } }
.product-detail__figure { background: var(--c-paper-2); border-radius: var(--radius); overflow: hidden; }
.spec-list { display: grid; grid-template-columns: 1fr 2fr; gap: 8px 20px; }
.spec-list dt { color: var(--c-muted); font-size: var(--step--1); }
.spec-list dd { margin: 0; font-weight: 500; }
.product-detail__note { color: var(--c-muted); margin-top: 20px; }
.placeholder--product { aspect-ratio: 4/3; background: repeating-linear-gradient(45deg, #efeae0 0 12px, #e6dfd1 12px 24px); }
.placeholder--large { min-height: 320px; }

/* --- Shopfinder -------------------------------------------------------- */
.shop-list { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .shop-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .shop-list { grid-template-columns: 1fr 1fr 1fr; } }
.shop-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; }
.shop-card__addr { color: var(--c-ink-2); margin: 8px 0 12px; }
.shop-card__meta { font-size: var(--step--1); color: var(--c-muted); }
.shop-card__meta a { color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; }

/* --- Notices ----------------------------------------------------------- */
.notice { border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; font-size: var(--step--1); }
.notice--info { background: #eaf1f6; border: 1px solid #cbdae4; color: #223a4a; }
.notice--demo { background: #fff5e6; border: 1px solid #f0d59a; color: #6b4d15; }
.notice--warn { background: #fbe4de; border: 1px solid #f0b7a8; color: #6a2313; }

/* --- Prose ------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--f-serif); font-size: var(--step-2); font-weight: 500; margin-top: 1.6em; }
.prose h3 { font-family: var(--f-serif); font-size: var(--step-1); font-weight: 500; margin-top: 1.2em; }
.prose p, .prose li { color: var(--c-ink-2); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* --- CTA band, contact ------------------------------------------------- */
.cta-band {
  background: var(--c-ink); color: var(--c-paper);
  padding: 40px; border-radius: var(--radius);
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 720px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band .btn--primary { background: var(--c-paper); color: var(--c-ink); border-color: var(--c-paper); }
.cta-band .btn--primary:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

.contact-grid { display: grid; gap: var(--gap-lg); grid-template-columns: 1fr; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

/* --- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--c-ink); color: var(--c-paper);
  padding: 48px 0;
  margin-top: 80px;
}
.site-footer__grid {
  display: grid; gap: var(--gap-lg);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__brand { font-family: var(--f-serif); font-size: var(--step-2); }
.site-footer__sub { color: rgba(245, 242, 236, 0.7); margin-top: 6px; }
.site-footer__nav ul { display: grid; gap: 8px; }
.site-footer__meta { color: rgba(245, 242, 236, 0.7); font-size: var(--step--1); }
.site-footer__meta a { text-decoration: underline; text-underline-offset: 3px; }

/* --- Article body ------------------------------------------------------ */
.article-body__hero { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }
.article-body__hero img { width: 100%; height: auto; }

.empty { color: var(--c-muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }

/* --- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
