/* ============================================================
   Custom Cupcakes — Diana Rowe, Houston TX

   Everything here comes off Diana's own materials: the pink is
   measured from her business card, the page ground is the white
   of the boxes she delivers in, and the stage is ringed in that
   same pink so a past order reads like her mark.
   ============================================================ */

:root {
  /* Measured off the best-exposed shot of her card — it needed only ~10%
     white-balance correction. --pink is the exact mark; --pink-deep is the
     same hue darkened until white type on it clears 4.5:1; --pink-light is
     the version that clears 4.5:1 on the ink. */
  --pink:       #EC236E;
  --pink-deep:  #B31352;
  --pink-light: #FF7BA6;

  --ink:        #241019;
  --ink-soft:   #6B4F58;
  --paper:      #FFFFFF;
  --shell:      #FCEEF3;

  --display: "Darker Grotesque", "Haettenschweiler", Impact, sans-serif;
  --body:    "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.35vw + 0.92rem, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

:focus-visible {
  outline: 3px solid var(--pink-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  z-index: 50;
}
.skip:focus { left: 0.5rem; }

/* ---------- Shared type ---------- */

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink-deep);
  margin: 0 0 1rem;
}
.eyebrow--onink { color: var(--pink-light); }

.head { max-width: 46rem; margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); }

.head__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.head__note { margin: 0; color: var(--ink-soft); max-width: 42ch; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--pink-deep);
  color: var(--paper);
  border: 2px solid var(--pink-deep);
  border-radius: 999px;
  padding: 0.9rem 1.7rem;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--ink); border-color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--small { padding: 0.55rem 1.1rem; font-size: 0.7rem; }

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem var(--gutter);
}

.wordmark { display: block; line-height: 0; border-radius: 50%; transition: transform 0.2s ease; }
.wordmark:hover { transform: rotate(-5deg); }
.wordmark__logo { width: clamp(48px, 7vw, 62px); height: auto; }

.topnav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.9rem); }
.topnav a {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.topnav a:not(.btn):hover { color: var(--pink-deep); }

/* ---------- Section base (modifiers follow, so they win) ---------- */

.section { padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter); }

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

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100svh, 52rem);
  padding:
    clamp(1.25rem, 2.5vw, 2rem)
    var(--gutter)
    clamp(2.75rem, 5vw, 4rem);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      var(--paper) 0%,
      rgba(255, 255, 255, 0.96) 36%,
      rgba(255, 255, 255, 0.55) 48%,
      rgba(255, 255, 255, 0.12) 60%,
      transparent 72%
    ),
    url("assets/hero-cupcake-land.png") 70% 42% / cover no-repeat;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: center;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
}

.hero__inner > * { min-width: 0; }

.hero__copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.hero__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.9rem, 6.4vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.028em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.hero__title span { display: block; }
.hero__accent { color: var(--pink); }

.hero__lede {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 0.3vw + 0.94rem, 1.1rem);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero__hearts {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero__mascot {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  text-align: center;
}

.hero__mascot-img {
  width: 100%;
  height: auto;
  max-height: min(78vh, 38rem);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 22px 36px rgba(36, 16, 25, 0.2));
}

.hero__mascot-tag {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  margin: 0.4rem auto 0;
  padding: 0.4rem 0.85rem 0.5rem;
  background: var(--paper);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(36, 16, 25, 0.1);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero__mascot-tag strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-transform: none;
  line-height: 1;
  color: var(--ink);
}

.polaroid {
  margin: 0;
  width: 100%;
  max-width: 24rem;
  background: var(--paper);
  padding: 0.55rem 0.55rem 1.35rem;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 36px rgba(36, 16, 25, 0.14);
  transform: rotate(-3deg);
}

.polaroid.reveal.is-in { transform: rotate(-3deg); }

.polaroid__frame,
.stage__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--shell);
}

.stage { margin: 0; }

.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.shot.is-live { opacity: 1; }

/* the tall shots need their subject held in frame when squared off */
.shot[src$="reeses-cake.jpg"], .thumb img[src$="reeses-cake.jpg"], .polaroid img[src$="reeses-cake.jpg"] { object-position: center 64%; }
.shot[src$="rose-tower.jpg"],  .thumb img[src$="rose-tower.jpg"],  .polaroid img[src$="rose-tower.jpg"]  { object-position: center 44%; }
.shot[src$="lego.jpg"],        .thumb img[src$="lego.jpg"],        .polaroid img[src$="lego.jpg"]        { object-position: center 62%; }
.shot[src$="rose-swirls.jpg"], .thumb img[src$="rose-swirls.jpg"], .polaroid img[src$="rose-swirls.jpg"] { object-position: center 38%; }
.shot[src$="boxed.jpg"],       .thumb img[src$="boxed.jpg"],       .polaroid img[src$="boxed.jpg"]       { object-position: 74% center; }

/* ---------- Gallery ---------- */

.gallery { background: var(--shell); }

.gallery__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

.gallery__intro .head {
  margin-bottom: 0;
  max-width: none;
}

.gallery__intro .head__title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 0;
}

.gallery__lede {
  margin: 0;
  color: var(--ink-soft);
  max-width: 36ch;
  font-size: 1.05em;
  line-height: 1.55;
  padding-bottom: 0.2rem;
}

.gallery__board {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  padding: 0.5rem 0.25rem;
}

.gallery .polaroid { justify-self: center; }

.filmstrip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 0.65rem;
}
.filmstrip > li { min-width: 0; }

.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  background: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 0.85; }
.thumb[aria-current="true"] {
  opacity: 1;
  border-color: var(--pink);
  transform: translateY(-2px);
}

/* ---------- Flavors ---------- */

.flavors {
  --menu-gap: 1.75rem;
  --menu-cols: 4;
  --menu-col: calc((100% - (var(--menu-cols) - 1) * var(--menu-gap)) / var(--menu-cols));
}

.flavors__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

.flavors__intro .head {
  margin-bottom: 0;
  max-width: none;
}

.flavors__intro .head__title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 0;
}

.flavors__lede {
  margin: 0;
  color: var(--ink-soft);
  max-width: 36ch;
  font-size: 1.05em;
  line-height: 1.55;
  padding-bottom: 0.2rem;
}

.flavors__subhead {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.flavor-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--menu-cols), minmax(0, 1fr));
  gap: var(--menu-gap);
}

.flavor { border-top: 2px solid var(--ink); padding-top: 0.9rem; }

.flavor__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 35%;
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  background: var(--shell);
}

.flavor h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}

.flavor p { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--ink-soft); }

.week {
  display: grid;
  grid-template-columns: var(--menu-col) minmax(0, 1fr);
  align-items: center;
  gap: var(--menu-gap);
  background: var(--ink);
  color: var(--paper);
  margin: var(--menu-gap) calc(-1 * var(--gutter)) 0;
  padding: clamp(1.25rem, 3vw, 1.75rem) var(--gutter);
}

.week .flavor__photo {
  margin-bottom: 0;
  background: #3A2430;
}

.week__main { min-width: 0; }

.week__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink-light);
  margin: 0 0 0.45rem;
}

.week__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin: 0 0 0.35rem;
}

.week__note { font-size: 0.95rem; color: #D8C4CB; margin: 0; }

.week__meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink-light);
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid #4A2E38;
  max-width: 36ch;
}

/* ---------- Diana ---------- */

.diana { background: var(--ink); color: var(--paper); }

.diana__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: end;
}

.diana .head__title { color: var(--paper); }

.diana__body {
  margin: 0;
  color: #D8C4CB;
  max-width: 42ch;
  font-size: 1.05em;
  line-height: 1.55;
}

.diana__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.diana__facts li {
  border-top: 2px solid #4A2E38;
  padding-top: 0.75rem;
  display: grid;
  gap: 0.25rem;
}

.diana__fact-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink-light);
}

.diana__fact-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* ---------- Ordering steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}

.step { border-top: 2px solid var(--ink); padding-top: 1rem; }

.step__num {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 0.8;
  color: var(--pink);
  margin-bottom: 0.6rem;
}

.step h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  margin: 0 0 0.45rem;
}

.step p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }

.how__note {
  font-size: 0.85rem;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid #E7D7DD;
  color: var(--ink-soft);
}

/* ---------- Order ---------- */

.order { background: var(--shell); }

.order__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.direct { list-style: none; margin: 2rem 0 0; padding: 0; }
.direct li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-top: 1px solid #E7D7DD;
}
.direct__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  min-width: 4.5rem;
}
.direct a { color: var(--pink-deep); font-weight: 600; text-underline-offset: 3px; }

.pay-qr {
  margin: 1.75rem 0 0;
  padding: 0;
  max-width: 11rem;
}
.pay-qr img {
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}
.pay-qr figcaption {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field--wide, .form__foot { grid-column: 1 / -1; }

.field label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.opt { color: var(--ink-soft); font-weight: 500; letter-spacing: 0.06em; }

.field input,
.field select,
.field textarea {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  width: 100%;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: #8A737C; }

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--pink-deep); background: #FDE7EE; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 0.4rem; }

.form__hint { font-size: 0.78rem; line-height: 1.45; margin: 0; color: var(--ink-soft); max-width: 30ch; }
.form__hint--error { color: var(--pink-deep); font-weight: 600; }

/* ---------- Footer ---------- */

.footer { background: var(--ink); color: var(--paper); }
.footer__inner { padding: clamp(2.5rem, 5vw, 4rem) var(--gutter); }

.footer__logo { width: clamp(104px, 15vw, 148px); height: auto; margin-bottom: 1.5rem; }

.footer__meta { font-size: 0.78rem; letter-spacing: 0.03em; margin: 0 0 0.35rem; color: #D8C4CB; }
.footer__meta--fine { color: #AD8E99; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  margin: 1rem 0 1.25rem;
}
.footer__links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pink-light);
  text-underline-offset: 3px;
}
.footer__links a:hover { color: var(--paper); }

/* ---------- Motion ---------- */

.reveal { opacity: 0; transform: translateY(12px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
  transition-delay: calc(var(--d, 0) * 60ms);
}

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
  .hero__mascot {
    width: min(22rem, 100%);
  }
  .hero__mascot-img {
    max-height: min(64vh, 30rem);
  }
  .gallery__intro { grid-template-columns: minmax(0, 1fr); }
  .gallery__board { grid-template-columns: minmax(0, 1fr); }
  .gallery .polaroid { max-width: 22rem; }
  .order__grid { grid-template-columns: minmax(0, 1fr); }
  .diana__layout { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .flavors__intro { grid-template-columns: minmax(0, 1fr); }
  .flavors { --menu-cols: 2; }
  .week { grid-template-columns: var(--menu-col) minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .hero {
    min-height: 0;
    align-items: stretch;
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 2.5rem);
  }
  .hero__bg {
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.82) 38%,
        var(--paper) 52%
      ),
      url("assets/hero-cupcake-land.png") center 18% / cover no-repeat;
  }
  .hero__visual {
    justify-content: center;
  }
  .hero__mascot {
    width: min(22rem, 88%);
  }
  .hero__mascot-img {
    max-height: min(56vh, 26rem);
  }
}

@media (max-width: 620px) {
  .topnav a:not(.btn) { display: none; }
  .hero {
    padding-bottom: clamp(2.25rem, 5vw, 3rem);
  }
  .hero__mascot {
    width: min(18.75rem, 90%);
  }
  .hero__mascot-img {
    max-height: min(48vh, 22rem);
  }
  .gallery .polaroid { max-width: 18rem; }
  .form { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; text-align: center; }
  .flavors { --menu-cols: 1; }
  .week {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .wordmark:hover, .thumb[aria-current="true"], .polaroid, .polaroid.reveal.is-in { transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
