/* ===========================================================
   Welserberg Bräu — Landingpage
   Fonts: Boska (Display) + General Sans (Body) — Fontshare
   =========================================================== */

/* ---------- Design Tokens ---------- */
:root,
[data-theme='light'] {
  /* Surfaces — warm cream, malt tones */
  --color-bg: #fbf3e7;
  --color-surface: #ffffff;
  --color-surface-offset: #f3e6d0;
  --color-divider: #e6d5b8;
  --color-border: #ddc7a0;

  /* Text — dark malt brown */
  --color-text: #2b1b10;
  --color-text-muted: #6b5643;
  --color-text-faint: #a8967d;
  --color-text-inverse: #fbf3e7;

  /* Primary accent — copper amber */
  --color-primary: #c1682b;
  --color-primary-hover: #9c4f1e;
  --color-primary-active: #7a3d17;
  --color-primary-highlight: #f0d9bc;

  /* Secondary accent — hop green (sparingly) */
  --color-hop: #5c7a3b;

  /* Beer glass fills */
  --beer-hell: #eebd4a;
  --beer-ipa: #d9822b;
  --beer-bock: #5a2c14;

  --radius-sm: 0.4rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(43, 27, 16, 0.08);
  --shadow-md: 0 8px 24px rgba(43, 27, 16, 0.1);
  --shadow-lg: 0 20px 48px rgba(43, 27, 16, 0.16);

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Boska', 'Georgia', serif;
  --font-body: 'General Sans', 'Segoe UI', sans-serif;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.4rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --text-2xl: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
  --text-hero: clamp(2.75rem, 1.6rem + 4vw, 4.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

[data-theme='dark'] {
  --color-bg: #1a120b;
  --color-surface: #241a10;
  --color-surface-offset: #2e2013;
  --color-divider: #3a2917;
  --color-border: #4a3520;

  --color-text: #f0e4d3;
  --color-text-muted: #b6a48c;
  --color-text-faint: #7c6c58;
  --color-text-inverse: #1a120b;

  --color-primary: #e0975a;
  --color-primary-hover: #f0ae7a;
  --color-primary-active: #f6c191;
  --color-primary-highlight: #4a3520;

  --color-hop: #8fae66;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, picture, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-wrap: balance;
  line-height: 1.12;
  font-weight: 600;
}

p, li {
  text-wrap: pretty;
  max-width: 68ch;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-interactive), background var(--transition-interactive), border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  transition: color var(--transition-interactive), background var(--transition-interactive), border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: color-mix(in oklab, var(--color-primary) 30%, transparent);
  color: var(--color-text);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Eyebrow / section titles ---------- */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
}

.section__intro {
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-12);
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.section--offset {
  background: var(--color-surface-offset);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-md); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.22); border-color: #fff; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
}
.header--scrolled { border-color: var(--color-divider); box-shadow: var(--shadow-sm); }
.header--hidden { transform: translateY(-100%); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}
.brand__mark { color: var(--color-primary); flex-shrink: 0; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
}

.nav {
  display: flex;
  gap: var(--space-8);
}
.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}
.nav a:hover { color: var(--color-primary); }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.theme-toggle, .nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  color: var(--color-text);
}
.theme-toggle:hover, .nav-toggle:hover { background: var(--color-surface-offset); }
.nav-toggle { display: none; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  padding: 0 var(--space-6) var(--space-4);
}
.mobile-nav a {
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  font-weight: 500;
  border-top: 1px solid var(--color-divider);
}
.mobile-nav.is-open { display: flex; }

@media (max-width: 780px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 12, 6, 0.35) 0%, rgba(20, 12, 6, 0.55) 55%, rgba(20, 12, 6, 0.88) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding-block: clamp(var(--space-16), 10vw, var(--space-32)) var(--space-16);
  max-width: 760px;
}
.hero .eyebrow { color: #f0c896; }
.hero__title {
  font-size: var(--text-hero);
  margin-bottom: var(--space-5);
}
.hero__lede {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.88);
  max-width: 52ch;
  margin-bottom: var(--space-8);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ---------- Beer cards ---------- */
.beer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-8);
}

.beer-grid--two {
  max-width: 860px;
  margin-inline: auto;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.beer-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.beer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.beer-card__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}
.beer-card__badge--current {
  background: var(--color-primary-highlight);
  color: var(--color-primary-hover);
}
.beer-card__badge--upcoming {
  background: transparent;
  color: var(--color-text-muted);
  border: 1.5px dashed var(--color-border);
}
.beer-card--current {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.beer-card--upcoming { opacity: 0.92; }

.beer-card__glass { color: var(--color-text-faint); margin-bottom: var(--space-4); }
.beer-card__style {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-hop);
  margin-bottom: var(--space-2);
}
.beer-card__name {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.beer-card__desc {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}
.beer-card__stats {
  display: flex;
  gap: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-divider);
  flex-wrap: wrap;
}
.beer-card__stats dt {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}
.beer-card__stats dd {
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ---------- Galerie ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-5);
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  margin: 0;
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-3) var(--space-4);
  padding-top: var(--space-8);
  background: linear-gradient(to top, rgba(20, 12, 6, 0.82), rgba(20, 12, 6, 0));
  color: #f6ead9;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.3;
}

/* ---------- Divider image ---------- */
.divider {
  width: 100%;
  height: clamp(220px, 32vw, 420px);
  overflow: hidden;
}
.divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Story ---------- */
.story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-16);
  align-items: center;
}
.story__text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.story__text p:last-child { margin-bottom: 0; }
.story__text em { color: var(--color-primary); font-style: normal; font-weight: 600; }
.story__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; gap: var(--space-8); }
  .story__media { order: -1; }
}

/* ---------- Contact / QR ---------- */
.contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-16);
  align-items: center;
}
.contact__text p { color: var(--color-text-muted); margin-bottom: var(--space-6); }
.contact__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.contact__list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.contact__list svg { color: var(--color-primary); flex-shrink: 0; }
.contact__list a:hover { color: var(--color-primary); }

.contact__qr { display: flex; justify-content: center; }
.qr-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 320px;
}
.qr-card__code {
  margin-inline: auto;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: var(--space-2);
}
.qr-card__caption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; gap: var(--space-10); }
}

/* ---------- Footer ---------- */
.footer {
  background: #1a120b;
  color: #d8c7b3;
  padding-block: var(--space-12);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  color: #f0e4d3;
}
.footer__legal {
  font-size: var(--text-xs);
  color: #a8916f;
  max-width: 60ch;
}
.footer__nav {
  display: flex;
  gap: var(--space-6);
  font-size: var(--text-xs);
}
.footer__nav a:hover { color: #f0e4d3; }
