/* ─────────────────────────────────────────────────────────
   Pops By AJ — Sweet on a Stick
   ───────────────────────────────────────────────────────── */

:root {
  --cream: #FAF6EE;
  --cream-2: #F4ECDA;
  --blush: #F8D7D7;
  --blush-deep: #E89DA8;
  --mint: #CFEDDB;
  --mint-deep: #7FB99B;
  --honey: #F4D08F;
  --honey-deep: #C99452;
  --lavender: #E5D4F1;
  --cocoa: #3B2C28;
  --cocoa-soft: #5A4641;
  --paper-line: rgba(59,44,40,.08);

  --display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --script: 'Caveat', cursive;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --pad: clamp(20px, 4vw, 56px);

  /* set by JS scroll listener — drives palette shift */
  --bg: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--cocoa);
  background: var(--bg);
  transition: background 1.2s ease;
  overflow-x: hidden;
}

/* paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,.012) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,.012) 0 1px, transparent 2px);
  background-size: 6px 6px, 9px 9px;
  z-index: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────
   Sprinkles drift layer
   ───────────────────────────────────────────────────────── */
.sprinkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.sprinkles span {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: 4px;
  height: 14px;
  background: var(--c);
  border-radius: 2px;
  transform: rotate(var(--r));
  animation: drift var(--d) linear infinite;
  animation-delay: var(--del);
  opacity: .55;
}
@keyframes drift {
  0%   { transform: translateY(-30px) rotate(var(--r)); opacity: 0; }
  10%  { opacity: .55; }
  90%  { opacity: .55; }
  100% { transform: translateY(110vh) rotate(calc(var(--r) + 180deg)); opacity: 0; }
}

/* ─────────────────────────────────────────────────────────
   Nav
   ───────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--paper-line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--cocoa);
  font-family: var(--display);
}
.brand-pops { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.brand-by   { font-family: var(--script); font-size: 22px; color: var(--blush-deep); transform: translateY(-2px); display: inline-block; }
.brand-aj   { font-size: 22px; font-weight: 700; letter-spacing: 0.02em; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--cocoa);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 6px 0;
}
.nav-links a:not(.nav-cta):hover::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--blush-deep);
  border-radius: 2px;
}
.nav-cta {
  background: var(--cocoa);
  color: var(--cream) !important;
  padding: 8px 16px !important;
  border-radius: 999px;
  transition: background .2s, transform .2s;
}
.nav-cta:hover { background: var(--blush-deep); transform: translateY(-1px); }

@media (max-width: 720px) {
  .nav-links { gap: 14px; }
  .nav-links li:nth-child(2),
  .nav-links li:nth-child(3) { display: none; }
}

/* ─────────────────────────────────────────────────────────
   Hero — wordmark with the O as a cake pop
   ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px var(--pad) 80px;
}
.hero-inner {
  max-width: 980px;
  position: relative;
  z-index: 2;
}
.eyebrow {
  display: inline-block;
  font-family: var(--script);
  color: var(--blush-deep);
  font-size: 24px;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(72px, 14vw, 200px);
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vw, 12px);
}
.wm-o {
  display: inline-flex;
  width: clamp(64px, 13vw, 180px);
  height: clamp(64px, 13vw, 180px);
  position: relative;
  transform-origin: 50% 60%;
  animation: bob 4.5s ease-in-out infinite;
}
.pop-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 16px 24px rgba(184,111,126,.35));
  animation: rotate 14s linear infinite;
  transform-origin: 50% 40%;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes rotate {
  0%   { transform: rotate(-8deg); }
  50%  { transform: rotate(8deg); }
  100% { transform: rotate(-8deg); }
}

.wordmark-row2 {
  font-size: clamp(56px, 11vw, 150px);
  margin-top: 6px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.wordmark-row2 .amp-aj {
  font-style: italic;
  color: var(--blush-deep);
  font-family: var(--display);
}

.hero-lede {
  font-family: var(--display);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 400;
  max-width: 640px;
  margin: 28px auto 0;
  color: var(--cocoa-soft);
}
.hero-lede em {
  font-family: var(--script);
  font-style: normal;
  color: var(--blush-deep);
  font-size: 1.15em;
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  color: var(--cocoa);
  background: transparent;
  border: 1.5px solid var(--cocoa);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--cocoa); color: var(--cream); transform: translateY(-2px); }
.btn-filled { background: var(--cocoa); color: var(--cream); }
.btn-filled:hover { background: var(--blush-deep); border-color: var(--blush-deep); }
.btn-large { padding: 18px 34px; font-size: 17px; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--cocoa-soft);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  opacity: .55;
}
.scroll-cue span {
  width: 3px;
  height: 7px;
  background: var(--cocoa-soft);
  border-radius: 3px;
  animation: cue 1.6s ease-in-out infinite;
}
@keyframes cue {
  0%, 20% { transform: translateY(0); opacity: 1; }
  80%, 100% { transform: translateY(10px); opacity: 0; }
}

/* ─────────────────────────────────────────────────────────
   Story
   ───────────────────────────────────────────────────────── */
.story { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.story-grid {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.story-art { position: relative; }
.pop-cluster { width: 100%; height: auto; filter: drop-shadow(0 18px 28px rgba(0,0,0,.08)); }
.story-text h2 {
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 12px 0 24px;
}
.story-text h2 em {
  font-family: var(--script);
  font-style: normal;
  color: var(--blush-deep);
}
.story-text p {
  margin: 0 0 16px;
  color: var(--cocoa-soft);
  font-size: 17px;
}
.story-text p em {
  font-family: var(--script);
  font-style: normal;
  color: var(--cocoa);
}
.signature {
  font-family: var(--script);
  font-size: 28px;
  color: var(--blush-deep);
  margin-top: 24px !important;
}

@media (max-width: 760px) {
  .story-grid { grid-template-columns: 1fr; text-align: center; }
  .story-art { max-width: 280px; margin: 0 auto; }
}

/* ─────────────────────────────────────────────────────────
   Section heading shared
   ───────────────────────────────────────────────────────── */
.section-head { text-align: center; margin-bottom: clamp(40px, 6vw, 80px); }
.section-head .eyebrow { color: var(--blush-deep); }
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 8px 0 16px;
}
.section-lede {
  max-width: 540px;
  margin: 0 auto;
  color: var(--cocoa-soft);
  font-size: 17px;
}

/* ─────────────────────────────────────────────────────────
   Lineup — pops on a stick rack
   ───────────────────────────────────────────────────────── */
.lineup { padding: clamp(60px, 10vw, 140px) 0; }
.rack {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 360px;
  padding: 40px 0 60px;
  flex-wrap: wrap;
}
.rack-shelf {
  position: absolute;
  left: 0; right: 0; bottom: 50px;
  height: 14px;
  background: linear-gradient(to bottom, #E8DCC0, #D9C9A3 60%, #B8A87A);
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(184,164,122,.35);
}
.rack-shelf::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -2px;
  height: 2px;
  background: rgba(255,255,255,.5);
}
.rack-pop {
  position: relative;
  margin: 0;
  height: var(--h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  transform-origin: 50% 100%;
  animation: sway 5s ease-in-out infinite;
  animation-delay: calc(var(--h) * -0.01s);
}
.rack-pop:nth-child(odd) { animation-duration: 6s; }
.rack-pop:nth-child(3n)  { animation-duration: 7s; }
@keyframes sway {
  0%, 100% { transform: rotate(-1.2deg); }
  50%      { transform: rotate(1.2deg); }
}
.rack-pop:hover { animation-play-state: paused; }
.rack-pop:hover .rack-photo {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 22px 40px rgba(0,0,0,.18);
}
.rack-stick {
  width: 5px;
  flex: 1;
  background: linear-gradient(to bottom, #F8F1E0, #E8DCC0);
  border-radius: 3px;
  margin-bottom: -8px;
  z-index: 1;
}
.rack-photo {
  width: clamp(96px, 11vw, 140px);
  height: clamp(96px, 11vw, 140px);
  border-radius: 50%;
  background: var(--c);
  position: relative;
  z-index: 2;
  box-shadow: 0 14px 28px rgba(0,0,0,.14), inset -8px -10px 20px rgba(0,0,0,.18), inset 12px 8px 20px rgba(255,255,255,.35);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rack-photo::before {
  content: '';
  position: absolute;
  top: 14%;
  left: 18%;
  width: 28%;
  height: 18%;
  background: rgba(255,255,255,.55);
  border-radius: 50%;
  filter: blur(2px);
}
.rack-photo::after {
  content: attr(data-label);
  position: absolute;
  bottom: -32px;
  white-space: nowrap;
  font-family: var(--script);
  color: var(--cocoa-soft);
  font-size: 16px;
  opacity: 0;
  transition: opacity .3s;
}
.rack-pop:hover .rack-photo::after { opacity: 1; }
.rack-note {
  text-align: center;
  font-family: var(--script);
  color: var(--cocoa-soft);
  margin-top: 20px;
  font-size: 18px;
}

/* ─────────────────────────────────────────────────────────
   Build Your Pop — interactive
   ───────────────────────────────────────────────────────── */
.build {
  padding: clamp(60px, 10vw, 140px) 0;
}
.builder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg) 60%, white), var(--bg));
  border-radius: 32px;
  padding: clamp(30px, 5vw, 60px);
  border: 1px solid var(--paper-line);
  box-shadow: 0 30px 60px rgba(59,44,40,.05);
}
.builder-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.builder-svg {
  width: 100%;
  max-width: 280px;
  filter: drop-shadow(0 22px 32px rgba(0,0,0,.18));
}
.builder-svg #bp-base,
.builder-svg #bp-coat { transition: fill .4s, stroke-width .4s, stroke .4s; }

.builder-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 360px;
}
.builder-readout > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, white);
  border: 1px solid var(--paper-line);
}
.ro-label {
  font-family: var(--script);
  color: var(--blush-deep);
  font-size: 15px;
}
.builder-readout > div > span:nth-child(2) {
  font-family: var(--display);
  font-size: 14px;
  color: var(--cocoa);
  font-weight: 500;
}

.builder-controls fieldset {
  border: none;
  padding: 0;
  margin: 0 0 20px;
}
.builder-controls legend {
  font-family: var(--script);
  color: var(--blush-deep);
  font-size: 22px;
  margin-bottom: 8px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: transparent;
  border: 1.5px solid var(--paper-line);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--body);
  font-size: 14px;
  color: var(--cocoa-soft);
  cursor: pointer;
  transition: all .2s;
}
.chip:hover { border-color: var(--cocoa-soft); color: var(--cocoa); }
.chip.active {
  background: var(--cocoa);
  color: var(--cream);
  border-color: var(--cocoa);
}
.btn-build { margin-top: 16px; }

@media (max-width: 760px) {
  .builder { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────
   How It Works — steps + cottage seal
   ───────────────────────────────────────────────────────── */
.how { padding: clamp(60px, 10vw, 140px) 0; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 32px 28px;
  background: color-mix(in srgb, var(--bg) 60%, white);
  border-radius: 24px;
  border: 1px solid var(--paper-line);
}
.step-num {
  position: absolute;
  top: -22px;
  left: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cocoa);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
}
.steps h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  margin: 16px 0 12px;
  letter-spacing: -0.01em;
}
.steps p { color: var(--cocoa-soft); margin: 0; font-size: 16px; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

.seal {
  margin: 60px auto 0;
  max-width: 320px;
  padding: 28px 24px;
  border: 2px solid var(--cocoa);
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--cream);
  position: relative;
  transform: rotate(-4deg);
  box-shadow: 0 8px 0 -2px var(--cocoa), 0 16px 24px rgba(0,0,0,.08);
}
.seal::before, .seal::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--cocoa-soft);
  border-radius: 50%;
}
.seal-eyebrow {
  font-family: var(--script);
  color: var(--blush-deep);
  font-size: 18px;
  margin-bottom: 4px;
}
.seal-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}
.seal-line {
  width: 40px;
  height: 2px;
  background: var(--cocoa);
  margin: 8px 0;
}
.seal-fine {
  font-size: 11px;
  color: var(--cocoa-soft);
  max-width: 200px;
  line-height: 1.35;
}

/* ─────────────────────────────────────────────────────────
   Inquire — form
   ───────────────────────────────────────────────────────── */
.inquire { padding: clamp(60px, 10vw, 140px) 0; }
.inquire-form {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.inquire-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 600px) {
  .inquire-form .row { grid-template-columns: 1fr; }
}
.inquire-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  color: var(--cocoa);
}
.inquire-form label > span {
  font-family: var(--script);
  color: var(--blush-deep);
  font-size: 18px;
  font-weight: 500;
}
.inquire-form input,
.inquire-form select,
.inquire-form textarea {
  font-family: var(--body);
  font-size: 16px;
  padding: 14px 16px;
  border: 1.5px solid var(--paper-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 50%, white);
  color: var(--cocoa);
  transition: border-color .2s, background .2s;
}
.inquire-form input:focus,
.inquire-form select:focus,
.inquire-form textarea:focus {
  outline: none;
  border-color: var(--blush-deep);
  background: white;
}
.cf-turnstile { min-height: 65px; align-self: center; }
.btn-large { align-self: center; margin-top: 8px; }
.form-fine {
  text-align: center;
  font-size: 12px;
  color: var(--cocoa-soft);
  margin: 8px 0 0;
}
.form-message {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  text-align: center;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  border: 1.5px solid transparent;
}
.form-message-success {
  background: color-mix(in srgb, var(--mint) 70%, white);
  border-color: var(--mint-deep);
  color: #2f5a47;
}
.form-message-error {
  background: color-mix(in srgb, var(--blush) 80%, white);
  border-color: var(--blush-deep);
  color: #7a2c3a;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ─────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────── */
.footer {
  background: var(--cocoa);
  color: var(--cream);
  padding: 60px 0 40px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.brand-footer .brand-pops,
.brand-footer .brand-aj { color: var(--cream); }
.brand-footer .brand-by { color: var(--blush); }
.footer-tag {
  font-family: var(--script);
  color: var(--blush);
  font-size: 18px;
  margin-top: 6px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(250,246,238,.3);
  padding-bottom: 4px;
  font-size: 14px;
  width: fit-content;
}
.footer-links a:hover { border-color: var(--blush); color: var(--blush); }

.footer-fine {
  font-size: 12px;
  color: rgba(250,246,238,.65);
  line-height: 1.5;
}
.footer-copyright { margin-top: 16px; font-size: 12px; }
.footer-copyright a {
  color: var(--blush);
  text-decoration: none;
  border-bottom: 1px solid rgba(248,215,215,.4);
}
.footer-copyright a:hover { color: var(--cream); border-color: var(--cream); }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: left; }
}
