/* =========================================================
   FÓRNOVA — Design System / Base
   Editorial, warm, handwerklich. Kein AI-Slop.
   ========================================================= */

/* ---- Design Tokens ---- */
:root {
  /* Farbwelt */
  --paper:        #F4EEE1;  /* 00-Mehl Creme */
  --paper-deep:   #EAE0CD;  /* Panel / abgesetzte Fläche */
  --paper-warm:   #F8F3E9;
  --ink:          #211A15;  /* warmes Beinahe-Schwarz */
  --ink-soft:     #5C5147;  /* gedämpfter Fließtext */
  --ink-faint:    #8A7E72;
  --tomato:       #C13B2B;  /* San Marzano */
  --tomato-deep:  #9C2C1F;
  --basil:        #586E40;  /* Basilikum */
  --terracotta:   #C2724B;
  --gold:         #D8A33E;  /* Weizen / Akzent */
  --line:         rgba(33, 26, 21, 0.14);
  --line-soft:    rgba(33, 26, 21, 0.08);

  /* Typografie */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Maße */
  --container:    1180px;
  --container-narrow: 760px;
  --gap:          clamp(1.25rem, 3vw, 2.5rem);
  --section-y:    clamp(4.5rem, 10vw, 9rem);
  --radius:       4px;
  --radius-lg:    14px;

  /* Schatten */
  --shadow-soft:  0 1px 2px rgba(33,26,21,.05), 0 8px 30px rgba(33,26,21,.07);
  --shadow-card:  0 1px 2px rgba(33,26,21,.06), 0 20px 50px -20px rgba(33,26,21,.20);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--tomato); outline-offset: 3px; border-radius: 2px; }

/* ---- Papier-Korn (gegen flachen AI-Look) ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Typografie ---- */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 460;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}
.display {
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5.6rem);
  font-weight: 500;
}
h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem); font-weight: 500; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tomato);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--tomato);
  opacity: .8;
}
.lead {
  font-size: clamp(1.1rem, 1.02rem + 0.5vw, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 54ch;
}
.muted { color: var(--ink-soft); }
em, .accent-serif { font-family: var(--font-display); font-style: italic; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }
.container.narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); position: relative; }
.section--paper-deep { background: var(--paper-deep); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .lead, .section--ink .muted { color: rgba(244,238,225,.72); }
.section--ink .eyebrow { color: var(--gold); }
.section--ink .eyebrow::before { background: var(--gold); }

.grid { display: grid; gap: var(--gap); }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.stack > * + * { margin-top: 1.1rem; }
.section-head { max-width: 60ch; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section-head .stack > * + * { margin-top: 0.9rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius);
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
  will-change: transform;
}
.btn svg { width: 1em; height: 1em; }
.btn--primary { background: var(--tomato); color: var(--paper-warm); box-shadow: var(--shadow-soft); }
.btn--primary:hover { background: var(--tomato-deep); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.section--ink .btn--ghost { border-color: rgba(244,238,225,.3); color: var(--paper); }
.section--ink .btn--ghost:hover { border-color: var(--paper); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--tomato); border-bottom: 1px solid transparent; transition: gap .25s var(--ease), border-color .25s var(--ease); }
.link-arrow:hover { gap: .7rem; border-color: var(--tomato); }

/* ---- Cards & Tags ---- */
.card {
  background: var(--paper-warm);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  background: rgba(88,110,64,.12); color: var(--basil);
}
.tag--tomato { background: rgba(193,59,43,.1); color: var(--tomato-deep); }
.tag--gold { background: rgba(216,163,62,.16); color: #97701f; }

/* ---- Media-Platzhalter (echte Fotos hier ersetzen) ---- */
.media {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--paper-deep), #ddcfb4);
}
.media::after {
  content: attr(data-note);
  position: absolute; inset: auto 0 0 0;
  z-index: 2;                 /* Notiz bleibt über dem (Platzhalter-)Bild */
  font-size: .68rem; letter-spacing: .04em;
  padding: .5rem .75rem; background: rgba(33,26,21,.72); color: var(--paper);
  font-weight: 500;
}
/* Temporäres Stock-Bild (per JS aus data-note gesetzt) — später durch echte Fotos ersetzen */
.media__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.media:has(.media__img) .media__icon { display: none; }
.media__icon { position: absolute; inset: 0; display: grid; place-items: center; opacity: .35; z-index: 1; }
.media__icon svg { width: clamp(48px, 12vw, 84px); height: auto; }
.media.ratio-1 { aspect-ratio: 1 / 1; }
.media.ratio-43 { aspect-ratio: 4 / 3; }
.media.ratio-32 { aspect-ratio: 3 / 2; }
.media.ratio-916 { aspect-ratio: 9 / 16; }
.media.ratio-tall { aspect-ratio: 3 / 4; }

/* ---- Scroll-Reveal ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* ---- Divider / Detail ---- */
.rule { height: 1px; background: var(--line); border: 0; }
.kicker-num { font-family: var(--font-display); font-style: italic; color: var(--tomato); font-size: 1.1rem; }

/* ---- Utilities ---- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.flow-buttons { display: flex; flex-wrap: wrap; gap: .9rem; }
.full-bleed { width: 100%; }
.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; }
