:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0b1220;
    --dark-2: #172033;
    --accent: #2563eb;
    --accent-2: #4f46e5;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-lg: 0 24px 70px rgba(15, 23, 42, .13);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-nav {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, var(--dark), #273449);
    color: white; box-shadow: 0 8px 20px rgba(15,23,42,.16);
    font-size: 19px;
}
.brand-copy strong { display: block; font-size: 14px; letter-spacing: .08em; }
.brand-copy small { display: block; color: #94a3b8; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; margin-top: 2px; }
.nav-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-user { color: var(--muted); font-size: 13px; font-weight: 600; padding: 0 8px; }

.btnx {
    min-height: 40px;
    border-radius: 10px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btnx:hover { transform: translateY(-1px); }
.btnx-ghost { color: #475569; background: transparent; }
.btnx-ghost:hover { background: #f1f5f9; color: var(--text); }
.btnx-outline { background: white; border-color: #cbd5e1; color: #334155; }
.btnx-outline:hover { border-color: #94a3b8; background: #f8fafc; }
.btnx-dark { background: var(--dark); color: white; box-shadow: 0 8px 18px rgba(15,23,42,.14); }
.btnx-dark:hover { background: var(--dark-2); }
.btnx-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; box-shadow: 0 10px 22px rgba(37,99,235,.20); }
.btnx-primary:hover { box-shadow: 0 14px 28px rgba(37,99,235,.26); }
.btnx-wide { width: 100%; min-height: 50px; border-radius: 12px; font-size: 15px; }

.site-main { flex: 1; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 56px; }
.site-footer { border-top: 1px solid var(--line); background: white; }
.site-footer-inner {
    width: min(1180px, calc(100% - 32px)); margin: 0 auto;
    min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    color: #64748b; font-size: 12px;
}

/* Home */
.home-wrap { display: grid; gap: 24px; }
.hero-pro {
    position: relative; overflow: hidden;
    min-height: 420px;
    border-radius: 28px;
    padding: clamp(34px, 7vw, 76px);
    background:
        radial-gradient(circle at 82% 18%, rgba(59,130,246,.24), transparent 27%),
        radial-gradient(circle at 72% 78%, rgba(99,102,241,.20), transparent 31%),
        linear-gradient(135deg, #0b1220 0%, #111c31 58%, #16263f 100%);
    color: white;
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center;
}
.hero-pro::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to right, transparent, black 55%, black);
}
.hero-content-pro { position: relative; z-index: 1; max-width: 760px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
    padding: 8px 12px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08);
    color: #dbeafe; font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 999px; background: #34d399; box-shadow: 0 0 0 5px rgba(52,211,153,.12); }
.hero-pro h1 { margin: 0; font-size: clamp(42px, 7vw, 72px); line-height: .98; letter-spacing: -.045em; max-width: 700px; }
.hero-pro p { margin: 22px 0 0; max-width: 720px; color: #cbd5e1; font-size: clamp(16px, 2vw, 19px); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-actions .btnx-outline { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: white; }
.hero-actions .btnx-outline:hover { background: rgba(255,255,255,.14); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card, .stack-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.feature-card { padding: 26px; min-height: 190px; }
.feature-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #eef2ff; font-size: 20px; margin-bottom: 22px; }
.feature-card h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.feature-card p { margin: 10px 0 0; color: var(--muted); line-height: 1.65; font-size: 14px; }
.stack-card { padding: 26px; }
.stack-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.stack-head h2 { margin: 0; font-size: 20px; }
.stack-head p { margin: 0; color: var(--muted); font-size: 13px; }
.tech-list { display: flex; flex-wrap: wrap; gap: 9px; }
.tech-pill { padding: 8px 12px; border-radius: 999px; border: 1px solid #dbe2ea; background: #f8fafc; color: #334155; font-size: 12px; font-weight: 700; }

/* Authentication */
.auth-wrap { width: min(100%, 990px); margin: 8px auto; }
.auth-card {
    overflow: hidden; border-radius: 26px; background: white; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    display: grid; grid-template-columns: .92fr 1.08fr;
}
.auth-aside {
    position: relative; overflow: hidden; padding: 46px 42px; color: white;
    background: radial-gradient(circle at 90% 15%, rgba(56,189,248,.18), transparent 28%), linear-gradient(145deg, #0b1220, #17233b);
    display: flex; flex-direction: column; justify-content: space-between; min-height: 590px;
}
.auth-aside::after { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 999px; background: rgba(79,70,229,.16); left: -110px; bottom: -100px; filter: blur(18px); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-kicker { display: inline-flex; align-items: center; gap: 8px; width: fit-content; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #dbeafe; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.auth-aside h1 { margin: 28px 0 0; font-size: 38px; line-height: 1.08; letter-spacing: -.035em; }
.auth-aside p { margin: 16px 0 0; color: #cbd5e1; line-height: 1.7; font-size: 14px; }
.auth-points { display: grid; gap: 14px; margin-top: 34px; color: #cbd5e1; font-size: 13px; }
.auth-point { display: flex; align-items: center; gap: 12px; }
.auth-check { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.09); color: #86efac; font-weight: 900; flex: 0 0 auto; }
.auth-form-panel { padding: 46px; display: flex; align-items: center; }
.auth-form-inner { width: 100%; max-width: 520px; margin: 0 auto; }
.auth-form-inner h2 { margin: 0; font-size: 31px; letter-spacing: -.035em; }
.auth-form-inner > p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.form-stack { display: grid; gap: 18px; margin-top: 30px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 800; color: #334155; }
.field input {
    width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid #cbd5e1; background: white; color: var(--text); padding: 0 14px;
    outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #a3afbf; }
.field input:focus { border-color: #64748b; box-shadow: 0 0 0 4px rgba(100,116,139,.10); }
.field input.is-error { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248,113,113,.08); }
.field-error { color: var(--danger); font-size: 12px; font-weight: 650; }
.auth-bottom { margin-top: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.auth-bottom a { color: var(--text); font-weight: 800; }
.auth-bottom a:hover { text-decoration: underline; }
.checkbox-row { display: flex; align-items: center; gap: 9px; color: #475569; font-size: 13px; }
.checkbox-row input { width: 16px; height: 16px; }

@media (max-width: 900px) {
    .feature-grid { grid-template-columns: 1fr; }
    .auth-card { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-form-panel { padding: 36px 28px; }
}

@media (max-width: 680px) {
    .site-nav { width: min(100% - 22px, 1180px); min-height: 64px; }
    .brand-copy small, .nav-user, .nav-products { display: none; }
    .nav-actions { gap: 3px; }
    .btnx { padding: 0 11px; }
    .site-main { width: min(100% - 22px, 1180px); padding: 24px 0 38px; }
    .hero-pro { min-height: 390px; padding: 34px 24px; border-radius: 22px; }
    .hero-pro h1 { font-size: 42px; }
    .feature-card, .stack-card { padding: 22px; }
    .stack-head { align-items: flex-start; flex-direction: column; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .auth-form-panel { padding: 30px 20px; }
    .auth-form-inner h2 { font-size: 27px; }
    .site-footer-inner { width: min(100% - 22px, 1180px); flex-direction: column; justify-content: center; text-align: center; padding: 16px 0; }
}
