/* TokenHub public landing page + member placeholder. */
:root,
html:not(.lp-static) :is(.lp-header, .lp-hero, .lp-hint, .lp-rail, .lp-loading) {
  --ink: #1d1b18;
  --ink-hover: #3a362f;
  --paper: #f5f2eb;
  --card: #fffdf9;
  --clay: #d9774a;
  --clay-deep: #ab4e26;
  --clay-darker: #8e3f1e;
  --clay-tint: #f0c9ae;
  --clay-wash: #fbede4;
  --green: #3e8e5a;
  --green-deep: #2f6f45;
  --red: #c2412d;
  --none: #ddd6c8;
  --text-2: #4a453d;
  --text-3: #5e584d;
  --text-4: #675f53;
  --border: #e5dfd3;
  --border-2: #dcd5c7;
  --border-btn: #cfc8ba;
  --track: #ede8de;
  --wash: #f1ece2;
  --hover-wash: rgba(29, 27, 24, 0.06);
  --deep: #1d1b18;
  --on-deep: #f5f2eb;
  --green-ring: rgba(62, 142, 90, 0.14);
  --clay-ring: rgba(217, 119, 74, 0.16);
  --red-ring: rgba(194, 65, 45, 0.14);
  --shadow-md: rgba(29, 27, 24, 0.14);
  --sans: "Styrene B", "Anthropic Sans", "DM Sans", system-ui, sans-serif;
  --serif: "Tiempos Headline", "Copernicus", "Anthropic Serif", "Source Serif 4", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
:root {
  --scene-bg: #f5f2eb;
  --sun-display: none;
  --moon-display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ece6d9;
    --ink-hover: #d4cdbf;
    --paper: #171512;
    --card: #211e1a;
    --clay-deep: #eb9a73;
    --clay-darker: #f5b392;
    --clay-tint: #5a3a28;
    --clay-wash: #3a251a;
    --green: #4fae6f;
    --green-deep: #7cc593;
    --red: #e5624c;
    --none: #3a362f;
    --text-2: #cfc8ba;
    --text-3: #bdb5a6;
    --text-4: #a39c8e;
    --border: #36322b;
    --border-2: #4a453b;
    --border-btn: #4a453b;
    --track: #2d2a24;
    --wash: #2a2722;
    --hover-wash: rgba(255, 255, 255, 0.08);
    --deep: #2b2823;
    --green-ring: rgba(79, 174, 111, 0.22);
    --clay-ring: rgba(217, 119, 74, 0.24);
    --red-ring: rgba(229, 98, 76, 0.22);
    --shadow-md: rgba(0, 0, 0, 0.5);
    --sun-display: block;
    --moon-display: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ece6d9;
  --ink-hover: #d4cdbf;
  --paper: #171512;
  --card: #211e1a;
  --clay-deep: #eb9a73;
  --clay-darker: #f5b392;
  --clay-tint: #5a3a28;
  --clay-wash: #3a251a;
  --green: #4fae6f;
  --green-deep: #7cc593;
  --red: #e5624c;
  --none: #3a362f;
  --text-2: #cfc8ba;
  --text-3: #bdb5a6;
  --text-4: #a39c8e;
  --border: #36322b;
  --border-2: #4a453b;
  --border-btn: #4a453b;
  --track: #2d2a24;
  --wash: #2a2722;
  --hover-wash: rgba(255, 255, 255, 0.08);
  --deep: #2b2823;
  --green-ring: rgba(79, 174, 111, 0.22);
  --clay-ring: rgba(217, 119, 74, 0.24);
  --red-ring: rgba(229, 98, 76, 0.22);
  --shadow-md: rgba(0, 0, 0, 0.5);
  --sun-display: block;
  --moon-display: none;
  color-scheme: dark;
}

html:not(.lp-static) :is(.lp-header, .lp-hero, .lp-hint, .lp-rail, .lp-loading) { color: var(--ink); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--clay-deep); text-decoration: none; }
a:hover { color: var(--clay-darker); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--clay-deep); outline-offset: 2px; }

@keyframes lpBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes lpPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Scroll container + sticky stage */
.lp-root { position: relative; height: 1100vh; }
.lp-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
html:not(.lp-static) .lp-stage { background: var(--scene-bg); }
.lp-canvas { position: absolute; inset: 0; }
.lp-canvas canvas { display: block; }
.lp-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.lp-loading[hidden] { display: none; }
.lp-loading-label { font-family: var(--mono); font-size: 13px; color: var(--text-4); display: flex; align-items: center; gap: 8px; }
.lp-pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--clay); animation: lpPulse 1.2s ease-in-out infinite; }

/* Header */
.lp-header { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px, 5vw, 72px); z-index: 3; }
.lp-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.lp-brand:hover { color: var(--ink); }
.lp-logo { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.lp-wordmark { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.lp-nav { display: flex; align-items: center; gap: 6px; }
.theme-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun { display: var(--sun-display); }
.theme-icon-moon { display: var(--moon-display); }
.lp-theme-toggle { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-btn); border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer; }
.lp-lang-toggle { font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.lp-theme-toggle:hover { background: var(--hover-wash); color: var(--ink); }
.lp-nav-link { font-size: 14px; font-weight: 500; padding: 9px 12px; border-radius: 9px; color: var(--text-3); white-space: nowrap; }
.lp-nav-link:hover { background: var(--hover-wash); color: var(--ink); }
.lp-nav-hello { font-size: 14px; font-weight: 500; padding: 0 8px; color: var(--text-3); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-nav-cta { font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); white-space: nowrap; }
.lp-nav-cta:hover { background: var(--ink-hover); color: var(--paper); }

/* Card layer */
.lp-cards { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.lp-cards > [data-scene] { will-change: opacity, translate; }

.lp-hero { position: absolute; left: clamp(20px, 6vw, 88px); top: clamp(96px, 20vh, 200px); max-width: min(640px, calc(100vw - 40px)); display: flex; flex-direction: column; gap: 22px; pointer-events: auto; }
.lp-pill { align-self: flex-start; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-3); padding: 6px 12px; border: 1px solid var(--border-2); border-radius: 999px; background: var(--paper); }
.lp-dot-green { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.lp-h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 6.6vw, 96px); line-height: 0.98; letter-spacing: -0.03em; text-wrap: balance; }
.lp-lede { margin: 0; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: var(--text-2); max-width: 500px; text-wrap: pretty; }
.lp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-actions-center { justify-content: center; }
.lp-btn { font-size: 15px; font-weight: 600; padding: 14px 22px; border-radius: 12px; }
.lp-btn-ink { background: var(--ink); color: var(--paper); }
.lp-btn-ink:hover { background: var(--ink-hover); color: var(--paper); }
.lp-btn-outline { padding: 14px 20px; border: 1px solid var(--border-btn); background: var(--paper); color: var(--ink); }
.lp-btn-outline:hover { background: var(--track); color: var(--ink); }
.lp-btn-clear { background: transparent; }
.lp-btn-clear:hover { background: var(--wash); }

.lp-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-4); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.lp-mouse { width: 22px; height: 34px; border: 1.5px solid var(--text-4); border-radius: 999px; display: flex; justify-content: center; padding-top: 6px; }
.lp-wheel { width: 3px; height: 7px; border-radius: 2px; background: var(--text-4); animation: lpBob 1.6s ease-in-out infinite; }

.lp-card { position: absolute; left: clamp(16px, 5vw, 72px); bottom: clamp(20px, 8vh, 80px); width: min(440px, calc(100vw - 32px)); padding: 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 24px 60px var(--shadow-md); display: flex; flex-direction: column; gap: 12px; opacity: 0; pointer-events: none; }
.lp-card-wide { width: min(460px, calc(100vw - 32px)); }
.lp-eyebrow { font-family: var(--mono); font-size: 12px; color: var(--clay-deep); font-weight: 500; }
.lp-h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.05; letter-spacing: -0.02em; }
.lp-body { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-3); text-wrap: pretty; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.lp-chip { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--track); color: var(--text-2); }
.lp-code { margin: 4px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--deep); color: var(--on-deep); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.lp-keys { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.lp-key-chip { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--clay-wash); border: 1px solid var(--clay-tint); }
.lp-key-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green-deep); flex: none; }
.lp-key-mono { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.lp-key-tag { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-4); }
.lp-meter { display: flex; flex-direction: column; gap: 7px; padding-top: 4px; }
.lp-meter-row { display: flex; justify-content: space-between; font-size: 13px; }
.lp-muted { color: var(--text-4); }
.lp-good { color: var(--green-deep); font-weight: 600; font-size: 13px; }
.lp-meter-track { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.lp-meter-fill { width: 68%; height: 100%; border-radius: 999px; background: var(--clay); }
.lp-transfer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--clay-wash); border: 1px solid var(--clay-tint); }
.lp-transfer-code { font-family: var(--mono); font-size: 14px; }

.lp-start { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 32px)); padding: clamp(28px, 4vw, 44px); border-radius: 24px; box-shadow: 0 30px 80px var(--shadow-md); align-items: center; gap: 16px; text-align: center; }
.lp-h2-xl { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5.6vw, 76px); line-height: 1; letter-spacing: -0.03em; }
.lp-start-body { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-3); max-width: 440px; text-wrap: pretty; }
.lp-foot { font-family: var(--mono); font-size: 12px; color: var(--text-4); display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.lp-foot-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 18px; }
.lp-foot-link { text-decoration: underline; text-underline-offset: 3px; }
.lp-foot-link:hover { color: var(--ink); }

/* Progress rail */
.lp-rail { position: absolute; right: clamp(12px, 2.4vw, 32px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.lp-rail-item { font: inherit; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 6px 4px; border: 0; background: transparent; cursor: pointer; }
.lp-rail-label { font-size: 12px; font-weight: 600; color: var(--text-4); opacity: 0; transition: opacity 0.3s; }
.lp-rail-pill { width: 8px; height: 8px; border-radius: 999px; background: var(--border-btn); transition: all 0.3s; }
.lp-rail-item.is-active .lp-rail-label { color: var(--ink); opacity: 1; }
.lp-rail-item.is-active .lp-rail-pill { width: 22px; background: var(--ink); }

/* Phones: the rail would sit on top of the full-width cards, and the header must fit in one row. */
@media (max-width: 600px) {
  .lp-rail { display: none; }
}
@media (max-width: 480px) {
  .lp-header { gap: 10px; }
  .lp-nav-how { display: none; }
  .lp-nav-link { font-size: 13px; padding: 6px 10px; line-height: 1.15; white-space: normal; text-align: center; }
  .lp-nav-cta { font-size: 13px; padding: 9px 12px; }
  .lp-nav-hello { display: none; }
}

/* Static stack: reduced motion, or no WebGL. */
.lp-static .lp-root { height: auto; }
.lp-static .lp-stage { position: relative; height: auto; overflow: visible; }
.lp-static .lp-canvas, .lp-static .lp-loading, .lp-static .lp-hint, .lp-static .lp-rail { display: none; }
.lp-static .lp-header { position: relative; }
.lp-static .lp-cards { position: relative; inset: auto; display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px 16px 64px; pointer-events: auto; }
.lp-static .lp-cards > [data-scene] { position: relative; left: auto; top: auto; bottom: auto; transform: none; width: min(640px, 100%); max-width: none; opacity: 1; pointer-events: auto; }
.lp-static .lp-hero { padding: 24px 0 16px; }


/* Root site: "enter your tenant" */
.lp-enter { box-sizing: border-box; max-width: 460px; min-height: 100vh; margin: 0 auto; padding: 48px 16px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.lp-enter .lp-actions { display: flex; gap: 8px; }
.lp-enter-form { display: flex; flex-direction: column; gap: 10px; }
.lp-enter-form label { font-size: 13px; font-weight: 600; color: var(--text-3); }
.lp-enter-row { display: flex; align-items: center; gap: 8px; }
.lp-enter-row input { flex: 1; min-width: 0; font: inherit; font-family: var(--mono); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-btn); background: transparent; color: var(--ink); }
.lp-enter-suffix { font-family: var(--mono); font-size: 13px; color: var(--text-4); }
.lp-enter-error { margin: 0; font-size: 13px; color: #b3261e; }
.lp-enter-form .lp-btn { align-self: flex-start; border: 0; cursor: pointer; }
