/*
 * ============================================================
 *  brew&good. — BASE + COMPONENTS + HERO
 *  css/base.css   (load AFTER tokens.css)
 * ============================================================
 *  Reset · typography · .container · reused design-system
 *  components (wordmark, pill, mono-label, section-header) ·
 *  the §01 hero. Every value references a token in tokens.css.
 *
 *  Components are transcribed from brew-good-design-system-v2.html
 *  and must not be restyled. Missing components (band, card,
 *  input) are defined in the design system and get ported when
 *  a section that needs them is built.
 * ============================================================
 */

/* ── Reset ──────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  font-family: var(--font-body);
  color: var(--midnight);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ── Typography ─────────────────────────────────────────── */
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-4);
}
h2 em { font-style: italic; color: var(--cobalt); font-weight: 400; }

h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.018em;
  margin-bottom: var(--space-4);
}

/* ── Component: mono-label (eyebrow / § tag) ─────────────── */
.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.mono-label.on-dark { color: var(--yellow); }

/* ── Component: wordmark ─────────────────────────────────── */
.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--cobalt);          /* cobalt on cream by default */
  text-decoration: none;
  display: inline-block;
}
.wordmark em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
}

/* ── Component: pill (primary CTA) ──────────────────────────
   Flat design-system pill. No shadow variant.             */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 26px;
  border-radius: var(--radius-full);
  background: var(--yellow);
  color: var(--midnight);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  min-height: 44px;              /* WCAG 2.5.5 touch target */
}
.pill:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}
button.pill { border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }

/* ── Component: section-header (used by home stubs) ──────── */
.section-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt);
}

/* ============================================================
   §01 — HERO
   ------------------------------------------------------------
   One hero DOM, one <h1>. Mobile-first defaults reproduce the
   audited .hero-mobile behaviour verbatim (100dvh, column,
   text-top / CTA-bottom, 300px image, 12px radius). At ≥769px
   the same markup reflows into the new centred desktop layout
   where cobalt is an accent, not the whole field.
   Toggle breakpoint preserved at 768/769px.
   ============================================================ */

/* ── Mobile (default, ≤768px): preserved cobalt hero ─────── */
.hero {
  min-height: 100dvh;            /* min- (not fixed) to avoid clipping longer copy */
  display: flex;
  flex-direction: column;
  background: var(--cobalt);
  color: var(--cream);
}

/* Topline: wordmark left · stage label right */
.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 14px;       /* preserved raw values */
}
.hero__wordmark { color: var(--yellow); font-size: 25px; }

/* Image zone: fixed height, side padding, rounded all corners */
.hero__media {
  height: 300px;                 /* preserved */
  padding: 0 20px;               /* preserved */
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-image);
  background: var(--cream-deep);   /* shows while the image loads */
}

/* Body fills remaining height; text sits at the top */
.hero__body {
  flex: 1;
  padding: 22px 20px 0;          /* preserved side padding + top */
}
.hero__eyebrow { display: none; }   /* omitted on mobile (confirmed) */

.hero__headline {
  font-family: var(--font-display);
  font-weight: 500;
  /* Fluid so "Dein Kaffeemoment," fits on one line down to small phones */
  font-size: clamp(26px, 9vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--yellow);
}
/* First phrase must never break across lines */
.hero__line1 { white-space: nowrap; }
.hero__accent {
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
}
.hero__subline {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.3;
  color: var(--cream);
  padding-top: var(--space-3);
}

/* CTA pinned to the bottom */
.hero__cta {
  padding: 0 20px var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero__cta-primary { width: 100%; justify-content: center; padding: 14px; }
.hero__secondary {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--cream);
  opacity: 0.85;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero__secondary:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

/* ── Desktop (≥769px): centred column, cobalt as accent ────
   The whole hero fits in one viewport. Topline, headline and
   CTA are fixed-height; the image flexes to fill only the
   leftover space, so the CTA is always above the fold.      */
@media (min-width: 769px) {
  .hero {
    height: 100dvh;                       /* fill exactly, no overflow */
    background: var(--cream);
    color: var(--midnight);
    padding: var(--space-6) var(--container-pad);
  }

  /* Utility bar pinned at top: wordmark left, stage right */
  .hero__top { order: 1; flex: 0 0 auto; padding: 0; }
  .hero__wordmark { color: var(--cobalt); }

  /* Text block: fixed height, centred */
  .hero__body {
    order: 2;
    flex: 0 0 auto;
    max-width: 800px;             /* wide enough for "Dein Kaffeemoment," at 80px */
    margin: var(--space-7) auto 0;
    padding: 0;
    text-align: center;
  }
  .hero__eyebrow { display: inline-block; margin-bottom: var(--space-5); }

  .hero__headline {
    font-size: clamp(48px, 6vw, 80px);
    line-height: 0.94;
    letter-spacing: -0.04em;
    color: var(--midnight);
  }
  .hero__accent { color: var(--cobalt); }

  .hero__subline {
    color: var(--midnight);
    opacity: 0.72;
    font-size: 21px;
    padding-top: var(--space-4);
  }

  /* Image: consumes leftover vertical space, never forces scroll */
  .hero__media {
    order: 3;
    flex: 1 1 auto;
    min-height: 0;                        /* allow the image to shrink */
    height: auto;
    width: 100%;
    max-width: 900px;
    margin: var(--space-6) auto 0;
    padding: 0;
  }
  .hero__img { border-radius: var(--radius-lg); }

  /* CTA: fixed height, sits directly under the image */
  .hero__cta {
    order: 4;
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: var(--space-5);
    margin: var(--space-6) auto 0;
    padding: 0;
  }
  .hero__cta-primary { width: auto; padding: 14px 26px; }
  .hero__secondary {
    color: var(--cobalt);
    opacity: 1;
    font-size: 14px;
  }
}

/* ============================================================
   HOME SECTIONS §02–§08 + FOOTER
   New components ported from the design system (band, input)
   and task-sanctioned patterns (accordion, secondary buttons,
   footer). Token-driven throughout.
   ============================================================ */

/* Section rhythm */
.section { padding: var(--space-10) 0; border-top: 1px solid var(--line); }

/* Content aligned under the headline column (design-system pattern) */
.section-body { margin-left: 256px; max-width: 760px; }
.section-body > * + * { margin-top: var(--space-5); }

/* Body text */
.lead { font-size: 16px; line-height: 1.6; }
.note { font-size: 14px; opacity: 0.7; }
.statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.018em;
  line-height: 1.25;
}

/* ── §05 · Commitment-Ladder ─────────────────────────────── */
.tiers { display: flex; flex-direction: column; gap: var(--space-6); }
.tier {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-5);
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}
.tier:first-child { border-top: none; padding-top: 0; }
.tier__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.018em;
  margin-bottom: var(--space-2);
}
.tier__desc { font-size: 15px; line-height: 1.55; opacity: 0.8; }
.tier__desc + .tier__desc { margin-top: var(--space-2); }
.tier__note { font-size: 14px; margin-top: var(--space-3); }

/* Tier 3 — dark waitlist panel (reuses the design-system input verbatim) */
.tier--waitlist {
  grid-template-columns: 1fr;
  background: var(--midnight);
  color: var(--cream);
  border-top: none;
  border-radius: var(--radius-md);
  padding: var(--space-6);
  gap: var(--space-4);
}
.tier--waitlist .tier__desc { opacity: 0.78; }
.waitlist-form { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.waitlist-consent { font-size: 12px; opacity: 0.6; flex-basis: 100%; margin: 0; }
.waitlist-consent a { color: var(--yellow); }

/* Input — ported from the design system (dark surface only) */
.input {
  background: var(--input-bg);
  border: 1px solid var(--line-inv);
  color: var(--cream);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  min-height: 44px;
  flex: 1 1 240px;
}
.input::placeholder { color: var(--input-placeholder); }
.input:focus-visible { outline: none; border-color: var(--yellow); }

/* ── Secondary buttons (task decision 4) ──────────────────
   .pill is the single yellow accent. These are the non-yellow
   alternatives; they inherit .pill's shape + 44px min-height. */
.pill--ghost {
  background: transparent;
  border: 1px solid var(--cobalt);
  color: var(--cobalt);
}
.pill--ghost.on-dark { border-color: var(--cream); color: var(--cream); }

/* ── §06 · Nebenton (quiet lines) ────────────────────────── */
.nebenton { list-style: none; display: flex; flex-direction: column; gap: var(--space-4); }
.nebenton li {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.35;
  padding-left: var(--space-4);
  border-left: 2px solid var(--line);
}

/* ── §07 · FAQ accordion (native details/summary) ────────── */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  padding: var(--space-5) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 44px;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: '+'; font-family: var(--font-mono); color: var(--cobalt); }
.faq__item[open] .faq__q::after { content: '\2013'; }
.faq__q:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.faq__a { padding: 0 0 var(--space-5); font-size: 15px; line-height: 1.6; max-width: 640px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--midnight); color: var(--cream); padding: var(--space-9) 0 var(--space-6); }
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-6);
}
.site-footer .wordmark { color: var(--yellow); font-size: 40px; }
.footer__brand .wordmark { display: block; }
.footer__col { display: flex; flex-direction: column; gap: var(--space-1); }
.footer__link {
  color: var(--cream);
  text-decoration: none;
  opacity: 0.85;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__meta { margin-top: var(--space-4); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; line-height: 1.5; opacity: 0.65; max-width: 320px; }

/* ── Utilities ───────────────────────────────────────────── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hidden-field { display: none; }

/* ── Small-screen / responsive ───────────────────────────── */
@media (max-width: 900px) {
  .section-header { grid-template-columns: 1fr; gap: var(--space-4); }
  .section-body { margin-left: 0; }
}
@media (max-width: 600px) {
  .container { padding: 0 var(--container-pad-sm); }
  .tier { grid-template-columns: 1fr; align-items: start; }
  .footer__grid { flex-direction: column; }
}

/* ============================================================
   CONVERSION PAGES — /probe.html, /danke-probe.html
   Minimal header + legal-only footer (low exits). The form
   sits on a cobalt panel because the .input component is
   defined for dark surfaces only.
   ============================================================ */

/* Minimal header — wordmark only */
.site-header { padding: var(--space-5) 0; border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; }

/* Narrow conversion column */
.convert {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-9) var(--space-5) var(--space-10);
}
.convert__intro > * + * { margin-top: var(--space-4); }
.convert h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.convert__lead { font-size: 16px; line-height: 1.6; }
.convert--center { text-align: center; }
.convert--center > * + * { margin-top: var(--space-5); }
.convert__quiet {
  color: var(--cobalt);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  min-height: 44px;
}
.convert__quiet:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

/* Form panel — cobalt ground for the design-system input */
.form-panel {
  background: var(--cobalt);
  color: var(--cream);
  border-radius: var(--radius-md);
  padding: var(--space-7);
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.85;
}
/* Neutralise the .input row-flex when it is stacked in a .field column */
.field .input { flex: none; width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-4); }
.field-fixed {
  border: 1px solid var(--line-inv);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  min-height: 44px;
  color: var(--cream);
  opacity: 0.7;
}
.form-note { font-size: 12px; opacity: 0.7; }
.form-note a { color: var(--yellow); }
.form-panel .pill { width: 100%; justify-content: center; }

/* Minimal legal footer */
.legal-footer { border-top: 1px solid var(--line); padding: var(--space-6) 0; }
.legal-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  justify-content: center;
  align-items: center;
}
.legal-footer a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--midnight);
  opacity: 0.7;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.legal-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal-footer a:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ============================================================
   ORDER / DELIVERY STEP — /bestellung-probe.html
   Product descriptor, the cobalt delivery panel (reuses
   .form-panel) and the closing shop note.
   ============================================================ */
.descriptor { font-size: 15px; opacity: 0.7; }
/* Delivery step — reuses the cobalt .form-panel */
.delivery { margin-top: var(--space-9); scroll-margin-top: var(--space-6); }
.delivery__summary {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cream);
  opacity: 0.85;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line-inv);
}
.shop-note {
  margin-top: var(--space-6);
  font-size: 14px;
  opacity: 0.7;
  max-width: 640px;
}

/* ── Legal pages (impressum / datenschutz) ──────────────── */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-9) var(--space-5) var(--space-10);
}
.legal__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 var(--space-8);
}
.legal__section { margin-top: var(--space-7); }
.legal__section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 var(--space-3);
}
.legal__section h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: var(--space-6) 0 var(--space-3);
}
.legal__section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--midnight);
  margin: 0;
}
.legal__section p + p { margin-top: var(--space-4); }
.legal__section ul { margin: var(--space-3) 0 0; padding-left: var(--space-5); }
.legal__section li { font-size: 15px; line-height: 1.7; color: var(--midnight); }
.legal__section li + li { margin-top: var(--space-2); }
.legal__meta {
  margin: calc(-1 * var(--space-6)) 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--midnight);
  opacity: 0.65;
}
.legal a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }
.legal__stand {
  margin-top: var(--space-8);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt);
}

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