/* Janus — website design layer (loaded after style.css).
   Fluid type scale, mobile menu, and the marketing sections. */

:root {
  --step--1: clamp(.82rem, .79rem + .15vw, .9rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.08rem);
  --step-1: clamp(1.12rem, 1.05rem + .35vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.2rem + .9vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.45rem + 2vw, 2.9rem);
  --step-4: clamp(2.35rem, 1.6rem + 3.6vw, 4.4rem);
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 8vw, 112px);
  --teal: #14b8a6;
}

body { font-size: var(--step-0); text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }
p, li, dd { text-wrap: pretty; }
.container { width: min(1200px, 100% - 2 * var(--gutter)); }
.narrow { width: min(780px, 100% - 2 * var(--gutter)); }
:focus-visible { outline: 2px solid var(--peri); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: rgba(139, 92, 246, .45); color: #fff; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { min-height: 42px; }
.btn-lg { min-height: 52px; padding: 0 26px; }
.btn-sm { min-height: 34px; }
.btn-icon { width: 42px; padding: 0; }
.btn-teal { --btn: #0ea5a4; background: linear-gradient(135deg, #0ea5a4, #22d3ee); box-shadow: 0 8px 26px -10px #22d3ee; color: #04121a; }
.btn-teal:hover { color: #04121a; }

/* ── Header + mobile menu ────────────────────────────────── */
.site-header { background: rgba(6, 5, 13, .72); }
.header-inner { height: 68px; gap: 28px; }
.brand { font-size: 1.22rem; letter-spacing: .03em; flex: none; }
.logo-mark { width: 32px; height: 32px; }
.site-nav { gap: 4px; margin-left: 8px; }
.site-nav a { padding: 8px 12px; border-radius: 8px; font-size: .94rem; transition: background .2s, color .2s; }
.site-nav a:hover { background: var(--panel); }
.header-cta { gap: 8px; }
.mnav { display: none; margin-left: auto; position: relative; }
.mnav summary { list-style: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); display: grid; place-content: center; gap: 5px; cursor: pointer; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #fff; transition: transform .25s, opacity .2s; }
.mnav[open] summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mnav[open] summary span:nth-child(2) { opacity: 0; }
.mnav[open] summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mnav-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 2 * var(--gutter))); padding: 10px; border-radius: 16px; background: rgba(14, 12, 32, .97); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); display: grid; gap: 2px; animation: drop .18s ease; }
.mnav-panel a:not(.btn) { padding: 12px 14px; border-radius: 10px; color: var(--text); font-weight: 500; }
.mnav-panel a:not(.btn):hover { background: var(--panel-2); }
.mnav-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; width: auto; }
.mnav-panel .btn { margin-top: 6px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ── Eyebrows + section heads ────────────────────────────── */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: var(--step--1); letter-spacing: .01em; margin-bottom: 20px; }
.eyebrow-teal { color: #5eead4; border-color: rgba(20, 184, 166, .35); background: rgba(20, 184, 166, .08); }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34, 211, 238, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
.section { padding: var(--section) 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: var(--step-3); margin: 0; }
.section-head p { color: var(--muted); font-size: var(--step-1); margin: 14px 0 0; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 5vw, 64px); }
.hero h1 { font-size: clamp(2.3rem, 1rem + 3.3vw, 3.9rem); line-height: 1.06; letter-spacing: -0.035em; margin-bottom: 22px; }
.h1-line { display: block; text-wrap: balance; }
@media (max-width: 560px) {
  .hero h1 { text-wrap: balance; }
  .h1-line { display: inline; }
}
.lead { font-size: var(--step-1); line-height: 1.6; max-width: 34em; }
.hero-cta { gap: 12px; }
.hero-cta-center { justify-content: center; }
.hero-points { gap: 10px; margin-top: 28px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: #cfcde3; font-size: var(--step--1); }
.hero-points li::before { content: none; }
.tick { width: 16px; height: 16px; flex: none; color: var(--cyan); stroke-width: 2.6; }
.hero-art { min-height: clamp(300px, 38vw, 480px); }
.hero-art img { width: min(340px, 62%); z-index: 1; }
.ring { position: absolute; aspect-ratio: 1; border-radius: 50%; pointer-events: none; }
.ring-1 { width: min(470px, 96%); border: 1px solid rgba(139, 92, 246, .22); background: radial-gradient(closest-side, rgba(109, 139, 250, .16), transparent 70%); }
.ring-2 { width: min(370px, 76%); border: 1px dashed rgba(34, 211, 238, .25); animation: spin 40s linear infinite; }
.float-card { z-index: 2; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(16, 13, 36, .88); }
.float-card b { display: block; font-size: .86rem; line-height: 1.2; }
.float-card small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.fc-1 { top: 10%; right: 2%; }
.fc-2 { top: 50%; bottom: auto; left: 0; }
.fc-3 { bottom: 6%; right: 10%; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(40px, 6vw, 72px) 0 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); overflow: hidden; }
.stats div { padding: clamp(16px, 2.4vw, 26px); text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats dt { font: 800 var(--step-3) var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stats dd { margin: 6px 0 0; color: var(--muted); font-size: var(--step--1); }

/* ── Features ────────────────────────────────────────────── */
.feature-grid { gap: 16px; }
.feature { padding: 26px 24px 24px; border-radius: 18px; }
.feature-tile { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(139, 92, 246, .3), rgba(34, 211, 238, .2)); border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.feature-tile .feature-icon { width: 24px; height: 24px; padding: 0; background: none; border-radius: 0; }
.feature h3 { font-size: var(--step-1); margin: 18px 0 8px; }
.feature p { font-size: .95rem; line-height: 1.6; }

/* ── Janus Gate showcase ─────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-copy h2 { font-size: var(--step-3); margin-bottom: 16px; }
.split-copy > p { color: #c9c6e0; font-size: var(--step-1); line-height: 1.6; margin: 0 0 24px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: #cfcde3; }
.checklist .tick { margin-top: 4px; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(34, 211, 238, .14); }
.checklist b { color: #fff; }
.gate-demo { display: grid; place-items: center; }
.gate-demo-card { width: min(440px, 100%); padding: 22px; border-radius: 22px; background: rgba(16, 13, 36, .85); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px rgba(109, 139, 250, .55); transform: rotate(-1.5deg); }
.gate-demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.gate-demo-head .state-title { margin: 0; font-size: 1.1rem; }
.gate-demo-img { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 2 / 1; }
.gate-demo-img img { display: block; width: 100%; height: 100%; }
.gate-demo-piece { position: absolute; width: 16.875% !important; height: auto !important; top: 36.25%; left: 0; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .7)) drop-shadow(0 0 6px rgba(255, 255, 255, .35)); animation: slide-piece 4.5s ease-in-out infinite; }
.gate-demo-track { position: relative; height: 46px; margin-top: 12px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); overflow: hidden; }
.gate-demo-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(139, 92, 246, .35), rgba(34, 211, 238, .25)); animation: slide-fill 4.5s ease-in-out infinite; }
.gate-demo-handle { position: absolute; top: 3px; left: 3px; width: 50px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); color: #0c0a1e; font-weight: 800; animation: slide-handle 4.5s ease-in-out infinite; }
@keyframes slide-piece { 0%, 12% { left: 0; } 55%, 85% { left: 61.25%; } 100% { left: 0; } }
@keyframes slide-fill { 0%, 12% { width: 28px; } 55%, 85% { width: 66%; } 100% { width: 28px; } }
@keyframes slide-handle { 0%, 12% { left: 3px; } 55%, 85% { left: calc(66% - 28px); } 100% { left: 3px; } }

/* ── Steps ───────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 0; position: relative; counter-reset: none; }
.steps::before { content: ''; position: absolute; top: 46px; left: 16%; right: 16%; height: 2px; background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .5), rgba(34, 211, 238, .5), transparent); }
.step { position: relative; text-align: center; padding: 30px 26px; border-radius: 18px; }
.step-n { width: 42px; height: 42px; margin-bottom: 16px; box-shadow: 0 0 0 6px var(--ink), 0 0 24px rgba(109, 139, 250, .5); }
.step h3 { font-size: var(--step-1); }

/* ── Specula promo ───────────────────────────────────────── */
.promo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 26px; color: var(--text); background: radial-gradient(600px 300px at 90% 50%, rgba(20, 184, 166, .2), transparent 70%), linear-gradient(135deg, rgba(20, 184, 166, .08), rgba(139, 92, 246, .06)); border: 1px solid rgba(20, 184, 166, .28); transition: border-color .25s, transform .25s; }
.promo:hover { color: var(--text); border-color: rgba(94, 234, 212, .55); transform: translateY(-2px); }
.promo h2 { font-size: var(--step-3); margin-bottom: 14px; }
.promo p { color: #c9c6e0; font-size: var(--step-1); margin: 0 0 24px; }
.promo-art { display: grid; place-items: center; }
.mini-graph { width: min(320px, 100%); height: auto; filter: drop-shadow(0 0 30px rgba(34, 211, 238, .25)); }

/* ── Compare table ───────────────────────────────────────── */
.compare { max-width: 860px; margin: 0 auto; border: 1px solid var(--line); border-radius: 18px; border-collapse: separate; border-spacing: 0; }
.compare th, .compare td { padding: 15px 20px; }
.compare thead th { font-size: .92rem; color: var(--muted); font-weight: 600; }
.compare thead .col-janus { color: #fff; }
.compare tbody th { font-weight: 500; text-align: left; color: #dcdaf0; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.col-janus { background: rgba(139, 92, 246, .1); }
.compare-logo { width: 20px; height: 20px; vertical-align: -5px; margin-right: 4px; }
.yes, .no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; }
.yes { background: rgba(34, 211, 238, .14); }
.no { background: rgba(244, 63, 94, .12); }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-list { display: grid; gap: 10px; }
.faq { margin: 0; border-radius: 14px; transition: border-color .2s, background .2s; }
.faq[open] { border-color: var(--line-2); background: var(--panel-2); }
.faq summary { padding: 20px 0; font-size: 1.02rem; }
.faq summary::after { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); font-size: 1.1rem; }

/* ── CTA ─────────────────────────────────────────────────── */
.cta-inner { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 80px) 24px; border-radius: 28px; text-align: center; }
.cta-glow { position: absolute; inset: -40% 10% auto; height: 120%; background: radial-gradient(closest-side, rgba(139, 92, 246, .28), transparent); pointer-events: none; }
.cta-inner > * { position: relative; }
.cta-inner h2 { font-size: var(--step-3); margin: 16px 0 8px; }
.cta-inner p { margin: 0 0 28px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { padding: clamp(48px, 6vw, 72px) 0 28px; margin-top: 0; background: linear-gradient(180deg, transparent, rgba(139, 92, 246, .04)); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand p { max-width: 30ch; margin: 12px 0 18px; font-size: .94rem; line-height: 1.6; }
.footer-col { display: grid; align-content: start; gap: 10px; }
.footer-col h4 { margin: 4px 0 6px; font: 600 .8rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.footer-col a { color: var(--muted); font-size: .94rem; }
.footer-col a:hover { color: #fff; }
.footer-legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-legal a { color: var(--muted); }

/* ── Legal pages ─────────────────────────────────────────── */
.legal { padding: clamp(40px, 6vw, 72px) 0; max-width: 780px; }
.legal h1 { font-size: var(--step-3); }
.legal p, .legal li { line-height: 1.75; }

/* ── Auth pages ──────────────────────────────────────────── */
.auth { background-image: radial-gradient(800px 500px at 50% 0%, rgba(139, 92, 246, .18), transparent 60%); }
.auth-wrap { padding: clamp(32px, 6vw, 72px) var(--gutter) 48px; }
.auth-card { padding: clamp(24px, 4vw, 36px); }
.auth-form input[type=email], .auth-form input[type=password], .auth-form input[type=text] { min-height: 46px; }

/* ── Specula landing ─────────────────────────────────────── */
.sp-preview { width: min(860px, 100%); margin: clamp(36px, 6vw, 64px) auto 0; padding: 20px; border-radius: 22px; background: rgba(8, 14, 24, .75); border: 1px solid rgba(34, 211, 238, .2); box-shadow: 0 50px 100px -50px rgba(34, 211, 238, .45); display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; text-align: left; position: relative; }
.sp-preview::before { content: 'Example'; position: absolute; top: -11px; left: 22px; padding: 2px 10px; border-radius: 999px; background: #0d1b24; border: 1px solid rgba(34, 211, 238, .3); color: #67e8f9; font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.sp-preview .sp-gauge { margin: 0; width: 96px; height: 96px; }
.sp-preview-info h3 { margin: 0 0 4px; font-size: 1.15rem; }
.sp-preview-info p { margin: 0; color: var(--muted); font-size: .88rem; }
.sp-preview-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sp-chip { padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: rgba(255, 255, 255, .06); color: #cfcde3; }
.sp-chip-bad { background: rgba(244, 63, 94, .14); color: #fda4af; }
.sp-chip-violet { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
.sp-preview .mini-graph { width: 100%; max-width: 260px; justify-self: end; }
.sp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sp-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sp-rules li { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; border-radius: 16px; }
.sp-rules .tick { color: #5eead4; background: rgba(20, 184, 166, .14); width: 22px; height: 22px; padding: 3px; border-radius: 50%; margin-top: 2px; }
.specula .step-n { background: linear-gradient(135deg, #22d3ee, #34d399); }
.specula .steps::before { background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .5), rgba(52, 211, 153, .5), transparent); }
.specula .eyebrow { color: #5eead4; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1080px) {
  .site-nav a { padding: 8px 9px; }
  .header-cta .btn-ghost[href="/dashboard"] { display: none; }
}
@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .mnav { display: block; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-points { justify-content: center; }
  .hero-art { min-height: 320px; max-width: 460px; width: 100%; margin: 8px auto 0; }
  .split, .promo { grid-template-columns: minmax(0, 1fr); }
  .split-copy { text-align: left; }
  .gate-demo-card { transform: none; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .sp-preview { grid-template-columns: auto minmax(0, 1fr); }
  .sp-preview .mini-graph { grid-column: 1 / -1; justify-self: center; }
}
@media (max-width: 760px) {
  .feature-grid, .steps, .sp-cards, .sp-rules { grid-template-columns: minmax(0, 1fr); }
  .steps::before { display: none; }
  .hero-cta { width: 100%; flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .hero-art { min-height: 280px; }
  .float-card { padding: 8px 11px; }
  .float-card small { display: none; }
  .fc-1 { top: 4%; right: 0; }
  .fc-2 { top: auto; bottom: 22%; left: 0; }
  .fc-3 { bottom: 2%; right: 4%; }
  .compare th, .compare td { padding: 12px 12px; font-size: .88rem; }
  .compare td:not(:first-child), .compare th:not(:first-child) { width: 84px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-legal { flex-direction: column; }
  .sp-preview { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .sp-preview-chips { justify-content: center; }
}
@media (max-width: 420px) {
  .feature { padding: 22px 20px; }
  .stats dt { font-size: 1.7rem; }
}
