/* ============================================================
   Café Jedermann — Design System
   „Goldene Stunde im Caféhaus": warm · edel · gemütlich · cinematic
   ============================================================ */

@import url('fonts.css');

:root {
  /* Palette */
  --cream: #F6EFE2;
  --cream-deep: #ECE0CB;
  --paper: #FBF7EF;
  --espresso: #241C16;
  --espresso-soft: #4A3D32;
  --green: #2E5A40;
  --green-deep: #1C3A2A;
  --gold: #C68A3E;
  --gold-light: #E1B468;
  --cherry: #9B2D3A;
  --line: #D8CBB4;
  --line-dark: rgba(246,239,226,0.16);

  /* Type */
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --script: 'Caveat', cursive;

  /* Rhythm */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-y: clamp(4.5rem, 11vw, 9.5rem);
  --radius: 3px;

  --shadow-soft: 0 22px 60px -28px rgba(36,28,22,0.55);
  --shadow-frame: 0 30px 80px -30px rgba(36,28,22,0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.65;
  font-size: clamp(1rem, 0.5vw + 0.95rem, 1.0625rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Subtle warm paper grain over the whole page */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  font-optical-sizing: auto;
}
.display {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 400; }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 500; }
p { margin: 0 0 1.1rem; max-width: 62ch; }
em, .ital { font-style: italic; }

.micro {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
}
.micro--gold { color: var(--gold); }
.script {
  font-family: var(--script);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
  color: var(--cherry);
}
.lead { font-size: clamp(1.1rem, 1.3vw, 1.3rem); color: var(--espresso-soft); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; z-index: 2; padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 7vw, 6rem); }

.section--dark { background: var(--green-deep); color: var(--cream); }
.section--dark .micro { color: var(--gold-light); }
.section--dark p { color: rgba(246,239,226,0.78); }
.section--espresso { background: var(--espresso); color: var(--cream); }
.section--espresso p { color: rgba(246,239,226,0.78); }

/* Section header with editorial numbering */
.sec-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); flex-wrap: wrap; }
.sec-head .num {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: 1.1rem; color: var(--gold);
}
.sec-head .rule { flex: 1; height: 1px; background: var(--line); align-self: center; min-width: 40px; }
.section--dark .sec-head .rule { background: var(--line-dark); }

/* ---------- Framed image ---------- */
.frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-frame); }
.frame::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(246,239,226,0.45);
  border-radius: var(--radius); pointer-events: none;
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.frame:hover img { transform: scale(1.04); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; border: 1px solid transparent; transition: all 0.4s var(--ease);
}
.btn--solid { background: var(--green); color: var(--cream); }
.btn--solid:hover { background: var(--green-deep); transform: translateY(-2px); }
.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }
.section--dark .btn--solid { background: var(--gold); color: var(--espresso); }
.section--dark .btn--solid:hover { background: var(--gold-light); }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  color: var(--cream);
  transition: background 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.nav__brand { display: flex; flex-direction: column; line-height: 1; }
.nav__brand-name { font-family: var(--display); font-size: 1.4rem; font-weight: 400; letter-spacing: -0.01em; }
.nav__brand-sub { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.8; margin-top: 4px; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.nav__links > a { font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em; position: relative; opacity: 0.92; }
.nav__links > a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1px; background: var(--gold); transition: width 0.4s var(--ease); }
.nav__links > a:hover { opacity: 1; }
.nav__links > a:hover::after { width: 100%; }
.nav__social { display: flex; gap: 0.7rem; padding-left: 0.4rem; border-left: 1px solid currentColor; }
.nav__social a { opacity: 0.85; transition: opacity 0.3s, color 0.3s; }
.nav__social a:hover { opacity: 1; color: var(--gold); }
.nav.scrolled {
  background: rgba(251,247,239,0.92); backdrop-filter: saturate(160%) blur(12px);
  color: var(--espresso); box-shadow: 0 1px 0 var(--line), 0 14px 40px -28px rgba(36,28,22,0.5);
}
.nav.scrolled .nav__links > a:hover { color: var(--green); }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 34px; padding: 7px; }
.nav__burger span { display: block; height: 1.6px; background: currentColor; margin: 5px 0; transition: transform 0.4s var(--ease), opacity 0.3s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-6.6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 640px; height: 100svh; display: flex; align-items: flex-end; overflow: hidden; z-index: 2; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); animation: heroZoom 16s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__overlay { position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28,22,16,0.34) 0%, rgba(28,22,16,0) 32%),
    linear-gradient(90deg, rgba(20,15,11,0.52) 0%, rgba(20,15,11,0.12) 42%, rgba(20,15,11,0) 62%),
    linear-gradient(0deg, rgba(20,15,11,0.82) 0%, rgba(20,15,11,0.14) 48%, rgba(20,15,11,0) 72%);
}
.hero__content { position: relative; z-index: 3; padding-bottom: clamp(3.5rem, 9vh, 7rem); color: var(--cream); }
.hero__eyebrow { margin-bottom: 1.1rem; }
.hero__title { color: var(--cream); text-shadow: 0 2px 40px rgba(0,0,0,0.3); margin-bottom: 0.4rem; }
.hero__tagline { font-family: var(--display); font-weight: 300; font-size: clamp(1.25rem, 2.4vw, 1.9rem); line-height: 1.3; color: rgba(246,239,226,0.94); max-width: 36ch; margin: 0 0 2rem; }
.hero__tagline em { color: var(--gold-light); font-style: italic; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__scroll { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 3; width: 26px; height: 42px; border: 1.5px solid rgba(246,239,226,0.55); border-radius: 14px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; background: var(--cream); border-radius: 2px; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0);} 35% { opacity: 1;} 70% { opacity: 0; transform: translateY(12px);} 100% { opacity: 0; } }

/* ---------- Intro ---------- */
.intro { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.intro__note { font-size: 0.85rem; color: var(--espresso-soft); margin-top: -0.4rem; }
.intro__img { aspect-ratio: 4/5; }
.intro .script { margin-top: 2rem; margin-bottom: 0.3rem; }

/* ---------- Torten ---------- */
.torten__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(1.8rem, 3.5vw, 3rem); flex-wrap: wrap; }
.torten__head .lead { max-width: 34ch; margin: 0; }
.torten__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.9rem, 1.5vw, 1.5rem); }
.torte { position: relative; aspect-ratio: 4/5; margin: 0; }
.torte img { width: 100%; height: 100%; object-fit: cover; }
.torte figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4rem 1.3rem 1.2rem; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(0deg, rgba(20,15,11,0.82) 0%, rgba(20,15,11,0) 100%); color: var(--cream); }
.torte__name { font-family: var(--display); font-size: 1.25rem; }
.torte__desc { font-size: 0.78rem; letter-spacing: 0.04em; color: rgba(246,239,226,0.82); }
.torten__more { text-align: center; margin: clamp(2rem,4vw,3rem) auto 0; max-width: 60ch; color: var(--espresso-soft); }
.torten__more strong { color: var(--green); font-weight: 600; }

/* ---------- Karte (dark) ---------- */
.karte__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(2.4rem,4vw,3.6rem); flex-wrap: wrap; }
.karte__head h2 { color: var(--cream); }
.karte__head .lead { color: rgba(246,239,226,0.8); max-width: 36ch; margin: 0; }
.karte__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.6rem, 3vw, 3rem) clamp(2rem,4vw,4rem); }
.karte__col h3 { color: var(--gold-light); font-size: 1.15rem; margin-bottom: 1rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line-dark); }
.karte__col ul { list-style: none; margin: 0; padding: 0; }
.karte__col li { padding: 0.28rem 0; color: rgba(246,239,226,0.84); font-size: 0.95rem; }
.karte__hint { font-size: 0.78rem; font-style: italic; color: var(--gold); margin-top: 0.9rem; }

/* ---------- Biergarten ---------- */
.biergarten__grid { display: grid; grid-template-columns: 1.25fr 0.9fr; gap: clamp(1.5rem,4vw,3.5rem); align-items: center; }
.biergarten__main { aspect-ratio: 4/3; }
.biergarten__text h2 { margin-bottom: 1.2rem; }
.biergarten__text p { margin-bottom: 1.6rem; }
.biergarten__text strong { color: var(--green); }
.biergarten__small { aspect-ratio: 16/10; }

/* ---------- Finde uns (espresso) ---------- */
.finde__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem,5vw,4.5rem); align-items: center; }
.finde__info h2 { color: var(--cream); margin-bottom: 1.1rem; }
.finde__address { font-style: normal; font-family: var(--display); font-size: 1.3rem; line-height: 1.55; color: var(--cream); margin: 1.4rem 0 1rem; }
.finde__address strong { font-weight: 500; }
.finde__phone { display: inline-block; font-size: 1.5rem; color: var(--gold-light); letter-spacing: 0.02em; margin-bottom: 1.2rem; transition: color 0.3s; }
.finde__phone:hover { color: var(--gold); }
.finde__hint { font-style: italic; color: rgba(246,239,226,0.7); margin-bottom: 1.8rem; }
.finde__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.finde__map { aspect-ratio: 4/3; min-height: 340px; position: relative; background: var(--green-deep); }
.finde__map-fallback { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 1.2rem; color: rgba(246,239,226,0.5); font-size: 0.9rem; letter-spacing: 0.03em; }
.finde__map iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; filter: saturate(0.9) contrast(1.02); }

/* ---------- Footer ---------- */
.footer { background: var(--green-deep); color: var(--cream); position: relative; z-index: 2; padding-top: clamp(2.5rem,5vw,3.5rem); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.8rem; }
.footer__brand { display: flex; flex-direction: column; }
.footer__name { font-family: var(--display); font-size: 1.5rem; }
.footer__tag { font-size: 0.8rem; color: rgba(246,239,226,0.7); margin-top: 2px; }
.footer__links { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.footer__links a { font-size: 0.85rem; opacity: 0.85; }
.footer__links a:hover { opacity: 1; color: var(--gold-light); }
.footer__social { display: flex; gap: 0.9rem; }
.footer__social a { opacity: 0.8; transition: opacity 0.3s, color 0.3s; }
.footer__social a:hover { opacity: 1; color: var(--gold-light); }
.footer__legal { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.2rem; border-top: 1px solid var(--line-dark); font-size: 0.76rem; color: rgba(246,239,226,0.6); }
.footer__legal a:hover { color: var(--gold-light); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .nav__links { position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); flex-direction: column; align-items: flex-start;
    justify-content: center; gap: 1.6rem; padding: 2rem 2.2rem; background: var(--green-deep); color: var(--cream);
    transform: translateX(100%); transition: transform 0.5s var(--ease); box-shadow: var(--shadow-soft); }
  .nav__links.open { transform: translateX(0); }
  .nav__links > a { font-size: 1.15rem; }
  .nav__social { border-left: 0; padding-left: 0; margin-top: 1rem; }
  .nav__burger { display: block; z-index: 60; }
  .nav.scrolled .nav__burger, .nav__burger { color: inherit; }
  .nav__links.open ~ .nav__burger, .nav__burger[aria-expanded="true"] { color: var(--cream); position: fixed; right: var(--gutter); }
  .intro, .biergarten__grid, .finde__grid { grid-template-columns: 1fr; }
  .biergarten__text { order: -1; }
  .karte__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .torten__grid { grid-template-columns: 1fr; }
  .torte { aspect-ratio: 3/2; }
  .karte__cols { grid-template-columns: 1fr; }
  .torten__head, .karte__head { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .hero__actions .btn, .finde__actions .btn { padding: 0.85rem 1.3rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
