/* =========================================================
   LogicStream — design system
   Brand colors preserved from the existing logo (orange + charcoal);
   editorial layout/type inspired by modern AI-lab marketing sites.
   ========================================================= */

:root {
    /* Brand */
    --accent: #F39233;         /* logo orange */
    --accent-dark: #D97918;
    --accent-tint: #FDE9D2;
    --muted: #6C6D6F;          /* logo charcoal */
    --ink: #1C1C1E;
    --ink-soft: #46464A;
    --bg: #FAF7F2;             /* warm off-white canvas */
    --surface: #FFFFFF;
    --surface-alt: #F1ECE3;
    --border: #E6DFD3;
    --success: #2E7D51;
    --danger: #C4453A;

    /* Type */
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

    /* Scale */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(28, 28, 30, 0.06);
    --shadow: 0 12px 32px -12px rgba(28, 28, 30, 0.18);
    --wrap: 1180px;

    color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; }

.skip-link {
    position: absolute; left: -999px; top: 0;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 64px 0; }
@media (min-width: 800px) { section { padding: 96px 0; } }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-body); font-weight: 700; font-size: 13px;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-dark);
    margin: 0 0 14px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.96rem;
    text-decoration: none; border: 2px solid transparent; cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn--accent { background: var(--accent); color: #1C1200; }
.btn--accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); padding: 8px 4px; }
.btn--sm { padding: 9px 16px; font-size: 0.86rem; }
.btn:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; gap: 16px; }
.brand { display: flex; align-items: center; }
.brand img { height: 60px; width: auto; }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; margin: -8px;
    background: none; border: none; appearance: none;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav ul { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-weight: 600; color: var(--ink-soft); font-size: 0.94rem; }
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active { border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.lang-switch {
    text-decoration: none; font-weight: 700; font-size: 0.76rem; letter-spacing: 0.04em;
    color: var(--muted); padding: 5px 9px; border-radius: 6px;
}
.lang-switch:hover { color: var(--ink); background: var(--surface-alt); }

@media (max-width: 900px) {
    .nav-toggle { display: flex; order: 3; }
    .site-nav {
        order: 4; flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: 0;
        max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
    }
    .site-nav ul { flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 0 4px; width: 100%; }
    .site-nav a { display: block; padding: 10px 4px; width: 100%; }
    .lang-switch { padding: 10px 4px 18px; }
    .site-nav.is-open { max-height: 480px; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
@media (min-width: 800px) { .hero { padding: 96px 0 56px; } }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: 64px; } }
.hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
.hero .lede { font-size: 1.25rem; margin-top: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ---------- Diagram card ---------- */
.diagram-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 28px; box-shadow: var(--shadow);
}
.diagram-card svg { width: 100%; height: auto; }
.diagram-card figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--muted); text-align: center; }

/* ---------- Proof strip ---------- */
.proof-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.proof-strip__row {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 12px 28px; padding: 24px 0; text-align: center;
}
.proof-strip__row span { color: var(--muted); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.01em; }

/* ---------- Competency cards ---------- */
.competency-grid { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 860px) { .competency-grid { grid-template-columns: repeat(3, 1fr); } }
.competency-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 32px; display: flex; flex-direction: column; gap: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.competency-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.competency-card__icon {
    width: 52px; height: 52px; border-radius: 14px; background: var(--accent-tint);
    display: flex; align-items: center; justify-content: center; color: var(--accent-dark);
}
.competency-card h3 { font-size: 1.3rem; }
.competency-card p { color: var(--ink-soft); flex-grow: 1; }
.competency-card a { font-weight: 700; color: var(--ink); text-decoration: none; }
.competency-card a:hover { color: var(--accent-dark); }

/* ---------- Generic content sections ---------- */
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6em; }
.prose p, .prose ul, .prose ol { color: var(--ink-soft); max-width: 74ch; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose a { color: var(--accent-dark); text-decoration-thickness: 1.5px; }
.prose strong { color: var(--ink); }
.client-list { max-width: 640px; }
@media (min-width: 640px) { .client-list { columns: 2; column-gap: 32px; } }

.two-col { display: grid; gap: 40px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col--wide { grid-template-columns: 1.3fr 1fr; }

.card-list { display: grid; gap: 20px; }
@media (min-width: 700px) { .card-list--2 { grid-template-columns: 1fr 1fr; } }
.info-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px;
}
.info-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.info-card p { color: var(--ink-soft); font-size: 0.96rem; }

.band { background: var(--surface-alt); }
.band-dark { background: var(--ink); color: #fff; }
.band-dark .eyebrow { color: var(--accent); }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark p { color: #D9D5CC; }

/* ---------- Tables (used on AI Transformation page) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
table.data-table th, table.data-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 0.94rem; vertical-align: top; }
table.data-table th { font-family: var(--font-display); font-weight: 600; background: var(--surface-alt); }
table.data-table tr:last-child td { border-bottom: none; }

/* ---------- Timeline (roadmap) ---------- */
.timeline { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 760px) { .timeline { grid-template-columns: repeat(4, 1fr); } }
.timeline__step { border-left: 3px solid var(--accent); padding-left: 18px; }
.timeline__step .stage { font-weight: 700; color: var(--accent-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.timeline__step h4 { margin: 6px 0 8px; font-size: 1.05rem; }
.timeline__step p { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; gap: 28px; margin-top: 36px; }
@media (min-width: 700px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    border-top: 4px solid var(--accent);
    overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.post-card__meta { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.post-card h3 { font-size: 1.15rem; margin: 0; }
.post-card p { color: var(--ink-soft); font-size: 0.94rem; }
.post-card__footer { margin-top: auto; font-weight: 700; font-size: 0.9rem; color: var(--accent-dark); }

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.filter-chip {
    text-decoration: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
    font-size: 0.88rem; font-weight: 600; color: var(--ink-soft);
}
.filter-chip.is-active, .filter-chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.post-header { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.post-header .eyebrow { justify-content: center; }
.post-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.post-meta-row { display: flex; justify-content: center; gap: 14px; color: var(--muted); font-size: 0.9rem; margin-top: 12px; flex-wrap: wrap; }
.post-body { max-width: 74ch; margin: 0 auto; }
.post-diagram { max-width: 640px; margin: 0 auto 48px; }
.post-questions {
    max-width: 74ch; margin: 48px auto 0; background: var(--surface-alt); border-radius: var(--radius);
    padding: 28px 32px;
}
.post-questions h3 { font-size: 1.05rem; }
.post-nav { max-width: 74ch; margin: 48px auto 0; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.field input, .field textarea, .field select {
    font: inherit; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--border);
    background: var(--surface); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 32px; box-shadow: var(--shadow-sm);
}
.form-note { font-size: 0.82rem; color: var(--muted); margin-top: 14px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent-field { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; }
.consent-field input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.consent-field label { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; }
.consent-field a { color: var(--accent-dark); }
.alert { border-radius: 12px; padding: 14px 18px; font-size: 0.92rem; margin-bottom: 20px; }
.alert--success { background: #E4F3EA; color: var(--success); border: 1px solid #BEE3CB; }
.alert--error { background: #FBE9E7; color: var(--danger); border: 1px solid #F3C6C0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D9D5CC; padding-top: 0; margin-top: 80px; }
.site-footer__cta {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
    padding: 40px 0; border-bottom: 1px solid #333;
}
.site-footer__cta .eyebrow { margin-bottom: 6px; }
.site-footer__cta h3 { color: #fff; font-family: var(--font-display); font-size: 1.4rem; text-transform: none; letter-spacing: normal; margin: 0; }
.site-footer__grid { padding-top: 48px; }
.site-footer__grid { display: grid; gap: 36px; grid-template-columns: 1fr; padding-bottom: 48px; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer__brand img { height: 48px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; margin-bottom: 14px; }
.site-footer__brand p { max-width: 32ch; color: #ADA89C; font-size: 0.92rem; }
.site-footer__roots { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.site-footer h3 { color: #fff; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; font-family: var(--font-body); }
.site-footer ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: #C7C2B6; text-decoration: none; font-size: 0.94rem; }
.site-footer a:hover { color: #fff; }
.site-footer__legal { border-top: 1px solid #333; padding: 20px 0; font-size: 0.82rem; color: #8B8679; }
.site-footer__legal p { margin: 0 0 6px; }
.site-footer__legal p:last-child { margin-bottom: 0; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Utility ---------- */
.center { text-align: center; margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; }
.text-muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
