.carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  background-color: #100c08;
  background-image:
    linear-gradient(to bottom, transparent 72%, rgb(4 3 2 / 57%) 100%),
    linear-gradient(rgb(8 5 2 / 19%), rgb(8 5 2 / 19%)),
    url("../assets/scene/counter.webp");
  background-position: center;
  background-size: cover;
}

.broggi-site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: var(--broggi-header-current-height, var(--broggi-header-height));
  overflow: visible;
  border-bottom: 1px solid rgb(185 154 34 / 20%);
  background: rgba(16, 12, 8, 0.18);
  background: rgba(16, 12, 8, var(--broggi-header-background-alpha, 0.18));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.broggi-brand {
  position: fixed;
  z-index: 21;
  top: 0;
  left: 0;
  display: block;
  width: clamp(120px, 20vw, 170px);
  height: auto;
  overflow: visible;
  transform-origin: top left;
  text-decoration: none;
  mix-blend-mode: screen;
}

.broggi-brand-mark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  aspect-ratio: 2.4;
}

.broggi-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}

.broggi-brand:focus-visible {
  outline: 2px solid #e8cf55;
  outline-offset: 4px;
}

html.broggi-carousel-booting:not(.broggi-navigation-ready) .broggi-brand {
  top: calc(var(--broggi-header-initial-height, var(--broggi-header-height)) + 18px);
  left: 50%;
  width: min(310px, calc(100vw - 40px));
  height: auto;
  transform: translateX(-50%);
  transition: width 220ms ease, height 220ms ease, transform 220ms ease;
}

html.broggi-carousel-booting.broggi-navigation-ready .broggi-brand {
  top: 0;
  left: 0;
}

.broggi-header-nav {
  position: absolute;
  top: 0;
  right: clamp(22px, 3.1vw, 50px);
  display: flex;
  height: 100%;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
}

.broggi-header-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #fff8e9;
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 0 1px 12px rgb(0 0 0 / 75%);
  transition: color 140ms ease;
  white-space: nowrap;
}

.broggi-header-link:hover,
.broggi-header-link:focus-visible {
  color: #e8cf55;
}

.broggi-header-link:focus-visible {
  outline: 2px solid #e8cf55;
  outline-offset: 4px;
}

.carousel:focus {
  outline: none;
}

.carousel:focus-visible {
  outline: 2px solid #e8cf55;
  outline-offset: -3px;
}

.carousel.dragging {
  cursor: grabbing;
}

.carousel-poster {
  position: absolute;
  z-index: 0;
  top: clamp(72px, 9vh, 110px);
  left: 50%;
  display: block;
  width: min(52vw, 760px);
  height: auto;
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
}

.carousel canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 360ms ease;
}

.carousel.is-initializing canvas {
  visibility: hidden;
  opacity: 0;
}

.carousel.is-initializing .carousel-poster {
  top: var(--broggi-fallback-poster-top, clamp(72px, 9vh, 110px));
  width: var(--broggi-fallback-poster-width, min(52vw, 760px));
  height: var(--broggi-fallback-poster-height, auto);
}

.carousel.is-initializing .pizza-details {
  top: var(--broggi-fallback-details-top, 72vh);
}

html.broggi-carousel-booting .carousel-poster,
html.broggi-carousel-booting .pizza-details,
.carousel.is-loading .carousel-poster,
.carousel.is-loading .pizza-details {
  opacity: 0 !important;
}

.carousel.is-ready .carousel-poster {
  visibility: hidden;
}

html.broggi-carousel-booting .carousel canvas {
  visibility: hidden;
  opacity: 0;
}

.carousel.is-loading canvas {
  visibility: hidden;
  opacity: 0;
}

html.broggi-carousel-booting .loader,
.carousel.is-loading .loader {
  display: grid;
}

.pizza-details {
  transition: opacity 360ms ease;
}

.carousel-controls {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 66px;
  left: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  pointer-events: none;
}

.carousel-controls[hidden] {
  display: none;
}

.carousel-caption {
  margin: 0 0 4px;
  color: #c8bfb0;
  font-size: 10px;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.carousel-control-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 64px;
  padding: 8px 12px 16px;
}

.carousel-controls .control {
  position: static;
  display: grid;
  width: 46px;
  height: 46px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  transform: none;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 19%);
  border-radius: 50%;
  background: transparent;
  color: #c8bfb0;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transition: background-color 200ms ease, color 200ms ease;
}

.carousel-controls .control:hover {
  background: rgb(255 255 255 / 8%);
  color: #fff8e9;
}

.carousel-controls .control:focus-visible {
  outline: 2px solid #fff3b0;
  outline-offset: 4px;
}

.carousel-controls .control:active {
  background: rgb(255 255 255 / 14%);
}

.carousel-progress {
  width: 88px;
  height: 2px;
  flex: 0 1 88px;
  background: rgb(255 255 255 / 19%);
}

.carousel-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0.1);
  transform-origin: left center;
  background: #dabb71;
  transition: transform 260ms ease;
}

.carousel-count {
  display: inline-flex;
  align-items: center;
  color: #fff8e9;
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.carousel-count i {
  padding: 0 8px;
  color: #c8bfb0;
  font-style: normal;
}

.carousel-controls .autoplay {
  width: auto;
  border: 0;
  border-radius: 0;
  padding: 12px 4px;
  color: #c8bfb0;
  font: 400 11px/1.2 "Broggi Sans", sans-serif;
}

.carousel-footer {
  position: absolute;
  z-index: 3;
  bottom: 8px;
  left: 50%;
  display: flex;
  width: min(90%, 1440px);
  min-height: 52px;
  align-items: flex-start;
  justify-content: center;
  transform: translateX(-50%);
  border-top: 1px solid rgb(255 255 255 / 12%);
  padding-top: 8px;
  pointer-events: none;
}

.carousel-menu-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  color: #fff8e9;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-decoration: none;
  pointer-events: auto;
  transition: color 160ms ease;
}

.carousel-menu-link:hover,
.carousel-menu-link:focus-visible {
  color: #e8cf55;
}

.carousel-menu-link:focus-visible {
  outline: 2px solid #e8cf55;
  outline-offset: 4px;
}

.loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  pointer-events: none;
}

.loader[hidden] {
  display: none;
}

.loader-plate {
  position: relative;
  display: block;
  width: 58px;
  height: 38px;
  border: 1px solid rgb(232 207 85 / 76%);
  border-radius: 50%;
  background: rgb(16 12 8 / 68%);
  box-shadow: inset 0 0 12px rgb(232 207 85 / 8%), 0 0 14px rgb(232 207 85 / 14%);
}

.loader-plate::before,
.loader-plate::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.loader-plate::before {
  inset: 5px 6px;
  border: 1px solid rgb(232 207 85 / 42%);
}

.loader-plate::after {
  inset: -4px -2px;
  border: 1px solid transparent;
  border-top-color: #e8cf55;
  animation: broggi-loader-turn 1.8s linear infinite;
}

@keyframes broggi-loader-turn {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .carousel canvas,
  .pizza-details,
  .carousel-progress span,
  .carousel-controls .control,
  .carousel-menu-link {
    transition: none;
  }

  .loader-plate::after {
    animation: none;
  }
}

.carousel-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 28px;
  background: rgb(16 12 8 / 88%);
  color: #fff8e9;
  text-align: center;
}

.carousel-error[hidden] {
  display: none;
}

.carousel-error p {
  max-width: 36rem;
  margin: 0;
  line-height: 1.6;
}

.carousel-error.is-nonblocking {
  inset: auto 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgb(232 207 85 / 55%);
  background: rgb(23 16 9 / 94%);
  font-size: 13px;
  text-align: left;
}

.carousel-retry {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #e8cf55;
  background: #e8cf55;
  color: #171009;
  font: 500 14px "Broggi Sans", sans-serif;
}

.carousel-retry:focus-visible {
  outline: 2px solid #fff3b0;
  outline-offset: 3px;
}

.pizza-details {
  position: absolute;
  z-index: 1;
  top: 72vh;
  left: 50%;
  width: min(760px, calc(100% - 48px));
  transform: translateX(-50%);
  color: #fff8e9;
  text-align: center;
  text-shadow: 0 1px 10px rgb(0 0 0 / 70%);
  pointer-events: none;
}

.pizza-details h2 {
  margin: 0 0 3px;
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 400;
  line-height: 1;
}

.pizza-details p {
  margin: 0 auto;
  color: #e4ded3;
  font-size: 14px;
  line-height: 1.2;
}

.pizza-details [data-showcase-description] {
  min-height: 2.4em;
}

.pizza-details .pizza-details-price {
  margin-top: 3px;
  color: #e8cf55;
  font-size: 14px;
  letter-spacing: 0.06em;
}

@media (min-width: 701px) and (max-height: 520px) {
  .carousel-poster {
    top: 52px;
    width: min(30vw, 400px);
  }

  .pizza-details {
    top: 65vh;
    width: min(600px, calc(100% - 250px));
  }

  .pizza-details h2 {
    margin-bottom: 2px;
    font-size: 22px;
  }

  .pizza-details p {
    font-size: 12px;
    line-height: 1.15;
  }

  .pizza-details [data-showcase-description] {
    min-height: 2.3em;
  }

  .pizza-details .pizza-details-price {
    margin-top: 3px;
    font-size: 12px;
  }

  .carousel-controls {
    bottom: 52px;
  }

  .carousel-caption {
    margin-bottom: 2px;
    font-size: 9px;
  }

  .carousel-control-row {
    min-height: 48px;
    padding: 0 12px 4px;
  }

  .carousel-controls .control {
    width: 44px;
    height: 44px;
  }

  .carousel-progress {
    width: 64px;
    flex-basis: 64px;
  }

  .carousel-count {
    font-size: 11px;
  }

  .carousel-count i {
    padding-inline: 6px;
  }

  .carousel-footer {
    bottom: 4px;
    min-height: 48px;
    padding-top: 4px;
  }
}

@media (max-width: 700px) {
  html.broggi-carousel-booting:not(.broggi-navigation-ready) .broggi-brand {
    width: min(260px, 72vw);
  }

  body {
    overflow-x: hidden;
  }

  .carousel {
    height: 100vh;
    height: 100dvh;
    height: 100svh;
  }

  .carousel-poster {
    top: clamp(72px, 12vh, 100px);
    width: min(82vw, 350px);
  }

  .broggi-header-nav {
    right: 12px;
    gap: clamp(8px, 2.3vw, 16px);
  }

  .broggi-header-link {
    min-height: 44px;
    font-size: clamp(10px, 2.8vw, 11px);
    letter-spacing: 0.04em;
  }

  .broggi-brand {
    width: min(104px, 31vw);
  }

  .pizza-details {
    top: clamp(336px, 44vh, 410px);
    width: calc(100% - 32px);
  }

  .pizza-details h2 {
    margin-bottom: 5px;
    font-size: 28px;
  }

  .pizza-details p {
    font-size: 13px;
    line-height: 1.25;
  }

  .pizza-details [data-showcase-description] {
    min-height: 5em;
  }

  .pizza-details .pizza-details-price {
    margin-top: 5px;
    font-size: 14px;
  }

  .carousel-controls {
    bottom: 66px;
  }

  .carousel-control-row {
    min-height: 60px;
    gap: 16px;
    padding: 4px 10px 8px;
  }

  .carousel-controls .control {
    width: 44px;
    height: 44px;
  }

  .carousel-progress {
    width: min(50px, 15vw);
    flex-basis: min(50px, 15vw);
  }

  .carousel-count {
    font-size: 11px;
  }

  .carousel-count i {
    padding-inline: 6px;
  }

  .carousel-footer {
    bottom: 8px;
    min-height: 52px;
    padding-top: 8px;
  }
}


@media (max-width: 480px) {
  .broggi-header-nav {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--broggi-stacked-nav-height, 44px);
    justify-content: space-evenly;
    gap: 0;
    padding: 0 6px;
  }

  .broggi-header-link {
    min-width: 0;
    flex: 1 1 0;
    justify-content: center;
    font-size: clamp(10px, 3vw, 11px);
    letter-spacing: 0.02em;
    text-align: center;
  }

  .broggi-brand {
    width: min(144px, calc(100vw - 24px));
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .broggi-site-header.is-docked {
    background: rgba(16, 12, 8, 0.94);
  }
}

@media (max-width: 360px) {
  .pizza-details [data-showcase-description] {
    min-height: 6.25em;
  }
}
