:root {
  color-scheme: only light;
  --cream: #fff4e5;
  --cream-deep: #f5dfbf;
  --vanilla: #ffe8ad;
  --gold: #c98f2f;
  --gold-light: #f7ca62;
  --gold-ivory: #fff6df;
  --gold-dark: #7b4824;
  --chocolate: #3a1c14;
  --dark-chocolate: #1e100c;
  --cocoa: #6d2b20;
  --berry: #e13c4d;
  --berry-dark: #ad2635;
  --leaf: #4f7f50;
  --ink: #2a1712;
  --shadow: 0 20px 55px rgba(58, 28, 20, 0.23);
  --body-font: "Nunito", "Noto Sans", "Noto Sans Thai", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font: "Fredoka", "Noto Sans", "Noto Sans Thai", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Arabic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(201, 143, 47, 0.2), transparent 38%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.28), transparent 42%),
    var(--cream);
  font-family: var(--body-font);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 18px;
  z-index: -2;
  border: 1px solid rgba(201, 143, 47, 0.45);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(123, 72, 36, 0.18);
  content: "";
  pointer-events: none;
}

@supports ((-webkit-mask: linear-gradient(#000 0 0)) or (mask: linear-gradient(#000 0 0))) {
  body::before {
    inset: 16px;
    padding: 4px;
    border: 0;
    border-radius: 28px;
    background:
      radial-gradient(circle at top left, rgba(255, 251, 243, 0.94), transparent 24%),
      radial-gradient(circle at bottom right, rgba(247, 202, 98, 0.5), transparent 28%),
      linear-gradient(
        135deg,
        rgba(58, 28, 20, 0.95) 0%,
        rgba(123, 72, 36, 0.95) 11%,
        rgba(255, 230, 170, 0.98) 20%,
        rgba(201, 143, 47, 0.96) 31%,
        rgba(255, 246, 223, 0.9) 41%,
        rgba(216, 170, 92, 0.96) 53%,
        rgba(109, 58, 27, 0.96) 67%,
        rgba(255, 232, 173, 0.92) 81%,
        rgba(58, 28, 20, 0.94) 100%
      );
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.62),
      inset 0 -2px 0 rgba(109, 58, 27, 0.28),
      0 0 0 1px rgba(123, 72, 36, 0.14),
      0 12px 30px rgba(109, 58, 27, 0.08);
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    mask-composite: exclude;
  }
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  content: "";
  opacity: 0.3;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: clamp(14px, 2vw, 26px);
  right: clamp(14px, 2.4vw, 34px);
  left: clamp(14px, 2.4vw, 34px);
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

.header-contact-links,
.language-control,
.brand-corner,
.dot-nav {
  pointer-events: auto;
}

.header-contact-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.header-phone-chip,
.header-contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.header-phone-chip {
  display: grid;
  place-items: center;
  border: 1px solid rgba(58, 28, 20, 0.18);
  color: var(--cream);
  background: linear-gradient(135deg, var(--chocolate), var(--cocoa));
  box-shadow: 0 12px 26px rgba(58, 28, 20, 0.18);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.header-contact-icon {
  display: block;
  box-shadow: 0 12px 26px rgba(17, 185, 92, 0.18);
}

.brand-corner {
  justify-self: end;
  width: clamp(128px, 15vw, 210px);
  filter: drop-shadow(0 10px 16px rgba(58, 28, 20, 0.25));
}

.brand-corner img {
  width: 100%;
}

.language-control {
  position: relative;
  display: inline-flex;
}

.language-control select {
  min-height: 43px;
  padding: 0 34px 0 14px;
  border: 1px solid rgba(58, 28, 20, 0.16);
  border-radius: 999px;
  color: var(--cocoa);
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) right 15px center / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 232, 173, 0.72));
  box-shadow: 0 12px 26px rgba(58, 28, 20, 0.12);
  font: 900 0.92rem var(--body-font);
  appearance: none;
  cursor: pointer;
}

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

.dot-nav {
  justify-self: center;
  display: flex;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(58, 28, 20, 0.11);
  border-radius: 999px;
  background: rgba(255, 244, 229, 0.72);
  box-shadow: 0 14px 30px rgba(58, 28, 20, 0.12);
  backdrop-filter: blur(16px);
}

.dot-nav a {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(58, 28, 20, 0.28);
  transition: width 220ms ease, background 220ms ease;
}

.dot-nav a.is-active {
  width: 25px;
  background: var(--berry);
}

.panel {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(92px, 10vw, 140px) clamp(22px, 7vw, 110px) clamp(46px, 7vw, 82px);
  scroll-snap-align: start;
  isolation: isolate;
}

.panel::before,
.panel::after {
  position: absolute;
  z-index: -1;
  color: rgba(201, 143, 47, 0.32);
  font-family: var(--display-font);
  font-size: clamp(70px, 14vw, 180px);
  font-weight: 700;
  line-height: 1;
  content: "✦";
  pointer-events: none;
}

.panel::before {
  top: 18%;
  left: 8%;
}

.panel::after {
  right: 9%;
  bottom: 10%;
  transform: rotate(20deg);
}

.hero {
  grid-template-columns: minmax(280px, 0.86fr) minmax(340px, 1.14fr);
  align-items: center;
  gap: clamp(22px, 5vw, 76px);
  overflow: hidden;
}

.decor {
  position: absolute;
  z-index: -1;
  width: min(30vw, 400px);
  height: min(14vw, 180px);
  border: 1px solid rgba(255, 232, 173, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 232, 173, 0.7), rgba(201, 143, 47, 0.18) 35%, rgba(30, 16, 12, 0.97) 36% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 20px 45px rgba(30, 16, 12, 0.18);
  pointer-events: none;
}

.decor-top {
  top: -86px;
  left: -120px;
  border-radius: 0 0 72% 0;
}

.decor-bottom {
  display: none;
  right: -260px;
  bottom: -150px;
  border-radius: 72% 0 0;
  transform: rotate(180deg);
}

.hero-copy {
  max-width: 620px;
}

.eyebrow,
.kicker {
  margin: 0 0 13px;
  color: var(--cocoa);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--chocolate);
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 720px;
  font-size: clamp(4.3rem, 13vw, 10.4rem);
  line-height: 0.86;
  text-shadow: 0 7px 0 rgba(201, 143, 47, 0.22);
}

h2 {
  font-size: clamp(3rem, 8vw, 7.4rem);
  line-height: 0.92;
  text-shadow: 0 5px 0 rgba(201, 143, 47, 0.14);
}

.hero-copy p:not(.eyebrow),
.product-copy p:not(.kicker),
.order-card p {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(1.06rem, 1.35vw, 1.32rem);
  font-weight: 800;
  line-height: 1.52;
}

.hero-action,
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 23px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--berry), var(--berry-dark));
  box-shadow: 0 14px 28px rgba(173, 38, 53, 0.24);
  font-weight: 900;
}

.hero-action {
  margin-top: 28px;
}

.hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(500px, 64vw, 720px);
}

.hero-logo {
  width: min(70vw, 560px);
  animation: logo-fade 800ms ease-out both;
  filter: drop-shadow(0 18px 22px rgba(58, 28, 20, 0.28));
}

.hero-logo-video {
  aspect-ratio: 720 / 404;
  object-fit: contain;
  background: transparent;
  cursor: pointer;
}

.scroll-cue {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 30;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  border-radius: 20px;
  background: rgba(255, 244, 229, 0.5);
  box-shadow: 0 18px 40px rgba(58, 28, 20, 0.16);
  backdrop-filter: blur(7px);
  color: var(--cocoa);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
  transform: translate(-50%, -50%);
  transition: opacity 550ms ease, transform 550ms ease;
  pointer-events: none;
}

.scroll-cue.is-hidden {
  opacity: 0;
  transform: translate(-50%, calc(-50% + 16px));
}

.scroll-cue i {
  position: relative;
  width: 22px;
  height: 40px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.scroll-cue i::before {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 5px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
  animation: scroll-dot 1.4s ease-in-out infinite;
}

.product {
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 0.82fr);
  align-items: center;
  gap: clamp(22px, 6vw, 86px);
  overflow: hidden;
}

.product-reverse {
  grid-template-columns: minmax(300px, 0.82fr) minmax(280px, 0.9fr);
}

.product-reverse .product-art {
  grid-column: 2;
  grid-row: 1;
}

.product-reverse .product-copy {
  grid-column: 1;
  grid-row: 1;
}

.product-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(320px, 48vw, 560px);
}

.product-art::before {
  position: absolute;
  width: min(70%, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(201, 143, 47, 0.38);
  border-radius: 999px;
  background:
    repeating-conic-gradient(from 7deg, rgba(201, 143, 47, 0.17) 0 8deg, transparent 8deg 18deg),
    rgba(255, 244, 229, 0.34);
  content: "";
  opacity: 0.85;
}

.product-art img {
  position: relative;
  width: min(86%, 520px);
  transform: translateY(28px) scale(0.92) rotate(-3deg);
  opacity: 0;
  filter: drop-shadow(0 28px 24px rgba(58, 28, 20, 0.24));
  transition: transform 800ms cubic-bezier(0.18, 1, 0.24, 1), opacity 550ms ease;
}

.product-copy {
  position: relative;
  max-width: 680px;
  transform: translateY(28px);
  opacity: 0;
  transition: transform 680ms ease 120ms, opacity 500ms ease 120ms;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.product-meta span {
  padding: 10px 14px;
  border: 1px solid rgba(201, 143, 47, 0.42);
  border-radius: 999px;
  background: rgba(255, 232, 173, 0.58);
  color: var(--cocoa);
  font-weight: 900;
}

.price-badge {
  position: absolute;
  top: clamp(118px, 15vw, 190px);
  right: clamp(44px, 8vw, 130px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(114px, 13vw, 178px);
  aspect-ratio: 1;
  color: white;
  background: linear-gradient(135deg, var(--berry), var(--berry-dark));
  clip-path: polygon(50% 0%, 62% 28%, 91% 15%, 79% 44%, 100% 67%, 68% 68%, 59% 100%, 41% 73%, 11% 88%, 23% 57%, 0% 35%, 32% 36%);
  filter: drop-shadow(0 16px 16px rgba(173, 38, 53, 0.25));
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  transform: rotate(-10deg) scale(0.85);
  opacity: 0;
  transition: transform 550ms cubic-bezier(0.2, 1.15, 0.2, 1) 250ms, opacity 420ms ease 250ms;
}

.price-badge::before {
  position: absolute;
  top: 25%;
  left: 50%;
  font-family: var(--body-font);
  font-size: 0.32em;
  font-weight: 700;
  content: "฿";
  transform: translateX(-50%);
  opacity: 0.95;
}

/* Prezzo variabile (pinata): stella con un segno "~" e l'etichetta sotto. */
.price-variable {
  width: auto;
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  clip-path: none;
  filter: none;
}

.price-variable::before {
  content: none;
}

.price-mark {
  display: grid;
  place-items: center;
  width: clamp(114px, 13vw, 178px);
  aspect-ratio: 1;
  padding-bottom: 0.12em;
  background: linear-gradient(135deg, var(--berry), var(--berry-dark));
  clip-path: polygon(50% 0%, 62% 28%, 91% 15%, 79% 44%, 100% 67%, 68% 68%, 59% 100%, 41% 73%, 11% 88%, 23% 57%, 0% 35%, 32% 36%);
  filter: drop-shadow(0 16px 16px rgba(173, 38, 53, 0.25));
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  line-height: 1;
}

.price-tag {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--berry);
  color: white;
  font-family: var(--body-font);
  font-size: clamp(0.82rem, 1.4vw, 1.02rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(173, 38, 53, 0.2);
}

.product.is-visible .product-art img,
.product.is-visible .product-copy {
  transform: translateY(0) scale(1) rotate(0deg);
  opacity: 1;
}

/* Il prezzo compare con l'animazione solo per la torta in vista e ricompare
   ogni volta che ci si torna sopra. */
.product.price-active .price-badge {
  transform: translateY(0) scale(1) rotate(0deg);
  opacity: 1;
}

.order-panel {
  place-items: center;
  padding-top: clamp(110px, 12vw, 150px);
}

.order-card {
  width: min(760px, 100%);
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid rgba(201, 143, 47, 0.42);
  border-radius: 8px;
  background: rgba(255, 244, 229, 0.76);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(14px);
}

.order-logo {
  width: min(310px, 66vw);
  margin: 0 auto 18px;
  filter: drop-shadow(0 14px 14px rgba(58, 28, 20, 0.18));
}

.order-card p {
  margin-inline: auto;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.phone-link {
  min-height: 58px;
  padding: 0 30px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1;
}

.line-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.line-contact-icon {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(17, 185, 92, 0.18);
}

@keyframes logo-fade {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes scroll-dot {
  0% {
    transform: translate(-50%, 0);
    opacity: 0;
  }
  32% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 14px);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .dot-nav {
    display: none;
  }

  .brand-corner {
    width: clamp(120px, 34vw, 170px);
  }

  .language-control {
    justify-self: center;
  }

  .hero,
  .product,
  .product-reverse {
    grid-template-columns: 1fr;
  }

  .hero {
    align-content: center;
    gap: 8px;
    padding-top: 96px;
  }

  .hero-stage {
    min-height: 440px;
    order: -1;
  }

  .hero-logo {
    width: min(80vw, 380px);
  }

  .product-reverse .product-art,
  .product-reverse .product-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .product-art {
    min-height: 320px;
  }

  .price-badge {
    top: 132px;
    right: 38px;
  }
}

@media (max-width: 560px) {
  body::before {
    inset: 10px;
    padding: 3px;
    border-radius: 20px;
  }

  .site-header {
    align-items: start;
    gap: 10px;
  }

  .header-contact-link,
  .header-phone-chip,
  .header-contact-icon {
    width: 44px;
    height: 44px;
  }

  .header-phone-chip {
    font-size: 1.38rem;
    border-radius: 13px;
  }

  .panel {
    padding-inline: 18px;
  }

  .hero {
    min-height: 100svh;
    padding-top: 84px;
    padding-bottom: 70px;
  }

  .hero-stage {
    min-height: 318px;
  }

  h1 {
    font-size: clamp(3.45rem, 18vw, 5.4rem);
  }

  h2 {
    font-size: clamp(2.7rem, 16vw, 4.8rem);
  }

  .hero-copy p:not(.eyebrow),
  .product-copy p:not(.kicker),
  .order-card p {
    font-size: 1rem;
  }

  .hero-copy p:not(.eyebrow) {
    margin-top: 16px;
  }

  .hero-action {
    margin-top: 20px;
  }

  .scroll-cue {
    padding: 16px 20px;
    font-size: 0.95rem;
  }

  .product {
    --mobile-art-ring-size: min(86vw, 380px);
    --mobile-art-width: min(86vw, 352px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 46svh) minmax(0, 1fr);
    align-items: stretch;
    gap: 6px;
    min-height: 100svh;
    padding-top: 90px;
    padding-bottom: 26px;
    overflow: hidden;
  }

  .product-art {
    align-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  .product-art::before {
    width: var(--mobile-art-ring-size);
  }

  .product-art img {
    width: var(--mobile-art-width);
    max-width: none;
    max-height: 100%;
  }

  .product-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .product-copy p:not(.kicker) {
    margin-top: 10px;
    line-height: 1.38;
  }

  .product-meta {
    margin-top: 16px;
  }

  .price-badge {
    top: 94px;
    right: clamp(18px, 7vw, 30px);
    width: clamp(104px, 31vw, 124px);
    font-size: clamp(1.85rem, 9.5vw, 2.55rem);
  }

  .price-mark {
    width: clamp(94px, 27vw, 116px);
    font-size: clamp(2rem, 9vw, 2.7rem);
  }

  .price-tag {
    padding: 6px 13px;
    font-size: 0.86rem;
  }
}

@media (max-width: 560px) and (max-height: 740px) {
  .product {
    grid-template-rows: minmax(0, 42svh) minmax(0, 1fr);
    padding-top: 76px;
    padding-bottom: 16px;
  }

  .product-meta {
    margin-top: 12px;
  }

  .price-badge {
    top: 76px;
    width: clamp(104px, 33vw, 120px);
  }
}

@media (max-width: 560px) and (max-height: 640px) {
  .product {
    grid-template-rows: minmax(0, 38svh) minmax(0, 1fr);
  }

  .product-meta {
    display: none;
  }

  h2 {
    font-size: clamp(2.05rem, 12vw, 3rem);
  }
}

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