:root {
  --cream: #fff6ea;
  --pink: #f9d3ae;
  --pink-deep: #df5536;
  --brown: #5a3a2a;
  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --font-hand: 'Caveat', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--brown);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: var(--cream);
}
.logo img {
  display: block;
  height: 72px;
  width: auto;
}
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-menu {
  position: relative;
  display: inline-block;
  padding: 7px 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.2;
  background: var(--pink-deep);
  color: #fff;
  border: 2px solid var(--pink-deep);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--pink);
  transform: rotate(2deg);
  transition: background .15s, box-shadow .15s;
}
.nav-menu::after {
  content: "";
  position: absolute; right: -9px; top: -11px;
  width: 18px; height: 23px;
  background: url(images/sparkle.svg) center / contain no-repeat;
  animation: twinkle 2.4s ease-in-out infinite;
}
.nav-menu:hover, .nav-menu:focus-visible { background: #c4452a; border-color: #c4452a; box-shadow: 1px 1px 0 var(--pink); animation: wiggle .4s ease-in-out; }
.nav-menu.is-active { box-shadow: 3px 3px 0 var(--brown); }

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 24px 40px;
  text-align: center;
}
.hero-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.photo { margin: 0; }
.photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  border: 3px solid var(--pink-deep);
  box-shadow: 6px 6px 0 var(--pink);
  background: var(--pink);
}
.p1 { transform: rotate(-2deg); }
.p2 { transform: rotate(1.5deg) translateY(12px); }
.p3 { transform: rotate(-1deg); }
.photo figcaption {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: .02em;
  line-height: 1;
  color: var(--pink-deep);
}
.hero-tagline {
  margin-top: 36px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  text-wrap: balance;
}
.hero-sub {
  margin-top: 10px;
  font-family: var(--font-hand);
  font-size: 1.7rem;
  color: var(--pink-deep);
}

.menu {
  max-width: 520px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  text-align: center;
}
.menu h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--pink-deep);
  margin-bottom: 24px;
}
.menu-list { list-style: none; text-align: left; }
.menu-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  font-size: 1.1rem;
}
.menu-list .dots { flex: 1; border-bottom: 2px dotted var(--pink-deep); }

.hero-button {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--pink-deep);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.1rem;
  transition: transform .2s;
}
.hero-button:hover { transform: translateY(-2px) rotate(-2deg); }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding: 28px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}
.footer { position: relative; }
.order { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.order-ask { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.order-cookie {
  width: 26px; height: 26px;
  background: url(images/cookie.svg) center / contain no-repeat;
  animation: bob 3s ease-in-out infinite;
}
.order-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
.order-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem; line-height: 1.2;
  white-space: nowrap;
  background: #fff;
  border: 2px solid var(--pink-deep);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--pink);
  transform: rotate(-1.5deg);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.order-btn + .order-btn { transform: rotate(1.5deg); }
.order-btn:nth-child(3) { transform: rotate(-1deg); }
.order-btn-main { background: var(--pink-deep); color: #fff; box-shadow: 3px 3px 0 var(--brown); }
.order-btn.order-btn-main svg { color: #fff; }
.order-btn-main:hover, .order-btn-main:focus-visible { background: #c4452a; box-shadow: 1px 1px 0 var(--brown); }
.footer .order-btn { text-decoration: none; }
.order-btn svg { color: var(--pink-deep); flex: none; }
.order-btn:hover, .order-btn:focus-visible { background: var(--pink); box-shadow: 1px 1px 0 var(--pink-deep); animation: wiggle .4s ease-in-out; }
.order-btn:active { transform: scale(.95); }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-5deg) scale(1.05); }
  75% { transform: rotate(5deg) scale(1.05); }
}
.footer-copy { font-size: .8rem; letter-spacing: .02em; color: var(--brown); opacity: .6; }
.footer a { text-decoration: underline; text-decoration-color: var(--pink-deep); text-underline-offset: 3px; }

@media (max-width: 560px) {
  .hero { padding: 6px 14px 14px; }
  .hero-sub { font-size: 1.3rem; margin-top: 4px; }
  .hero-button { margin-top: 16px; padding: 10px 26px; }
  /* phone: big photos sized to the screen height, swipe sideways to see the next one */
  .hero-photos {
    --ph: clamp(170px, calc(100svh - 470px), 480px);
    display: flex;
    gap: 16px;
    margin: 0 -14px;
    padding: 6px 14px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .hero-photos::-webkit-scrollbar { display: none; }
  .photo { flex: none; scroll-snap-align: center; }
  .photo img { height: var(--ph); width: calc(var(--ph) * 0.8); border-radius: 22px; }
  .p2 { transform: rotate(1.5deg); }
  .photo figcaption { font-size: .95rem; margin-top: 8px; }
  .hero-tagline { margin-top: 12px; font-size: 1.85rem; }
  .footer { padding: 4px 12px 14px; flex-direction: column; align-items: center; text-align: center; font-size: .95rem; gap: 32px; }
  .order { flex-direction: column; gap: 8px; }
  .footer { padding-top: 26px; }
  .order-btns { gap: 8px; }
  .order-btn { padding: 7px 12px; font-size: .92rem; gap: 5px; }
  .order-btn svg { width: 16px; height: 16px; }
  .footer p { margin: 0; }
  .footer a { white-space: nowrap; }
  .nav { padding: 10px 16px; }
  .logo img { height: 48px; }
  .nav-menu { padding: 6px 16px; font-size: 1rem; }
  .nav-right { gap: 12px; }
}

.login {
  max-width: 420px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  text-align: center;
}
.login h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--pink-deep);
}
.login-sub {
  margin: 4px 0 28px;
  font-family: var(--font-hand);
  font-size: 1.4rem;
}
.login-form { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.login-form input {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid var(--pink-deep);
  border-radius: 999px;
  background: #fff;
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
}
.login-form input:focus { outline: 3px solid var(--pink); }
.login-form .hero-button { border: 0; cursor: pointer; }
.login-error { margin-top: 20px; font-family: var(--font-hand); font-size: 1.3rem; color: var(--pink-deep); }

/* desktop: size the photos to the window height so the footer stays on screen */
@media (min-width: 900px) {
  .hero-photos {
    --ph: clamp(180px, calc(100vh - 565px), 520px);
    display: flex;
    justify-content: center;
    gap: 28px;
  }
  .photo { flex: none; }
  .photo img { height: var(--ph); width: calc(var(--ph) * 0.8); }
}

/* ---- cute bits from the logo: sparkles, a cookie, crumbs ---- */
main { position: relative; }
.sprinkles { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.sprinkles i {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  animation-delay: var(--d);
}
.sp { background-image: url(images/sparkle.svg); animation: twinkle 2.8s ease-in-out infinite; }
.ck { background-image: url(images/cookie.svg); animation: bob 5s ease-in-out infinite; }
.cr { background-image: url(images/crumbs.svg); animation: drift 6s ease-in-out infinite; }

/* little sparkles tucked beside the tagline and on the menu button */
.hero-tagline, .menu h1 { position: relative; }
.hero-tagline::before, .hero-tagline::after, .menu h1::after {
  content: "";
  display: inline-block;
  width: .55em; height: .7em;
  background: url(images/sparkle.svg) center / contain no-repeat;
  vertical-align: top;
  animation: twinkle 2.6s ease-in-out infinite;
}
.hero-tagline::before { margin-right: .2em; width: .4em; height: .5em; animation-delay: 1.3s; }
.hero-tagline::after { margin-left: .15em; }
.menu h1::after { margin-left: .15em; width: .6em; height: .75em; }
.hero-button { position: relative; }
.hero-button::after {
  content: "";
  position: absolute; right: -10px; top: -12px;
  width: 22px; height: 28px;
  background: url(images/sparkle.svg) center / contain no-repeat;
  animation: twinkle 2.2s ease-in-out infinite .7s;
}
.hero-button:hover::after { animation: spin .8s ease-in-out; }

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  50% { transform: scale(.55) rotate(25deg); opacity: .55; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-8px) rotate(6deg); }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(4px, 5px) rotate(12deg); }
}
@keyframes spin { to { transform: rotate(180deg) scale(1.3); } }

@media (max-width: 560px) { .sprinkles .wide { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .sprinkles i, .hero-tagline::before, .hero-tagline::after, .menu h1::after, .hero-button::after, .order-cookie, .order-btn:hover, .nav-menu::after, .nav-menu:hover { animation: none; }
}

/* homepage: centre the hero in the space between header and footer */
main.home { display: flex; flex-direction: column; }
main.home .hero { margin: auto; width: 100%; }
