/* ===== Theme colours & fonts — change these to restyle the whole site ===== */
:root {
  --blue-1: #0b86c6;          /* background gradient, top */
  --blue-2: #075a8c;          /* background gradient, bottom */
  --blue-ink: #0a6aa6;        /* blue used on white cards */
  --yellow: #f7c443;          /* main accent / buttons */
  --yellow-2: #f2a92c;        /* button gradient end */
  --ink: #17283b;             /* dark text */
  --muted: #5b6b7d;           /* secondary text on cards */
  --card: #ffffff;
  --line: #e2e8f0;
  --soft: #f3f8fc;            /* light blue tint on cards */
  --error: #c0392b;
  --radius: 20px;
  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body {
  font-family: var(--font-body);
  color: #fff;
  background: linear-gradient(160deg, var(--blue-1) 0%, var(--blue-2) 100%) fixed;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding-inline: 20px; }

/* ----- top bar ----- */
.topbar { border-bottom: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.06); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; }
.stepper { list-style: none; display: flex; gap: 6px; margin: 0; padding: 8px 0; flex-wrap: wrap; }
.stepper li { font-size: .82rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }
.stepper li.done { background: rgba(255,255,255,.22); color: #fff; }
.stepper li.active { background: var(--yellow); color: var(--ink); }
.test-banner { background: #fff4d6; color: #6b4e00; text-align: center; font-size: .85rem; font-weight: 700; padding: 6px 12px; }

main { padding-block: 40px 60px; }

/* ----- landing ----- */
.hero > * { min-width: 0; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; min-height: 70vh; }
.badge { display: inline-block; background: rgba(255,255,255,.18); padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .92rem; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 12px; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; margin-top: 20px; }
.hl { color: var(--yellow); }
.lead { font-size: 1.12rem; color: rgba(255,255,255,.92); max-width: 560px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 24px; }
.ticks li { padding-left: 30px; position: relative; margin: 8px 0; font-weight: 600; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: .8rem; font-weight: 800; display: grid; place-items: center; }
.consent { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); padding: 14px 16px; border-radius: 14px; font-size: .92rem; margin-bottom: 22px; max-width: 560px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--yellow); flex: none; }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 480px; justify-self: center; width: 88%; }
.art { position: absolute; border-radius: 18px; box-shadow: 0 24px 50px rgba(0,0,0,.3); border: 6px solid #fff; }
.art-front { width: 72%; left: 14%; top: 10%; z-index: 3; transform: rotate(-2deg); }
.art-mid { width: 52%; right: -4%; top: 0; z-index: 2; transform: rotate(7deg); }
.art-back { width: 50%; left: -6%; bottom: 0; z-index: 1; transform: rotate(-9deg); }

/* ----- buttons ----- */
.btn { font: inherit; font-weight: 800; border: 0; border-radius: 14px; padding: 12px 22px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s, box-shadow .2s, opacity .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--yellow), var(--yellow-2)); color: var(--ink); box-shadow: 0 6px 18px rgba(242,169,44,.35); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(242,169,44,.5); }
.btn-ghost { background: transparent; color: var(--blue-ink); border: 2px solid var(--line); }
.btn-small { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 16px 30px; font-size: 1.08rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ----- cards / steps ----- */
.card { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); box-shadow: 0 30px 60px rgba(0,0,0,.18); max-width: 960px; margin: 0 auto; }
.card h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--ink); }
.card h3 { font-size: 1.2rem; margin-top: 26px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.notice { background: var(--soft); border-radius: 12px; padding: 12px 16px; color: var(--ink); font-size: .93rem; }
.form-error { color: var(--error); font-weight: 700; }
.notice.early { background: #fff6dc; font-weight: 700; }

/* choice cards (family, delivery) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.choice-grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.choice { font: inherit; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.choice:hover { border-color: #b9d7ec; transform: translateY(-2px); }
.choice.selected { border-color: var(--blue-ink); box-shadow: 0 0 0 4px rgba(10,106,166,.12); background: var(--soft); }
.choice-icon { font-size: 1.9rem; line-height: 1; margin-bottom: 6px; }
.choice-title { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; }
.choice-sub { color: var(--muted); font-size: .93rem; }
.price { margin-top: 8px; font-weight: 800; color: var(--blue-ink); font-size: 1.15rem; }

/* photos */
.tips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.tips span { background: var(--soft); border-radius: 999px; padding: 6px 12px; font-size: .88rem; font-weight: 700; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.slot { border: 2px dashed #c8d6e4; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fbfdff; }
.slot.filled { border-style: solid; border-color: #bfe0c9; background: #f6fcf8; }
.slot-title { font-weight: 800; }
.slot-hint { color: var(--muted); font-size: .86rem; margin-top: -8px; }
.slot-preview { aspect-ratio: 3 / 4; border-radius: 12px; background: var(--soft) center / cover no-repeat; display: grid; place-items: center; color: #9db3c8; font-size: 2.6rem; overflow: hidden; }
.slot input { display: none; }

/* avatars */
.working { display: flex; gap: 20px; align-items: center; background: var(--soft); border-radius: 16px; padding: 20px; margin: 16px 0; }
.working-title { font-weight: 800; margin: 0 0 4px; }
.working .muted { margin: 0; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 5px solid #cfe3f2; border-top-color: var(--blue-ink); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 10px; background: #dbe8f3; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--yellow), var(--yellow-2)); transition: width .5s; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 18px; }
.avatar { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.avatar-img { aspect-ratio: 1 / 1; background: var(--soft); position: relative; display: grid; place-items: center; }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.avatar-img .spinner { position: absolute; }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.18); display: grid; place-items: center; padding: 0 0 3px; }
.nav-arrow:hover { background: #fff; }
.nav-arrow.prev { left: 8px; }
.nav-arrow.next { right: 8px; }
.version-tag { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(23,40,59,.75);
  color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.avatar-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.avatar-name { font-weight: 800; }
.avatar-body textarea { font: inherit; font-size: .9rem; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; min-height: 64px; }
.avatar-body label { font-size: .85rem; font-weight: 700; color: var(--muted); }

/* forms */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .9rem; }
.field.full { grid-column: 1 / -1; }
.field input { font: inherit; font-weight: 400; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); }
.field input:focus, .avatar-body textarea:focus { outline: none; border-color: var(--blue-ink); box-shadow: 0 0 0 3px rgba(10,106,166,.12); }
.field input.invalid { border-color: var(--error); }

/* book progress */
.ring { --p: 0; width: 160px; height: 160px; border-radius: 50%; margin: 6px auto 22px; display: grid; place-items: center;
  background: conic-gradient(var(--yellow-2) calc(var(--p) * 1%), #e3edf5 0); position: relative; transition: --p .5s; }
.ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #fff; }
.ring span { position: relative; font-family: var(--font-head); font-weight: 700; font-size: 2.1rem; color: var(--ink); }
.ring.pulse::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid rgba(242,169,44,.35); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.95); opacity: 1; } to { transform: scale(1.12); opacity: 0; } }
.done-cover { width: min(320px, 80%); margin: 0 auto 20px; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,.2); }
.lead-dark { font-size: 1.1rem; }

.start-over { text-align: center; margin-top: 26px; }
.start-over a { color: rgba(255,255,255,.8); font-weight: 700; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 28px; }
  .hero-art { max-width: 380px; order: -1; }
  .fields { grid-template-columns: 1fr; }
  .stepper li:not(.active) { display: none; }
  .actions .btn { flex: 1; }
}

/* traditional / casual switch on a parent's photo card */
.outfit { display: flex; flex-direction: column; gap: 6px; }
.outfit-label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.segmented { display: flex; border: 1.5px solid #c8d6e4; border-radius: 999px; overflow: hidden; background: #fff; }
.segmented button { flex: 1; border: 0; background: transparent; padding: 7px 10px; font: inherit; font-size: .88rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.segmented button.on { background: var(--blue-ink); color: #fff; }
.segmented button:disabled { cursor: default; opacity: .7; }
