/* Hallmark · macrostructure: Photographic · H6 hero knobs: full-bleed, lower-third, cta-stack
 * N9 nav knobs: cta=filled-pill, wordmark=image
 * Ft1 footer knobs: align=center, tagline=domain
 * theme: studied-DNA (source: https://huangguo.com) · viewport: mobile
 * studied: yes · DNA-source: url · rhythm: 100dvh hero + flow
 */

html,
body {
  overflow-x: clip;
}

html {
  min-height: 100%;
  background: var(--color-paper);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100%;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-ink);
  background: var(--color-paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 900;
  overflow-wrap: anywhere;
  min-width: 0;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-nav);
  opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
  mix-blend-mode: overlay;
}

.nav-edge {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--page-gutter);
  background: var(--color-nav);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: var(--rule-hair) solid var(--color-nav-edge);
}

.nav-edge::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1.25rem;
  left: 0;
  height: 1.25rem;
  background: linear-gradient(oklch(14% 0.022 140 / 0.35), transparent);
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
}

.logo-word {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
  min-width: 0;
}

.logo-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
}

.logo-url {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.cta,
.cover,
.qr-link,
.text-link,
.cta-ghost,
.logo {
  white-space: nowrap;
}

.cta,
.cta-ghost,
.cover,
.social,
.qr-link,
.text-link,
.logo {
  touch-action: manipulation;
  transition:
    transform var(--dur-press) ease-out,
    background var(--dur-press) ease-out,
    border-color var(--dur-press) ease-out,
    color var(--dur-press) ease-out;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
}

.cta-lg {
  min-height: 52px;
  padding: 0 var(--space-xl);
  font-size: var(--text-md);
}

@media (hover: hover) and (pointer: fine) {
  .cta:hover,
  .cta.is-hover {
    background: var(--color-accent-2);
  }
}

.cta:focus-visible,
.cta.is-focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.cta:active,
.cta.is-active {
  transform: scale(0.97);
}

.cta:disabled,
.cta[aria-disabled="true"],
.cta.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cta[data-state="loading"],
.cta.is-loading {
  opacity: 0.72;
}

.cta[data-state="error"],
.cta.is-error {
  background: var(--color-error);
  color: var(--color-ink);
}

.cta[data-state="success"],
.cta.is-success {
  background: var(--color-success);
}

.deck {
  overflow-x: clip;
}

.deck-page {
  position: relative;
  overflow: clip;
}

.hero-photo {
  min-height: 100dvh;
  touch-action: pan-y;
  user-select: none;
}

.hero-photo.is-dragging .scene {
  transition: none;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64%;
  z-index: var(--z-scene);
  background: linear-gradient(transparent, var(--color-veil) 52%, oklch(8% 0.02 140 / 0.9));
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: var(--z-stage);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: calc(72px + var(--space-sm)) var(--page-gutter) var(--space-lg);
}

.hero-photo .stage {
  min-height: 100dvh;
  gap: var(--space-sm);
}

.scenes,
.promise-bg,
.stay-bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-scene);
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out);
}

.hero-photo[data-scene="0"] .scene-0,
.hero-photo[data-scene="1"] .scene-1,
.hero-photo[data-scene="2"] .scene-2,
.hero-photo[data-scene="3"] .scene-3,
.hero-photo[data-scene="4"] .scene-4,
.hero-photo[data-scene="5"] .scene-5,
.hero-photo[data-scene="6"] .scene-6 {
  opacity: 1;
}

.scene-2 { object-position: center 28%; }
.scene-3 { object-position: center 30%; }
.scene-4 { object-position: center 16%; }
.scene-5 { object-position: center 24%; }
.scene-6 { object-position: center 32%; }

.theme {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 22rem;
}

.theme-title {
  font-size: var(--text-hero-m);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.theme-title .line {
  display: block;
  white-space: nowrap;
}

.hl {
  color: var(--color-accent-2);
}

.theme-desc {
  max-width: 36ch;
  font-size: var(--text-lede-m);
  line-height: 1.6;
  color: var(--color-ink-soft);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-xs);
}

.hero-hint {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
}

.cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-lg);
  border: var(--rule-hair) solid var(--color-ghost-line);
  border-radius: var(--radius-pill);
  background: var(--color-ghost);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
  .cta-ghost:hover,
  .cta-ghost.is-hover {
    background: var(--color-cover-hover);
  }
}

.cta-ghost:focus-visible,
.cta-ghost.is-focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.cta-ghost:active,
.cta-ghost.is-active {
  transform: scale(0.97);
}

.cta-ghost:disabled,
.cta-ghost[aria-disabled="true"],
.cta-ghost.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cta-ghost[data-state="loading"],
.cta-ghost.is-loading { opacity: 0.72; }
.cta-ghost[data-state="error"],
.cta-ghost.is-error { border-color: var(--color-error); color: var(--color-error); }
.cta-ghost[data-state="success"],
.cta-ghost.is-success { border-color: var(--color-success); color: var(--color-success); }

.hero-dots {
  display: flex;
  gap: var(--space-xs);
  padding-top: var(--space-2xs);
}

.dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--color-dot);
  transition: transform var(--dur-press) ease-out, background var(--dur-press) ease-out;
}

.dot::before {
  content: "";
  position: absolute;
  inset: -12px;
}

.dot.is-on,
.dot[aria-selected="true"] {
  background: var(--color-ink);
}

.dot:focus-visible,
.dot.is-focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.dot:disabled,
.dot.is-disabled { opacity: 0.45; cursor: not-allowed; }
.dot.is-hover { background: var(--color-muted); }
.dot.is-active { transform: scale(0.9); }
.dot.is-loading { opacity: 0.72; }
.dot.is-error { background: var(--color-error); }
.dot.is-success { background: var(--color-success); }

.cta-row {
  display: none;
}

.qr-link {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: var(--space-md);
  align-items: center;
  white-space: normal;
  max-width: 36rem;
}

.qr-frame {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  padding: 3px;
  border-radius: var(--radius-lg);
  background: var(--color-accent);
}

.qr-canvas {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-lg) - 4px);
  background: var(--color-ink);
}

.qr-copy {
  display: grid;
  gap: var(--space-2xs);
  min-width: 0;
}

.qr-title {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-accent-2);
}

.qr-tip {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-muted);
}

@media (hover: hover) and (pointer: fine) {
  .qr-link:hover .qr-frame,
  .qr-link.is-hover .qr-frame {
    background: var(--color-accent-2);
  }
}

.qr-link:focus-visible,
.qr-link.is-focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

.qr-link:active,
.qr-link.is-active {
  transform: scale(0.985);
}

.qr-link[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.qr-link[data-state="loading"] { opacity: 0.72; }
.qr-link[data-state="error"] .qr-title { color: var(--color-error); }
.qr-link[data-state="success"] .qr-frame { background: var(--color-success); }

.covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
}

.cover {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2xs);
  min-height: 118px;
  min-width: 0;
  padding: var(--space-sm);
  border: var(--rule-hair) solid var(--color-cover-line);
  border-radius: var(--radius-md);
  background-color: var(--color-cover-fill);
  background-size: cover;
  background-position: center 22%;
  text-align: left;
  white-space: normal;
  overflow: clip;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, oklch(10% 0.02 140 / 0.08), oklch(8% 0.02 140 / 0.82));
}

.cover-0 { background-image: url("../assets/posters/chuanqi-wuniang.jpg"); }
.cover-1 { background-image: url("../assets/posters/cos-fengyun.jpg"); }
.cover-2 { background-image: url("../assets/posters/star-cowgirl.jpg"); }
.cover-3 { background-image: url("../assets/posters/mianbei-fengyun.jpg"); }
.cover-4 { background-image: url("../assets/posters/dongjing-pian.jpg"); }
.cover-5 { background-image: url("../assets/posters/newyork-qingxiao.jpg"); }
.cover-6 { background-image: url("../assets/posters/nvrenmen.jpg"); }

.cover span {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--color-accent-2);
  text-shadow: 0 1px 8px oklch(8% 0.02 140 / 0.8);
}

.cover b {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-shadow: 0 1px 10px oklch(8% 0.02 140 / 0.85);
}

@media (hover: hover) and (pointer: fine) {
  .cover:hover,
  .cover.is-hover {
    border-color: var(--color-cover-line-on);
    background-color: var(--color-cover-hover);
  }
}

.cover:focus-visible,
.cover.is-focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.cover:active,
.cover.is-active {
  transform: scale(0.97);
}

.cover[aria-pressed="true"],
.cover.is-success {
  border-color: var(--color-accent);
}

.cover:disabled,
.cover.is-disabled { opacity: 0.45; cursor: not-allowed; }
.cover.is-loading { opacity: 0.72; }
.cover.is-error { border-color: var(--color-error); }

.promise-bg {
  background:
    url("../assets/brand/promise-bg.png") center 42% / cover no-repeat,
    oklch(10% 0.02 140);
}

.promise-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(10% 0.02 140 / 0.38), oklch(8% 0.02 140 / 0.72));
  pointer-events: none;
}

.promise,
.stay {
  min-height: 100dvh;
}

.promise .stage,
.stay .stage {
  min-height: 100dvh;
}

.promise-stage {
  display: grid;
  gap: var(--space-lg);
  align-content: center;
  align-items: center;
  justify-content: stretch;
}

.promise-copy {
  display: grid;
  gap: var(--space-md);
  max-width: 28rem;
}

.promise-copy h2 {
  font-size: var(--text-display-s);
  line-height: 1.2;
}

.promise-copy p {
  max-width: 36ch;
  color: var(--color-ink-soft);
}

.promise-cards {
  display: grid;
  gap: var(--space-sm);
}

.card {
  display: grid;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-md) var(--space-sm);
  border: var(--rule-hair) solid var(--color-glass-line);
  border-radius: var(--radius-lg);
  background: var(--color-glass);
  transition: transform var(--dur-press) ease-out;
}

.card-b,
.card-c {
  width: 100%;
  justify-self: stretch;
}

.card h3 {
  font-size: var(--text-xl);
  color: var(--color-accent-2);
}

.card p {
  font-size: var(--text-sm);
  color: var(--color-card-copy);
}

.stay-bg {
  background:
    linear-gradient(oklch(12% 0.02 140 / 0.72), oklch(12% 0.02 140 / 0.82)),
    repeating-linear-gradient(90deg, oklch(22% 0.03 135 / 0.35) 0 25%, transparent 25% 50%),
    repeating-linear-gradient(0deg, oklch(20% 0.025 128 / 0.28) 0 33%, transparent 33% 66%),
    oklch(14% 0.02 140);
}

.stay-stage {
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: var(--space-md);
  padding-bottom: 7rem;
}

.stay-stage .foot-mast {
  position: absolute;
  inset-inline: var(--page-gutter);
  bottom: var(--space-lg);
  margin-top: 0;
}

.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.social {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: var(--rule-hair) solid var(--color-ghost-line);
  border-radius: var(--radius-pill);
  background: var(--color-ghost);
  color: var(--color-ink);
}

.social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .social:hover,
  .social.is-hover {
    background: var(--color-cover-hover);
    border-color: var(--color-accent);
    color: var(--color-accent-2);
  }
}

.social:focus-visible,
.social.is-focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.social:active,
.social.is-active {
  transform: scale(0.94);
}

.social:disabled,
.social[aria-disabled="true"],
.social.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.social[data-state="loading"],
.social.is-loading { opacity: 0.72; }
.social[data-state="error"],
.social.is-error { border-color: var(--color-error); color: var(--color-error); }
.social[data-state="success"],
.social.is-success { border-color: var(--color-success); color: var(--color-success); }

.stay-stage h2 {
  font-size: var(--text-display-s);
  line-height: 1.15;
}

.stay-stage > p {
  max-width: 32ch;
  color: var(--color-ink-soft);
}

.text-link {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-accent-2);
  border-bottom: var(--rule-hair) solid var(--color-accent-2);
}

@media (hover: hover) and (pointer: fine) {
  .text-link:hover,
  .text-link.is-hover { color: var(--color-ink); border-color: var(--color-ink); }
}

.text-link:focus-visible,
.text-link.is-focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.text-link:active,
.text-link.is-active { transform: scale(0.97); }
.text-link[aria-disabled="true"],
.text-link.is-disabled { opacity: 0.45; cursor: not-allowed; }
.text-link[data-state="loading"],
.text-link.is-loading { opacity: 0.72; }
.text-link[data-state="error"],
.text-link.is-error { color: var(--color-error); border-color: var(--color-error); }
.text-link[data-state="success"],
.text-link.is-success { color: var(--color-success); border-color: var(--color-success); }

.foot-mast {
  display: grid;
  justify-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

@media (min-width: 40rem) {
  .covers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-sm);
  }
  .cover { min-height: 108px; }
  .qr-link { grid-template-columns: 148px minmax(0, 1fr); }
  .qr-frame { width: 148px; height: 148px; }
}

@media (min-width: 60rem) {
  html,
  body {
    height: 100%;
  }

  .deck {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
  }

  .deck-page {
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero-photo::after {
    height: 100%;
    background:
      linear-gradient(90deg, oklch(8% 0.02 140 / 0.7) 0 26%, transparent 58%),
      linear-gradient(transparent 36%, oklch(8% 0.02 140 / 0.78));
  }

  .hero-actions {
    display: none;
  }

  .cta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: end;
    gap: var(--space-lg);
  }

  .theme-title {
    font-size: var(--text-display);
    line-height: 1.12;
  }

  .theme-desc {
    font-size: var(--text-md);
  }

  .stage {
    gap: var(--space-xl);
    padding-bottom: var(--space-2xl);
  }

  .covers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cover {
    min-height: 112px;
  }

  .promise-bg {
    background-position: 58% 42%;
  }

  .promise-bg::after {
    background:
      linear-gradient(90deg, oklch(8% 0.02 140 / 0.62) 0 34%, transparent 66%),
      linear-gradient(180deg, oklch(8% 0.02 140 / 0.28), oklch(8% 0.02 140 / 0.5));
  }

  .promise-stage {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-content: center;
    align-items: center;
    gap: var(--space-3xl);
  }

  .card { padding: var(--space-lg); }
  .card-b { width: 88%; justify-self: end; }
  .card-c { width: 94%; }

  .stay-stage {
    justify-content: center;
    gap: var(--space-lg);
    min-height: 100dvh;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav-edge {
    background: var(--color-paper);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .deck { scroll-behavior: auto; }
  .scene,
  .cta,
  .cover,
  .qr-link,
  .text-link,
  .cta-ghost,
  .social,
  .dot {
    transition: opacity 150ms linear;
  }
  .cta:hover,
  .cta:active,
  .cover:active,
  .qr-link:active,
  .text-link:active,
  .cta-ghost:active,
  .social:active,
  .dot.is-active {
    transform: none;
  }
}
