/* ==========================================================================
   Lattella Brand Website — Pixel-accurate to Design PDF
   Mobile-first, BEM naming
   ========================================================================== */

:root {
  --color-red: #D9000D;
  --color-red-dark: #B0000A;
  --color-yellow: #FFD500;
  --color-yellow-ray: #FFFFFF;
  --color-white: #FFFFFF;
  --color-black: #1A1A1A;
  --sunray-background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    var(--color-yellow-ray) 0deg 10deg,
    var(--color-yellow) 10deg 20deg
  );

  --font-heading: 'sofia-pro', 'Impact', Arial, sans-serif;
  --font-body: 'sofia-pro', 'Helvetica Neue', Arial, sans-serif;
  --font-claim: 'congenial', 'Georgia', serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-black);
  background: var(--color-yellow);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-red); text-decoration: none; }
a:hover { opacity: 0.85; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.2;
  color: var(--color-red);
}

.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;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-md) var(--space-sm) 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__toggle { display: none; }

.nav__hamburger {
  display: flex; flex-direction: column; justify-content: center;
  gap: 5px; width: 44px; height: 44px; cursor: pointer;
  z-index: 101; background: var(--color-red); border-radius: 10px;
  align-items: center; position: absolute;
  right: var(--space-sm); top: var(--space-md);
}

.nav__hamburger span {
  display: block; width: 22px; height: 2.5px;
  background: var(--color-white);
  transition: transform 0.2s, opacity 0.2s;
}

.nav__toggle:checked ~ .nav__hamburger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle:checked ~ .nav__hamburger span:nth-child(2) { opacity: 0; }
.nav__toggle:checked ~ .nav__hamburger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav__list {
  display: none; position: absolute; top: 60px;
  right: var(--space-sm); background: var(--color-white);
  border-radius: 12px; padding: var(--space-xs);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15); min-width: 220px;
}

.nav__toggle:checked ~ .nav__list { display: block; }
.nav__item { text-align: center; }

.nav__link {
  display: block; padding: 0.6rem var(--space-sm);
  color: var(--color-red); font-family: var(--font-heading);
  font-size: 1rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.03em;
  border-radius: 999px;
}

.nav__link:hover {
  background: var(--color-red); color: var(--color-white);
  text-decoration: none; opacity: 1;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  padding: var(--space-3xl) var(--space-sm) var(--space-xl);
  text-align: center;
  background: var(--sunray-background);
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

.hero__logo {
  width: 45vw; min-width: 240px; max-width: 650px;
  height: auto;
  margin: 0 auto 2vh;
  position: relative; z-index: 2;
}

.hero__claim {
  width: clamp(260px, 50vw, 600px);
  height: auto;
  margin-bottom: 4vh;
  position: relative; z-index: 2;
}

/* Collage — centered container so cards don't spread too far on wide screens */
.hero__collage {
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero__collage-item {
  position: absolute; width: clamp(105px, 30vw, 140px); min-width: 0;
  pointer-events: auto;
}

.hero__collage-item img {
  width: 100%; height: auto; display: block;
}

/* Mobile: keep the center clear for logo and claim. */
.hero__collage-item--1 { top: 7%; left: 0%; transform: rotate(-8deg); }
.hero__collage-item--2 { bottom: 8%; left: -2%; transform: rotate(5deg); }
.hero__collage-item--3 { display: none; }
.hero__collage-item--4 { top: 7%; right: 0%; transform: rotate(6deg); width: clamp(110px, 32vw, 148px); }
.hero__collage-item--5 { bottom: 9%; right: -2%; transform: rotate(4deg); width: clamp(114px, 33vw, 152px); }

.instagram-cta {
  padding: var(--space-xl) var(--space-sm);
  background: var(--color-yellow);
  text-align: center;
  scroll-margin-top: 80px;
}

.instagram-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.75rem var(--space-xl);
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 999px;
  text-decoration: none;
}

.instagram-cta__button:hover {
  background: var(--color-red-dark);
  color: var(--color-white);
  opacity: 1;
}

/* ==========================================================================
   SPLIT SECTIONS - product ray + text layout
   ========================================================================== */
.split-section {
  display: flex;
  flex-direction: column;
  background: var(--color-yellow);
  scroll-margin-top: 80px;
}

.split-section__product,
.split-section__text {
  min-height: 360px;
  padding: var(--space-xl) var(--space-sm);
}

.split-section__product {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--sunray-background);
  z-index: 1;
}

.split-section__product-images {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.25rem, 2vw, 1rem);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.split-section__image {
  width: auto;
  max-height: 360px;
  max-width: min(50vw, 260px);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

.split-section__image:only-child {
  max-width: min(80vw, 380px);
}

.split-section__text {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--color-yellow);
  text-align: center;
  z-index: 0;
}

.split-section__text-inner {
  position: relative;
  width: min(100%, 500px);
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  overflow-wrap: break-word;
}

.split-section__title {
  font-family: var(--font-claim);
  font-size: 1.9rem;
  font-weight: 700;
  font-style: normal;
  margin-bottom: var(--space-md);
  color: var(--color-red);
}

.split-section__plus-mark {
  font-size: 0.5em;
  vertical-align: super;
  line-height: 0;
  font-weight: 900;
}

.split-section__description {
  font-size: 0.95rem;
  color: var(--color-red);
  font-weight: 900;
  line-height: 1.75;
}

.split-section__decoration {
  width: 120px;
  height: auto;
  margin: var(--space-md) auto 0;
  pointer-events: none;
}

.product-section--classic .split-section__product-images {
  gap: 0;
  position: relative;
}

.product-section--classic .split-section__image {
  max-height: 280px;
  max-width: 30vw;
}

.product-section--classic .split-section__image:nth-child(1) {
  transform: rotate(-8deg) translateX(10px);
  z-index: 1; position: relative;
}

.product-section--classic .split-section__image:nth-child(2) {
  z-index: 3; position: relative;
}

.product-section--classic .split-section__image:nth-child(3) {
  transform: rotate(8deg) translateX(-10px);
  z-index: 2; position: relative;
}

.product-section--minis .split-section__product-images {
  position: relative;
  width: min(100%, 300px);
  min-height: 320px;
}

.product-section--minis .split-section__image:nth-child(1) {
  position: absolute;
  top: 8px; left: 24px;
  z-index: 1;
  max-height: 260px;
  max-width: none;
}

.product-section--minis .split-section__image:nth-child(2) {
  position: absolute;
  top: 40px; left: 92px;
  z-index: 2;
  max-height: 280px;
  max-width: none;
}

.product-section--protein .split-section__product-images {
  gap: 0;
}

.product-section--protein .split-section__image {
  max-height: 380px;
  max-width: min(50vw, 290px);
}

.product-section--protein .split-section__image:nth-child(1) {
  z-index: 2; position: relative;
}

.product-section--protein .split-section__image:nth-child(2) {
  margin-left: -18px;
  z-index: 1; position: relative;
}

/* ==========================================================================
   FOLLOW US
   ========================================================================== */
.follow-us {
  padding: var(--space-4xl) var(--space-sm) var(--space-2xl);
  text-align: center;
  background: var(--color-yellow);
}

.follow-us__title {
  font-size: 2.25rem;
  margin-bottom: var(--space-xl);
  color: var(--color-red);
}

.follow-us__icons {
  display: flex; justify-content: center;
  align-items: center;
  gap: var(--space-md);
}

.follow-us__link {
  display: flex; align-items: center; justify-content: center;
  width: 90px; height: 90px;
  border-radius: 18px; overflow: hidden;
  transition: transform 0.2s;
}

.follow-us__link:hover { transform: scale(1.08); opacity: 1; }

.follow-us__link svg {
  width: 100%; height: 100%;
}

.follow-us__link--instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border-radius: 22px; padding: 16px;
}
.follow-us__link--instagram svg { fill: var(--color-white); }

.follow-us__link--tiktok {
  background: #000000; border-radius: 50%; padding: 16px;
}
.follow-us__link--tiktok svg { fill: var(--color-white); }

.follow-us__link--facebook {
  background: #1877F2; border-radius: 50%; padding: 16px;
}
.follow-us__link--facebook svg { fill: var(--color-white); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  padding: var(--space-2xl) var(--space-sm) var(--space-xl);
  text-align: center;
  background: var(--color-yellow);
}

.contact__heading {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-red);
  margin-bottom: 0.25rem;
}

.contact__email {
  font-size: 1.35rem;
  color: var(--color-red);
  font-weight: 400;
}

.contact__teaser {
  margin-top: var(--space-2xl);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-red);
  max-width: 600px;
  margin-left: auto; margin-right: auto;
  line-height: 1.5;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--color-yellow);
  padding: var(--space-2xl) var(--space-sm) var(--space-3xl);
  text-align: center;
}

.footer__links {
  display: flex; flex-direction: column; justify-content: center;
  align-items: center;
  gap: 0.45rem;
}

.footer__links a {
  color: var(--color-red);
  font-family: var(--font-heading);
  font-size: clamp(1rem, 5vw, 1.25rem);
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none !important;
  overflow-wrap: anywhere;
}

.footer__links a:hover { opacity: 0.8; text-decoration: none !important; }

.footer__separator {
  display: none;
  color: var(--color-red);
  font-weight: 900; font-size: 1.25rem;
}

/* ==========================================================================
   LEGAL / ERROR
   ========================================================================== */
.legal-content {
  max-width: 800px; margin: var(--space-lg) auto;
  padding: var(--space-2xl) var(--space-lg);
  background: var(--color-white); border-radius: 32px;
}
.legal-content h1 { font-size: 2rem; margin-bottom: var(--space-lg); }
.legal-content h2 { font-size: 1.5rem; margin-top: var(--space-xl); margin-bottom: var(--space-sm); }
.legal-content h3 { font-size: 1.25rem; margin-top: var(--space-lg); margin-bottom: var(--space-xs); }
.legal-content h4 { font-size: 1.1rem; margin-top: var(--space-md); margin-bottom: var(--space-xs); }
.legal-content p { margin-bottom: var(--space-sm); }
.legal-content ul { list-style: disc; padding-left: var(--space-lg); margin-bottom: var(--space-sm); }
.legal-content a { color: var(--color-red); text-decoration: underline; }

.error-page { text-align: center; padding: var(--space-3xl) var(--space-sm); }
.error-page h1 { font-size: 3rem; margin-bottom: var(--space-sm); }
.error-page p { font-size: 1.25rem; color: var(--color-red); }

/* ==========================================================================
   RESPONSIVE — Tablet 768px+
   ========================================================================== */
@media (min-width: 768px) {
  .hero__collage-item {
    display: block;
    width: 20%;
    min-width: 120px;
    max-width: none;
  }

  .hero__collage-item--1 { top: 5%; left: -5%; transform: rotate(-8deg); }
  .hero__collage-item--2 { top: 35%; bottom: auto; left: -3%; transform: rotate(5deg); }
  .hero__collage-item--3 { top: 65%; left: -5%; transform: rotate(-6deg); }
  .hero__collage-item--4 { top: 3%; right: -5%; transform: rotate(6deg); width: 22%; }
  .hero__collage-item--5 { top: 45%; bottom: auto; right: -3%; transform: rotate(4deg); width: 24%; }

  .split-section {
    flex-direction: row;
    min-height: 540px;
  }

  .split-section + .split-section {
    margin-top: -1px;
  }

  .split-section--reversed {
    flex-direction: row-reverse;
  }

  .split-section__product,
  .split-section__text {
    flex: 1;
    min-width: 0;
    min-height: 540px;
    padding: var(--space-3xl) var(--space-lg);
  }

  .split-section__text-inner {
    max-width: 500px;
  }

  .split-section__image {
    max-height: 390px;
    max-width: min(40vw, 290px);
  }

  .split-section__image:only-child {
    max-width: min(60vw, 390px);
  }

  .split-section__decoration { width: 150px; }

  .product-section--classic .split-section__image {
    max-height: 300px;
    max-width: 30%;
  }

  .product-section--protein .split-section__image {
    max-height: 450px;
    max-width: min(42vw, 320px);
  }

  .product-section--minis .split-section__product-images {
    width: 340px;
    min-height: 380px;
  }
  .product-section--minis .split-section__image:nth-child(1) { max-height: 300px; }
  .product-section--minis .split-section__image:nth-child(2) {
    max-height: 340px; top: 35px; left: 100px;
  }

  /* Social icons */
  .follow-us__link { width: 110px; height: 110px; }
  .follow-us__link--instagram { border-radius: 24px; padding: 20px; }
  .follow-us__link--tiktok, .follow-us__link--facebook { padding: 20px; }

  .footer__links {
    flex-direction: row;
    gap: var(--space-sm);
  }

  .footer__separator {
    display: inline;
  }

}

/* ==========================================================================
   RESPONSIVE — Desktop 1024px+
   ========================================================================== */
@media (min-width: 1024px) {
  /* Nav — desktop red pills */
  .nav__hamburger { display: none; }

  .nav__list {
    display: flex; position: static;
    background: transparent; box-shadow: none;
    padding: 0; gap: 0.5rem; min-width: auto;
  }

  .nav__link {
    padding: 0.5rem 1.8rem;
    border: none; border-radius: 999px;
    font-size: 0.85rem;
    color: var(--color-white);
    background: var(--color-red);
    transition: background 0.2s;
    min-width: 130px;
    text-align: center;
  }

  .nav__link:hover {
    background: var(--color-red-dark);
    color: var(--color-white); opacity: 1;
  }

  /* Hero */
  .hero {
    min-height: 100vh;
    padding: var(--space-4xl) var(--space-lg);
  }
  /* Hero scales via vw units — no overrides needed */

  /* Product sections */
  .split-section {
    min-height: 650px;
  }

  .split-section__product,
  .split-section__text {
    min-height: 650px;
    padding: var(--space-4xl) var(--space-lg);
  }

  .split-section__title { font-size: 2.5rem; margin-bottom: var(--space-md); }
  .split-section__description { font-size: 1.1rem; }

  .split-section__image {
    max-height: 500px;
    max-width: min(34vw, 380px);
  }

  .split-section__image:only-child {
    max-width: min(48vw, 460px);
  }

  .split-section__decoration { width: 180px; }

  .product-section--classic .split-section__image {
    max-height: 340px;
    max-width: 30%;
  }

  .product-section--protein .split-section__image {
    max-height: 590px;
    max-width: min(36vw, 430px);
  }

  /* Classic tighter fan */
  .product-section--classic .split-section__image:nth-child(1) {
    transform: rotate(-8deg) translateX(20px);
  }
  .product-section--classic .split-section__image:nth-child(3) {
    transform: rotate(8deg) translateX(-20px);
  }

  /* Minis */
  .product-section--minis .split-section__product-images {
    width: 420px; min-height: 440px;
  }
  .product-section--minis .split-section__image:nth-child(1) { max-height: 340px; }
  .product-section--minis .split-section__image:nth-child(2) {
    max-height: 400px; top: 40px; left: 100px;
  }

  /* Follow Us */
  .follow-us__link { width: 130px; height: 130px; }
  .follow-us__link--instagram { border-radius: 28px; padding: 24px; }
  .follow-us__link--tiktok, .follow-us__link--facebook { padding: 24px; }

  .contact__heading { font-size: 2rem; }
  .contact__email { font-size: 1.5rem; }
  .contact__teaser { font-size: 1.2rem; }

  .footer__links a { font-size: 1.4rem; }
  .footer__separator { font-size: 1.4rem; }
}

/* ==========================================================================
   RESPONSIVE — Large Desktop 1440px+
   ========================================================================== */
@media (min-width: 1440px) {
  /* Hero scales via vw units — no overrides needed */

  .split-section__image { max-height: 560px; }
  .split-section__image:only-child { max-width: min(42vw, 520px); }
  .product-section--classic .split-section__image { max-height: 400px; }
  .product-section--protein .split-section__image { max-height: 660px; }
}

/* ==========================================================================
   SPLIT3 — Slogan dividers between product sections
   ========================================================================== */
.split-divider {
  background: var(--color-yellow);
  text-align: center;
  padding: var(--space-3xl) var(--space-sm);
}

.split-divider__slogan {
  font-family: var(--font-claim);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--color-red);
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.02em;
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   SPLIT4 — Seamless symmetric sunburst
   All product panels share ONE fixed gradient origin (viewport center)
   so the rays flow continuously across every section — Spitz zu Spitz.
   ========================================================================== */

/* Unified sunburst: fixed attachment makes every panel a window into the
   same conic-gradient, so rays align perfectly across section boundaries. */
.split4-container .split-section__product {
  background: var(--sunray-background);
  background-attachment: fixed;
}

/* Remove gaps between rows so the fixed background is uninterrupted */
.split4-container .split-section {
  min-height: 0;
}

.split4-container .split-section + .split-section {
  margin-top: 0;
  border-top: none;
}

/* Mobile: equal square-ish panels, stacked vertically */
.split4-container .split-section__product,
.split4-container .split-section__text {
  min-height: 50vw;
  padding: var(--space-2xl) var(--space-sm);
}

.split4-container .split-section__product {
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
}

/* Constrain product images */
.split4-container .split-section__image {
  max-height: 300px;
}

.split4-container .split-section__image:only-child {
  max-height: 340px;
}

/* ---------- Tablet 768px+ ---------- */
@media (min-width: 768px) {
  .split4-container .split-section {
    flex-direction: row;
    min-height: 0;
  }

  .split4-container .split-section--reversed {
    flex-direction: row-reverse;
  }

  /* Both halves: equal 50 / 50, square product panel drives the height */
  .split4-container .split-section__product {
    flex: 0 0 50%;
    aspect-ratio: 1;
    width: auto;
    min-height: 0;
  }

  .split4-container .split-section__text {
    flex: 0 0 50%;
    min-height: 0;
    padding: var(--space-3xl) var(--space-lg);
  }

  .split4-container .split-section__image {
    max-height: 390px;
  }

  .split4-container .split-section__image:only-child {
    max-height: 420px;
  }

  .split4-container .split-section + .split-section {
    margin-top: -1px;
  }
}

/* ---------- Desktop 1024px+ ---------- */
@media (min-width: 1024px) {
  .split4-container .split-section__product,
  .split4-container .split-section__text {
    padding: var(--space-4xl) var(--space-lg);
  }

  .split4-container .split-section__image {
    max-height: 440px;
  }

  .split4-container .split-section__image:only-child {
    max-height: 470px;
  }
}

/* ---------- Large Desktop 1440px+ ---------- */
@media (min-width: 1440px) {
  .split4-container .split-section__image {
    max-height: 520px;
  }
}
