/* ==========================================================================
   KeepOne / 留一张 — Product site (DARKROOM family)
   Visual system borrowed from 77workshop: tokens, grain, dust, reveal,
   brand-pulse, spring hovers, optional cursor + marquee.
   No ⌘K / day-night / travel gallery — product IA only.
   ========================================================================== */

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

html {
  background: var(--desk);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html.js { /* marked by inline boot script */ }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 72% -6%, rgba(255, 159, 110, .10), transparent 60%),
    radial-gradient(700px 500px at 8% 90%, rgba(201, 67, 47, .06), transparent 62%),
    radial-gradient(600px 420px at 92% 70%, rgba(143, 227, 192, .03), transparent 60%);
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--lamp); color: #12100d; }
:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 2px;
}

.mono { font-family: var(--f-mono); }
.label {
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding-inline: var(--pad);
  padding-bottom: var(--sp-9);
}

/* ---- atmosphere ---- */
.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.62'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain-shift 7s steps(5) infinite;
}
.dust {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  overflow: hidden;
}
.dust span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 6px 1px rgba(255, 196, 107, .4);
  opacity: 0;
  animation: dust-drift var(--t, 30s) linear var(--d, 0s) infinite;
}

/* ---- nav ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: var(--fs-small);
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px -8px rgba(255, 159, 110, .55);
}
.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lamp);
  animation: brand-pulse 2.8s var(--ease-out) infinite;
  flex: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
}
.nav-link {
  position: relative;
  padding: 6px 2px;
  color: var(--ink-2);
  font-size: var(--fs-small);
  letter-spacing: .02em;
  text-decoration: none;
  transition: color var(--dur-1) var(--ease-out);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--lamp);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-2) var(--ease-out);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }

/* ---- hero ---- */
.hero {
  text-align: center;
  padding: clamp(40px, 7vh, 64px) 0 clamp(28px, 4vh, 40px);
}
.hero-icon {
  width: 120px;
  height: 120px;
  margin-inline: auto;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px var(--line),
    0 22px 50px -18px rgba(255, 159, 110, .55),
    0 0 60px -10px rgba(201, 67, 47, .28);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .02);
  color: var(--mint);
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: brand-pulse 2.8s var(--ease-out) infinite;
}
.hero h1 {
  margin-top: 18px;
  font-family: var(--f-serif);
  font-size: clamp(30px, 5.4vw, 46px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
}
.hero h1 em {
  font-style: normal;
  color: var(--lamp);
  text-shadow: 0 0 28px rgba(255, 159, 110, .28);
}
.sub {
  margin: 14px auto 0;
  max-width: 36em;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.7;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-small);
  letter-spacing: .02em;
  text-decoration: none;
  transition:
    transform var(--dur-2) var(--ease-spring),
    background-color var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.98); }
.btn-solid {
  background: var(--lamp);
  border-color: var(--lamp);
  color: #12100d;
  font-weight: 650;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 10px 26px -16px rgba(255, 196, 107, .7);
}
.btn-solid:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    0 20px 40px -18px rgba(255, 196, 107, .65);
}
.btn-arrow {
  font-size: 13px;
  transition: transform var(--dur-2) var(--ease-out);
}
.btn-solid:hover .btn-arrow { transform: translate(2px, -2px); }
.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--lamp);
  color: var(--lamp);
}

.meta {
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
  line-height: 1.8;
}
.meta code {
  font-size: 10.5px;
  word-break: break-all;
  color: var(--ink-2);
}

/* ---- marquee ---- */
.marquee {
  margin: clamp(20px, 3vh, 32px) calc(50% - 50vw) 0;
  width: 100vw;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding-block: 14px;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
.marquee-run {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}
.marquee-word {
  padding-right: clamp(16px, 2.2vw, 32px);
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 38%, transparent);
  transition: color .4s var(--ease-out), -webkit-text-stroke-color .4s var(--ease-out);
}
.marquee:hover .marquee-word {
  color: var(--lamp);
  -webkit-text-stroke-color: var(--lamp);
}
.marquee-sep {
  padding-right: clamp(16px, 2.2vw, 32px);
  font-size: 12px;
  color: var(--safelight);
  opacity: .55;
}
@media (hover: hover) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
}

/* ---- sections ---- */
.section {
  position: relative;
  margin-top: clamp(48px, 8vh, 72px);
  padding-top: 8px;
}
.section::before {
  content: "";
  display: block;
  height: 10px;
  margin-bottom: 22px;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 1px, transparent 1px 26px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sec-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.sec-h h2 {
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--safelight);
  text-shadow: 0 0 24px rgba(201, 67, 47, .35);
}
.sec-h p {
  color: var(--ink-3);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 18px 16px;
  transition:
    transform var(--dur-2) var(--ease-spring),
    border-color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-lift);
}
.card .ico {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  font-family: var(--f-mono);
  background: rgba(255, 159, 110, .10);
  color: var(--lamp);
  border: 1px solid rgba(255, 159, 110, .18);
}
.card .ico.mint {
  background: rgba(143, 227, 192, .08);
  color: var(--mint);
  border-color: rgba(143, 227, 192, .18);
}
.card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  letter-spacing: -.01em;
  font-weight: 620;
}
.card p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.steps {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px;
}
.steps ol { list-style: none; counter-reset: s; }
.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  align-items: start;
  padding: 14px 14px 14px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14.5px;
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  width: 32px;
  height: 28px;
  margin-left: 6px;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--lamp);
  border: 1px solid rgba(255, 159, 110, .28);
  border-radius: var(--radius);
  background: rgba(255, 159, 110, .06);
}
.steps li strong { color: var(--ink); font-weight: 620; }

.req { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  color: var(--ink-2);
  font-size: 13px;
}
.pill b {
  color: var(--ink);
  font-weight: 620;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  margin-right: 6px;
}

/* ---- footer ---- */
.site-foot {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  padding: 40px 0 8px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.site-foot a {
  color: var(--lamp);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease-out);
}
.site-foot a:hover { color: var(--ink); }
.site-foot .copy {
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
}

/* ---- privacy page ---- */
.privacy-main { padding-top: 8px; }
.privacy-main header { margin-bottom: 28px; }
.privacy-main h1 {
  font-family: var(--f-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -.02em;
}
.privacy-main .meta {
  margin-top: 8px;
  text-align: left;
}
.lang-nav {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}
.lang-nav a {
  color: var(--lamp);
  font-family: var(--f-mono);
  font-size: var(--fs-small);
  letter-spacing: .08em;
  text-decoration: none;
}
.lang-nav a:hover { text-decoration: underline; }
.privacy-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 22px 24px;
  margin: 18px 0;
}
.privacy-card h2 {
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--safelight);
  margin-bottom: 16px;
}
.privacy-card h3 {
  font-size: 15px;
  margin: 18px 0 8px;
  letter-spacing: -.01em;
}
.privacy-card p,
.privacy-card li {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.7;
}
.privacy-card ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 0;
}
.privacy-card li { margin: .35rem 0; }
.privacy-card .lead {
  font-size: 1.05rem;
  color: var(--ink);
}
.privacy-card .lead strong { color: var(--ink); }
.privacy-card code {
  font-family: var(--f-mono);
  font-size: .88em;
  color: var(--lamp);
}
.privacy-card .placeholder {
  color: var(--ink-3);
  font-style: italic;
}

/* ---- reveal ---- */
html.js .reveal {
  opacity: 0;
  translate: 0 24px;
  filter: blur(6px);
  transition:
    opacity var(--dur-4) var(--ease-out),
    translate var(--dur-4) var(--ease-out),
    filter var(--dur-4) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js .reveal.in {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
}

/* ---- custom cursor (desktop only) ---- */
.cur {
  position: fixed;
  top: 0; left: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out);
  will-change: transform;
}
.cur.is-live { opacity: 1; }
.cur.is-off { display: none; }
.cur i {
  display: block;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    transform var(--dur-2) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    background-color var(--dur-1) var(--ease-out);
}
#cur-dot i {
  width: 6px; height: 6px;
  background: var(--lamp);
}
#cur-ring i {
  width: 26px; height: 26px;
  border: 1px solid rgba(237, 237, 240, .5);
  mix-blend-mode: difference;
}
body.cur-on #cur-ring i {
  transform: translate(-50%, -50%) scale(1.72);
  border-color: var(--lamp);
}
body.cur-on #cur-dot i {
  transform: translate(-50%, -50%) scale(.4);
}
@media (hover: hover) and (pointer: fine) {
  html.js body.cursor-live,
  html.js body.cursor-live a,
  html.js body.cursor-live button { cursor: none; }
}

/* ---- keyframes ---- */
@keyframes grain-shift {
  0%   { background-position: 0 0; }
  20%  { background-position: -30px 12px; }
  40%  { background-position: 22px -18px; }
  60%  { background-position: -12px 28px; }
  80%  { background-position: 30px -12px; }
  100% { background-position: 0 0; }
}
@keyframes dust-drift {
  0%   { opacity: 0; transform: translate3d(0, 0, 0); }
  14%  { opacity: .34; }
  68%  { opacity: .16; }
  100% { opacity: 0; transform: translate3d(16px, -130px, 0); }
}
@keyframes brand-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 196, 107, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 196, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 196, 107, 0); }
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js .reveal,
  html.js .reveal.in {
    opacity: 1;
    translate: none;
    filter: none;
  }
  .marquee-track { animation: none; transform: none; }
  .dust { display: none; }
  .brand-dot, .badge i { animation: none; }
  .cur { display: none; }
  html.js body,
  html.js body a,
  html.js body button { cursor: auto; }
  .card:hover, .btn:hover { transform: none; }
}

/* ---- responsive ---- */
@media (max-width: 480px) {
  .hero { padding-top: 28px; }
  .hero-icon { width: 100px; height: 100px; }
  .cta-row .btn { width: 100%; }
  .nav-links { gap: 14px; }
}
