/* Sechosti public site — design system.
   Light and dark themes via [data-theme]; 'auto' follows the OS via prefers-color-scheme. */

:root {
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --maxw: 1140px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
    --space: 1rem;

    /* Brand */
    --brand: #2563eb;
    --brand-strong: #1d4ed8;
    --brand-contrast: #ffffff;
}

/* ---- Light theme (default + auto in light OS) ---- */
:root,
[data-theme="light"] {
    --bg: #ffffff;
    --bg-alt: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #475569;
    --header-bg: rgba(255, 255, 255, .9);
    --hero-grad-1: #eff6ff;
    --hero-grad-2: #ffffff;
    --code-bg: #f1f5f9;
}

/* ---- Dark theme (explicit) ---- */
[data-theme="dark"] {
    --bg: #0b1120;
    --bg-alt: #0f1a2e;
    --surface: #111c33;
    --surface-2: #0f1a2e;
    --border: #1e2b47;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --header-bg: rgba(11, 17, 32, .85);
    --hero-grad-1: #0f1e3a;
    --hero-grad-2: #0b1120;
    --code-bg: #0f1a2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .5);
}

/* ---- Auto follows the OS when no explicit theme is set ---- */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bg: #0b1120;
        --bg-alt: #0f1a2e;
        --surface: #111c33;
        --surface-2: #0f1a2e;
        --border: #1e2b47;
        --text: #e2e8f0;
        --text-muted: #94a3b8;
        --header-bg: rgba(11, 17, 32, .85);
        --hero-grad-1: #0f1e3a;
        --hero-grad-2: #0b1120;
        --code-bg: #0f1a2e;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .5);
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

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

h1, h2, h3 { line-height: 1.2; color: var(--text); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--brand); color: var(--brand-contrast);
    padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .7rem 1.25rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: .98rem; border: 1px solid transparent;
    cursor: pointer; transition: background-color .15s, border-color .15s, transform .05s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-contrast); }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---- Header / nav ---- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); display: inline-flex; }
.brand-name { font-size: 1.15rem; letter-spacing: -.01em; }

.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.primary-nav ul { list-style: none; display: flex; gap: clamp(.65rem, 1.1vw, 1.1rem); margin: 0; padding: 0; }
.primary-nav li a { white-space: nowrap; color: var(--text-muted); font-weight: 500; font-size: .93rem; }
.primary-nav li a:hover { color: var(--text); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; white-space: nowrap; }

.theme-toggle {
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .5rem .7rem; font: inherit; font-size: .85rem;
    cursor: pointer; min-width: 70px;
}
.theme-toggle:hover { border-color: var(--brand); }

.nav-toggle {
    display: none; margin-left: auto; background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .55rem; cursor: pointer; flex-direction: column; gap: 4px;
}
.nav-toggle-bar { width: 22px; height: 2px; background: var(--text); display: block; }

/* ---- Main ---- */
.site-main { flex: 1 0 auto; }
.section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 2.25rem; }
.section-head p, .lede { color: var(--text-muted); font-size: 1.1rem; }

.eyebrow {
    text-transform: uppercase; letter-spacing: .08em; font-size: .78rem;
    font-weight: 700; color: var(--brand); margin: 0 0 .6rem;
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(160deg, var(--hero-grad-1), var(--hero-grad-2));
    border-bottom: 1px solid var(--border);
    padding: clamp(3rem, 6vw, 5.5rem) 0;
}
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; }
.hero-copy h1 { max-width: 19ch; text-wrap: balance; }
.hero-copy .lede { max-width: 51ch; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.hero-note { color: var(--text-muted); font-size: .95rem; }

.hero-visual {
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    color: #eef5ff;
    background: radial-gradient(ellipse at top right, #233e68, #102037 65%);
    border: 1px solid #2b4464;
    border-radius: 1.5rem;
    box-shadow: 0 24px 50px -22px #071a3e80;
}
.hero-visual figcaption {
    display: flex; justify-content: space-between; align-items: baseline;
    flex-wrap: wrap; gap: .3rem 1rem; font-weight: 700;
}
.hero-visual figcaption span, .activity-list li span {
    color: #b9cbe3; font-size: .85rem; font-weight: 500;
}
.activity-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.activity-list li { padding: .75rem 0 .75rem 1.2rem; border-top: 1px solid #ffffff29; position: relative; }
.activity-list li:last-child { padding-bottom: 0; }
.activity-list li::before {
    content: ""; position: absolute; left: 0; top: 1.2rem;
    width: .55rem; height: .55rem; border-radius: 50%; background: #94bbff;
}
.activity-list li:nth-child(2)::before { background: #76e2bc; }
.activity-list li:nth-child(3)::before { background: #ffd98a; }
.activity-list strong, .activity-list li span { display: block; }

/* ---- Page hero (interior) ---- */
.page-hero {
    background: linear-gradient(160deg, var(--hero-grad-1), var(--hero-grad-2));
    border-bottom: 1px solid var(--border);
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}
.page-hero h1 { margin-bottom: .4rem; }
.page-hero .lede { max-width: 60ch; }

/* ---- Feature grid / cards ---- */
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem;
}
.feature-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow); transition: transform .12s, border-color .12s;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p { color: var(--text-muted); margin-bottom: .75rem; }
.feature-card a { font-weight: 600; font-size: .92rem; }

/* ---- Two column ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }

/* ---- Lists ---- */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.check-list li { padding-left: 1.75rem; position: relative; color: var(--text-muted); }
.check-list li::before {
    content: ""; position: absolute; left: 0; top: .45em; width: .7rem; height: .7rem;
    border-radius: 50%; background: var(--brand);
}
.step-list { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1.5rem; }
.step-list li { position: relative; padding-left: 3rem; }
.step-list li::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.step-list p { color: var(--text-muted); margin: 0; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
.feature-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.feature-table th, .feature-table td {
    text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top;
}
.feature-table thead th { background: var(--surface-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.feature-table tbody th { font-weight: 600; width: 35%; }
.feature-table td { color: var(--text-muted); }

/* ---- CTA band ---- */
.cta-band {
    display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow);
}
.cta-band h2 { margin-bottom: .4rem; }
.cta-band p { color: var(--text-muted); margin: 0; }
.cta-band-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---- Forms ---- */
.form { display: grid; gap: 1.1rem; max-width: 520px; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea {
    font: inherit; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.field-error { color: #dc2626; font-size: .85rem; }
.validation-summary { color: #dc2626; }
.validation-summary ul { margin: 0; padding-left: 1.2rem; }
.contact-aside { color: var(--text-muted); }
.contact-aside h2 { color: var(--text); }

.alert { border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); background: var(--surface); }
.alert-success { border-color: #16a34a; }
.alert-success h2 { color: #15803d; }

.note { color: var(--text-muted); font-size: .92rem; }
code { background: var(--code-bg); padding: .15em .4em; border-radius: 4px; font-size: .9em; }

/* ---- Error page ---- */
.error-page { text-align: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.error-page .hero-cta { justify-content: center; }

/* ---- Footer ---- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: auto; }
.footer-grid {
    display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem;
    padding: 3rem 1.25rem 2rem;
}
.footer-brand .brand-name { font-size: 1.2rem; font-weight: 700; }
.footer-tagline { color: var(--text-muted); font-size: .92rem; max-width: 24ch; }
.footer-col h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: .75rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-col a { color: var(--text); font-size: .92rem; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.25rem; }
.footer-bottom p { color: var(--text-muted); font-size: .88rem; margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { max-width: 540px; }
    .two-col { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }

}

@media (max-width: 1100px) {
    .nav-toggle { display: inline-flex; }
    .primary-nav {
        position: fixed; inset: 64px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--border);
        flex-direction: column; align-items: stretch; gap: 0; padding: 1rem 1.25rem;
        margin-left: 0; display: none; box-shadow: var(--shadow);
    }
    .primary-nav.is-open { display: flex; }
    .primary-nav ul { flex-direction: column; gap: .25rem; }
    .primary-nav li a { display: block; padding: .6rem 0; }
    .nav-actions { padding-top: .75rem; border-top: 1px solid var(--border); }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .cta-band { flex-direction: column; align-items: flex-start; }
}

/* Homepage layout from the product design export. */
.pdf-home-hero { background:var(--bg); }
.pdf-home-hero .hero-inner { grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; }
.pdf-home-hero .hero-copy h1 { max-width:unset; text-wrap:unset; line-height:1.05; }
.pdf-home-hero .hero-visual { align-self:center; background:var(--surface); color:var(--text); border-color:var(--border); box-shadow:none; border-radius:.8rem; }
.pdf-home-hero .hero-visual figcaption span, .pdf-home-hero .activity-list li div span { color:var(--text-muted); }
.pdf-home-hero .activity-list { display:grid; gap:.5rem; }
.pdf-home-hero .activity-list li { display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin:0; padding:.7rem .7rem .7rem 1.65rem; border:1px solid var(--border); border-radius:.45rem; background:var(--bg); }
.pdf-home-hero .activity-list li::before { left:.65rem; top:1rem; }
.pdf-home-hero .activity-list .activity-tag { background:#173a36; color:#9ef0c7; padding:.15rem .45rem; border-radius:.22rem; font-size:.75rem; }
.pdf-home-hero .activity-list li:last-child .activity-tag { background:#422733; color:#ffb5bc; }
.home-feature-grid { gap:1px; border:1px solid var(--border); background:var(--border); border-radius:.8rem; overflow:hidden; }
.home-feature-grid .feature-card { border:0; border-radius:0; box-shadow:none; background:var(--surface); }
.home-feature-grid .feature-card:hover { transform:none; background:var(--surface-2); }
.home-steps .feature-card { border:0; border-top:2px solid var(--border); background:transparent; border-radius:0; box-shadow:none; padding:1.15rem 0; }
.home-steps .feature-card:first-child { border-top-color:var(--brand); }
.home-steps .feature-card:hover { transform:none; }
.home-cta-band { border:1px solid var(--border); border-radius:.65rem; padding:1.8rem; }
html[data-theme="dark"] { --brand:#38bdf8; --brand-strong:#7dd3fc; --brand-contrast:#061525; }
html[data-theme="dark"] .btn-primary:hover { color:#061525; }
@media (prefers-color-scheme:dark) {
    html[data-theme="auto"] { --brand:#38bdf8; --brand-strong:#7dd3fc; --brand-contrast:#061525; }
    html[data-theme="auto"] .btn-primary:hover { color:#061525; }
}
@media (max-width:900px) { .pdf-home-hero .hero-inner { grid-template-columns:1fr; } }
/* Homepage dimensions and card treatment from the supplied HTML reference. */
body:has(.pdf-home-hero) {
  --bg:#0b1020;
  --bg-alt:#0b1020;
  --surface:#141b2e;
  --border:#243049;
  --text:#e6ebf5;
  --text-muted:#8a95ad;
  --brand:#38bdf8;
  font-size:14px;
}
body:has(.pdf-home-hero) .container { max-width:none; padding-inline:24px; }
body:has(.pdf-home-hero) .site-header { position:static; background:var(--bg); }
body:has(.pdf-home-hero) .header-inner { min-height:0; padding-block:14px; }
body:has(.pdf-home-hero) .brand-mark,
body:has(.pdf-home-hero) .theme-toggle,
body:has(.pdf-home-hero) .hero-visual { display:none; }
body:has(.pdf-home-hero) .primary-nav li a { font-size:12px; }
body:has(.pdf-home-hero) .btn { padding:8px 14px; border-radius:6px; font-size:13px; }
body:has(.pdf-home-hero) .btn-primary { background:#38bdf8; color:#04121c; }
body:has(.pdf-home-hero) .pdf-home-hero { padding:48px 0; border:0; }
body:has(.pdf-home-hero) .hero-inner { display:block; }
body:has(.pdf-home-hero) .hero-copy h1 { font-size:34px; line-height:1.15; margin:10px 0; max-width:640px; }
body:has(.pdf-home-hero) .lede { max-width:560px; font-size:14px; }
body:has(.pdf-home-hero) .hero-cta { gap:6px; margin:12px 0; }
body:has(.pdf-home-hero) .hero-note,
body:has(.pdf-home-hero) .feature-card p { font-size:12px; }
body:has(.pdf-home-hero) .section { padding:32px 0; border-top:1px solid var(--border); }
body:has(.pdf-home-hero) .section-head { margin-bottom:16px; max-width:none; }
body:has(.pdf-home-hero) .section-head h2,
body:has(.pdf-home-hero) .cta-band h2 { margin:0 0 16px; font-size:20px; }
body:has(.pdf-home-hero) .section-head .eyebrow { font-size:11px; margin-bottom:4px; color:var(--brand); }
body:has(.pdf-home-hero) .section-head > :last-child:not(h2) { display:none; }
body:has(.pdf-home-hero) .home-feature-grid,
body:has(.pdf-home-hero) .home-steps { gap:12px; border:0; background:none; }
body:has(.pdf-home-hero) .feature-card {
  border:1px solid var(--border);
  border-radius:8px;
  padding:16px;
  background:var(--surface);
}
body:has(.pdf-home-hero) .feature-card h3 { font-size:15px; margin:0 0 8px; }
body:has(.pdf-home-hero) .feature-card a { font-size:12px; }
body:has(.pdf-home-hero) .home-cta-band { display:block; background:none; border:0; }
body:has(.pdf-home-hero) .cta-band p { margin-bottom:12px; font-size:12px; }
@media(max-width:900px) {
  body:has(.pdf-home-hero) .home-feature-grid,
  body:has(.pdf-home-hero) .home-steps { grid-template-columns:1fr; }
}

body .site-header .brand-mark {
  display:inline-flex;
  width:32px;
  height:32px;
  flex:none;
  background:url("/sechosti-mark.svg") center / contain no-repeat;
}
.site-header .brand-mark svg { visibility:hidden; }

body:has(.pdf-home-hero) .site-header .brand-mark { display:inline-flex; }
