@font-face { font-family: "Caveat"; src: url("/assets/fonts/Caveat-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/assets/fonts/CormorantGaramond-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/assets/fonts/CormorantGaramond-SemiBoldItalic.ttf") format("truetype"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url("/assets/fonts/PTSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url("/assets/fonts/PTSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #140b17;
  --bg-deep: #0f0812;
  --parchment: #f2e4c9;
  --gold: #d9a441;
  --gold-light: #f2c75c;
  --muted: #c9b79a;
  --wine: #6e1f2e;
  --ink: #2a1d1f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--parchment);
  font: 17px/1.55 "PT Sans", system-ui, sans-serif;
}
a { color: var(--gold-light); }
a:hover { color: var(--parchment); }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* top bar */
.bar { position: absolute; inset: 0 0 auto 0; z-index: 2; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--parchment); text-decoration: none; font: italic 600 22px "Cormorant", serif; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.langs select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  min-height: 44px; padding: 0 38px 0 16px; border-radius: 999px;
  border: 1px solid rgba(217, 164, 65, .55); color: var(--gold-light);
  font: 700 15px "PT Sans", "PingFang SC", "Noto Sans SC", sans-serif;
  background: rgba(15, 8, 18, .55)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23f2c75c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center / 12px 8px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.langs select:hover, .langs select:focus-visible { border-color: var(--gold-light); outline: none; }
.langs option { color: var(--parchment); background: var(--bg-deep); }

/* Chinese: the bundled fonts have no CJK glyphs, so fall back to good system faces and drop faux italics. */
:lang(zh) body { font-family: "PT Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
:lang(zh) .hero h1, :lang(zh) h2, :lang(zh) .page h1, :lang(zh) .brand {
  font-family: "Cormorant", "Songti SC", "STSong", "Noto Serif SC", serif; font-style: normal; letter-spacing: .04em;
}
:lang(zh) .hero p.tag, :lang(zh) .store, :lang(zh) .quote, :lang(zh) .feature h3 {
  font-family: "Caveat", "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", cursive;
}

/* hero: the tent curtains (the curtain layer drifts slower than the page — see site.js) */
.hero {
  position: relative; min-height: min(92vh, 860px); display: grid; place-items: center; text-align: center;
  padding: 96px 0 64px; overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 -20% 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,11,23,.35) 0%, rgba(20,11,23,.55) 50%, var(--bg) 83%),
              url("/assets/curtain.jpg") center top / cover no-repeat;
  transform: translate3d(0, calc(var(--p, 0) * 1px), 0);
  will-change: transform;
}
.hero h1 {
  margin: 0; font: italic 600 clamp(44px, 9vw, 92px)/1 "Cormorant", serif; color: var(--parchment);
  text-shadow: 0 4px 30px rgba(0,0,0,.6);
}
.hero p.tag { margin: 18px auto 0; max-width: 32ch; font: 700 clamp(24px, 4vw, 32px)/1.2 "Caveat", cursive; color: var(--gold-light); }
.store {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 34px; min-height: 54px; padding: 0 26px;
  background: var(--gold); color: var(--ink); border-radius: 14px; text-decoration: none;
  font: 700 26px "Caveat", cursive; box-shadow: 4px 4px 0 var(--ink);
}
.store:hover { background: var(--gold-light); color: var(--ink); }
.store[aria-disabled="true"] { cursor: default; }
.store svg { width: 22px; height: 22px; }
.soon { margin-top: 12px; color: var(--muted); font-size: 15px; }

/* sections */
section { padding: 72px 0; }
h2 { margin: 0 0 12px; font: italic 600 clamp(32px, 5vw, 46px)/1.1 "Cormorant", serif; color: var(--parchment); }
.lead { margin: 0 0 32px; max-width: 60ch; color: var(--muted); }

.table { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.table img {
  width: 100%; max-width: 440px; justify-self: center; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.55);
}
.quote {
  margin: 0; padding: 22px 24px; background: var(--parchment); color: var(--ink); border-radius: 16px;
  font: 700 24px/1.3 "Caveat", cursive; position: relative;
}
.quote cite { display: block; margin-top: 10px; font: 700 15px "PT Sans", sans-serif; font-style: normal; color: var(--wine); }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature { padding: 22px; background: var(--bg-deep); border: 1px solid rgba(201,183,154,.18); border-radius: 16px; }
.feature svg { width: 28px; height: 28px; color: var(--gold); }
.feature h3 { margin: 12px 0 6px; font: 700 26px/1.1 "Caveat", cursive; color: var(--gold-light); }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

/* a fan of cards */
.deck { overflow: hidden; }
.fan { display: flex; justify-content: center; padding: 30px 0 10px; }
.fan img {
  width: clamp(92px, 15vw, 170px); aspect-ratio: 3 / 5; object-fit: cover; border-radius: 9px;
  margin: 0 calc(clamp(92px, 15vw, 170px) * -0.18); box-shadow: 0 12px 30px rgba(0,0,0,.6);
  transform: rotate(var(--r)) translateY(var(--y)); transition: transform .3s ease;
}
.fan img:hover { transform: rotate(var(--r)) translateY(calc(var(--y) - 18px)); }

footer { padding: 40px 0 56px; border-top: 1px solid rgba(201,183,154,.15); color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }

/* text pages: privacy, support */
.page { padding: 110px 0 40px; }
.page .wrap { max-width: 720px; }
.page h1 { margin: 0 0 8px; font: italic 600 46px/1.1 "Cormorant", serif; }
.page h2 { font-size: 30px; margin-top: 36px; }
.page .updated { color: var(--muted); margin: 0 0 24px; }
.page li { margin: 6px 0; }

@media (max-width: 860px) {
  .table { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .table img { max-width: 360px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  section { padding: 52px 0; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .fan img:nth-child(n+6) { display: none; }
  .brand span { display: none; }
}
/* ---------------------------------------------------------------- scroll reveals
   Only when site.js has run (html.js) and motion is welcome; otherwise everything is simply visible. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transition: opacity .9s ease, transform 1s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0ms);
  }
  .js [data-reveal="up"]    { transform: translate3d(0, 32px, 0); }
  .js [data-reveal="left"]  { transform: translate3d(-40px, 0, 0); }
  .js [data-reveal="right"] { transform: translate3d(40px, 0, 0); }
  .js [data-reveal="zoom"]  { transform: scale(.92); }
  .js [data-reveal="note"]  { transform: translate3d(0, 24px, 0) rotate(-2.5deg); }
  .js [data-reveal].in { opacity: 1; transform: none; }

  /* the deck is dealt from one pile in the middle into a fan */
  .js .fan img[data-reveal] {
    transform: translate3d(calc((3 - var(--i)) * 70%), 90px, 0) rotate(0deg);
    transition: opacity .5s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1);
    transition-delay: calc(var(--i) * 90ms);
  }
  .js .fan img[data-reveal].in { transform: rotate(var(--r)) translateY(var(--y)); }
  .js .fan img[data-reveal].in:hover { transform: rotate(var(--r)) translateY(calc(var(--y) - 18px)); transition-delay: 0ms; }

  /* a slow candle-light breath on the quote once it lands */
  .quote.in { animation: glow 5s ease-in-out 1.2s infinite; }
  @keyframes glow {
    0%, 100% { box-shadow: 0 0 0 rgba(242, 199, 92, 0); }
    50%      { box-shadow: 0 0 38px rgba(242, 199, 92, .22); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .fan img { transition: none; }
  .hero::before { transform: none; }
}
