/* ===========================================================================
   Onysoft design system — brand navy #0F2A47, accent indigo #6366F1 / #4F46E5
   Dark + light themes via [data-theme]. Foundation for all pages.
   =========================================================================== */
:root {
    --navy: #0F2A47;
    --accent: #6366F1;
    --accent-600: #4F46E5;
    --accent-300: #a5b4fc;
    --radius: 14px;
    --radius-sm: 9px;
    --maxw: 1180px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --shadow: 0 10px 30px rgba(15, 42, 71, .12);
    --shadow-lg: 0 24px 60px rgba(15, 42, 71, .22);
    --t: .2s ease;
}

/* Light theme (default) */
:root, [data-theme="light"] {
    --bg: #f6f8fc;
    --bg-2: #eef2f9;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --text: #0f1f33;
    --text-muted: #5b6b80;
    --border: #e2e8f0;
    --header-bg: rgba(255, 255, 255, .82);
    --hero-glow: rgba(99, 102, 241, .18);
}

/* Dark theme */
[data-theme="dark"] {
    --bg: #081325;
    --bg-2: #0b1b2e;
    --surface: #0f2440;
    --surface-2: #13355a;
    --text: #e7eef7;
    --text-muted: #93a7bf;
    --border: #1c3e63;
    --header-bg: rgba(8, 19, 37, .82);
    --hero-glow: rgba(99, 102, 241, .35);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background var(--t), color var(--t);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-muted); }
.eyebrow {
    display: inline-block; font-size: .82rem; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 600; font-size: .95rem; line-height: 1; cursor: pointer;
    padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
    transition: transform var(--t), background var(--t), border-color var(--t), box-shadow var(--t);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .35); }
.btn--primary:hover { background: var(--accent-600); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 8px 14px; font-size: .85rem; }
.btn--lg { padding: 15px 26px; font-size: 1.02rem; }

/* ---- Header ---- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg); backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand__logo { height: 34px; width: auto; }
.main-nav { display: flex; gap: 6px; margin-left: 12px; flex: 1; }
.main-nav__link {
    padding: 8px 12px; border-radius: 8px; color: var(--text-muted); font-weight: 500; font-size: .94rem;
    transition: color var(--t), background var(--t);
}
.main-nav__link:hover { color: var(--text); background: var(--surface-2); }
.main-nav__link.is-active { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-switch__btn { padding: 6px 10px; font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.lang-switch__btn.is-active { background: var(--accent); color: #fff; }
.theme-toggle {
    width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle__icon { display: none; }
[data-theme="light"] .theme-toggle__icon--moon { display: inline; }
[data-theme="dark"]  .theme-toggle__icon--sun  { display: inline; }
.nav-burger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 38px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; cursor: pointer; align-items: center; justify-content: center; }
.nav-burger span { width: 18px; height: 2px; background: var(--text); display: block; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: 86px 0 64px; }
.hero::before {
    content: ""; position: absolute; top: -180px; right: -120px; width: 560px; height: 560px;
    background: radial-gradient(circle, var(--hero-glow), transparent 62%); pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero__title { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; margin: 0 0 18px; letter-spacing: -.02em; }
.hero__desc { font-size: 1.12rem; color: var(--text-muted); max-width: 540px; margin: 0 0 28px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__visual { position: relative; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.orb { position: absolute; width: 320px; height: 320px; border-radius: 50%;
    background: conic-gradient(from 180deg, var(--accent), var(--accent-600), var(--navy), var(--accent));
    filter: blur(36px); opacity: .35; }
.glass-card {
    position: relative; width: 320px; padding: 22px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.glass-card__row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: .85rem; color: var(--text-muted); }
.glass-card__row span { width: 38px; }
.meter { flex: 1; height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-600)); }
.glass-card__tag { font-size: .78rem; color: var(--accent); font-weight: 600; }

/* ---- Features ---- */
.features { padding: 24px 0 80px; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.feature-card__icon {
    width: 46px; height: 46px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-600)); color: #fff; font-size: 1.3rem; margin-bottom: 16px;
}
.feature-card__title { margin: 0 0 8px; font-size: 1.12rem; }
.feature-card__desc { margin: 0; color: var(--text-muted); font-size: .96rem; }

/* ---- Page stub / errors ---- */
.page-stub { padding: 90px 0; }
.page-stub--center { text-align: center; }
.page-stub h1 { font-size: 2rem; margin: 0 0 10px; }
.page-stub .btn { margin-top: 18px; }
.error-code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: 40px; }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 24px 24px; }
.site-footer__logo { height: 30px; margin-bottom: 12px; }
.site-footer__col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 0 0 12px; }
.site-footer__col a { display: block; color: var(--text); padding: 5px 0; font-size: .95rem; }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom { padding: 18px 24px; border-top: 1px solid var(--border); font-size: .88rem; }

/* ---- Header sign-in (hide on small) ---- */
.header-actions__signin { }

/* ---- Hero trust + dashboard preview card ---- */
.hero__trust { margin-top: 18px; font-size: .85rem; }
.dash-card { position: relative; width: 360px; max-width: 100%; padding: 16px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.dash-card__head { display: flex; align-items: center; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.dash-card__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); }
.dash-card__live { margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--accent); }
.dash-card__table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.dash-card__table td { padding: 9px 4px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dash-card__table tr:last-child td { border-bottom: 0; }
.dc-host { font-weight: 600; color: var(--text); }
.dc-meters { display: flex; gap: 5px; justify-content: flex-end; }
.meter--xs { width: 34px; height: 6px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.pill--ok  { background: rgba(34,197,94,.15); color: #22c55e; }
.pill--off { background: var(--surface-2); color: var(--text-muted); }
.pill--warn{ background: rgba(245,158,11,.15); color: #f59e0b; }

/* ---- Section heads ---- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 10px; }

/* ---- Stats strip ---- */
.stats { padding: 8px 0 36px; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { text-align: center; padding: 22px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat__val { font-size: 1.7rem; font-weight: 800; color: var(--accent); font-family: var(--font); }
.stat__label { font-size: .9rem; margin-top: 4px; }

/* ---- Audiences ---- */
.audiences { padding: 56px 0; }
.audiences__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.audience-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-align: center; }
.audience-card__icon { font-size: 2rem; margin-bottom: 12px; }
.audience-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.audience-card p { margin: 0; }

/* ---- How it works ---- */
.howto { padding: 24px 0 64px; }
.howto__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { position: relative; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step-card__num { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-600)); margin-bottom: 14px; }
.step-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.step-card p { margin: 0; }

/* ---- Closing CTA band ---- */
.cta-band { padding: 28px 0 72px; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    background: linear-gradient(120deg, var(--navy), var(--surface)); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 36px 40px; }
.cta-band__title { margin: 0 0 6px; font-size: 1.6rem; color: #fff; }
[data-theme="light"] .cta-band__inner { background: linear-gradient(120deg, #eef0ff, var(--surface)); }
[data-theme="light"] .cta-band__title { color: var(--text); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__visual { order: -1; min-height: 220px; }
    .features__grid { grid-template-columns: repeat(2, 1fr); }
    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .audiences__grid, .howto__grid { grid-template-columns: 1fr; }
    .site-footer__inner { grid-template-columns: 1fr 1fr; }
    .header-actions__signin { display: none; }
    .cta-band__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
    .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
        background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 24px; }
    .main-nav.is-open { display: flex; }
    .nav-burger { display: flex; }
    .features__grid { grid-template-columns: 1fr; }
    .site-footer__inner { grid-template-columns: 1fr; }
}
