/* ==========================================================================
   COMPONENTES — SORVEBOM
   ========================================================================== */

/* --- Botões ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border-radius: var(--pill);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1;
  transition: transform 180ms var(--ease), background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sun {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 4px 0 #D99E10;
}

.btn-sun:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #D99E10;
}

.btn-sun:active {
  box-shadow: 0 2px 0 #D99E10;
}

.btn-berry {
  background: var(--berry);
  color: var(--on-dark);
  box-shadow: 0 4px 0 var(--berry-deep);
}

.btn-berry:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--berry-deep);
}

.btn-berry:active {
  box-shadow: 0 2px 0 var(--berry-deep);
}

.btn-ghost {
  color: var(--on-dark);
  box-shadow: inset 0 0 0 2px rgba(255, 248, 239, 0.55);
}

.btn-ghost:hover {
  box-shadow: inset 0 0 0 2px var(--on-dark);
  background: rgba(255, 248, 239, 0.08);
}

/* --- Navegação ---------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--milk);
  transition: box-shadow 200ms ease;
}

.site-nav.scrolled {
  box-shadow: 0 1px 0 var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.nav-logo img {
  height: 2.75rem;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
}

.nav-links a {
  position: relative;
  padding-block: 0.25rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 3px;
  background: var(--berry);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  font-size: var(--text-base);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--pill);
  color: var(--ink);
}

.nav-toggle:hover {
  background: var(--cream);
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--berry);
  color: var(--on-dark);
  padding-top: clamp(2.5rem, 6vw, 5rem);
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero .eyebrow {
  color: var(--sun);
}

.hero h1 {
  font-size: var(--text-hero);
  line-height: 0.92;
  color: var(--on-dark);
  margin-bottom: 1.5rem;
}

.hero-lede {
  max-width: 34rem;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--on-dark-muted);
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* Foto recortada no formato de picolé, com palito e sol atrás */
.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 25rem);
  padding-bottom: 4.5rem;
}

.hero-sun {
  position: absolute;
  top: 8%;
  right: -18%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
}

.popsicle {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 2.5rem 2.5rem;
  overflow: hidden;
  border: 6px solid var(--milk);
  background: var(--cream);
}

.popsicle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 30%;
  transition: transform 600ms var(--ease);
}

.hero-visual:hover .popsicle img {
  transform: scale(1.04);
}

.popsicle-stick {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  width: 3.25rem;
  height: 5.5rem;
  transform: translateX(-50%);
  border-radius: 0 0 var(--pill) var(--pill);
  background: var(--stick);
  z-index: -1;
}

.hero-visual .popsicle-stick {
  z-index: 0;
}

.hero-visual .popsicle {
  z-index: 1;
}

/* Calda escorrendo entre seções */
.drip {
  display: block;
  width: 100%;
  height: auto;
  color: var(--berry);
  background: var(--milk);
}

.drip-choco {
  color: var(--choco);
  background: var(--berry);
}

/* --- Fatos -------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-block: clamp(2rem, 4vw, 3rem) 0;
}

.fact {
  padding: 0.5rem 1.5rem;
  border-left: 2px dashed var(--line);
}

.fact:first-child {
  border-left: 0;
  padding-left: 0;
}

.fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  color: var(--berry);
  margin-bottom: 0.375rem;
}

.fact span {
  font-size: var(--text-sm);
  color: var(--ink-body);
}

/* --- Sabores ------------------------------------------------------------ */

.flavors-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.flavors-head p {
  max-width: 30rem;
  margin-top: 1rem;
}

.tabs {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.3rem;
  border-radius: var(--pill);
  background: var(--cream);
}

.tab {
  min-height: 2.5rem;
  padding: 0 1.125rem;
  border-radius: var(--pill);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink-body);
  transition: background-color 180ms ease, color 180ms ease;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected='true'] {
  background: var(--ink);
  color: var(--on-dark);
}

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

.flavor {
  --tint: var(--sun-soft);
  display: flex;
  flex-direction: column;
}

.flavor[hidden] {
  display: none;
}

.flavor--cookies { --tint: #FBEAB8; }
.flavor--bombom { --tint: #FFD9E5; }
.flavor--torta { --tint: #F6DDBE; }

.flavor-photo {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--tint);
  margin-bottom: 1.25rem;
}

/* As fotos têm fundo creme: o multiply troca o creme pela cor do sabor */
.flavor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  transition: transform 500ms var(--ease);
}

.flavor:hover .flavor-photo img {
  transform: translateY(-6px) rotate(-3deg);
}

.flavor-line {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--berry);
  margin-bottom: 0.375rem;
}

.flavor h3 {
  margin-bottom: 0.625rem;
}

.flavor p {
  font-size: var(--text-sm);
  margin-bottom: 1rem;
}

.flavor-link {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--berry);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color 160ms ease;
}

.flavor-link:hover {
  color: var(--berry);
}

.catalog-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}

.catalog-cta .btn {
  min-height: 3.75rem;
  padding: 0 2.25rem;
  font-size: var(--text-xl);
}

.catalog-cta .btn svg {
  transition: transform 200ms var(--ease);
}

.catalog-cta .btn:hover svg {
  transform: translateX(4px);
}

.catalog-cta p {
  max-width: 28rem;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* --- História ----------------------------------------------------------- */

.story {
  background: var(--cream);
}

.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.story-photos {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: end;
}

.story-photos img {
  width: 100%;
  object-fit: cover;
}

.story-photo-main {
  aspect-ratio: 2 / 3;
  border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.story-photo-side {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.story-photos img {
  height: 100%;
}

.story-text h2 {
  margin-bottom: 1.25rem;
}

.story-text > p {
  margin-bottom: 1rem;
}

.timeline {
  margin-top: 2rem;
  border-top: 2px dashed var(--line);
}

.timeline div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 2px dashed var(--line);
}

.timeline dt {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  line-height: 1.3;
  color: var(--berry);
}

.timeline dd {
  font-size: var(--text-sm);
}

/* --- Lojas -------------------------------------------------------------- */

.stores {
  background: var(--choco);
  color: var(--on-dark-muted);
}

.stores h2,
.stores h3 {
  color: var(--on-dark);
}

.stores .eyebrow {
  color: var(--sun);
}

.stores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.stores-intro p {
  margin-top: 1rem;
  max-width: 28rem;
}

.store-list {
  margin-top: 2rem;
}

.store {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.125rem;
  border-top: 1px solid rgba(255, 248, 239, 0.14);
}

.store:last-child {
  border-bottom: 1px solid rgba(255, 248, 239, 0.14);
}

.store h3 {
  font-size: var(--text-lg);
  margin-bottom: 0.25rem;
}

.store p {
  font-size: var(--text-sm);
}

.store a {
  flex-shrink: 0;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--sun);
  white-space: nowrap;
}

.store a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.resale {
  align-self: start;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--choco-soft);
}

.resale h3 {
  font-size: var(--text-2xl);
  margin-bottom: 1rem;
}

.resale p {
  margin-bottom: 1.75rem;
}

.resale-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.resale-actions .text-link {
  font-weight: 700;
  color: var(--on-dark);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
}

/* --- Rodapé ------------------------------------------------------------- */

.site-footer {
  background: var(--berry);
  color: var(--on-dark-muted);
  padding-block: 1rem 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-logo {
  height: 3rem;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}

.footer-top p {
  max-width: 22rem;
  font-size: var(--text-sm);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--on-dark);
}

.footer-links a:hover {
  color: var(--sun);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 248, 239, 0.2);
  font-size: var(--text-xs);
}

/* --- WhatsApp flutuante ------------------------------------------------- */

.float-whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0 1.25rem 0 1rem;
  border-radius: var(--pill);
  background: var(--whatsapp);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  box-shadow: 0 6px 20px rgba(18, 140, 74, 0.35);
  transition: transform 180ms var(--ease);
}

.float-whatsapp:hover {
  transform: translateY(-2px);
}

/* --- Responsivo --------------------------------------------------------- */

@media (max-width: 1024px) {
  .flavors-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .stores-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-photos {
    max-width: 32rem;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--milk);
    box-shadow: 0 12px 24px rgba(43, 13, 25, 0.08);
    font-size: var(--text-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 200ms var(--ease), visibility 200ms;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links a {
    width: 100%;
    padding-block: 0.75rem;
    border-bottom: 1px solid var(--line);
  }

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

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

  .hero-visual {
    width: min(80%, 20rem);
  }

  .facts {
    grid-template-columns: 1fr 1fr;
    row-gap: 1.5rem;
  }

  .fact:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

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

@media (max-width: 560px) {
  .hero-actions .btn {
    flex: 1 1 100%;
  }

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

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    padding: 0 0.5rem;
    font-size: var(--text-sm);
  }

  .timeline div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .store {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
  }

  .float-whatsapp span {
    display: none;
  }

  .float-whatsapp {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    justify-content: center;
  }
}
