/* ============ The Registry Desk — base ============ */
:root {
  --paper: #faf6ee;
  --paper-2: #f3edE0;
  --paper-3: #ece4d2;
  --white: #ffffff;
  --ink: #2e2e30;          /* charcoal from logo "time" */
  --muted: #6f6a60;
  --line: #e2dac8;
  --rule: #d8cfba;
  --orange: #ffa629;       /* Captime orange */
  --orange-deep: #ef8f00;
  --orange-soft: rgba(255, 166, 41, 0.16);
  --purple: #4e45df;       /* small bits only */
  --display: "Young Serif", serif;
  --body: "Figtree", sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --tc: "Noto Serif TC", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    /* faint ledger ruling */
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(216, 207, 186, 0.28) 31px 32px),
    var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}
::selection { background: var(--orange); color: var(--ink); }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 99;
  background: var(--ink); color: #fff; padding: 10px 18px; font-weight: 700;
}
.skip:focus { left: 12px; top: 12px; }

h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
.fullstop { color: var(--orange); }
h3 { font-weight: 600; }
a { color: var(--ink); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color 0.2s; }
a:hover { color: var(--orange-deep); }
strong { font-weight: 700; }

/* orange highlighter on the answer-first passage */
mark {
  background: var(--orange); color: var(--ink);
  padding: 0.1em 0.32em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
mark strong { color: var(--ink); }

/* buttons */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--body); font-weight: 700; letter-spacing: 0.02em;
  padding: 15px 32px; border: 2px solid var(--ink); color: var(--ink);
  background: transparent; position: relative;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-solid { background: var(--orange); }
.btn-solid:hover { background: var(--orange-deep); color: var(--ink); }
.btn-line { background: var(--white); }
.btn-mini { padding: 8px 16px; font-size: 0.8rem; box-shadow: 3px 3px 0 var(--ink); }

/* reveal on load/scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; } .d4 { transition-delay: 0.4s; }

/* section shells (inside the folder sheet) */
.section { position: relative; padding: 70px 5%; }
.section-head { margin-bottom: 20px; }
.sub-head { margin-top: 70px; }
.index {
  font-family: var(--mono); color: var(--purple); font-size: 0.74rem;
  letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 14px;
}
.section h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; max-width: 26ch; }
.section-lede { color: var(--muted); max-width: 64ch; font-size: 1.03rem; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .note, .marquee-track, .chop, .play::before, .play::after { animation: none !important; }
}
/* ============ The Registry Desk — sections ============ */

/* ---------- HERO ---------- */
.hero { position: relative; padding: 56px 5vw 38px; max-width: 1280px; margin: 0 auto; }

/* section menu above the certificate card */
.hero-right { position: relative; }
.mini-menu {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 18px; flex-wrap: wrap; margin-bottom: 22px;
}
.mini-menu a:not(.btn) {
  color: var(--muted); text-decoration: none; font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s;
}
.mini-menu a:not(.btn):hover { color: var(--orange-deep); }
@media (max-width: 940px) { .mini-menu { justify-content: flex-start; margin: 26px 0 0; } }

/* vertical 有限公司 column */
.vertical-glyph {
  position: absolute; top: 40px; right: 1vw; z-index: 0;
  font-family: var(--tc); font-weight: 900; font-size: clamp(60px, 8vw, 118px);
  writing-mode: vertical-rl; line-height: 1; letter-spacing: 0.12em;
  color: rgba(46, 46, 48, 0.055); user-select: none; pointer-events: none;
}

/* drifting banknotes (logo motif) */
.note {
  position: absolute; width: 86px; height: 46px; z-index: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  border: 2px solid rgba(46,46,48,0.25); border-radius: 6px;
  display: grid; place-items: center; opacity: 0.16;
  animation: noteFloat 11s ease-in-out infinite;
}
.note i { font-style: normal; font-family: var(--mono); font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.note::before, .note::after {
  content: ""; position: absolute; inset: 4px; border: 1px dashed rgba(46,46,48,0.3); border-radius: 3px;
}
.note-1 { top: 16%; left: 44%; rotate: -14deg; }
.note-2 { top: 58%; left: 55%; rotate: 9deg; animation-delay: 2.2s; }
.note-3 { top: 30%; left: 61%; rotate: -4deg; animation-delay: 4.4s; width: 66px; height: 36px; }
@keyframes noteFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -22px; } }

.hero-grid {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 48px; align-items: center;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } .stage { display: none; } }

.kicker {
  font-family: var(--mono); color: var(--muted); font-size: 0.74rem;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 22px;
}
.kicker .tick { color: var(--orange-deep); font-weight: 700; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.04; margin-bottom: 24px; }
.flag-badge {
  display: inline-block; width: 0.74em; height: 0.74em;
  border-radius: 50%; vertical-align: baseline; margin-bottom: -0.06em;
  box-shadow: 0 4px 14px rgba(238, 28, 37, 0.28);
}
.lede { font-size: clamp(1rem, 1.4vw, 1.16rem); max-width: 56ch; margin-bottom: 14px; }
.sub { color: var(--muted); font-size: 0.94rem; max-width: 60ch; }

/* ---------- CERTIFICATE CARD + CHOP ---------- */
.stage { position: relative; perspective: 1000px; }
.cert {
  position: relative; background: var(--white);
  border: 1px solid var(--rule); outline: 4px double var(--rule); outline-offset: -12px;
  padding: 46px 44px 40px;
  box-shadow: 10px 12px 0 rgba(46,46,48,0.12), 0 24px 60px rgba(46,46,48,0.12);
  transform-style: preserve-3d; will-change: transform;
  rotate: 1.5deg;
}
.cert-head { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.34em; color: var(--muted); }
.cert-rule { height: 2px; background: var(--ink); margin: 14px 0 20px; width: 56px; }
.cert-name { font-family: var(--display); font-size: 1.7rem; line-height: 1.25; margin-bottom: 18px; }
.cert-name b { color: var(--orange-deep); font-weight: 400; }
.cert-line { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); padding: 7px 0; border-bottom: 1px dashed var(--rule); }
.cert-status { margin-top: 18px; font-weight: 700; color: var(--purple); }
.cert-status::before { content: "✓ "; }
.cert-foot { margin-top: 6px; font-size: 0.72rem; color: var(--muted); }

/* the company chop — stamps down on load */
.chop {
  position: absolute; right: 26px; bottom: 24px; width: 96px; height: 96px;
  border: 4px solid var(--orange-deep); border-radius: 10px;
  display: grid; place-items: center; rotate: -12deg;
  color: var(--orange-deep); font-family: var(--tc); font-weight: 900;
  font-size: 1.7rem; line-height: 1.05; text-align: center;
  mix-blend-mode: multiply; opacity: 0.9;
  animation: stamp 0.5s 1.1s cubic-bezier(.2,1.6,.3,1) backwards;
}
.chop::after {
  content: ""; position: absolute; inset: 5px; border: 1.5px solid rgba(239,143,0,0.6); border-radius: 6px;
}
@keyframes stamp {
  0% { transform: scale(2.6) rotate(12deg); opacity: 0; }
  55% { transform: scale(0.94); opacity: 1; }
  75% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ---------- CHECKER (official form) ---------- */
.checker {
  position: relative; z-index: 3; margin-top: 64px;
  background: var(--white); border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--orange);
  padding: 38px 34px 22px;
}
.checker-tag {
  position: absolute; top: -15px; left: 26px;
  background: var(--ink); color: var(--paper); font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.22em; padding: 5px 14px; text-transform: uppercase;
}
.checker-form { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.grow { flex: 2 1 300px; }
.field:not(.grow) { flex: 1 1 220px; }
.field span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); font-weight: 700; }
.field span b { color: var(--orange-deep); }
.field input, .field select {
  background: var(--paper); border: none; border-bottom: 2px solid var(--ink);
  color: var(--ink); font-family: var(--body); font-size: 1.02rem; padding: 13px 14px;
  outline: none; transition: background 0.2s, border-color 0.2s;
}
.field input:focus, .field select:focus { background: var(--orange-soft); border-bottom-color: var(--orange-deep); }
.btn-check { flex: 0 0 auto; }
.email-note { margin-top: 16px; color: var(--muted); font-size: 0.78rem; }
.email-note .instant { color: var(--orange-deep); font-weight: 800; letter-spacing: 0.04em; }
.demo-result { margin-top: 6px; font-size: 0.92rem; font-weight: 600; color: var(--purple); }
.demo-result:empty { display: none; }
.disclaimer { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--rule); color: var(--muted); font-size: 0.78rem; }

/* ---------- MARQUEE ---------- */
.marquee { border-block: 2px solid var(--ink); overflow: hidden; padding: 12px 0; background: var(--orange); margin-top: 26px; }
.marquee-track { display: flex; width: max-content; animation: scroll 38s linear infinite; }
.marquee-track span {
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.26em; white-space: nowrap;
  color: var(--ink); font-weight: 500;
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- FOLDER TABS ---------- */
.folder { max-width: 1280px; margin: 26px auto 0; padding: 0 5vw; }
.tabbar-wrap { position: sticky; top: 8px; z-index: 30; }
.tabbar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 6px 0; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button {
  appearance: none; cursor: pointer; white-space: nowrap;
  font-family: var(--body); font-weight: 600; font-size: 0.9rem;
  color: var(--muted); background: var(--paper-3);
  border: 2px solid var(--ink); border-bottom: none;
  border-radius: 10px 10px 0 0; padding: 13px 22px 11px;
  translate: 0 2px; transition: background 0.2s, color 0.2s, translate 0.2s;
}
.tabbar button:hover { background: var(--paper-2); color: var(--ink); }
.tabbar button[aria-selected="true"] {
  background: var(--white); color: var(--ink); translate: 0 2.5px;
  box-shadow: 0 -6px 14px rgba(46,46,48,0.06);
}
.tabbar button .no { font-family: var(--mono); color: var(--orange-deep); margin-right: 8px; font-size: 0.74rem; }
.sheet {
  background: var(--white); border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 rgba(46,46,48,0.14);
  margin-bottom: 90px;
}
.panel-tab[hidden] { display: none; }
.panel-tab { animation: panelIn 0.4s cubic-bezier(.2,.7,.2,1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- RULES (ledger list) ---------- */
.rule-list { list-style: none; counter-reset: rule; margin-top: 40px; border-top: 2px solid var(--ink); }
.rule {
  counter-increment: rule; position: relative;
  padding: 30px 20px 30px 110px; border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.rule:hover { background: var(--paper); }
.rule::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute; left: 14px; top: 26px;
  font-family: var(--display); font-size: 2.2rem; color: var(--orange);
}
.rule:hover::before { color: var(--orange-deep); }
.rule h3 { font-size: 1.12rem; margin-bottom: 8px; }
.rule p { color: var(--muted); font-size: 0.94rem; max-width: 74ch; }

/* ---------- HOW / STEPS ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-top: 40px; }
.step {
  background: var(--paper); border: 1.5px solid var(--ink); padding: 30px 26px;
  box-shadow: 5px 5px 0 var(--paper-3); transition: box-shadow 0.2s, translate 0.2s;
}
.step:hover { translate: -2px -2px; box-shadow: 8px 8px 0 var(--orange); }
.step-no { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--purple); margin-bottom: 14px; }
.step h3 { font-size: 1.15rem; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 0.93rem; }

.tick-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 34px; }
.tick-grid li, .tick-list li {
  position: relative; padding: 16px 18px 16px 46px;
  background: var(--paper); border: 1px solid var(--line);
}
.tick-grid li::before, .tick-list li::before {
  content: "✓"; position: absolute; left: 17px; top: 15px; color: var(--orange-deep); font-weight: 800;
}
.tick-list { list-style: none; display: grid; gap: 10px; }

/* ---------- VIDEO ---------- */
.video-shell {
  position: relative; aspect-ratio: 16 / 9; margin-top: 40px;
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--orange);
  background: linear-gradient(160deg, #35353a, var(--ink));
  display: grid; place-items: center; overflow: hidden;
}
.video-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-inner { text-align: center; }
.play {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 22px;
  border: 2px solid var(--orange); display: grid; place-items: center; position: relative; cursor: pointer;
  transition: transform 0.3s;
}
.play::before, .play::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 1px solid rgba(255,166,41,0.6); animation: ripple 2.6s ease-out infinite;
}
.play::after { animation-delay: 1.3s; }
@keyframes ripple { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.play span {
  width: 0; height: 0; border-left: 22px solid var(--orange);
  border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 5px;
}
.play:hover { transform: scale(1.07); }
.video-note { color: #cfc9bd; font-size: 0.85rem; font-family: var(--mono); letter-spacing: 0.04em; }

/* ---------- GOOD TO KNOW ---------- */
.know-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
@media (max-width: 860px) { .know-grid { grid-template-columns: 1fr; } }
.panel { padding: 32px 30px; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--paper-3); }
.panel h3 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; margin-bottom: 14px; }
.panel p { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.panel p strong { color: var(--ink); }
.x-list { list-style: none; display: grid; gap: 10px; }
.x-list li { position: relative; padding-left: 28px; color: var(--muted); font-size: 0.94rem; }
.x-list li::before { content: "✕"; position: absolute; left: 0; color: var(--purple); font-weight: 800; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 36px; border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 22px 46px 22px 4px; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary h3 { display: inline; font-family: var(--display); font-weight: 400; font-size: 1.12rem; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--orange-deep); font-weight: 400; transition: transform 0.3s, color 0.3s;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--purple); }
.faq-list summary:hover h3 { color: var(--orange-deep); }
.faq-list details p { padding: 0 8% 24px 4px; color: var(--muted); max-width: 74ch; }

/* ---------- CTA ---------- */
.cta { background: var(--ink); border-top: 6px solid var(--orange); padding: 100px 5vw; text-align: center; }
.cta-inner { max-width: 820px; margin: 0 auto; }
.cta h2 { color: var(--paper); font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.08; margin-bottom: 22px; }
.cta p { color: #b9b4a8; margin-bottom: 38px; }
.cta a:not(.btn) { color: var(--orange); text-decoration-color: rgba(255,166,41,0.5); }
.cta a:not(.btn):hover { color: #ffc46a; }
.cta-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.cta .btn { border-color: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--orange-deep); }
.cta .btn-line { background: var(--paper); }
.cta .btn:hover { box-shadow: 2px 2px 0 var(--orange-deep); }
