/**
 * Sun Cone — vstupní split (sladká / slaná)
 * Zeleno-bílý styl jako zbytek webu; text v levé / pravé části klínu (bez překryvu ve středu).
 */

.split-gate-body {
  margin: 0;
  min-height: 100dvh;
  background: #fff;
  color: #333;
  font-family: Montserrat, Ubuntu, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.split-gate-body * {
  box-sizing: border-box;
}

.split-gate-sr-only {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.split-gate-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Padding roste/snižuje se s menší stranou viewportu (stejná logika jako logo) */
  padding: clamp(0.65rem, 2.4vmin, 3.5rem) clamp(0.65rem, 2.5vw, 1.35rem);
  pointer-events: none;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.9) 22%,
    rgba(250, 252, 249, 0.62) 48%,
    rgba(245, 250, 243, 0.28) 76%,
    rgba(245, 250, 243, 0) 100%
  );
}

.split-gate-top img {
  pointer-events: auto;
  /* Trochu menší na běžných šířkách; při roztáhnutí okna přibývá díky vw víc než jen vmin */
  height: auto;
  width: min(94vw, clamp(7.5rem, 10vw + 28vmin, 46rem));
  max-height: min(36dvh, 19rem);
  max-width: min(94vw, clamp(7.5rem, 10vw + 28vmin, 46rem));
  display: block;
  object-fit: contain;
}

.split-gate {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #f5faf3;
}

/*
 * Panely: flex + asymetrický padding = obsah je vycentrovaný ve „své“ polovině klínu,
 * ne ve středu celé obrazovky (tam by se překrýval).
 */
.split-gate__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.4s ease,
    box-shadow 0.4s ease;
}

.split-gate__panel--salty {
  z-index: 1;
  background: linear-gradient(
    160deg,
    #f8fbf6 0%,
    #eef4ec 26%,
    #dce8d6 54%,
    #c5d9bc 100%
  );
  animation: split-gate-clip-salty 16s ease-in-out infinite;
  padding-left: min(56vw, 62%);
  padding-right: clamp(0.75rem, 3vw, 2rem);
}

.split-gate__panel--sweet {
  z-index: 2;
  background: linear-gradient(
    200deg,
    #ffffff 0%,
    #fafdf9 14%,
    #f0f7ec 38%,
    #e6f0e1 62%,
    #d8ead2 100%
  );
  animation: split-gate-clip-sweet 16s ease-in-out infinite;
  box-shadow: 4px 0 24px rgba(103, 117, 95, 0.08);
  padding-right: min(56vw, 62%);
  padding-left: clamp(0.75rem, 3vw, 2rem);
}

@keyframes split-gate-clip-salty {
  0%,
  100% {
    clip-path: polygon(53% 0, 100% 0, 100% 100%, 45% 100%);
  }
  50% {
    clip-path: polygon(60% 0, 100% 0, 100% 100%, 36% 100%);
  }
}

@keyframes split-gate-clip-sweet {
  0%,
  100% {
    clip-path: polygon(0 0, 53% 0, 45% 100%, 0 100%);
  }
  50% {
    clip-path: polygon(0 0, 60% 0, 36% 100%, 0 100%);
  }
}

/* Jemná animovaná „mlha“ — na světlém podkladu */
.split-gate__motion {
  position: absolute;
  inset: -30%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  opacity: 0.55;
}

.split-gate__motion--sweet {
  background:
    radial-gradient(ellipse 50% 45% at 20% 40%, rgba(163, 214, 130, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 70% 65%, rgba(204, 226, 191, 0.5) 0%, transparent 52%);
  filter: blur(40px);
  animation: split-gate-sweet-drift 22s ease-in-out infinite;
}

.split-gate__motion--salty {
  background:
    radial-gradient(ellipse 48% 44% at 85% 35%, rgba(103, 117, 95, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 42% at 55% 70%, rgba(150, 170, 140, 0.35) 0%, transparent 52%);
  filter: blur(38px);
  animation: split-gate-salty-drift 26s ease-in-out infinite;
}

@keyframes split-gate-sweet-drift {
  0%,
  100% {
    transform: translate(0%, 0%) scale(1);
  }
  50% {
    transform: translate(5%, -4%) scale(1.06);
  }
}

@keyframes split-gate-salty-drift {
  0%,
  100% {
    transform: translate(0%, 0%) scale(1);
  }
  50% {
    transform: translate(-4%, 5%) scale(1.05);
  }
}

/* Plovoucí produktové snímky (dekorace, pod textem) */
.split-gate__floats {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.split-gate__float {
  position: absolute;
  width: clamp(76px, 12vw, 148px);
  height: auto;
  object-fit: contain;
  opacity: 0.88;
  filter: drop-shadow(0 14px 26px rgba(103, 117, 95, 0.2));
  will-change: transform;
}

.split-gate__floats--sweet .split-gate__float {
  width: clamp(82px, 13vw, 158px);
}

.split-gate__float--cone1 {
  left: 2%;
  top: 10%;
  animation: split-gate-float-a 7s ease-in-out infinite alternate;
  animation-delay: -0.5s;
}

.split-gate__float--cone2 {
  left: 6%;
  top: 50%;
  width: clamp(70px, 10vw, 128px);
  animation: split-gate-float-b 9s ease-in-out infinite alternate;
  animation-delay: -2s;
}

.split-gate__float--cone3 {
  left: 4%;
  bottom: 14%;
  width: clamp(64px, 9vw, 118px);
  animation: split-gate-float-c 8.2s ease-in-out infinite alternate;
  animation-delay: -4s;
}

.split-gate__float--cone4 {
  left: 24%;
  top: 26%;
  width: clamp(58px, 8vw, 104px);
  animation: split-gate-float-d 6.5s ease-in-out infinite alternate;
  animation-delay: -1.2s;
}

.split-gate__float--snack1 {
  right: 3%;
  top: 12%;
  animation: split-gate-float-b 7.8s ease-in-out infinite alternate;
  animation-delay: -3s;
}

.split-gate__float--snack2 {
  right: 8%;
  top: 48%;
  width: clamp(70px, 10vw, 130px);
  animation: split-gate-float-d 8.8s ease-in-out infinite alternate;
  animation-delay: -0.8s;
}

.split-gate__float--snack3 {
  right: 4%;
  bottom: 16%;
  width: clamp(66px, 9.5vw, 122px);
  animation: split-gate-float-a 9.2s ease-in-out infinite alternate;
  animation-delay: -5s;
}

.split-gate__float--snack4 {
  right: 22%;
  top: 30%;
  width: clamp(58px, 8vw, 108px);
  animation: split-gate-float-c 7s ease-in-out infinite alternate;
  animation-delay: -2.5s;
}

/*
 * Pátý snack — dole u řezu (vnitř viditelného klínu).
 * Slaný panel má clip-path od ~45–53 % zleva u spodku — malé `left` byly mimo obraz.
 */
.split-gate__float--snack5 {
  left: 48%;
  bottom: 5%;
  right: auto;
  width: clamp(74px, 11.5vw, 142px);
  animation: split-gate-float-e 8.6s ease-in-out infinite alternate;
  animation-delay: -2.1s;
  opacity: 0.9;
}

@keyframes split-gate-float-a {
  0% {
    transform: translate(0, 0) rotate(-5deg) scale(1);
  }

  100% {
    transform: translate(12px, -16px) rotate(5deg) scale(1.04);
  }
}

@keyframes split-gate-float-b {
  0% {
    transform: translate(0, 0) rotate(4deg) scale(1);
  }

  100% {
    transform: translate(-10px, 14px) rotate(-5deg) scale(1.03);
  }
}

@keyframes split-gate-float-c {
  0% {
    transform: translate(0, 0) rotate(-3deg) scale(1);
  }

  100% {
    transform: translate(14px, 10px) rotate(4deg) scale(1.05);
  }
}

@keyframes split-gate-float-d {
  0% {
    transform: translate(0, 0) rotate(6deg) scale(1.02);
  }

  100% {
    transform: translate(-12px, -12px) rotate(-4deg) scale(1);
  }
}

@keyframes split-gate-float-e {
  0% {
    transform: translate(0, 0) rotate(-2deg) scale(1);
  }

  100% {
    transform: translate(8px, -14px) rotate(3deg) scale(1.04);
  }
}

.split-gate__panel:hover .split-gate__float {
  opacity: 0.95;
  filter: drop-shadow(0 18px 32px rgba(103, 117, 95, 0.26));
}

/* Hrana řezu — diskrétní zelená linka */
.split-gate__diagonal {
  position: absolute;
  left: 50%;
  top: -20%;
  width: 120%;
  height: 140%;
  z-index: 4;
  pointer-events: none;
  transform: translateX(-50%) rotate(-11deg);
  transform-origin: 50% 0%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 48.5%,
    rgba(103, 117, 95, 0.12) 49.5%,
    rgba(103, 117, 95, 0.28) 50%,
    rgba(103, 117, 95, 0.12) 50.5%,
    transparent 51.5%,
    transparent 100%
  );
  animation: split-gate-beam 18s ease-in-out infinite;
  opacity: 0.85;
}

@keyframes split-gate-beam {
  0%,
  100% {
    transform: translateX(-50%) rotate(-9deg);
    opacity: 0.65;
  }
  50% {
    transform: translateX(-49%) rotate(-13deg);
    opacity: 1;
  }
}

.split-gate__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(22rem, 100%);
  text-align: center;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Jedna škála pro všechny jazyky (Crowdin obaluje text — * dostane stejný rem) */
  --sg-label: 0.72rem;
  --sg-title: 1.68rem;
  --sg-sub: 0.9rem;
  --sg-btn: 0.78rem;
}

.split-gate__inner,
.split-gate__inner * {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

@media (min-width: 480px) {
  .split-gate__inner {
    --sg-title: 1.88rem;
  }
}

@media (min-width: 769px) {
  .split-gate__inner {
    --sg-title: 2.05rem;
  }
}

.split-gate__label {
  /* Crowdin často obalí zdrojový text — sjednotit včetně vnořených uzlů */
  font-size: var(--sg-label) !important;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #67755f;
  margin-bottom: 0.65rem;
  font-family: Montserrat, Ubuntu, -apple-system, BlinkMacSystemFont, sans-serif;
}

.split-gate__label * {
  font-size: var(--sg-label) !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  color: inherit !important;
}

.split-gate__title {
  font-size: var(--sg-title) !important;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  color: #67755f;
  font-family: Montserrat, Ubuntu, -apple-system, BlinkMacSystemFont, sans-serif;
}

.split-gate__title * {
  font-size: var(--sg-title) !important;
  line-height: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  color: inherit !important;
}

@media (min-width: 769px) {
  .split-gate__title {
    line-height: 1.15;
    white-space: nowrap;
  }
}

.split-gate__sub {
  font-family: Ubuntu, Montserrat, sans-serif;
  font-size: var(--sg-sub) !important;
  font-weight: 400;
  line-height: 1.5;
  color: #3d3d3d;
  margin: 0 0 1.65rem;
  opacity: 0.92;
}

.split-gate__sub * {
  font-size: var(--sg-sub) !important;
  line-height: inherit !important;
  font-family: inherit !important;
  color: inherit !important;
}

.split-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: 2px solid #67755f;
  font-size: var(--sg-btn) !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #67755f;
  background: #fff;
  box-shadow: 0 2px 12px rgba(103, 117, 95, 0.12);
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.35s ease,
    transform 0.25s ease;
  font-family: Montserrat, Ubuntu, -apple-system, BlinkMacSystemFont, sans-serif;
}

.split-gate__btn * {
  font-size: var(--sg-btn) !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
}

.split-gate__panel:hover,
.split-gate__panel:focus-visible {
  filter: brightness(1.02);
}

.split-gate__panel:hover .split-gate__btn,
.split-gate__panel:focus-visible .split-gate__btn {
  background: #67755f;
  color: #fff;
  border-color: #67755f;
  box-shadow: 0 6px 22px rgba(103, 117, 95, 0.28);
  transform: translateY(-2px);
}

.split-gate__panel:focus-visible {
  outline: 3px solid #a3d682;
  outline-offset: 4px;
  z-index: 5;
}

@media (min-width: 769px) {
  .split-gate__panel:hover {
    transform: scale(1.005);
  }
}

@media (prefers-reduced-motion: reduce) {
  .split-gate__panel--sweet,
  .split-gate__panel--salty {
    animation: none;
  }

  .split-gate__panel--sweet {
    clip-path: polygon(0 0, 56% 0, 40% 100%, 0 100%);
  }

  .split-gate__panel--salty {
    clip-path: polygon(56% 0, 100% 0, 100% 100%, 40% 100%);
  }

  .split-gate__motion--sweet,
  .split-gate__motion--salty,
  .split-gate__diagonal {
    animation: none;
  }

  .split-gate__motion--sweet,
  .split-gate__motion--salty {
    transform: none;
  }

  .split-gate__diagonal {
    opacity: 0.7;
    transform: translateX(-50%) rotate(-11deg);
  }

  .split-gate__float {
    animation: none !important;
    opacity: 0.72;
  }

  .split-gate__panel,
  .split-gate__btn {
    transition: none;
  }

  .split-gate__panel:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  .split-gate {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background: #fff;
  }

  .split-gate__panel--sweet,
  .split-gate__panel--salty {
    position: relative;
    flex: 1;
    min-height: 44dvh;
    animation: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3.5rem, 10vw, 5rem) 1.25rem 2rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .split-gate__panel--sweet {
    order: 1;
    clip-path: polygon(0 0, 100% 0, 100% 97%, 0 100%);
    border-bottom: 1px solid rgba(103, 117, 95, 0.15);
  }

  .split-gate__panel--salty {
    order: 2;
    clip-path: polygon(0 3%, 100% 0, 100% 100%, 0 100%);
  }

  .split-gate__panel--sweet .split-gate__inner,
  .split-gate__panel--salty .split-gate__inner {
    max-width: 22rem;
  }

  .split-gate__diagonal {
    display: none;
  }

  .split-gate__motion--sweet,
  .split-gate__motion--salty {
    inset: -20%;
    filter: blur(32px);
    opacity: 0.4;
  }

  .split-gate__floats--sweet .split-gate__float:nth-child(n + 3) {
    display: none;
  }

  .split-gate__floats--salty .split-gate__float:nth-child(3),
  .split-gate__floats--salty .split-gate__float:nth-child(4) {
    display: none;
  }

  .split-gate__float {
    width: clamp(52px, 22vw, 96px) !important;
    opacity: 0.78;
  }

  .split-gate__float--snack5 {
    left: 10% !important;
    bottom: 5% !important;
    width: clamp(60px, 26vw, 108px) !important;
    opacity: 0.82;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .split-gate__panel--sweet {
    padding-right: min(58vw, 64%);
  }

  .split-gate__panel--salty {
    padding-left: min(58vw, 64%);
  }

  .split-gate__inner {
    max-width: min(19rem, 92%);
  }
}
