/* Self-hosted and preloaded so text doesn't flicker. The script fonts stay hidden until ready,
   since a stand-in looks nothing like them. Body text shows straight away in a similar sans. */
@font-face { font-family: "Sacramento"; src: url(../fonts/sacramento.woff2) format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Caveat"; src: url(../fonts/caveat.woff2) format("woff2"); font-weight: 400 700; font-display: block; }
@font-face { font-family: "Nunito"; src: url(../fonts/nunito.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --navy: #323b6c; /* sampled from the landing mockup */
  --navy-deep: #262d57;
  --lilac: #eed4fd;
  --lilac-glow: #c98bff;
  --gold: #e8c468;
  --white: #fff;
  --photo-bg: transparent; /* behind the gallery photos; try colours with js/dev-tools.js */
  --ink: #2a3160;
  --script: "Sacramento", cursive;
  --hand: "Caveat", cursive;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; } /* keeps link targets and focused fields clear of the fixed menu bar */
@media (max-width: 560px) { html { scroll-padding-top: 100px; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy) url(../img/brand/stars.svg);
  color: var(--white);
  font: 400 1.0625rem/1.55 var(--body);
}
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--lilac); }

/* Shown only when words.js is broken or missing a word. */
.word-problems { margin: 0; padding: 12px 16px; background: #c8102e; color: #fff; font-weight: 700; text-align: center; }

/* Type */
.neon {
  font-family: var(--script);
  font-weight: 400;
  color: var(--lilac);
  text-shadow: 0 0 6px var(--lilac-glow), 0 0 22px var(--lilac-glow);
}
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; }
.hand { font-family: var(--hand); }
.page-title { text-align: center; font-size: clamp(3rem, 11vw, 4.5rem); padding-top: 16px; }
.page-intro {
  max-width: 34em;
  margin: 4px auto 0;
  text-align: center;
  font: 500 clamp(1.45rem, 4.5vw, 1.75rem)/1.25 var(--hand);
}
.flourish { width: min(240px, 70%); margin: 16px auto; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--ink);
  font: 600 1.6rem/1.2 var(--hand);
  font-variant-caps: small-caps;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--lilac-glow);
  transition: box-shadow .2s, transform .2s;
}
.btn:hover, .btn:focus-visible { box-shadow: 0 0 18px 2px var(--lilac-glow); transform: translateY(-1px); }
.btn-small { padding: 4px 16px; font-size: 1.25rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Header and footer on inner pages */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 20px;
  padding: 12px 16px;
  background: var(--navy-deep);
}
.logo { margin-right: auto; font: 400 1.9rem/1.2 var(--script); color: var(--lilac); text-decoration: none; text-shadow: 0 0 10px var(--lilac-glow); }
.site-nav { display: flex; align-items: center; gap: 16px; font: 500 1.35rem/1.2 var(--hand); }
.site-nav a { white-space: nowrap; }
@media (max-width: 480px) {
  .site-nav { gap: 10px; font-size: clamp(1.05rem, 5.4vw, 1.35rem); }
  .site-nav .btn-small { padding-inline: 12px; font-size: inherit; }
}
.site-nav a:not(.btn)[aria-current] { color: var(--gold); }
@media (max-width: 560px) { .logo { margin: 0; width: 100%; text-align: center; } }
.site-footer { padding: 20px 16px; text-align: center; font: 500 1.2rem/1.3 var(--hand); color: var(--lilac); }

/* Landing page: two columns as in the mockup, one on a phone with the CTA high up */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 48px;
  align-items: start;
  padding-top: 24px;
  text-align: center;
}
.hero-left, .hero-right { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-right { align-self: center; }
main.landing { max-width: 1360px; }
main.landing + .site-footer { padding: 0 16px 12px; } /* keeps the landing page within one laptop screen */
.hero h1 { font-size: min(4.4vw, 4.2rem); white-space: nowrap; }
.tagline { margin: 0; font: 500 clamp(1.7rem, 3.4vw, 2.75rem)/1.15 var(--hand); }
.promise { font: 500 clamp(2.3rem, 4.4vw, 3.5rem)/1.2 var(--hand); color: var(--lilac); text-wrap: balance; }
.fairy { width: min(100%, 430px); margin-top: 12px; }
.bundle {
  position: relative;
  display: grid;
  width: min(100%, 440px);
  padding: 8px 12px 12px;
  border: 1px solid var(--lilac); /* the same glowing border as the gallery tiles */
  border-radius: 18px;
  box-shadow: 0 0 18px var(--lilac-glow);
  transition: border-color .15s, box-shadow .15s;
}
.bundle:hover, .bundle:focus-within { border-color: var(--white); box-shadow: 0 0 10px 2px var(--lilac), 0 0 34px 8px var(--lilac-glow); }
.bundle-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 4px;
  color: var(--lilac);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(.94);
  transition: opacity 1.1s ease, transform 1.4s ease, visibility 1.1s;
}
.bundle-slide.is-active { opacity: 1; visibility: visible; transform: none; }
.bundle-photo { position: relative; display: block; width: 100%; aspect-ratio: 1; }
.bundle-photo img { position: absolute; inset: 0; width: 100%; height: 100%; margin: auto; object-fit: contain; }
.bundle-name { font-family: var(--script); font-size: clamp(2rem, 3vw, 2.5rem); line-height: 1.2; text-shadow: 0 0 10px var(--lilac-glow); }
.bundle-dots { display: flex; justify-content: center; gap: 2px; }
.bundle-dot { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.bundle-dot::before { content: ""; width: 12px; height: 12px; border: 1.5px solid var(--lilac); border-radius: 50%; transition: background-color .3s, border-color .3s, box-shadow .3s; }
.bundle-dot:hover::before { border-color: var(--gold); background: var(--gold); }
.bundle-dot[aria-current]::before { border-color: var(--lilac); background: var(--lilac); box-shadow: 0 0 8px var(--lilac-glow); }
.spark {
  position: absolute;
  z-index: 1;
  width: 26px;
  height: 26px;
  background: var(--gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: 0;
  pointer-events: none;
}
.is-sparkling .spark { animation: spark 1.5s ease-out both; }
.spark:nth-of-type(2) { animation-delay: .15s !important; }
.spark:nth-of-type(3) { animation-delay: .3s !important; }
.spark:nth-of-type(4) { animation-delay: .1s !important; }
.spark:nth-of-type(5) { animation-delay: .4s !important; }
@keyframes spark {
  0% { opacity: 0; transform: scale(.2) rotate(0); }
  40% { opacity: 1; transform: scale(1.1) rotate(25deg); }
  100% { opacity: 0; transform: scale(.3) rotate(60deg); }
}
.hero-links { display: flex; flex-direction: column; align-items: center; gap: 4px; white-space: nowrap; font: 500 clamp(1.7rem, 3vw, 2.2rem)/1.3 var(--hand); }
.twinkle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 50% { opacity: .15; transform: scale(.6) rotate(20deg); } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 12px; }
  .hero h1 { font-size: clamp(3.1rem, 13vw, 4.5rem); white-space: normal; }
  .fairy { width: min(78%, 340px); margin-top: 4px; }
  .hero-right { margin-top: 32px; }
  .bundle { width: min(92%, 420px); }
  .twinkle-optional { display: none; }
}

/* Collections */
.collection { padding-top: 32px; scroll-margin-top: 8px; text-align: center; }
.collection h2 { font-size: clamp(2.8rem, 8vw, 3.75rem); }
.collection-fairy { width: 132px; margin: 8px auto -2px; }
.collection p { margin: 0 auto 16px; max-width: 34em; font: 500 1.5rem/1.25 var(--hand); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 6px;
  border: 1px solid var(--lilac);
  border-radius: 18px;
  background: var(--photo-bg);
  box-shadow: 0 0 18px var(--lilac-glow);
  cursor: zoom-in;
  transition: transform .2s, box-shadow .2s;
}
.tile:hover, .tile:focus-visible { transform: translateY(-2px); border-color: var(--white); box-shadow: 0 0 10px 2px var(--lilac), 0 0 34px 8px var(--lilac-glow); }
.tile img { width: 100%; height: 100%; object-fit: contain; }
.tile-feature { grid-column: span 2; }
@media (min-width: 761px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .tile-feature { grid-row: span 2; }
}
.cta-band { padding-top: 40px; text-align: center; }

/* Fixed size whatever the photo's shape, so the controls never move between photos. */
.lightbox {
  width: min(94vw, 900px);
  height: min(90vh, 900px);
  height: min(90dvh, 900px); /* follows the phone's address bar where supported */
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--navy) linear-gradient(var(--photo-bg), var(--photo-bg));
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: rgb(20 24 54 / .85); }
.lightbox img { width: 100%; height: 100%; padding: 8px; object-fit: contain; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; background: var(--navy-deep); }
.lightbox-bar:last-child { padding-left: 8px; }
.lightbox-name { font: 400 clamp(1.8rem, 6vw, 2.25rem)/1.1 var(--script); color: var(--lilac); text-shadow: 0 0 10px var(--lilac-glow); }
.lightbox-count { color: var(--white); font-weight: 700; }
.lightbox-bar button { min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: var(--lilac); color: var(--ink); font-size: 1.2rem; cursor: pointer; }

/* How it works */
.steps { display: grid; gap: 14px; max-width: 720px; margin: 8px auto 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  padding: 16px 20px 16px 76px;
  border: 1px solid rgb(238 212 253 / .4);
  border-radius: 24px;
  background: var(--navy-deep);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font: 700 1.7rem/44px var(--hand);
  text-align: center;
}
.steps h2 { font: 600 1.8rem/1.2 var(--hand); color: var(--lilac); }
.steps p { margin: 4px 0 0; }
.faq { max-width: 720px; margin: 16px auto 0; padding: 16px 20px; border: 1px solid rgb(238 212 253 / .4); border-radius: 24px; background: var(--navy-deep); }
.faq h2 { margin: 0 0 4px; font: 600 1.8rem/1.2 var(--hand); color: var(--lilac); }
.faq p { margin: 8px 0 0; }
.faq ul { margin: 8px 0 0; padding-left: 20px; }
.faq li + li { margin-top: 6px; }

/* Estimate */
.preview-note {
  max-width: 720px;
  margin: 16px auto 0;
  padding: 8px 14px;
  border: 2px dashed var(--gold);
  border-radius: 12px;
  color: var(--gold);
  font-size: .95rem;
  text-align: center;
}
.estimate { max-width: 720px; margin: 16px auto 0; }
.contact { display: grid; gap: 6px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid rgb(238 212 253 / .4); border-radius: 18px; background: var(--navy-deep); }
.contact > label:first-child { font-weight: 700; }
.contact input[type="email"] { width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--white); color: var(--ink); font: inherit; }
.contact-promise { margin: 0; font-size: .92rem; line-height: 1.35; color: var(--lilac); }
.contact-optin { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.contact-optin input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--gold); }
.measure { margin-bottom: 12px; padding: 14px 16px; border-radius: 18px; background: var(--white); color: var(--ink); }
.measure h2 { margin-bottom: 8px; font: 600 1.9rem/1.1 var(--hand); text-align: center; }
.measure-body { display: grid; gap: 12px 20px; align-items: center; }
.measure-diagram { display: block; width: 100%; max-width: 380px; margin: 0 auto; font-family: var(--body); }
.measure-steps { margin: 0 0 10px; padding-left: 1.3em; }
.measure-helper { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.measure-helper label { display: grid; gap: 2px; font-size: .9rem; font-weight: 700; }
.measure-helper input { width: 100%; padding: 8px 10px; border: 2px solid var(--lilac); border-radius: 10px; color: var(--ink); font: inherit; }
.measure-result { min-height: 1.5em; margin: 8px 0 4px; font-weight: 700; }
@media (min-width: 680px) { .measure-body { grid-template-columns: 1.1fr 1fr; } }
.sizes { display: grid; gap: 10px; }
.size {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
}
.size svg { justify-self: center; }
.size h3 { font: 600 1.6rem/1.1 var(--hand); }
.size p { margin: 0; font-size: .92rem; line-height: 1.3; }
.size .size-range { font-weight: 700; }
.size .price { font-weight: 700; }
.size .price s { font-weight: 400; opacity: .7; }
.early-bird-note { margin: 0 0 12px; text-align: center; font-weight: 700; color: var(--gold); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--lilac);
  color: var(--ink);
  font: 700 1.4rem/1 var(--body);
  cursor: pointer;
}
.stepper button:disabled { opacity: .4; cursor: default; }
.stepper output { min-width: 1.6em; text-align: center; font-weight: 700; font-size: 1.15rem; }
@media (max-width: 480px) {
  .size { grid-template-columns: 64px 1fr; }
  .stepper { grid-column: 1 / -1; justify-content: flex-end; }
}
.total {
  position: sticky;
  bottom: 8px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 6px 20px;
  white-space: nowrap;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: var(--navy-deep);
  font: 600 1.6rem/1.3 var(--hand);
}
.total strong { font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1.1; color: var(--gold); }
.lead { display: grid; gap: 12px; margin-top: 20px; }
.lead h2 { font: 500 clamp(1.8rem, 5vw, 2.2rem)/1.2 var(--hand); color: var(--lilac); text-align: center; }
.lead label { display: grid; gap: 4px; font-weight: 700; }
.lead input, .lead textarea {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.lead .btn { justify-self: center; }
.picks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.picks legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.lead .pick { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 1px solid rgb(238 212 253 / .4); border-radius: 16px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; }
.lead .pick input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; }
.pick img { width: 72px; height: 72px; object-fit: contain; }
.pick:hover { border-color: var(--lilac); }
.pick:has(input:checked) { border: 2px solid var(--gold); padding: 9px 7px; background: var(--navy-deep); box-shadow: 0 0 12px var(--gold); }
.pick:has(input:focus-visible) { outline: 2px solid var(--white); outline-offset: 2px; }
@media (min-width: 761px) { .picks { grid-template-columns: repeat(3, 1fr); } }
.lead .field-hint, .lead .field-alert { margin: -6px 0 0; font-size: .95rem; }
.lead .field-alert { font-weight: 700; color: var(--gold); }
.lead .field-alert:empty { display: none; }
.lead input[type="date"] { min-height: 44px; color-scheme: light; }
.choices { display: grid; gap: 2px; min-width: 0; margin: 0; padding: 0; border: 0; }
.choices legend { margin-bottom: 4px; padding: 0; font-weight: 700; }
.lead .choice { display: flex; align-items: center; gap: 10px; min-height: 36px; font-weight: 400; cursor: pointer; }
.lead .choice input { flex: none; width: 20px; height: 20px; accent-color: var(--gold); }
.form-status { min-height: 1.5em; margin: 0; text-align: center; font-weight: 700; color: var(--gold); }
.fine-print { margin: 0; text-align: center; font-size: .9rem; opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before { animation: none !important; transition: none !important; }
}
