/* Certified Nice brand system. A warm North Pole heirloom: cream paper, thin gold rules, no heavy shadows. */
@font-face { font-family: 'Fraunces'; font-weight: 600; font-display: swap; src: url('/fonts/fraunces-600.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 700; font-display: swap; src: url('/fonts/fraunces-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('/fonts/nunito-800.woff2') format('woff2'); }

:root {
  --santa-red: #B3202A;
  --berry: #7E1621;
  --gold: #C9A24B;
  --gold-light: #E8CB7E;
  --gold-deep: #7A5C1E;
  --pine: #1F4A38;
  --cream-100: #FBF5E9;
  --parchment: #F1E4C8;
  --ink-900: #2A1B14;
  --ink-600: #6B5A4E;
  --radius-card: 16px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream-100);
  color: var(--ink-900);
  font: 400 1.0625rem/1.6 var(--sans);
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--berry); }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, 1080px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 720px); margin-inline: auto; }
.eyebrow {
  font: 800 0.8rem/1.2 var(--sans);
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--gold-deep); margin: 0 0 0.9em;
}
.lede { font-size: 1.2rem; color: var(--ink-600); max-width: 34em; }
.rule { border: 0; border-top: 1px solid var(--gold); margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0.7em 1.7em;
  border-radius: 999px; border: 2px solid var(--santa-red);
  background: var(--santa-red); color: var(--cream-100);
  font: 800 1.05rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover, .btn:active { background: var(--berry); border-color: var(--berry); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-quiet { background: transparent; color: var(--berry); border-color: var(--gold); }
.btn-quiet:hover, .btn-quiet:active { background: var(--parchment); border-color: var(--gold); }

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-900); font: 700 1.3rem/1 var(--serif); }
.brand svg { width: 44px; height: 44px; flex: none; }

.card { background: var(--parchment); border: 1px solid var(--gold); border-radius: var(--radius-card); padding: 24px; }
.section { padding: clamp(48px, 9vw, 96px) 0; }

/* Landing */
.hero { padding: clamp(24px, 6vw, 64px) 0 clamp(48px, 8vw, 88px); }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 em { font-style: normal; color: var(--santa-red); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.hero-note { color: var(--ink-600); font-size: 0.95rem; margin: 0; }
.hero-card { text-align: center; padding: 28px 24px 22px; }
.hero-card svg { width: min(100%, 260px); height: auto; }
.hero-card p { font: 600 1.2rem/1.3 var(--serif); margin: 8px 0 0; }
.hero-card small { color: var(--ink-600); }

.grid-4 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 32px; }
.grid-4 .card p { margin: 0; color: var(--ink-600); }
.num { font: 700 1.1rem/1 var(--serif); color: var(--gold-deep); display: block; margin-bottom: 10px; }

.band { background: var(--pine); color: var(--cream-100); }
.band .eyebrow { color: var(--gold-light); }
.band p { color: #E4EDE7; max-width: 38em; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--gold); }
.steps li:last-child { border-bottom: 1px solid var(--gold); }
.steps li::before {
  content: counter(step); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--gold);
  font: 700 1.2rem/1 var(--serif); color: var(--gold-deep); background: var(--parchment);
}
.steps strong { display: block; font: 600 1.15rem/1.3 var(--serif); }
.steps span { color: var(--ink-600); }

.promises { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.promises li { padding-left: 34px; position: relative; }
.promises li::before {
  content: ''; position: absolute; left: 0; top: 0.2em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16 8' fill='none' stroke='%231F4A38' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.faq details { border-top: 1px solid var(--gold); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--gold); }
.faq summary { cursor: pointer; font: 600 1.15rem/1.3 var(--serif); min-height: 32px; }
.faq p { margin: 10px 0 0; color: var(--ink-600); }

.cta { text-align: center; }
.cta .lede { margin-inline: auto; }
.site-footer { padding: 32px 0 48px; color: var(--ink-600); font-size: 0.92rem; text-align: center; }

/* Order form */
.order-layout { display: grid; gap: 28px; align-items: start; padding-bottom: 72px; }
@media (min-width: 900px) { .order-layout { grid-template-columns: 1fr 320px; } }
.preview { text-align: center; }
@media (min-width: 900px) { .preview { position: sticky; top: 20px; order: 2; } }
.preview svg { width: 200px; height: auto; }
/* Phones and small tablets: the builder carries its own preview that stays in view while choosing,
   so this card would show the same avatar a second time. It comes back on the check step, where
   the form (and the builder with it) is hidden. */
@media (max-width: 899px) {
  .order-layout > .preview { display: none; }
  .order-layout:has(#order-form[hidden]) > .preview { display: block; }
}
.preview .name { font: 700 1.5rem/1.2 var(--serif); margin: 6px 0 0; min-height: 1.2em; overflow-wrap: anywhere; }
.preview small { color: var(--ink-600); }

fieldset { border: 0; margin: 0 0 36px; padding: 0; min-width: 0; }
legend { font: 700 1.45rem/1.2 var(--serif); padding: 0; margin-bottom: 6px; }
.hint { color: var(--ink-600); font-size: 0.95rem; margin: 0 0 14px; }
.field { margin-bottom: 18px; }
.field label, .group-label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .optional { font-weight: 400; color: var(--ink-600); }
input[type='text'], input[type='email'], select {
  width: 100%; min-height: 50px; padding: 10px 14px;
  border: 1px solid var(--gold-deep); border-radius: 12px;
  background: #FFFDF8; color: var(--ink-900); font: 400 1.0625rem/1.3 var(--sans);
}
.row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
.error { color: var(--berry); font-weight: 700; font-size: 0.95rem; margin: 6px 0 0; }
.error:empty { display: none; }
.form-error { border: 1px solid var(--berry); border-radius: 12px; padding: 12px 16px; background: #FFFDF8; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label { position: relative; cursor: pointer; margin: 0; }
.swatches input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatches span {
  display: grid; place-items: center; min-width: 48px; min-height: 48px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--gold-deep); background: #FFFDF8; font-weight: 700;
}
.swatches span.dot { padding: 0; width: 48px; background: var(--c); }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--cream-100), 0 0 0 6px var(--pine); }
.swatches input:focus-visible + span { outline: 3px solid var(--pine); outline-offset: 6px; }

.check { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; margin-bottom: 14px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--pine); }

.review dl { margin: 0; }
.review dt { font: 800 0.78rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-deep); margin-top: 18px; }
.review dd { margin: 4px 0 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.review .big { font: 700 2rem/1.15 var(--serif); }
.review-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
/* Character builder (public/js/builder.js): one question at a time, picture choices. */
.cb { display: grid; gap: 18px; background: var(--parchment); border: 1px solid var(--gold); border-radius: var(--radius-card); padding: 16px; text-align: left; }
@media (min-width: 640px) { .cb { grid-template-columns: 200px 1fr; gap: 24px; padding: 22px; align-items: start; } }
.cb-preview { display: flex; align-items: center; gap: 14px; background: var(--cream-100); border: 1px solid var(--gold-light); border-radius: 14px; padding: 10px 14px; position: sticky; top: 8px; z-index: 3; }
.cb-art { flex: none; width: 92px; }
.cb-art svg { display: block; width: 100%; height: auto; }
@media (min-width: 640px) { .cb-preview { flex-direction: column; padding: 16px; top: 16px; } .cb-art { width: 150px; } }
.cb-surprise { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--gold-deep); background: #FFFDF8; color: var(--ink-900); font: 700 0.95rem/1 var(--sans); cursor: pointer; }
.cb-surprise:hover { background: var(--parchment); }
.cb-main { min-width: 0; }
.cb-steps { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.cb-step { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--gold); background: #FFFDF8; color: var(--ink-600); font: 700 0.88rem/1 var(--sans); cursor: pointer; }
.cb-step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--parchment); color: var(--gold-deep); font-weight: 800; font-size: 0.8rem; }
.cb-step.seen .n { background: var(--pine); color: var(--gold-light); }
.cb-step.on { background: var(--pine); border-color: var(--pine); color: var(--cream-100); }
.cb-step.on .n { background: var(--gold-light); color: var(--pine); }
.cb-ask { font: 700 1.3rem/1.25 var(--serif); margin: 16px 0 12px; }
.cb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.cb-options.two { grid-template-columns: repeat(2, minmax(0, 150px)); }
.cb-opt { position: relative; cursor: pointer; }
.cb-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cb-tile { display: block; background: #FFFDF8; border: 2px solid transparent; outline: 1px solid var(--gold-light); border-radius: 14px; padding: 6px 4px 8px; text-align: center; transition: transform 0.12s ease; }
.cb-tile svg { display: block; width: 100%; height: auto; max-height: 120px; }
.cb-name { display: block; margin-top: 4px; font: 700 0.82rem/1.2 var(--sans); color: var(--ink-900); }
.cb-opt:hover .cb-tile { transform: translateY(-2px); }
.cb-opt input:checked + .cb-tile { border-color: var(--pine); outline-color: var(--pine); background: var(--cream-100); box-shadow: 0 0 0 3px var(--gold-light); }
.cb-opt input:focus-visible + .cb-tile { outline: 3px solid var(--pine); outline-offset: 3px; }
.cb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.cb-nav .btn { min-height: 46px; padding: 0.5em 1.5em; font-size: 1rem; }
.cb-done { margin: 0; color: var(--pine); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .cb-tile { transition: none; } }

#review:focus { outline: none; }
[hidden] { display: none !important; }
