/* =============================================================================
   SDcloud — Clean White Design System
   Light, professional, pastel accents. 4 themes.
   ============================================================================= */

/* System fonts — zero network requests, instant render.
   Inter-like stack: system UI fonts that look nearly identical to Inter
   on every platform. Government workers on Windows 11 get Segoe UI. */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Theme tokens ── */
:root {
    --bg: #ffffff;
    --bg-alt: #f7f8fa;
    --bg-code: #f0f2f5;
    --text: #111318;
    --text-body: #1a1d24;
    --text-muted: #3d4250;
    --brand: #14508a;
    --brand-lt: #1a6bb5;
    --accent: #0e7490;
    --accent-lt: #0891b2;
    --accent-bg: #e0f7fa;
    --border: #c8cdd5;
    --border-lt: #e4e8ee;
    --green: #047857;
    --green-bg: #ecfdf5;
    --amber: #b45309;
    --amber-bg: #fffbeb;
    --red: #b91c1c;
    --red-bg: #fef2f2;
    --shadow-sm: 0 1px 3px rgb(0 0 0 / .08);
    --shadow: 0 4px 12px rgb(0 0 0 / .1);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / .15);
    --radius: 8px;
    --radius-lg: 16px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    --font-size: 17px;
    --max-w: 1200px;
    --nav-h: 64px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-code: #1e293b;
    --text: #f1f5f9;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --brand: #60a5fa;
    --brand-lt: #93c5fd;
    --accent: #22d3ee;
    --accent-lt: #67e8f9;
    --accent-bg: #083344;
    --border: #334155;
    --border-lt: #1e293b;
    --green-bg: #064e3b;
    --amber-bg: #451a03;
    --red-bg: #450a0a;
    --shadow-sm: 0 1px 3px rgb(0 0 0 / .3);
    --shadow: 0 4px 12px rgb(0 0 0 / .4);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / .5);
}

[data-theme="hc-light"] {
    --bg: #fff; --bg-alt: #fff; --bg-code: #f5f5f5;
    --text: #000; --text-body: #000; --text-muted: #000;
    --brand: #000; --brand-lt: #000; --accent: #000; --accent-lt: #000;
    --accent-bg: #fff; --border: #000; --border-lt: #000;
    --shadow-sm: none; --shadow: none; --shadow-lg: none;
}

[data-theme="hc-dark"] {
    --bg: #000; --bg-alt: #000; --bg-code: #111;
    --text: #fff; --text-body: #fff; --text-muted: #fff;
    --brand: #fff; --brand-lt: #fff; --accent: #fff; --accent-lt: #fff;
    --accent-bg: #000; --border: #fff; --border-lt: #fff;
    --shadow-sm: none; --shadow: none; --shadow-lg: none;
}

/* ── Base ── */
html { font-size: var(--font-size); scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text-body);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
    font-weight: 400;
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-lt); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

.eyebrow {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .6rem;
}
.lead { font-size: 1.2rem; color: var(--text-muted); line-height: 1.75; }
.mono { font-family: var(--font-mono); }

/* ���─ Layout ── */
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: 1.5rem; }
.container-sm { max-width: 800px; margin-inline: auto; padding-inline: 1.5rem; }
.section { padding-block: 80px; }
.section-sm { padding-block: 48px; }
.section-alt { background: var(--bg-alt); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.text-center { text-align: center; }

/* ── Navigation ── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border-lt);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    transition: background var(--transition);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo {
    display: flex; align-items: center; gap: .5rem;
    font-size: 1.15rem; font-weight: 800; color: var(--text); letter-spacing: -.03em;
}
.nav-logo .accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
    color: var(--text-muted); font-size: .9rem; font-weight: 500;
    padding: .4rem .75rem; border-radius: var(--radius); transition: all .15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-cta {
    background: var(--accent) !important; color: var(--bg) !important;
    font-weight: 600 !important; padding: .45rem 1rem !important;
    border-radius: var(--radius) !important;
}
.nav-cta:hover { background: var(--accent-lt) !important; }
.nav-right { display: flex; align-items: center; gap: .5rem; }

/* A11y toolbar */
.a11y { display: flex; gap: 3px; margin-left: .75rem; padding-left: .75rem; border-left: 1px solid var(--border-lt); }
.a11y button {
    background: var(--bg-alt); border: 1px solid var(--border);
    color: var(--text-muted); width: 28px; height: 28px;
    border-radius: 4px; cursor: pointer; font-size: .65rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.a11y button:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }

/* Mobile menu */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; transition: all .2s; }

/* ── Hero ── */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
    min-height: 500px; /* prevent CLS during load */
}
.hero h1 { margin-bottom: 1rem; }
.hero .lead { max-width: 640px; margin: 0 auto 2rem; }
.hero-tag {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .8rem; font-weight: 500; color: var(--accent);
    background: var(--accent-bg); padding: .4rem 1rem;
    border-radius: 99px; margin-bottom: 1.5rem;
}
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .65rem 1.5rem; border-radius: var(--radius);
    font-size: .9rem; font-weight: 600; font-family: var(--font);
    border: none; cursor: pointer; transition: all .15s;
    text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-lt); color: var(--bg); }
.btn-outline { background: none; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: .4rem 1rem; font-size: .8rem; }

/* ── Cards ── */
.card {
    background: var(--bg);
    border: 1px solid var(--border-lt);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow); border-color: var(--border); }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1rem;
}
.card-icon-blue { background: #dbeafe; color: #2563eb; }
.card-icon-cyan { background: #cffafe; color: #0891b2; }
.card-icon-green { background: #d1fae5; color: #059669; }
.card-icon-amber { background: #fef3c7; color: #d97706; }
.card-icon-purple { background: #ede9fe; color: #7c3aed; }
.card-icon-red { background: #fce7f3; color: #db2777; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .95rem; line-height: 1.65; }

/* ── Score widget ── */
.score-widget {
    display: flex; gap: 1.5rem; justify-content: center;
    margin-top: 2.5rem; flex-wrap: wrap;
}
.score-col {
    background: var(--bg); border: 1px solid var(--border-lt);
    border-radius: var(--radius-lg); padding: 1.25rem 2rem;
    text-align: center; min-width: 180px;
}
.score-col .label { font-size: .75rem; color: var(--text-muted); display: block; margin-bottom: .25rem; }
.score-num { font-size: 2.5rem; font-weight: 800; line-height: 1; margin: .25rem 0; }
.score-col .rating { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.score-green .score-num { color: var(--green); }
.score-green .rating { color: var(--green); }
.score-amber .score-num { color: var(--amber); }
.score-amber .rating { color: var(--amber); }
.score-red .score-num { color: var(--red); }
.score-red .rating { color: var(--red); }

/* ── Stats bar ── */
.stats-bar {
    display: flex; justify-content: center; gap: 3rem;
    padding: 2rem 0; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }

/* ── Comparison tables ── */
table {
    width: 100%; border-collapse: collapse;
    font-size: .9rem; margin: 1.5rem 0;
}
thead { background: var(--bg-alt); }
th {
    padding: .6rem 1rem; font-weight: 600; text-align: left;
    border-bottom: 2px solid var(--border); font-size: .8rem;
    text-transform: uppercase; letter-spacing: .03em; color: var(--text);
}
td { padding: .6rem 1rem; border-bottom: 1px solid var(--border-lt); }
tbody tr:hover { background: var(--bg-alt); }

/* ── Feature sections ── */
.feature-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4rem; align-items: center; padding: 4rem 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--border-lt); }
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-text h2 { margin-bottom: .75rem; }
.feature-text p { color: var(--text-muted); margin-bottom: 1rem; }
.feature-list { list-style: none; }
.feature-list li {
    padding: .4rem 0; padding-left: 1.5rem; position: relative;
    color: var(--text-body); font-size: .95rem; line-height: 1.6;
}
.feature-list li::before {
    content: '✓'; position: absolute; left: 0;
    color: var(--green); font-weight: 700;
}

/* ── Locations ── */
.location-card {
    background: var(--bg); border: 1px solid var(--border-lt);
    border-radius: var(--radius-lg); padding: 2rem;
}
.location-flag { font-size: 2rem; margin-bottom: .75rem; }
.location-card h3 { margin-bottom: .5rem; }
.location-card p { color: var(--text-muted); font-size: .9rem; }

/* ── FAQ Accordion ── */
.faq-item {
    border: 1px solid var(--border-lt);
    border-radius: var(--radius);
    margin-bottom: .5rem;
    overflow: hidden;
}
.faq-q {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; cursor: pointer; font-weight: 600;
    font-size: .95rem; color: var(--text); background: var(--bg);
    transition: background .15s;
}
.faq-q:hover { background: var(--bg-alt); }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--text-muted); transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { padding: 0 1.25rem 1rem; color: var(--text-body); font-size: .9rem; line-height: 1.7; display: none; }
.faq-item.open .faq-a { display: block; }

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border-lt);
    padding: 3rem 0 2rem;
    background: var(--bg-alt);
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem; margin-bottom: 2rem;
}
.footer-brand { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: .5rem; }
.footer-brand .accent { color: var(--accent); }
.footer-desc { color: var(--text-muted); font-size: .85rem; line-height: 1.6; }
.footer-col h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: .75rem; }
.footer-col a { display: block; color: var(--text-muted); font-size: .85rem; padding: .2rem 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border-lt);
    padding-top: 1.5rem; display: flex;
    justify-content: space-between; align-items: center;
    font-size: .8rem; color: var(--text-muted);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ── Network footer (FAQ sites + sdcloud) ── */
.network-bar {
    text-align: center; padding: 1rem 0; margin-top: 1rem;
    font-size: .8rem; color: var(--text-muted);
}
.network-bar a { color: var(--text-muted); margin: 0 .4rem; }
.network-bar a:hover { color: var(--accent); }

/* ── Contact form ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: .6rem .85rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: .9rem; font-family: var(--font);
    background: var(--bg); color: var(--text);
    transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

/* ── Badges ── */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .65rem; border-radius: 99px;
    font-size: .7rem; font-weight: 600;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: #dbeafe; color: #2563eb; }

/* ── Code blocks ── */
code {
    font-family: var(--font-mono); font-size: .85em;
    background: var(--bg-code); padding: 2px 6px;
    border-radius: 4px; border: 1px solid var(--border-lt);
}
pre {
    background: var(--bg-code); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.25rem;
    overflow-x: auto; margin: 1rem 0; line-height: 1.5;
}
pre code { background: none; border: none; padding: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .feature-row { grid-template-columns: 1fr; gap: 2rem; }
    .feature-row.reverse { direction: ltr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 60px 0 40px; }
    .stats-bar { gap: 1.5rem; }
    .score-widget { flex-direction: column; align-items: center; }
}
