/* Titanium design tokens: preto e cinza (somente escuro) */
:root {
  --bg: #08090a; --surface: #101213; --surface-2: #151819; --line: #23272b; --line-2: #2f353a;
  --text: #f2f4f5; --text-2: #a4abb1; --text-3: #6b737a;
  --accent: #34e39a; --accent-ink: #04140d; --accent-soft: rgba(52, 227, 154, 0.1);
  --ok: #34e39a; --ok-soft: rgba(52, 227, 154, 0.12);
  --danger: #ff6b6b; --danger-soft: rgba(255, 107, 107, 0.1);
  --warn: #f5c451; --warn-soft: rgba(245, 196, 81, 0.1);
  --code-bg: #0a0b0c; --code-text: #cfd6db;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --radius: 14px; --radius-sm: 10px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition: none !important; } }
.wrap { width: min(100% - 40px, 1120px); margin: 0 auto; }

/* ── Marca e botões ───────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); box-shadow: 0 6px 16px -8px var(--accent); }
.brand-mark svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s, filter .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 10px 22px -12px var(--accent); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn.sm { min-height: 38px; padding: 0 15px; font-size: 14px; }
.btn.lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn:disabled { opacity: .7; cursor: wait; }

/* ── Cabeçalho ────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid transparent; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(160%) blur(14px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.home-nav { display: flex; align-items: center; gap: 6px; }
.home-nav a:not(.btn) { padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.home-nav a:not(.btn):hover { background: var(--surface-2); color: var(--text); }
.home-nav .btn { margin-left: 6px; }

/* ── Hero ─────────────────────────────────────────────────── */
.home-hero { position: relative; padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.home-hero::before { content: ""; position: absolute; inset: -68px 0 auto; height: 620px; z-index: -1; background: radial-gradient(60% 70% at 78% 18%, var(--accent-soft), transparent 70%), radial-gradient(50% 60% at 8% 0%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy h1 { margin: 0; font-size: clamp(40px, 6.2vw, 68px); font-weight: 700; line-height: 1.02; letter-spacing: -0.05em; text-wrap: balance; }
.hero-copy > p { max-width: 52ch; margin: 22px 0 0; color: var(--text-2); font-size: clamp(16px, 1.6vw, 18.5px); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Demonstração do portão (momento principal da página) */
.gate { position: relative; }
.gate-card { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow), 0 40px 80px -40px color-mix(in srgb, var(--accent) 45%, transparent); }
.gate-bar { display: flex; align-items: center; gap: 7px; margin: -4px 0 18px; }
.gate-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.gate-bar span { margin-left: 8px; padding: 3px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); font: 12px var(--mono); }
.gate-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.gate-sub { margin: 0 0 18px; color: var(--text-3); font-size: 14px; }
.gate-field { height: 42px; margin-bottom: 10px; padding: 0 14px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text-3); font-size: 14px; }
.gate-check { position: relative; display: flex; align-items: center; gap: 14px; height: 64px; margin: 16px 0; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); overflow: hidden; }
.gate-check .state { position: absolute; inset: 0; display: flex; align-items: center; gap: 14px; padding: 0 16px; }
.gate-check .state strong { display: block; font-size: 15px; line-height: 1.2; }
.gate-check .state small { color: var(--text-3); font-size: 12.5px; }
.gate-check .spinner { width: 24px; height: 24px; border: 3px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.gate-check .tick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); }
.gate-check .tick svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.gate-check .state.verified { opacity: 0; background: var(--ok-soft); }
.gate-go { width: 100%; opacity: .45; pointer-events: none; }
.gate-response { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--code-bg); color: var(--code-text); font: 12.5px/1.6 var(--mono); opacity: 0; transform: translateY(6px); }
.gate-response b { color: var(--accent); font-weight: 600; }
.gate-replay { display: block; margin: 14px auto 0; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--text-3); font-size: 13px; cursor: pointer; }
.gate-replay:hover { color: var(--text); background: var(--surface-2); }
.gate.run .state.verifying { animation: fade-out .3s 1.9s forwards; }
.gate.run .state.verified { animation: fade-in .35s 2s forwards; }
.gate.run .tick svg { animation: draw .45s 2.25s ease forwards; }
.gate.run .gate-go { animation: enable .4s 2.5s forwards; }
.gate.run .gate-response { animation: rise .45s 2.7s ease forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-out { to { opacity: 0; visibility: hidden; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes enable { to { opacity: 1; pointer-events: auto; } }
@keyframes rise { to { opacity: 1; transform: none; } }
.gate:not(.run) .state.verifying { opacity: 0; }
.gate:not(.run) .state.verified { opacity: 1; }
.gate:not(.run) .tick svg { stroke-dashoffset: 0; }
.gate:not(.run) .gate-go { opacity: 1; pointer-events: auto; }
.gate:not(.run) .gate-response { opacity: 1; transform: none; }
.gate.run .gate-response, .gate.run .gate-go, .gate.run .state.verified { }

/* ── Status resumido ──────────────────────────────────────── */
.status-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; }
.status-heading { display: flex; align-items: center; gap: 10px; }
.status-heading strong { font-weight: 600; }
.status-heading #health-label { color: var(--text-3); }
.status-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.status-items { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--text-2); }
.status-items span { display: inline-flex; align-items: center; gap: 8px; }
.status-indicator, .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.status-indicator.is-ok, .dot.good { background: var(--ok); }

/* ── Seções ───────────────────────────────────────────────── */
.section { padding: clamp(56px, 9vw, 104px) 0 0; }
.section-heading { max-width: 640px; margin-bottom: 36px; }
.section-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); font-weight: 700; line-height: 1.08; letter-spacing: -0.04em; text-wrap: balance; }
.section-heading p { margin: 14px 0 0; color: var(--text-2); font-size: 17px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.steps li { position: relative; padding: 28px; }
.steps li + li { border-left: 1px solid var(--line); }
.step-n { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700; }
.steps h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.02em; }
.steps p { margin: 0; color: var(--text-2); font-size: 15px; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; margin: 0; }
.features div { padding: 22px 0; border-top: 1px solid var(--line); }
.features dt { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.features dd { margin: 0; color: var(--text-2); font-size: 15px; max-width: 48ch; }
.features code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font: 13px var(--mono); }

.cta-band { border: 1px solid var(--line-2); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(56px, 9vw, 104px); padding: clamp(28px, 5vw, 48px); border-radius: 22px; background: #0c0e0f; color: #f2f4f5; background-image: radial-gradient(60% 120% at 100% 0%, rgba(52,227,154,.14), transparent 70%); }
.cta-band h2 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.04em; line-height: 1.1; }
.cta-band p { margin: 0; color: #a4abb1; max-width: 52ch; }
.cta-band code { padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.1); color: #d5dadd; font: 13px var(--mono); }


.site-footer { margin-top: auto; padding: 56px 0 32px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ── Login e cadastro ─────────────────────────────────────── */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.auth-side { border-right: 1px solid var(--line); position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: clamp(28px, 4vw, 48px); background: #0b0d0e; background-image: radial-gradient(90% 60% at 0% 0%, rgba(52,227,154,.16), transparent 70%), radial-gradient(70% 50% at 100% 100%, rgba(52,227,154,.07), transparent 70%); color: #f2f4f5; }
.auth-side .brand-name { color: #fff; }
.auth-side h2 { max-width: 14ch; margin: 0 0 16px; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -0.045em; text-wrap: balance; }
.auth-side p { max-width: 38ch; margin: 0; color: #a4abb1; }
.auth-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; color: #c4cacf; font-size: 14.5px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; }
.auth-points svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: min(100%, 400px); }
.login-card h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.1; letter-spacing: -0.045em; }
.login-lead { margin: 0 0 28px; color: var(--text-2); font-size: 15.5px; }
.login-card label { display: block; margin: 0 0 7px; font-size: 14px; font-weight: 600; }
.login-card input { width: 100%; min-height: 48px; margin-bottom: 18px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); color: var(--text); font: inherit; font-size: 15.5px; outline: none; transition: border-color .15s, box-shadow .15s; }
.login-card input::placeholder { color: var(--text-3); }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.login-card .btn { width: 100%; min-height: 50px; margin-top: 4px; }
.login-error { margin: 0 0 20px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: 11px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }
.login-switch { display: block; margin-top: 22px; color: var(--text-2); font-size: 14.5px; text-align: center; text-decoration: none; }
.login-switch b { color: var(--accent); font-weight: 600; }
.login-switch:hover b { text-decoration: underline; }
.login-back { display: block; margin-top: 12px; color: var(--text-3); font-size: 13.5px; text-align: center; text-decoration: none; }
.login-back:hover { color: var(--text); }
.field-hint { display: block; margin: -10px 0 18px; color: var(--text-3); font-size: 13px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 88px; }
.pw-toggle { position: absolute; top: 8px; right: 8px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); font-size: 13px; font-weight: 600; cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.notfound { display: grid; place-items: center; flex: 1; padding: 40px 20px; text-align: center; }
.notfound .code { font-size: clamp(72px, 16vw, 140px); font-weight: 700; line-height: 1; letter-spacing: -0.06em; color: var(--accent); }
.notfound h1 { margin: 8px 0 8px; font-size: 28px; letter-spacing: -0.04em; }
.notfound p { margin: 0 0 24px; color: var(--text-2); }

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li + li { border-left: 0; border-top: 1px solid var(--line); }
  .features { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-side { gap: 24px; padding: 24px 20px; }
  .auth-side h2 { font-size: 28px; max-width: none; }
  .auth-side .auth-points { display: none; }
  .home-nav a:not(.btn):not(.keep) { display: none; }
}

.status-h1 { margin: 0; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.08; letter-spacing: -0.045em; }
.status-page { flex: 0 1 auto; max-width: 760px; }
.status-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.status-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.status-card-head strong { display: block; font-size: 18px; letter-spacing: -0.02em; }
.status-card-head small { color: var(--text-3); font-size: 13.5px; }
.status-pill { padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600; }
.status-pill.good { background: var(--ok-soft); color: var(--ok); }
.component-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; }
.component-list > div + div { border-top: 1px solid var(--line); }
.component-list span { display: inline-flex; align-items: center; gap: 12px; }
.component-list strong { color: var(--text-3); font-size: 14px; font-weight: 600; }
.component-list strong.good { color: var(--ok); }
.status-section { padding-top: clamp(32px, 6vw, 64px); }

/* ── Acabamento moderno ───────────────────────────────────── */
.home-hero::before { background: radial-gradient(55% 60% at 80% 12%, rgba(52,227,154,.13), transparent 70%); }
.home-hero::after { content: ""; position: absolute; inset: -68px 0 auto; height: 640px; z-index: -1; pointer-events: none; background: radial-gradient(circle, rgba(255,255,255,.075) 1px, transparent 1.2px) 0 0/24px 24px; -webkit-mask-image: radial-gradient(70% 80% at 50% 0%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 80% at 50% 0%, #000 20%, transparent 75%); }
.gate-card { background: linear-gradient(180deg, #131617, #0e1011); border-color: var(--line-2); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 40px 90px -40px rgba(52,227,154,.35), 0 20px 50px -30px #000; }
.gate-field { background: #0b0d0e; border-color: var(--line); }
.gate-check { background: #0b0d0e; }
.btn.primary { background: linear-gradient(180deg, #4df0ad, #2fd68f); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 12px 28px -12px rgba(52,227,154,.6); }
.btn.primary:hover { background: linear-gradient(180deg, #4df0ad, #2fd68f); filter: brightness(1.06); }
.btn { background: var(--surface); }
.btn:hover { background: var(--surface-2); border-color: #3a4147; }
.brand-mark { background: linear-gradient(150deg, #5cf0b0, #1fbf7f); box-shadow: 0 6px 18px -8px rgba(52,227,154,.7); }
.site-header { border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); }
.steps, .status-strip, .status-card { background: linear-gradient(180deg, #111415, #0e1011); }
.step-n { background: var(--accent-soft); color: var(--accent); }
.cta-band { background-color: #0c0e0f; background-image: radial-gradient(60% 140% at 100% 0%, rgba(52,227,154,.16), transparent 70%); }
.login-card input { background: #0b0d0e; }
.status-heading #health-label { color: var(--text-2); }
.features div { border-top-color: var(--line-2); }
