/* Santa Joy. Airmail letter from the North Pole: snow paper, navy ink, postal red. */
:root {
  --snow: #eef3f7;
  --paper: #ffffff;
  --ink: #1b2a47;
  --ink-soft: #4a5876;
  --line: #cfd8e3;
  --red: #c3202f;
  --red-deep: #9e1724;
  --pine: #1e5b44;
  --gold: #d9a322;
  --display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --body: 'Atkinson Hyperlegible', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --gutter: clamp(18px, 5vw, 40px);
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font: 400 1.1875rem/1.6 var(--body); /* 19px: readable for 45+ on phones */
}
img,
video {
  max-width: 100%;
  display: block;
}
a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.2rem, 8.4vw, 3.6rem);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.6rem, 5.6vw, 2.2rem);
}
h3 {
  font-size: 1.3rem;
}
p {
  margin: 0 0 1em;
}
small {
  font-size: 0.85em;
  color: var(--ink-soft);
}

/* Header: a plain bar so the hero leads. */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--gutter);
  max-width: 1080px;
  margin: 0 auto;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--red);
}
.top-link {
  font-weight: 700;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Hero: headline + the video inside an airmail envelope. */
.hero {
  display: grid;
  gap: 28px;
  padding-block: 8px 40px;
  align-items: center;
}
@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    padding-block: 32px 64px;
  }
}
.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34em;
}

.envelope {
  margin: 0 auto;
  width: min(100%, 360px);
  padding: 12px;
  border-radius: 18px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 16px, var(--paper) 16px 30px, var(--ink) 30px 46px, var(--paper) 46px 60px);
  box-shadow: 0 18px 40px -22px rgba(27, 42, 71, 0.55);
  transform: rotate(-1.5deg);
}
.envelope-inner {
  position: relative;
  background: var(--paper);
  border-radius: 10px;
  padding: 10px;
}
.hero-video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 6px;
  background: var(--ink);
}
.postmark {
  position: absolute;
  z-index: 2;
  top: -22px;
  right: -18px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  outline: 1.5px solid var(--ink);
  outline-offset: -8px;
  display: grid;
  place-items: center;
  text-align: center;
  font: 400 0.82rem/1.15 var(--display);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  transform: rotate(12deg);
}
.sound {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font: 700 1rem var(--body);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
}
.sound[hidden] {
  display: none;
}

/* Buttons: tall, high contrast, thumb-friendly. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 700 1.15rem/1.2 var(--body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn-main {
  background: var(--red);
  color: #fff;
  width: 100%;
  max-width: 420px;
}
.btn-main:hover {
  background: var(--red-deep);
}
.btn-main:disabled {
  opacity: 0.6;
  cursor: wait;
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.cta-block {
  margin-top: 8px;
}
.cta-note {
  margin-top: 10px;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Content bands */
.band {
  padding-block: 36px;
  border-top: 1px solid var(--line);
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
  display: grid;
  gap: 20px;
  max-width: 40em;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 58px;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 400 1.3rem var(--display);
  color: #fff;
  background: var(--pine);
}
.tpl-list {
  padding-left: 1.1em;
  max-width: 40em;
}
.tpl-list li {
  margin-bottom: 10px;
}

.plans {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  max-width: 640px;
}
.plan {
  display: grid;
  gap: 2px;
  padding: 20px 22px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}
.plan:hover {
  border-color: var(--ink);
}
.plan-price {
  font: 400 2.2rem/1.1 var(--display);
  color: var(--red);
}
.plan-label {
  font-weight: 700;
}
.plan-blurb {
  color: var(--ink-soft);
  font-size: 1rem;
}
.fine {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-top: 14px;
}
.center {
  text-align: center;
}

.promises {
  display: grid;
  gap: 22px;
}
@media (min-width: 760px) {
  .promises {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}
.promise h3 {
  color: var(--pine);
}

details {
  border-bottom: 1px solid var(--line);
  padding-block: 14px;
  max-width: 40em;
}
summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.15rem;
}
details p {
  margin: 10px 0 0;
}
.last-cta {
  text-align: center;
  border-top: 0;
}
.last-cta .btn-main {
  margin: 0 auto;
}

/* Footer */
.foot {
  max-width: 1080px;
  margin: 40px auto 0;
  padding: 28px var(--gutter) calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--ink-soft);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 14px;
}
.foot-links a {
  font-weight: 700;
}
.foot-legal {
  font-size: 1rem;
}
/* Seller disclosure before payment (California B&P 17538(d)): body-size text, not fine print. */
.seller {
  font-size: 1rem;
  margin-top: 10px;
}

/* Legal pages */
.prose {
  max-width: 40em;
  padding-block: 12px 24px;
}
.prose h1 {
  font-size: clamp(2rem, 7vw, 2.8rem);
}
.prose h2 {
  font-size: 1.45rem;
  margin-top: 1.6em;
}
.prose ul {
  padding-left: 1.2em;
}
.prose li {
  margin-bottom: 6px;
}

.narrow {
  max-width: 560px;
  margin: 0 auto;
  padding-block: 16px 24px;
}

/* Order flow */
.order {
  max-width: 560px;
  margin: 0 auto;
  padding-block: 4px 24px;
}
.order h1 {
  font-size: clamp(2rem, 7vw, 2.6rem);
}
.progress {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.step {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.step legend {
  padding: 0;
}
.field {
  display: grid;
  gap: 6px;
  margin: 0 0 20px;
}
.field > span {
  font-weight: 700;
}
input[type='text'],
input[type='email'] {
  width: 100%;
  font: 400 1.25rem var(--body);
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
input[type='text']:focus,
input[type='email']:focus {
  border-color: var(--ink);
  outline: none;
}
.hint {
  font-size: 0.95rem;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.seg-opt,
.chip,
.tpl {
  position: relative;
  cursor: pointer;
}
.seg-opt input,
.chip input,
.tpl input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.seg-opt span {
  display: grid;
  text-align: center;
  padding: 12px 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-weight: 700;
  line-height: 1.3;
}
.seg-opt small {
  font-weight: 400;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip span {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
}
.seg-opt input:checked + span,
.chip input:checked + span,
.tpl input:checked + span {
  border-color: var(--pine);
  background: #e6f1ec;
  box-shadow: inset 0 0 0 1px var(--pine);
}
.seg-opt input:focus-visible + span,
.chip input:focus-visible + span,
.tpl input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.tpls {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}
.tpl span {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.tpl strong {
  font: 400 1.3rem var(--display);
}

.kid {
  display: flex;
  gap: 12px;
  align-items: end;
}
.kid .field {
  flex: 1;
}
.link-btn {
  background: none;
  border: 0;
  color: var(--ink);
  text-decoration: underline;
  font: inherit;
  padding: 0 0 34px;
  cursor: pointer;
}
[data-add-kid] {
  margin: 0 0 24px;
}

.photo-slot {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--paper);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}
.photo-slot.has-photo {
  border-style: solid;
  border-color: var(--pine);
}
.photo-thumb {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--snow);
  border: 3px solid var(--gold);
}
.photo-slot label.btn {
  min-height: 50px;
  padding: 10px 18px;
  font-size: 1.05rem;
  position: relative;
  overflow: hidden;
}
.photo-slot input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.photo-name {
  font-weight: 700;
  margin-bottom: 8px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: start;
  margin: 18px 0;
  cursor: pointer;
}
.check input {
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--pine);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}
.nav .btn-main {
  max-width: none;
}
.error {
  color: var(--red-deep);
  font-weight: 700;
  min-height: 1px;
}
.error:empty {
  margin: 0;
}

.previews {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.previews canvas,
.previews video {
  width: 100%;
  border-radius: 12px;
  background: var(--ink);
}
.preview-cap {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 6px;
}
.summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0 0 22px;
}
.summary dt {
  color: var(--ink-soft);
}
.summary dd {
  margin: 0;
  font-weight: 700;
}
.total {
  font-size: 1.3rem;
  display: flex;
  justify-content: space-between;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}
[data-pay] {
  margin-bottom: 4px;
}
.order [data-step='4'] > .btn-quiet {
  margin-top: 10px;
}

/* Name autosuggest: attached to the field, same width, big rows for thumbs. */
.combo {
  position: relative;
}
.combo.open input[type='text'] {
  border-color: var(--ink);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.combo-list {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  margin: -2px 0 0;
  padding: 4px 0;
  list-style: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 28px -12px rgba(27, 42, 71, 0.45);
  overflow: hidden;
}
.combo-list li {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  font-size: 1.25rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.combo-list li[aria-selected='true'] {
  background: #e6f1ec;
  box-shadow: inset 4px 0 0 var(--pine);
}
.combo-list li:active {
  background: #d3e7dd;
}
.combo-list mark {
  background: none;
  color: inherit;
  font-weight: 700;
}

/* Thanks + watch */
.kid-status {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
}
.kid-status li {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 2px solid var(--line);
}
.kid-status li[data-state='ready'] {
  border-color: var(--pine);
}
.kid-name {
  font: 400 1.5rem var(--display);
}
.kid-wait {
  color: var(--ink-soft);
}
.watch-video {
  width: 100%;
  max-height: 72vh;
  border-radius: 12px;
  background: var(--ink);
  margin-bottom: 20px;
}
.share {
  display: grid;
  gap: 12px;
}
.share .btn {
  width: 100%;
  max-width: none;
}

@media (prefers-reduced-motion: reduce) {
  .envelope {
    transform: none;
  }
}
