/* 参考：refs/cartesia、refs/upload-zone-x，加上现站 santacam.org（evergreen + red CTA + Bree/Nunito）；
   结构参考 makesantavideo.com 的首屏（照片 ↔ 视频拖动对比），用我们自己的品牌和文案。
   Draft E, the whole home page, mobile first.
   Phone: full-bleed portrait compare, H1 on a dark gradient over the bottom 30%, edge-only
   overlays, knob in the middle of the line, line stops above the gradient. Compact chips
   (Santa | Elf), primary button scrolls to the next-step form below. Then examples, how it
   works, FAQ, footer. Desktop: two-column hero; ≥1600px adds side rails (DESIGN.md §8). */

@property --pos {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 33%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
[hidden] {
  display: none !important;
}
.wide-only {
  display: none;
}
.top nav a {
  padding-left: 16px;
}

/* ---------- Hero stage ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 var(--pad) 24px;
}
.media {
  grid-row: 1;
  grid-column: 1;
  margin: 0 calc(var(--pad) * -1);
}
.stage {
  margin: 0;
  width: 100%;
  height: min(70vh, calc(100vh - 280px), 177.78vw);
  height: min(70svh, calc(100svh - 280px), 177.78vw);
  min-height: 360px;
  touch-action: pan-y;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: --pos 0.6s cubic-bezier(0.2, 0, 0, 1);
}
.stage.tapping {
  transition: --pos 0.2s ease;
}
.stage.dragging {
  transition: none;
  cursor: ew-resize;
}
.stage.no-compare {
  cursor: default;
}
.stage img,
.stage video {
  -webkit-user-drag: none;
}
.stage::after {
  height: 88px;
}
.stage.face-top video {
  object-position: 50% 0%;
}
.stage .photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  z-index: 1;
}
.stage .shade {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(4, 30, 23, 0.94), rgba(4, 30, 23, 0.6) 55%, transparent);
  pointer-events: none;
}
.stage .handle {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 30%; /* stops at the top of the gradient, never crosses the H1 */
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
.stage .knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--bg);
  font: 800 16px/1 var(--body);
}
.stage .knob:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.stage.no-compare .photo,
.stage.no-compare .handle,
.stage.no-rec .cam-line {
  display: none;
}
.stage .tag {
  position: absolute;
  z-index: 5;
  top: 8px;
  left: 8px;
  max-width: 55%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  font: 700 13px/16px var(--body);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage .corner {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.cam-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  font: 600 12px/16px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.cam-line i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e5484d;
  animation: blink 1.2s steps(1) infinite;
}
.sound.chip {
  width: auto;
  height: 32px;
  padding: 0 12px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 13px/1 var(--body);
  white-space: nowrap;
}
.sound.chip svg {
  width: 16px;
  height: 16px;
}
.media .says {
  display: none;
}

/* H1 on the gradient */
.hero > .copy:not(.actions) {
  grid-row: 1;
  grid-column: 1;
  align-self: end;
  z-index: 6;
  padding-bottom: 16px;
  pointer-events: none;
}
.hero h1 {
  font-size: 30px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.hero h1 .soft {
  color: rgba(255, 255, 255, 0.82);
}
.hero .copy .sub {
  display: none;
}
.picker {
  grid-row: 2;
}
.hero > .actions {
  grid-row: 3;
}
/* Styles with no floor to write on (call, selfie, elf-you): H1 under the video */
.hero.h1-below .stage {
  height: min(60vh, calc(100vh - 350px), 177.78vw);
  height: min(60svh, calc(100svh - 350px), 177.78vw);
}
.hero.h1-below .stage .shade {
  display: none;
}
.hero.h1-below .stage .handle {
  bottom: 0;
}
.hero.h1-below > .copy:not(.actions) {
  grid-row: 2;
  align-self: auto;
  padding: 16px 0 0;
}
.hero.h1-below h1 {
  font-size: 26px;
  color: var(--text);
  text-shadow: none;
}
.hero.h1-below h1 .soft {
  color: var(--text-2);
}
.hero.h1-below .picker {
  grid-row: 3;
}
.hero.h1-below > .actions {
  grid-row: 4;
}

/* ---------- Style chips (compact) ---------- */
.picker {
  margin-top: 12px;
}
.segment {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.segment button {
  height: 24px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: 700 13px/1 var(--body);
  cursor: pointer;
}
.segment button[aria-selected='true'] {
  background: var(--panel);
  color: var(--text);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-height: 72px; /* two rows, so switching Santa/Elf never shifts the button */
  align-content: flex-start;
}
.chips button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 14px/1 var(--body);
  white-space: nowrap;
  cursor: pointer;
}
.chips button[aria-pressed='true'] {
  background: #fff;
  border-color: #fff;
  color: var(--bg);
}
.actions .ctas {
  margin-top: 12px;
}
.actions .btn.secondary {
  display: none;
}
.actions .btn.primary {
  padding: 12px 16px;
  font-size: 16px;
}

/* ---------- Next step (form mock) ---------- */
.step {
  padding: 40px var(--pad) 48px;
  border-top: 1px solid var(--line-soft);
}
.draft-tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 8px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  font: 600 12px/18px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.step h2,
.band h2 {
  margin: 0;
  font: 400 28px/1.15 var(--display);
  letter-spacing: -0.01em;
}
.step-blurb,
.lead {
  margin: 8px 0 0;
  color: var(--text-2);
}
.form {
  margin-top: 24px;
  display: grid;
  gap: 20px;
}
.field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-weight: 700;
}
.hint,
.privacy {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-2);
}
.privacy {
  font-size: 14px;
}
.drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--r-btn);
  background: rgba(240, 246, 242, 0.03);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.drop:hover,
.drop.over,
.drop:focus-within {
  border-color: var(--text);
  background: rgba(240, 246, 242, 0.08);
}
.drop .file {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
.drop-icon svg {
  width: 22px;
  height: 22px;
}
.drop-text u {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.drop-limit {
  font: 600 12px/16px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
}
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--panel);
}
.file-row img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
}
.file-meta {
  display: grid;
  min-width: 0;
  flex: 1;
}
.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-state {
  font: 600 12px/16px var(--mono);
  text-transform: uppercase;
  color: var(--ok, #5ee08a);
}
.file-remove {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}
.preset summary,
.note-line summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.preset summary::-webkit-details-marker,
.note-line summary::-webkit-details-marker {
  display: none;
}
.preset summary::after {
  content: '▾';
  margin-left: auto;
  padding-left: 8px;
  color: var(--text-2);
}
.preset[open] summary::after {
  content: '▴';
}
.preset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.preset-card {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--text);
  font: 600 14px/1.3 var(--body);
  text-align: left;
  cursor: pointer;
}
.preset-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
}
.preset-card span {
  padding: 0 4px 4px;
}
.preset-card[aria-pressed='true'] {
  border-color: #fff;
  background: rgba(240, 246, 242, 0.1);
  box-shadow: inset 0 0 0 1px #fff;
}
.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.action {
  position: relative;
  display: grid;
  gap: 4px;
  font: 600 13px/1.2 var(--body);
  text-align: center;
  cursor: pointer;
}
.action input {
  position: absolute;
  opacity: 0;
}
.action img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
}
.action input:checked + img {
  border-color: #fff;
}
.action input:focus-visible + img {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.input {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--deep);
  color: var(--text);
  font: 400 16px/1.4 var(--body);
}
textarea.input {
  resize: vertical;
}
.input::placeholder {
  color: rgba(191, 212, 200, 0.6);
}
.input:focus {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}
.note-line .input {
  margin-top: 8px;
}
.packs {
  display: grid;
  gap: 8px;
}
.pack {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  grid-template-areas:
    'dot name price'
    'dot note price';
  align-items: center;
  column-gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  cursor: pointer;
}
.pack input {
  grid-area: dot;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}
.pack-name {
  grid-area: name;
  font-weight: 700;
}
.pack-name em {
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--panel);
  font: 700 12px/18px var(--body);
  font-style: normal;
  color: var(--text-2);
}
.pack-note {
  grid-area: note;
  color: var(--text-2);
  font-size: 14px;
}
.pack-price {
  grid-area: price;
  font-weight: 800;
}
.pack-price s {
  margin-right: 4px;
  font-weight: 400;
  color: var(--text-2);
}
.pack:has(input:checked) {
  border-color: #fff;
  background: rgba(240, 246, 242, 0.06);
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.btn.make {
  border: 0;
  cursor: pointer;
}
.pay-methods {
  margin: -8px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
}
.draft-done {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r-btn);
  text-align: center;
}
.form .trust {
  margin-top: 0;
}

/* ---------- Bands: examples, how it works, FAQ ---------- */
.band {
  padding: 48px var(--pad);
  border-top: 1px solid var(--line-soft);
}
#examples {
  background: var(--deep);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.card {
  margin: 0;
}
.card-play {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-btn);
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
  cursor: pointer;
}
.card-play video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 18px;
  transition: opacity 0.2s;
}
.card.playing .card-icon {
  opacity: 0;
}
.card figcaption {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}
.card figcaption span {
  color: var(--text-2);
  font-size: 14px;
}
.card-use {
  justify-self: start;
  min-height: 36px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 14px/1 var(--body);
  cursor: pointer;
}
.steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-btn);
  background: var(--panel);
}
.steps .num {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--bg);
  font: 400 20px/1 var(--display);
}
.steps span:last-child {
  color: var(--text-2);
}
.faq {
  margin-top: 16px;
  max-width: 720px;
}
.faq details {
  border-bottom: 1px solid var(--line-soft);
}
.faq summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  margin-left: auto;
  font-size: 22px;
  color: var(--text-2);
}
.faq details[open] summary::after {
  content: '−';
}
.faq p {
  margin: 0 0 16px;
  color: var(--text-2);
}

/* ---------- Footer ---------- */
.foot {
  padding: 40px var(--pad) 112px;
  border-top: 1px solid var(--line-soft);
  background: var(--deep);
}
.foot-in > p {
  margin: 12px 0 0;
  color: var(--text-2);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
}
.foot-links a,
.foot-links span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}
.foot-links span {
  color: var(--text-2);
}
.foot .small {
  font-size: 14px;
}

/* ---------- Rails (≥1600px only) ---------- */
.rail {
  display: none;
}
.rail-title {
  margin: 0 0 12px;
  font: 600 12px/16px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

/* ---------- Wider screens ---------- */
@media (min-width: 861px) {
  .wide-only {
    display: inline;
  }
  .phone-only {
    display: none;
  }
  .hero {
    padding-top: 48px;
    padding-bottom: 64px;
  }
  .media {
    margin: 0;
  }
  .hero > .copy:not(.actions) {
    grid-row: 2;
    margin-top: 24px;
  }
  .hero .picker {
    grid-row: 3;
  }
  .hero > .actions {
    grid-row: 4;
  }
  .stage {
    height: auto;
    aspect-ratio: 9 / 16;
    width: min(100%, 360px);
    margin: 0 auto;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-panel);
  }
  .stage.landscape {
    width: 100%;
    max-height: none;
    aspect-ratio: 16 / 9;
  }
  .hero.h1-below .stage {
    height: auto;
  }
  .stage .shade {
    display: none;
  }
  .stage .handle {
    bottom: 0;
  }
  .media .says {
    display: block;
    max-width: 640px;
    margin: 12px auto 0;
    white-space: normal;
  }
  .hero > .copy:not(.actions),
  .hero.h1-below > .copy:not(.actions) {
    padding: 0;
    align-self: auto;
    pointer-events: auto;
  }
  .hero h1,
  .hero.h1-below h1 {
    font-size: 48px;
    color: var(--text);
    text-shadow: none;
  }
  .hero h1 .soft,
  .hero.h1-below h1 .soft {
    color: var(--text-2);
  }
  .hero .copy .sub {
    display: block;
  }
  .actions .btn.secondary {
    display: flex;
  }
  .step,
  .band {
    padding-left: 32px;
    padding-right: 32px;
  }
  .step .form,
  .step > p,
  .step > h2 {
    max-width: 640px;
  }
  .step > h2,
  .step > p,
  .step > .form,
  .band > * {
    margin-left: auto;
    margin-right: auto;
    max-width: 1136px;
  }
  .step > h2,
  .step > .step-blurb,
  .step > .draft-tag,
  .step > .form {
    max-width: 640px;
  }
  .step > .draft-tag {
    display: block;
    width: max-content;
  }
  .gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .steps li {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }
  .steps .num {
    grid-row: auto;
  }
  .lead {
    max-width: 720px;
  }
  .foot-in {
    max-width: 1136px;
    margin: 0 auto;
  }
  .foot {
    padding-bottom: 40px;
  }
}
@media (min-width: 900px) {
  .hero {
    max-width: 1200px;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: 56px;
  }
  .hero > .copy:not(.actions),
  .hero.h1-below > .copy:not(.actions) {
    grid-column: 1;
    grid-row: 2;
  }
  .hero .picker,
  .hero.h1-below .picker {
    grid-column: 1;
    grid-row: 3;
    margin-top: 24px;
  }
  .hero > .actions,
  .hero.h1-below > .actions {
    grid-column: 1;
    grid-row: 4;
  }
  .hero .media {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
  }
  .chips {
    min-height: 0;
  }
}
@media (min-width: 1600px) {
  .layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1200px) 240px;
    justify-content: center;
    column-gap: 48px;
    max-width: 1760px;
    margin: 0 auto;
  }
  .rail {
    display: block;
    padding-top: 48px;
  }
  .toc,
  .pick-card {
    position: sticky;
    top: 24px;
  }
  .toc a {
    display: block;
    padding: 8px 0;
    color: var(--text-2);
    text-decoration: none;
    font-weight: 600;
  }
  .toc a:hover {
    color: var(--text);
  }
  .pick-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-panel);
    background: var(--panel);
  }
  .pick-card img {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 280px;
    object-fit: cover;
    border-radius: var(--r-btn);
  }
  .pick-price {
    color: var(--text-2);
    font-size: 14px;
  }
  .hero {
    margin: 0;
    max-width: none;
  }
}
