/* ============================================================
   RISCAS · Gelados à Beira-Mar
   Divertido · listras da Costa Nova · letras gordas contornadas
   Nested CSS
   ============================================================ */

:root {
  --mag:    #ff3fa4;   /* magenta */
  --turq:   #22c9de;   /* turquesa */
  --sun:    #ffd21f;   /* amarelo */
  --lime:   #4fd08a;   /* verde menta */
  --cream:  #fffdf5;   /* branco */
  --sky:    #eafaff;
  --ink:    #2a2140;   /* roxo escuro p/ contornos e texto */

  --font-fun:  "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;

  --maxw: 1100px;
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);  /* com "bounce" */

  --stripe-w: 46px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  background: var(--sky);
  line-height: 1.6;
  overflow-x: hidden;

  &.is-loading { overflow: hidden; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

h1, h2, h3 { margin: 0; font-family: var(--font-fun); line-height: 1; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 4px solid var(--mag); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--sun); color: var(--ink); }

/* thick outlined heading helper */
.outline {
  color: var(--cream);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
}

/* ---------- Reveal (bouncy) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  &.is-visible { opacity: 1; transform: none; }
}

/* ============================================================
   Intro: scoops stacking onto a cone
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  background: repeating-linear-gradient(90deg, var(--turq) 0 var(--stripe-w), var(--cream) var(--stripe-w) calc(var(--stripe-w) * 2));
  transition: opacity 0.5s ease, visibility 0.5s;

  &.is-done { opacity: 0; visibility: hidden; }

  & .intro__stack {
    position: relative;
    width: 140px; height: 200px;
  }

  & .scoop {
    position: absolute;
    left: 50%;
    width: 90px; height: 90px;
    margin-left: -45px;
    border-radius: 50%;
    border: 4px solid var(--ink);
    opacity: 0;
  }
  & .scoop--1 { top: 70px; background: var(--sun);  animation: plop 0.5s var(--ease) 0.1s forwards; }
  & .scoop--2 { top: 35px; background: var(--mag);  animation: plop 0.5s var(--ease) 0.45s forwards; }
  & .scoop--3 { top: 0;    background: var(--turq); animation: plop 0.5s var(--ease) 0.8s forwards; }

  & .cone {
    position: absolute;
    left: 50%; bottom: 0;
    width: 0; height: 0;
    margin-left: -45px;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-top: 90px solid var(--sun);
    filter: brightness(0.92);
    opacity: 0;
    animation: plop 0.5s var(--ease) forwards;
  }

  & .intro__word {
    font-family: var(--font-fun);
    font-weight: 700;
    font-size: clamp(2.4rem, 10vw, 4rem);
    letter-spacing: 0.05em;
    color: var(--cream);
    -webkit-text-stroke: 4px var(--ink);
    paint-order: stroke fill;
    opacity: 0;
    animation: popIn 0.6s var(--ease) 1.1s forwards;
  }
}

@keyframes plop {
  from { opacity: 0; transform: translateY(-40px) scale(0.5); }
  to   { opacity: 1; transform: none; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   Header
   ============================================================ */
.head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  transition: background 0.3s var(--ease), box-shadow 0.3s, padding 0.3s;

  &.is-scrolled {
    background: var(--cream);
    box-shadow: 0 5px 0 var(--sun);
    padding-block: 0.6rem;
  }

  & .logo {
    font-family: var(--font-fun);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--mag);
    -webkit-text-stroke: 2px var(--ink);
    paint-order: stroke fill;
    & .logo__ico { -webkit-text-stroke: 0; }
  }

  & .nav {
    display: flex;
    gap: clamp(0.7rem, 2.5vw, 1.6rem);
    & a {
      font-family: var(--font-fun);
      font-weight: 600;
      font-size: 1.02rem;
      color: var(--ink);
      padding: 0.3rem 0.7rem;
      border-radius: 999px;
      transition: background 0.25s var(--ease), color 0.25s, transform 0.25s var(--ease);
      &:hover { background: var(--turq); color: var(--cream); transform: rotate(-3deg) scale(1.08); }
    }
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 7rem 1.5rem 5rem;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,63,164,0.16) 0 var(--stripe-w), transparent var(--stripe-w) calc(var(--stripe-w) * 2)),
    linear-gradient(180deg, var(--sky), var(--cream));

  & .hero__inner { position: relative; z-index: 3; max-width: 720px; }

  & .hero__tag {
    display: inline-block;
    font-family: var(--font-fun);
    font-size: 1.2rem;
    color: var(--cream);
    background: var(--turq);
    padding: 0.3rem 1.1rem;
    border-radius: 999px;
    border: 3px solid var(--ink);
    transform: rotate(-2deg);
    margin-bottom: 1rem;
  }

  & .hero__title {
    font-family: var(--font-fun);
    font-weight: 700;
    font-size: clamp(3rem, 15vw, 8rem);
    line-height: 0.92;

    & .wob {
      display: block;
      color: var(--sun);
      -webkit-text-stroke: 5px var(--ink);
      paint-order: stroke fill;
      text-shadow: 7px 7px 0 var(--mag);
    }
    & .hero__title--alt {
      color: var(--turq);
      text-shadow: 7px 7px 0 var(--ink);
    }
  }

  & .hero__lede {
    max-width: 30rem;
    margin: 1.6rem auto 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
  }
}

/* floating treats */
.float {
  position: absolute;
  font-size: clamp(2rem, 6vw, 3.5rem);
  z-index: 1;
  animation: bob 4s ease-in-out infinite;
}
.float--1 { top: 18%; left: 10%; animation-delay: 0s; }
.float--2 { top: 28%; right: 12%; animation-delay: 0.6s; }
.float--3 { bottom: 22%; left: 15%; animation-delay: 1.2s; }
.float--4 { bottom: 16%; right: 14%; animation-delay: 1.8s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-22px) rotate(6deg); }
}

/* ---------- Button ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-fun);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--cream);
  background: var(--mag);
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  border: 4px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  &:hover { transform: translateY(-4px) rotate(-2deg); box-shadow: 0 10px 0 var(--ink); }
  &:active { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
}

/* ============================================================
   Section band headers
   ============================================================ */
.band {
  text-align: center;
  margin-bottom: 2.4rem;

  & .band__title {
    font-family: var(--font-fun);
    font-weight: 700;
    font-size: clamp(2.2rem, 7vw, 4rem);
    color: var(--sun);
    -webkit-text-stroke: 4px var(--ink);
    paint-order: stroke fill;
    text-shadow: 5px 5px 0 var(--mag);
  }
  & .band__sub {
    font-family: var(--font-fun);
    font-size: 1.2rem;
    color: var(--turq);
    margin-top: 0.4rem;
  }

  &--turq .band__title { color: var(--turq); text-shadow: 5px 5px 0 var(--ink); }
  &--turq .band__sub { color: var(--mag); }
  &--lime .band__title { color: var(--lime); text-shadow: 5px 5px 0 var(--ink); }
  &--lime .band__sub { color: var(--turq); }
  &--mag  .band__title { color: var(--mag); text-shadow: 5px 5px 0 var(--ink); }
  &--mag  .band__sub { color: var(--turq); }
}

/* ============================================================
   Flavors grid (scoops)
   ============================================================ */
.scoops, .cups, .pops, .shakes {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.2rem, 5vw, 2.5rem);
}

.flavors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.4rem;
}

.flavor {
  text-align: center;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 26px;
  padding: 1.8rem 1rem 1.4rem;
  box-shadow: 0 7px 0 var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);

  & .flavor__ball {
    display: inline-grid;
    place-items: center;
    width: 76px; height: 76px;
    font-size: 2.2rem;
    border-radius: 50%;
    border: 4px solid var(--ink);
    background: radial-gradient(circle at 35% 30%, var(--c), var(--c2));
    margin-bottom: 0.7rem;
    transition: transform 0.3s var(--ease);
  }
  & .flavor__name { font-family: var(--font-fun); font-weight: 600; font-size: 1.35rem; color: var(--ink); }
  & .flavor__desc { font-size: 0.86rem; font-weight: 600; color: #6a6280; margin-top: 0.2rem; }

  &:hover {
    transform: translateY(-6px) rotate(-2deg);
    box-shadow: 0 13px 0 var(--mag);
  }
  &:hover .flavor__ball { transform: scale(1.15) rotate(10deg); }
}

/* ============================================================
   Awning divider (striped, scalloped)
   ============================================================ */
.awning {
  position: relative;
  background: repeating-linear-gradient(90deg, var(--mag) 0 var(--stripe-w), var(--cream) var(--stripe-w) calc(var(--stripe-w) * 2));
  border-block: 4px solid var(--ink);
  padding: 1.1rem 0 1.6rem;
  overflow: hidden;

  & .awning__text {
    font-family: var(--font-fun);
    font-weight: 600;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--ink);
    text-align: center;
    white-space: nowrap;
    margin: 0;
    animation: scrollText 22s linear infinite;
  }

  /* scalloped bottom */
  &::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -13px;
    height: 26px;
    background: radial-gradient(circle at 13px 0, var(--sun) 12px, transparent 13px) repeat-x;
    background-size: 26px 26px;
  }
}
@keyframes scrollText {
  from { transform: translateX(40%); }
  to   { transform: translateX(-60%); }
}

/* ============================================================
   Cards (taças, picolés, batidos)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.4rem;
}

.card {
  text-align: center;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: 2rem 1.2rem 1.4rem;
  box-shadow: 0 7px 0 var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);

  & .card__emoji { font-size: 3rem; display: inline-block; transition: transform 0.3s var(--ease); }
  & h3 { font-family: var(--font-fun); font-weight: 600; font-size: 1.4rem; color: var(--ink); margin: 0.4rem 0 0.3rem; }
  & p { font-size: 0.9rem; font-weight: 600; color: #6a6280; min-height: 2.6em; }

  & .price {
    display: inline-block;
    margin-top: 0.7rem;
    font-family: var(--font-fun);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--cream);
    background: var(--turq);
    padding: 0.2rem 1rem;
    border-radius: 999px;
    border: 3px solid var(--ink);
    &::after { content: " €"; font-size: 0.7em; }
  }

  &:hover { transform: translateY(-6px) rotate(2deg); box-shadow: 0 13px 0 var(--turq); }
  &:hover .card__emoji { transform: scale(1.2) rotate(-8deg); }
}

/* ============================================================
   Footer
   ============================================================ */
.foot {
  margin-top: 2rem;
  background: var(--turq);
  color: var(--cream);
  text-align: center;

  & .foot__stripes {
    height: 30px;
    background: repeating-linear-gradient(90deg, var(--mag) 0 var(--stripe-w), var(--cream) var(--stripe-w) calc(var(--stripe-w) * 2));
    border-bottom: 4px solid var(--ink);
  }
  & .foot__body { padding: 2.5rem 1.5rem 3rem; }

  & .foot__mark {
    font-family: var(--font-fun);
    font-weight: 700;
    font-size: 2rem;
    color: var(--cream);
    -webkit-text-stroke: 3px var(--ink);
    paint-order: stroke fill;
    margin: 0 0 0.4rem;
  }
  & .foot__tag { font-family: var(--font-fun); font-size: 1.2rem; margin: 0; }
  & .foot__meta { margin: 0.3rem 0; font-weight: 700; }
  & .foot__note { margin-top: 1.2rem; font-family: var(--font-fun); font-size: 1.1rem; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .head .nav { gap: 0.3rem; }
  .head .nav a { padding: 0.3rem 0.5rem; font-size: 0.9rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .intro .scoop, .intro .cone, .intro .intro__word { opacity: 1; }
}
