:root {
  --bg: #0a0c0e;
  --surface: #111519;
  --surface-2: #161b20;
  --surface-3: #1b2127;
  --border: #242b33;
  --border-soft: #1a2026;
  --text: #eef3f2;
  --muted: #93a3ac;
  --muted-2: #657077;
  --accent: #8de3ce;
  --accent-strong: #b3f0de;
  --gold: #eec874;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; max-width: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

h1, h2, h3 {
  font-family: "Archivo Black", "Space Grotesk", sans-serif;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.0;
}

p { margin: 0; }

.mono { font-family: "IBM Plex Mono", monospace; letter-spacing: 0.1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

button { font-family: inherit; cursor: pointer; }

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

::selection { background: var(--accent); color: #0a0c0e; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

@keyframes pulseRing { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Side nav ---------- */
.side-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: 54px; z-index: 55;
  display: none; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 90px 0 22px; border-right: 1px solid var(--border-soft);
  background: rgba(10,12,14,0.6); backdrop-filter: blur(12px);
}
.side-nav .nav-links { display: flex; flex-direction: column; align-items: center; }
.side-nav a {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.16em;
  color: var(--muted-2); padding: 16px 0; border-top: 1px solid var(--border-soft); transition: color .2s;
}
.side-nav .nav-links a:first-child { border-top: none; }
.side-nav a.active { color: var(--accent); }
.side-nav .brand { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; }

.shell { margin-left: 0; }

@media (min-width: 980px) {
  .side-nav { display: flex; }
  .shell { margin-left: 54px; }
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px,4vw,56px);
  background: rgba(10,12,14,0.65); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar .brand-mark { display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 0; }
.topbar .brand-mark img { width: 20px; height: 20px; flex-shrink: 0; }
.topbar .wordmark { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.topbar .wordmark .accent { color: var(--accent); }

@media (max-width: 480px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar .wordmark-full { display: none; }
  .topbar .btn { padding: 9px 12px; font-size: 12.5px; gap: 5px; }
  .topbar #authArea { gap: 6px; }
  .user-pill { padding: 6px 10px 6px 6px; font-size: 12.5px; }
  .user-pill .plan { display: none; }
}

.btn {
  border: none; border-radius: 8px; font-weight: 700; font-size: 13.5px;
  padding: 10px 18px; display: inline-flex; align-items: center; gap: 7px;
  transition: filter .15s, background .15s, border-color .15s;
}
.btn.gold { background: var(--gold); color: #2a2205; }
.btn.gold:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--muted-2); }
.btn.text { background: transparent; color: var(--text); font-weight: 400; padding: 9px 14px; }
.btn.text:hover { color: var(--accent); }
.btn:disabled { opacity: 0.6; cursor: default; filter: none; }
.btn .spinner {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.25); border-top-color: currentColor;
  animation: spin .7s linear infinite;
}

/* ---------- Account chip + panel ---------- */
.user-chip { position: relative; }
.user-pill {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px 7px 7px; color: var(--text);
}
.user-pill .avatar {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(141,227,206,0.15);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: "IBM Plex Mono", monospace;
}
.user-pill .plan {
  font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: 0.08em;
  color: var(--muted-2); border-left: 1px solid var(--border); padding-left: 8px; margin-left: 2px;
}
.user-pill .plan.active { color: var(--accent); }

.account-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 290px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); z-index: 65;
}
.account-panel .ap-label { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.08em; font-family: "IBM Plex Mono", monospace; }
.account-panel .ap-name { font-size: 15px; font-weight: 700; margin-top: 2px; }
.account-panel .license-detail { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.account-panel form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.account-panel label { font-size: 11.5px; color: var(--muted-2); }
.account-panel .status-msg { font-size: 12px; margin-top: 10px; min-height: 16px; }
.account-panel .signout-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* ---------- Inputs ---------- */
input[type="text"], input[type="password"] {
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px;
  padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 13.5px; width: 100%;
}
input:focus { outline: none; border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 200px clamp(20px,5vw,56px) 110px; overflow: hidden;
  border-bottom: 1px solid var(--border-soft); min-height: 92vh; display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: -10% 0 auto 0; height: 120%; z-index: 0; pointer-events: none; }
.ghost-word {
  position: absolute; top: 46%; left: 50%; transform: translate(-50%,-50%);
  font-size: clamp(140px,24vw,420px); color: rgba(141,227,206,0.045); font-family: "Archivo Black";
  letter-spacing: -0.02em; white-space: nowrap; z-index: 0; pointer-events: none;
}
.hero-inner { max-width: 1240px; margin: 0 auto; position: relative; z-index: 1; width: 100%; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--accent);
  background: rgba(141,227,206,0.08); border: 1px solid rgba(141,227,206,0.25);
  padding: 7px 13px; border-radius: 999px; margin-bottom: 30px;
}
.eyebrow-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulseRing 2.2s ease-in-out infinite; }
.hero h1 { font-size: clamp(44px,7.4vw,104px); }
.hero-sub { max-width: 580px; margin-top: 28px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.cta-row { display: flex; align-items: center; gap: 14px; margin-top: 42px; flex-wrap: wrap; }
.stat-row { display: flex; gap: clamp(20px,4vw,56px); margin-top: 88px; flex-wrap: wrap; }
.stat-row .stat-value { font-family: "Archivo Black"; font-size: 26px; }
.stat-row .stat-label { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: var(--muted-2); margin-top: 6px; letter-spacing: 0.1em; }

/* ---------- Statement break ---------- */
.statement { position: relative; padding: 150px clamp(20px,5vw,56px); text-align: center; overflow: hidden; border-bottom: 1px solid var(--border-soft); }
.statement .ghost-word { font-size: clamp(100px,18vw,300px); color: rgba(255,255,255,0.025); }
.statement-inner { position: relative; max-width: 760px; margin: 0 auto; }
.statement h2 { font-size: clamp(34px,6vw,76px); color: #fff; }
.statement .sub { margin-top: 26px; font-size: 12.5px; color: var(--muted-2); letter-spacing: 0.16em; }

/* ---------- Sections ---------- */
section { padding: 130px clamp(20px,5vw,56px); border-bottom: 1px solid var(--border-soft); }
.section-inner { max-width: 1240px; margin: 0 auto; }
.kicker { color: var(--accent); font-size: 12px; margin-bottom: 14px; }
.section-title { font-size: clamp(30px,4vw,48px); max-width: 640px; }

/* ---------- Showcase ---------- */
.showcase-grid { display: flex; gap: 48px; margin-top: 68px; align-items: center; flex-wrap: wrap; }
.annotation-col { flex: 1 1 220px; min-width: 200px; display: flex; flex-direction: column; gap: 46px; }
.annotation-col .label { font-size: 10.5px; color: var(--muted-2); }
.annotation-col p { font-size: 14px; margin-top: 8px; line-height: 1.55; color: var(--muted); }
.annotation-col .hl { color: var(--text); }

.card-wrap { flex: 1.4 1 420px; min-width: 300px; perspective: 1400px; display: flex; justify-content: center; }
.tilt-card {
  transform: perspective(1000px) rotateY(-6deg) rotateX(3deg);
  width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; transition: transform .15s ease-out; transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(141,227,206,0.04);
}
.chrome-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #1c2127; background: #0f1215; }
.chrome-dot { width: 8px; height: 8px; border-radius: 50%; background: #3a4149; }
.chrome-label { font-size: 9.5px; color: #5c6670; margin-left: 6px; }
.card-body { padding: 18px; }
.search-row { display: flex; align-items: center; gap: 8px; background: #171c21; border: 1px solid #262d35; border-radius: 6px; padding: 9px 11px; margin-bottom: 12px; }
.row-list { display: flex; flex-direction: column; gap: 1px; border-radius: 6px; overflow: hidden; border: 1px solid #1c2127; }
.row-item { display: flex; align-items: center; gap: 10px; background: #12161a; padding: 9px 11px; }
.row-item .box { width: 13px; height: 13px; border-radius: 3px; border: 1.4px solid #3a4149; }
.row-item .box.checked { border-color: var(--accent); background: rgba(141,227,206,0.15); }
.row-item .date { font-size: 9.5px; color: #5c6670; margin-left: auto; }
.row-item .dupe-tag { font-size: 9px; color: var(--gold); background: rgba(238,200,116,0.12); padding: 2px 7px; border-radius: 4px; }
.row-item .kept-tag { font-size: 9px; color: var(--accent); background: rgba(141,227,206,0.12); padding: 2px 7px; border-radius: 4px; }
.card-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 13px; }
.card-footer .mini-btn { background: var(--gold); color: #2a2205; font-weight: 700; font-size: 11.5px; padding: 8px 16px; border-radius: 6px; }
.card-footer .mini-ghost { color: #8b9aa7; font-size: 11.5px; padding: 8px 14px; border-radius: 6px; border: 1px solid #2b3139; }

/* ---------- Merge visual ---------- */
.merge-section { background: var(--surface); overflow: hidden; }
.merge-grid { max-width: 1240px; margin: 0 auto; display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.legend-row { display: flex; gap: 28px; margin-top: 34px; }
.legend-item { display: flex; align-items: center; gap: 7px; }
.legend-swatch { width: 8px; height: 8px; border-radius: 2px; }
.stack-wrap { position: relative; width: 360px; height: 380px; animation: floaty 7s ease-in-out infinite; }
.stack-tag { position: absolute; right: 8px; font-size: 9px; padding: 3px 8px; border-radius: 4px; }

/* ---------- Workflow ---------- */
.workflow-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; margin-top: 64px; }
.workflow-step { position: relative; padding-top: 10px; }
.workflow-step .ghost-num { position: absolute; top: -34px; left: -6px; font-size: 84px; color: rgba(255,255,255,0.04); font-family: "Archivo Black"; }
.workflow-step h3 { font-size: 19px; font-family: "Space Grotesk"; font-weight: 700; position: relative; }
.workflow-step p { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.6; position: relative; }

/* ---------- Access ---------- */
.access-grid { display: grid; grid-template-columns: repeat(3,minmax(220px,1fr)); gap: 20px; margin-top: 52px; }
.access-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 28px; position: relative; }
.access-card.featured { border-color: var(--accent); }
.access-badge { position: absolute; top: -11px; left: 24px; background: var(--accent); color: #0a0c0e; font-size: 9.5px; padding: 4px 9px; border-radius: 999px; font-weight: 700; }
.access-card .duration-label { font-size: 11px; color: var(--muted-2); }
.access-card .duration-value { font-family: "Archivo Black"; font-size: 34px; margin-top: 10px; }
.access-card .duration-value .unit { font-size: 16px; font-family: "Space Grotesk"; color: var(--muted); }
.access-card p { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.55; }

/* ---------- Final CTA ---------- */
.final-cta { position: relative; text-align: center; overflow: hidden; }
.final-cta-inner { position: relative; max-width: 640px; margin: 0 auto; }
.final-cta h2 { font-size: clamp(32px,5vw,56px); }
.final-cta p { margin-top: 20px; font-size: 15.5px; color: var(--muted); }

/* ---------- Footer ---------- */
footer { padding: 64px clamp(20px,5vw,56px) 40px; border-bottom: none; }
.footer-top { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col-title { font-size: 10.5px; color: var(--muted-2); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 13.5px; }
.footer-bottom { max-width: 1240px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--muted-2); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,6,7,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; position: relative;
}
.modal-close { position: absolute; top: 16px; right: 16px; background: transparent; border: none; color: var(--muted); padding: 6px; border-radius: 6px; }
.modal-close:hover { color: var(--text); background: var(--surface-3); }
.modal h2 { font-size: 22px; font-family: "Space Grotesk"; font-weight: 700; }
.modal .sub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.modal form { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.modal label { font-size: 12px; color: var(--muted-2); display: block; margin-bottom: 6px; }
.modal .field { margin-bottom: 2px; }
.modal .status-msg { font-size: 12.5px; min-height: 16px; margin-top: 4px; }
.modal .status-msg.error { color: #e89b8a; }
.modal .status-msg.ok { color: var(--accent); }
.modal .toggle-mode { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); background: none; border: none; width: 100%; }
.modal .toggle-mode:hover { color: var(--accent); }
.modal .submit-btn { width: 100%; justify-content: center; margin-top: 4px; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .tilt-card { transition: none; }
}
