/* =========================================================================
   SkillOS — Bright theme (light surfaces, blue typography & accents)
   ========================================================================= */
:root {
    --bg: #f4f7fc;            /* page background, soft blue-tinted */
    --surface: #ffffff;       /* cards, bars */
    --surface-2: #eef3fb;     /* subtle fills */
    --border: #e1e8f3;        /* hairline borders */
    --text: #14233f;          /* primary body text (deep navy) */
    --heading: #173a8a;       /* headings — the blue "font theme" */
    --muted: #5d6b85;         /* secondary text */
    --primary: #2563eb;       /* brand blue */
    --primary-2: #1d4ed8;     /* darker blue — hovers, links */
    --primary-soft: #e7f0ff;  /* light blue tint — pills, badges */
    --accent: #0ea5e9;        /* sky accent */
    --success: #0f9d76;       /* positive */
    --danger: #e1456b;        /* errors */
    --radius: 14px;
    --shadow: 0 1px 2px rgba(20,40,80,.05), 0 6px 20px rgba(20,40,80,.06);
    --shadow-lg: 0 12px 34px rgba(20,40,80,.14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--heading); }

a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar { background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-size: 20px; font-weight: 800; color: var(--heading); letter-spacing: -.2px; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--primary); }
.brand sup { color: var(--muted); font-size: 11px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--primary); text-decoration: none; }
.nav-user { color: var(--heading); font-weight: 700; }

/* Buttons */
.btn { display: inline-block; padding: 10px 18px; border-radius: 10px; font-weight: 700; cursor: pointer;
    border: 1px solid transparent; font-size: 14px; transition: background .15s ease, box-shadow .15s ease, transform .1s ease, color .15s ease; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.28); }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--primary-2); }
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(14,165,233,.28); }
.btn-accent:hover { filter: brightness(.95); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 7px 13px; font-size: 13px; }

/* Hero */
.hero { padding: 84px 0 44px; text-align: center;
    background: radial-gradient(900px 400px at 50% -120px, #dce9ff 0%, rgba(220,233,255,0) 70%); }
.hero h1 { font-size: 46px; line-height: 1.12; margin: 0 0 16px; letter-spacing: -1px; }
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 720px; margin: 0 auto 28px; }
.hero .pill { display: inline-block; background: var(--primary-soft); border: 1px solid #cfe0ff; color: var(--primary-2);
    padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }

/* Cards & grid */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; }
.card .cat { display: inline-block; font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; margin-bottom: 8px; }
.card .meta { color: var(--muted); font-size: 13px; margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }

.section { padding: 40px 0; }
.section h2 { font-size: 30px; margin: 0 0 6px; letter-spacing: -.5px; }
.section .sub { color: var(--muted); margin: 0 0 24px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat .num { font-size: 32px; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.stat .label { color: var(--muted); font-size: 13px; }

/* Forms */
.form { max-width: 480px; margin: 40px auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); }
.form.wide { max-width: 760px; }
.form h1 { margin-top: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; color: var(--heading); }
.field .hint { color: var(--muted); font-size: 12px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%; padding: 11px 13px; background: #fff; border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); font-size: 14px; font-family: inherit; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.prefilled { border-color: var(--accent); background: #f2fbff; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tbody tr:hover { background: var(--surface-2); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin: 20px 0; font-size: 14px; }
.alert-success { background: #e6f7f1; border: 1px solid #b7e6d6; color: #0b7a5d; }
.alert-error { background: #fdebf0; border: 1px solid #f6c3d2; color: #b32651; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-green { background: #e3f6ef; color: var(--success); }
.badge-amber { background: #fff3da; color: #b9770b; }
.badge-grey { background: var(--surface-2); color: var(--muted); }
.badge-red { background: #fdebf0; color: var(--danger); }
.badge-blue { background: var(--primary-soft); color: var(--primary-2); }

/* Output / report rendering */
.report { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.report h1 { font-size: 27px; } .report h2 { font-size: 21px; margin-top: 26px; }
.report h3 { font-size: 17px; } .report ul { padding-left: 20px; }
.report blockquote { border-left: 3px solid var(--primary); margin: 12px 0; padding: 6px 14px; color: var(--muted); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.report code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--primary-2); }
.report hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt { margin-top: 20px; } .mb { margin-bottom: 20px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tag { font-size: 12px; color: var(--muted); }

/* Pricing */
.price { font-size: 36px; font-weight: 800; color: var(--heading); }
.price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg); }
.plan ul { list-style: none; padding: 0; margin: 16px 0; }
.plan li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }

.footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 28px 0; color: var(--muted); background: var(--surface); }
.footer p { margin: 4px 0; }
.footer strong { color: var(--heading); }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; padding: 8px 0 8px 38px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 6px; width: 26px; height: 26px; background: var(--primary); color: #fff; border-radius: 50%; text-align: center; line-height: 26px; font-size: 13px; font-weight: 700; }

/* ---- Loading overlay (skill / workflow runs) ---- */
.loading-overlay { position: fixed; inset: 0; background: rgba(18,38,74,.45); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; transition: opacity .2s ease; }
.loading-overlay.show { opacity: 1; }
.loading-card { text-align: center; padding: 36px 44px; max-width: 430px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 5px solid #e4ecfa;
    border-top-color: var(--primary); margin: 0 auto 20px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 19px; font-weight: 800; margin: 0 0 8px; color: var(--heading); }
.loading-sub { color: var(--muted); margin: 0; font-size: 14px; }
.loading-bar { margin: 20px auto 0; width: 230px; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.loading-bar span { display: block; height: 100%; width: 40%; border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent)); animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.loading-overlay.determinate .loading-bar span { transition: width .4s ease; }
.loading-step { font-size: 13px; margin: 14px 0 0; min-height: 18px; color: var(--muted); }

button[disabled] { opacity: .65; cursor: progress; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Card hover lift ---- */
.card { transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
a.card:hover, .grid a.card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-lg); }

/* ---- Hero rotator ---- */
.rotate-line { font-size: 18px; color: var(--muted); margin-top: 18px; }
.rotator { color: var(--primary); font-weight: 800; display: inline-block; transition: opacity .25s ease, transform .25s ease; }
.rotator.swap { opacity: 0; transform: translateY(-8px); }

/* ---- FAQ accordion ---- */
.faq-item { cursor: pointer; }
.faq-q { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin: 0; color: var(--heading); }
.faq-q::after { content: '+'; color: var(--primary); font-size: 22px; line-height: 1; margin-left: 12px; }
.faq-item.open .faq-q::after { content: '\2212'; }
.faq-a { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .3s ease, opacity .3s ease, margin .3s ease; color: var(--muted); margin: 0; }
.faq-item.open .faq-a { max-height: 240px; opacity: 1; margin-top: 12px; }