/* ==========================================================================
   Cologne Trading House — Stylesheet
   Werte nach design.md. Keine Frameworks, kein Buildschritt.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #0b0b0c;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;
  --hairline: #d2d2d7;

  --s1: 4px;  --s2: 8px;   --s3: 12px;  --s4: 16px;  --s5: 24px;
  --s6: 32px; --s7: 48px;  --s8: 64px;  --s9: 96px;  --s10: 128px;

  --container: 1024px;
  --container-wide: 1280px;
  --gutter: clamp(1.5rem, 5vw, 2.5rem);

  --radius-card: 12px;
  --radius-pill: 980px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur: 240ms;

  --header-h: 80px;
}

/* --------------------------------------------------------------- Reset -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s5));
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;      /* 17px */
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------------- Typografie -- */

.display {
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h3 {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lead {
  font-size: clamp(1.1875rem, 1.6vw, 1.5rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  max-width: 34ch;
  text-wrap: pretty;
}

.body { max-width: 65ch; text-wrap: pretty; }
.small { font-size: 0.875rem; line-height: 1.5; letter-spacing: -0.005em; }
.micro { font-size: 0.75rem; font-weight: 500; line-height: 1.4; letter-spacing: 0; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.muted { color: var(--ink-2); }

/* --------------------------------------------------------------- Layout -- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }

.section { padding-block: clamp(5rem, 10vw, 10rem); }
.section--tint { background: var(--surface-2); }
.section--dark { background: var(--surface-3); color: var(--on-dark); }
.section--dark .lead,
.section--dark .muted { color: var(--on-dark-2); }
.section--tight { padding-block: clamp(3.5rem, 7vw, 6rem); }

.stack > * + * { margin-top: var(--s5); }
.stack-lg > * + * { margin-top: var(--s7); }

.center { text-align: center; }
.center .lead, .center .body { margin-inline: auto; }

/* --------------------------------------------------------------- Header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: rgba(0, 0, 0, 0.08); }

.site-header .container {
  max-width: var(--container-wide);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
}

.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; }

.nav { display: flex; align-items: center; gap: var(--s5); }
.nav a {
  font-size: 0.8125rem;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity var(--dur) var(--ease);
}
.nav a:hover { opacity: 1; }

/* ----------------------------------------------------------------- Hero -- */

.hero {
  padding-block: clamp(6rem, 14vw, 12rem) clamp(5rem, 10vw, 9rem);
  text-align: center;
}
.hero .display { margin-inline: auto; max-width: 16ch; }
.hero .lead { margin-inline: auto; margin-top: var(--s5); }
.hero .eyebrow { margin-bottom: var(--s5); }

/* --------------------------------------------------------------- Raster -- */

.grid {
  display: grid;
  gap: var(--s7) var(--s5);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.trait .h3 { margin-bottom: var(--s3); }
.trait p { color: var(--ink-2); font-size: 1rem; }

/* ---------------------------------------------------------------- Shops -- */

.shops { display: grid; gap: var(--s6); }
@media (min-width: 800px) { .shops { grid-template-columns: 1fr 1fr; } }

.shop {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

/* Ueber die Hoehe skalieren, nicht ueber die Breite — die beiden Logos haben
   sehr unterschiedliche Seitenverhaeltnisse und wirkten sonst ungleich schwer. */
.shop__logo { display: flex; align-items: center; min-height: 56px; }
.shop__logo img { width: auto; }
.shop__logo img[data-shop="kos"] { height: 34px; }
.shop__logo img[data-shop="gfm"] { height: 46px; }

.shop p { color: var(--ink-2); font-size: 1rem; margin: 0; }
.shop__link {
  margin-top: auto;
  font-size: 0.9375rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  align-self: flex-start;
}
.shop__link span { text-decoration: underline; text-underline-offset: 0.2em; }
.shop__link svg { transition: transform var(--dur) var(--ease); }
.shop__link:hover svg { transform: translateX(3px); }

/* -------------------------------------------------------------- Buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 12px 24px;
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              opacity var(--dur) var(--ease);
  font-family: inherit;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #000; }
.btn--secondary { background: var(--surface-2); color: var(--ink); }
.btn--secondary:hover { background: #ebebef; }
.btn--block { width: 100%; }

.link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* --------------------------------------------------------------- Footer -- */

.site-footer {
  background: var(--surface-3);
  padding-block: var(--s7);
  font-size: 0.75rem;
  color: var(--on-dark-2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer .container {
  max-width: var(--container-wide);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s5); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* ------------------------------------------------------------- Bewegung -- */

/* Inhalt ist grundsaetzlich sichtbar. Erst wenn JavaScript laeuft (Klasse .js
   auf <html>), wird ausgeblendet und eingeblendet. Ohne JS bleibt die Seite
   vollstaendig lesbar. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Fliesstext in Lead-Groesse, aber in Primaerfarbe — fuer den Über-uns-Text,
   der Hauptinhalt und nicht Beiwerk ist. */
.lead--strong { color: var(--ink); }

/* ==================================================== Visitenkarten-Seite == */
/* Zielgeraet ist das Handy direkt nach dem QR-Scan. Deshalb: eine Spalte,
   grosse Tap-Flaechen, alles Wichtige ohne Scrollen erreichbar.
   E-Mail-, Telefon- und Faxwert sind Bilder (siehe build_cards.py). */

.karte-seite { background: var(--surface-2); }

.karte {
  max-width: 420px;
  margin-inline: auto;
  padding: clamp(2.5rem, 9vw, 4.5rem) 20px var(--s8);
}

.karte__logo {
  width: 168px;
  height: auto;
  margin: 0 auto clamp(2.5rem, 8vw, 3.5rem);
}

.karte__name {
  font-size: clamp(1.75rem, 7vw, 2.125rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.karte__rolle {
  margin-top: var(--s2);
  color: var(--ink-2);
  font-size: 1rem;
  text-wrap: pretty;
}
.karte__zusatz {
  margin-top: var(--s1);
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* Bezeichnung ueber dem Wert, nicht daneben: die Werte sind Bilder fester
   Groesse — in einer zweiten Spalte wuerde die laengste Zeile (die E-Mail)
   herunterskaliert und damit kleiner erscheinen als die uebrigen. */
.karte__daten {
  margin: clamp(2rem, 7vw, 2.5rem) 0 0;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px;
}
.karte__daten dt {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.karte__daten dd {
  margin: 2px 0 0;
  font-size: 1rem;
}
.karte__daten dd + dt { margin-top: var(--s5); }

/* Wert-Zeilen: das Bild sitzt in einer Flaeche, die auf dem Handy sicher
   getroffen wird (mind. 44px), ohne dass die Zeilen auseinanderfallen. */
.karte__wert {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: -6px -8px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease);
}
a.karte__wert:hover { background: var(--surface-2); }
a.karte__wert:active { background: #e8e8ed; }
.karte__wert img { display: block; }

.karte__aktion { margin-top: var(--s6); }
.karte__aktion .btn { padding-block: 15px; }
/* Solange JavaScript den Link nicht scharf geschaltet hat, nicht anklickbar. */
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.karte__fuss {
  margin-top: var(--s7);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.karte__fuss a { color: inherit; }

/* ============================================================ Textseiten == */

.seitenkopf {
  padding-block: clamp(3.5rem, 9vw, 6rem) clamp(2rem, 4vw, 3rem);
}
.seitenkopf .h2 { margin-top: var(--s3); }

.prose { max-width: 68ch; padding-bottom: clamp(4rem, 9vw, 7rem); }
.prose > * + * { margin-top: var(--s4); }
.prose h2 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-top: var(--s8);
}
.prose h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--s6);
}
.prose h2 + p, .prose h3 + p { margin-top: var(--s3); }
.prose a { text-decoration: underline; text-underline-offset: 0.2em; }
.prose ul { list-style: disc; padding-left: 1.25em; }
.prose li + li { margin-top: var(--s2); }
.prose address { font-style: normal; }
.prose .small { color: var(--ink-2); }

/* --------------------------------------------------------- Kontaktformular */

.formular { display: grid; gap: var(--s5); max-width: 34rem; }
.feld { display: grid; gap: var(--s2); }
.feld label { font-size: 0.875rem; color: var(--ink-2); }

.feld input, .feld textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 11px 14px;
  width: 100%;
  transition: border-color var(--dur) var(--ease);
}
.feld input:focus, .feld textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.08);
}
.feld textarea { min-height: 9rem; resize: vertical; }
.feld[data-fehler] input, .feld[data-fehler] textarea { border-color: #b3261e; }
.feld__fehler { font-size: 0.8125rem; color: #b3261e; }

/* Honigtopf — fuer Menschen unsichtbar, fuer viele Bots verlockend. */
.honig {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.formular__hinweis { font-size: 0.8125rem; color: var(--ink-2); }
.meldung {
  border-radius: var(--radius-card);
  padding: var(--s4) var(--s5);
  font-size: 0.9375rem;
}
.meldung--ok { background: var(--surface-2); }
.meldung--fehler { background: #fdecea; color: #8c1d18; }

/* Auf Textseiten darf der Einleitungssatz breiter laufen als im Hero. */
.seitenkopf .lead { max-width: 46ch; }


/* Auf schmalen Geräten passen Logo und drei Links nicht nebeneinander — die
   Navigation brach um und schob sich ins Logo. Dort bleibt nur "Kontakt"
   stehen; "Über uns" und "Onlineshops" stehen ohnehin direkt darunter. */
.nav a { white-space: nowrap; }

@media (max-width: 640px) {
  .brand img { height: 34px; }
  .nav a:not([data-immer]) { display: none; }
}

/* ================================================================= Hero ==
   Vollflaechiges Koeln-Panorama hinter der Schrift.

   Die Schrift steht links, weil das Bild dort mit Abstand am dunkelsten ist
   (gemessen: 129 gegenueber 173 auf der Sonnenseite). Dadurch reicht ein
   Verlauf von links statt einer flaechigen Abdunkelung — das Foto behaelt
   seine Farbe und die Sonne bleibt der Blickfang. */

.hero--bild {
  position: relative;
  isolation: isolate;
  /* Unter die Kopfzeile ziehen, damit das Bild wirklich oben beginnt.
     Die Kopfzeile steht im Fluss und wuerde sonst einen weissen Streifen
     ueber dem Foto lassen — mit weissem Logo darauf unsichtbar. */
  margin-top: calc(var(--header-h) * -1);
  display: flex;
  align-items: flex-end;
  min-height: clamp(30rem, 82vh, 46rem);
  padding-block: clamp(7rem, 14vw, 9rem) clamp(3rem, 7vw, 5rem);
  text-align: left;
  color: #fff;
}

.hero__bild {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 70%: schiebt die Domsilhouette links neben den Text und die Sonne rechts
     daneben — bei jeder anderen Position liegt der Dom hinter der Headline
     (nachgerechnet: er landet sonst zwischen 197 und 609 px, der Text laeuft
     von 248 bis 808). */
  object-position: 70% 60%;
  background: var(--surface-3);
}

.hero--bild::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.58) 24%,
      rgba(0, 0, 0, 0.34) 46%,
      rgba(0, 0, 0, 0.06) 66%,
      rgba(0, 0, 0, 0) 100%),
    linear-gradient(to bottom,
      rgba(0, 0, 0, 0.42) 0%,
      rgba(0, 0, 0, 0) 26%);
}

.hero--bild .display {
  margin-inline: 0;
  max-width: 15ch;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}
.hero--bild .lead {
  margin-inline: 0;
  max-width: 38ch;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}
.hero--bild .eyebrow { color: rgba(255, 255, 255, 0.7); }

/* Schmale Geraete: das Panorama wird stark beschnitten. Der Dom bleibt im
   Bild, und der Verlauf laeuft von unten statt von links. */
@media (max-width: 720px) {
  .hero--bild { min-height: clamp(26rem, 72vh, 33rem); }

  /* Ein 390px breites Fenster schneidet aus dem Panorama nur rund ein Viertel
     der Breite heraus. Der Ausschnitt haelt deshalb den Dom im Bild — er ist
     das eindeutige Kölnzeichen. Die Sonne liegt dafuer ausserhalb; mit dem
     eingebrannten Logo im Original laesst sich beides nicht gleichzeitig
     zeigen (siehe README). */
  .hero__bild { object-position: 36% 66%; }

  .hero--bild::after {
    background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.46) 0%,
      rgba(0, 0, 0, 0.12) 28%,
      rgba(0, 0, 0, 0.34) 56%,
      rgba(0, 0, 0, 0.68) 82%,
      rgba(0, 0, 0, 0.78) 100%);
  }
  .hero--bild .display { max-width: none; }
  .hero--bild .lead { max-width: none; }
}

/* Kopfzeile liegt oben auf dem Bild und wird erst beim Scrollen wieder hell. */
.site-header--auf-bild[data-scrolled="false"] {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header--auf-bild[data-scrolled="false"] .nav a { color: #fff; opacity: 0.92; }
.site-header--auf-bild[data-scrolled="false"] .brand img {
  filter: brightness(0) invert(1);
}

/* Weisse Logofassung im dunklen Footer. */
.site-footer__marke { display: grid; gap: var(--s3); }
.site-footer__logo { width: 172px; height: auto; opacity: 0.92; }
.site-footer__marke p { margin: 0; }

@media (max-width: 640px) {
  .site-footer__logo { width: 148px; }
}
