/* ============================================================
   WALLERI'S HAUSBRÄU — layout.css
   Grid, Header, Footer, Sections
   ============================================================ */

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--xl  { max-width: var(--container-xl); }

/* ---- Section Base ---- */
.section {
  padding: var(--section-pad-y) 0;
}

.section--lg {
  padding: 7rem 0;
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

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

/* ---- Split Layout (50/50) ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.split__visual {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.split__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.split__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
}

.split--reverse .split__visual {
  order: 2;
}
.split--reverse .split__content {
  order: 1;
}

/* ---- Grid Layouts ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* ---- Header / Navigation ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--color-white);
  box-shadow: 0 1px 0 rgba(0,0,0,0.07);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  padding: 0 1.5rem;
  max-width: var(--container-xl);
  margin: 0 auto;
}

/* Logo */
.site-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  height: 60px;
  width: auto;
  max-width: 270px;
  display: block;
  object-fit: contain;
}

/* Active nav indicator */
.nav-left {
  justify-content: flex-start;
}

.nav-right {
  justify-content: flex-end;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  font-family: var(--font-headline);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-dark);
  padding: 0.5rem 0.75rem;
  position: relative;
  white-space: nowrap;
  transition: color var(--transition);
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background-color: var(--color-gold);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: center;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-gold);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__toggle {
  cursor: pointer;
  user-select: none;
}

.nav-dropdown__toggle::before {
  content: '▾';
  margin-left: 4px;
  font-size: 0.65em;
  vertical-align: middle;
}

.nav-dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--color-white);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-top: 2px solid var(--color-gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown__menu:focus-within {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown__menu a {
  display: block;
  padding: 0.65rem 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #f0f0f0;
  color: var(--color-dark);
}

.nav-dropdown__menu a::after {
  display: none;
}

.nav-dropdown__menu a:hover {
  background: var(--color-light);
  color: var(--color-gold);
}

/* Facebook icon in nav */
.nav-fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--color-dark);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.nav-fb svg {
  width: 24px;
  height: 24px;
}

.nav-fb:hover {
  color: #1877f2;
}

.nav-fb::after {
  display: none !important;
}

/* Mobile Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  margin-left: auto;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  transition: transform var(--transition), opacity var(--transition);
  display: block;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  z-index: 999;
  padding: 2rem 1.5rem;
  overflow-y: auto;
  flex-direction: column;
  gap: 0;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-dark);
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  display: block;
}

.mobile-nav a:hover {
  color: var(--color-gold);
}

.mobile-nav__sub {
  padding-left: 1.5rem;
}

.mobile-nav__sub a {
  font-size: 0.9rem;
  color: var(--color-muted);
  padding: 0.7rem 0;
}

/* ---- Hero Section (Homepage) ---- */
.hero {
  min-height: 100vh;
  padding-top: var(--header-height);
  background-color: var(--color-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 4.5rem 1.5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  margin-bottom: 1rem;
  line-height: 1.05;
}

.hero__sub {
  display: block;
  font-family: var(--font-headline);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1.2rem;
}

.hero__tagline {
  display: block;
  font-family: var(--font-headline);
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 2.5rem;
}

.hero__bottles {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  padding: 0 1rem;
  margin-top: auto;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero__bottle {
  flex: 1;
  max-width: 220px;
  transition: transform 0.4s ease;
}

.hero__bottle img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 360px);
  min-height: 260px;
  object-fit: contain;
}

.hero__bottle:hover {
  transform: translateY(-12px);
}

/* ---- About Split Section ---- */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
}

/* Text column (used on team/about sub-pages – no dark background) */
.about-split__text {
  padding: 4rem 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-split__img {
  position: relative;
  overflow: hidden;
}

.about-split__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.about-split__content {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-split__content h2 {
  color: var(--color-white);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

.about-split__content .superheadline {
  color: var(--color-gold);
}

.about-split__content p {
  color: rgba(255,255,255,0.75);
}

/* ---- Testimonial / Dark parallax section ---- */
.testimonial-section {
  position: relative;
  padding: 7rem 0;
  background-color: var(--color-dark);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-align: center;
  overflow: hidden;
}

.testimonial-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 25, 0.82);
}

.testimonial-section__inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.testimonial-section h3 {
  color: var(--color-gold);
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  text-transform: none;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.testimonial-section blockquote {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.88);
  font-weight: 300;
  margin-bottom: 2rem;
  font-style: italic;
}

.testimonial-divider {
  width: 80px;
  height: 1px;
  background: rgba(255,255,255,0.3);
  margin: 1.5rem auto;
}

.testimonial-author strong {
  display: block;
  color: var(--color-white);
  font-family: var(--font-headline);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.testimonial-author span {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---- Quote Section ---- */
.quote-section {
  padding: 7rem 0;
  text-align: center;
  background: var(--color-white);
}

.quote-section__quote {
  font-family: var(--font-headline);
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-dark);
  line-height: 1.2;
  max-width: 850px;
  margin: 0 auto 1.5rem;
}

.quote-section__author {
  font-family: var(--font-headline);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* ---- Footer ---- */
.site-footer {
  position: relative;
  background-color: var(--color-dark);
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  color: var(--color-white);
  padding: 5rem 0 2rem;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(25,25,25,0.88);
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.site-footer__brand h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.site-footer__brand .superheadline {
  margin-bottom: 1rem;
}

.site-footer__brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  max-width: 360px;
  margin-bottom: 1.5rem;
}

.site-footer__logo {
  max-width: 240px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: brightness(1.1);
}

.site-footer__contact p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

.site-footer__contact a {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}

.site-footer__contact a:hover {
  color: var(--color-gold);
}

.site-footer__nav h5 {
  color: var(--color-white);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.site-footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__nav a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-footer__nav a::before {
  content: '→';
  color: var(--color-gold);
  font-size: 0.75rem;
}

.site-footer__nav a:hover {
  color: var(--color-white);
}

.site-footer__bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer__bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

.site-footer__bottom a {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  transition: color var(--transition);
}

.site-footer__bottom a:hover {
  color: var(--color-gold);
}

/* ---- Page Header Offset ---- */
/* Hero already includes padding-top for header. Other pages use page-hero which handles it. */
main {
  padding-top: 0;
}

/* ---- Responsive ---- */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  .site-header__inner {
    display: flex;
    justify-content: space-between;
  }

  .site-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .site-logo {
    height: var(--header-height);
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split__visual {
    min-height: 300px;
  }

  .split--reverse .split__visual { order: 1; }
  .split--reverse .split__content { order: 2; }

  .split__content {
    padding: 3rem 2rem;
  }

  .about-split {
    grid-template-columns: 1fr;
  }

  .about-split__img {
    min-height: 320px;
  }

  .about-split__content {
    padding: 3.5rem 2rem;
  }

  .about-split__text {
    padding: 3rem 2rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero__bottles {
    gap: 0;
  }

  .hero__bottle img {
    max-height: calc(100vh - 400px);
    min-height: 220px;
  }
}

/* Mobile: 768px */
@media (max-width: 768px) {
  :root {
    --section-pad-y: 3.5rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .hero__bottles {
    max-width: 420px;
  }

  .testimonial-section {
    background-attachment: scroll;
  }

  .quote-section__quote {
    font-size: clamp(1.2rem, 5vw, 2rem);
  }
}

/* Small Mobile: 480px */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero__bottles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }

  .beer-card {
    padding: 1.5rem 1rem 2rem;
  }

  .split__content,
  .about-split__content,
  .about-split__text {
    padding: 2.5rem 1.2rem;
  }
}
