/* =====================================================================
 * AlurDigital public marketing site
 *
 * Dark venture-studio brand surface. Self-hosted typefaces (Inter for
 * display/body, JetBrains Mono for technical eyebrow labels + metrics),
 * a considered dark palette with a primary accent and a second "data"
 * accent, real elevation, and depth treatments. Layout is plain CSS Grid
 * + Flexbox so the site loads with zero blocking external requests; the
 * only fonts are the two self-hosted woff2 files under /fonts.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * Self-hosted typefaces (SIL Open Font License — free for commercial
 * embedding). Variable woff2, single file each, font-display: swap.
 * --------------------------------------------------------------------- */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/Inter-Variable.woff2") format("woff2");
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url("../fonts/JetBrainsMono-Variable.woff2") format("woff2");
}

:root {
    color-scheme: dark;

    /* Dark canvas — graded, not three near-identical greys. */
    --bg: #0a0c12;            /* deepest — page base */
    --bg-alt: #0f121b;        /* alternating section band */
    --bg-elevated: #161a26;   /* cards / raised surfaces */
    --bg-raised: #1b2030;     /* hover / topmost surfaces */

    --border: #232838;
    --border-strong: #313850;
    --border-accent: rgba(91, 140, 255, 0.45);

    --text: #eef0f6;
    --text-soft: #aeb4c6;
    --text-mute: #767d94;

    /* Primary accent — indigo/blue, brand. */
    --accent: #4d7cff;
    --accent-strong: #6f97ff;
    --accent-soft: rgba(77, 124, 255, 0.14);
    --accent-glow: rgba(77, 124, 255, 0.35);

    /* Second "data / technical" accent — cyan/teal, engineering-grade. */
    --accent-2: #2fd9c9;
    --accent-2-strong: #5fe9da;
    --accent-2-soft: rgba(47, 217, 201, 0.12);

    --success: #5fd0a0;
    --error: #ff7a8a;

    --radius: 14px;
    --radius-sm: 8px;
    --max-width: 1200px;
    --section-pad-y: 6rem;

    --font-display: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { overflow-x: clip; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 17px;
    font-feature-settings: "cv05" 1, "ss03" 1;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.12;
    margin: 0 0 0.75rem;
    letter-spacing: -0.022em;
    font-weight: 700;
}
h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; font-weight: 650; letter-spacing: -0.015em; }
p { margin: 0 0 1rem; }

/* Mono eyebrow label — the "engineering" tell, reused across sections. */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-2-strong);
    margin: 0 0 1.1rem;
}
.eyebrow::before {
    content: "";
    width: 1.6rem;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-2), transparent);
}
.section > .eyebrow { margin-top: 0; }

/* ---------------------------------------------------------------------
 * Full-bleed helper — the Keen shell wraps content in a padded
 * container-xxl. Sections that need to span edge-to-edge (hero, alt
 * bands) break out of it with this technique. Uses 100% + the parent's
 * own offset rather than 100vw so it never counts the scrollbar width
 * (which caused horizontal overflow on mobile). The app content
 * container clips any residual sub-pixel breakout via overflow-x.
 * --------------------------------------------------------------------- */
#kt_app_content_container { overflow-x: clip; }
.bleed {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
}
/* Mobile: stop the 100vw / -50vw breakout from shoving bands sideways
 * (it counts the scrollbar and de-centres inside padded containers). The
 * band simply fills its parent and stays centred at phone widths. */
@media (max-width: 920px) {
    .bleed {
        left: auto;
        right: auto;
        width: auto;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}

/* ---------------------------------------------------------------------
 * Hero — two-column, art-directed, depth on the dark canvas
 * --------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 7rem 1.5rem 6rem;
    background:
        radial-gradient(120% 90% at 80% -10%, rgba(47, 217, 201, 0.10), transparent 55%),
        radial-gradient(110% 120% at 8% 0%, rgba(77, 124, 255, 0.18), transparent 55%),
        linear-gradient(180deg, #0d1019 0%, var(--bg) 75%);
    border-bottom: 1px solid var(--border);
}
/* Faint engineering grid texture behind the hero. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 52px 52px;
    -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 80%);
    mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 80%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3.5rem;
    align-items: center;
}
.hero-copy { max-width: 38rem; }
.hero h1 {
    margin-bottom: 1.4rem;
    background: linear-gradient(180deg, #ffffff 30%, #c7cde0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-lede {
    font-size: 1.2rem;
    color: var(--text-soft);
    max-width: 34rem;
    margin: 0 0 2.25rem;
}
.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.hero-visual { position: relative; }
.hero-svg {
    width: 100%;
    height: auto;
    max-width: 560px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.55));
}
.hero-svg .hg-flows path {
    stroke-dasharray: 7 9;
    animation: hgDash 22s linear infinite;
}
.hero-svg .hg-ring { transform-origin: 260px 230px; animation: hgPulse 3.4s ease-in-out infinite; }
@keyframes hgDash { to { stroke-dashoffset: -320; } }
@keyframes hgPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.14); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-svg .hg-flows path, .hero-svg .hg-ring { animation: none; }
    .hero-svg circle animateMotion { display: none; }
}

/* "hero-tight" — interior pages without the two-column visual. */
.hero-tight { padding: 5rem 1.5rem 3.5rem; }
.hero-tight .hero-inner { max-width: 50rem; }
.hero-tight .hero-lede { max-width: 42rem; font-size: 1.15rem; }

@media (max-width: 920px) {
    .hero { padding: 4.5rem 1.5rem 3.5rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-visual { order: -1; }
}

.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--section-pad-y) 1.5rem;
}
.section h2 { margin-bottom: 0.6rem; }
.section-lede {
    color: var(--text-soft);
    max-width: 44rem;
    margin: 0 0 2.75rem;
    font-size: 1.12rem;
}
.section-alt {
    background:
        radial-gradient(90% 60% at 100% 0%, var(--accent-2-soft), transparent 60%),
        var(--bg-alt);
    max-width: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section-alt > * {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}
.section-footer-link { margin-top: 2.5rem; }
.section-footer-link a {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    font-weight: 500;
}

.section-cta { padding-bottom: 6.5rem; }
.cta-inner {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 140% at 50% -40%, var(--accent-soft), transparent 60%),
        var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 3.5rem 2.5rem;
    text-align: center;
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}
.cta-inner h2 { max-width: 32rem; margin-inline: auto; }
.cta-inner > p { max-width: 38rem; margin-inline: auto; color: var(--text-soft); }
.cta-actions { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------------------------------------------------------------------
 * Buttons
 * --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.55rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn .ki-duotone, .btn .ki-outline, .btn .ki-solid { font-size: 1.05rem; }
.btn-primary {
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    color: #fff;
    box-shadow: 0 8px 24px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { box-shadow: 0 12px 30px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-ghost {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    border-color: var(--border-strong);
    backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: var(--bg-raised); border-color: var(--accent); color: #fff; }

/* ---------------------------------------------------------------------
 * Cards / three-up grids
 * --------------------------------------------------------------------- */
.three-up {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (max-width: 860px) {
    .three-up { grid-template-columns: 1fr; }
}
.card {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.85rem 1.7rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 16px 40px -28px rgba(0, 0, 0, 0.85);
    transition: transform 0.18s ease, border-color 0.18s, box-shadow 0.18s;
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 26px 50px -30px rgba(0, 0, 0, 0.9);
}
.card h3 { margin-bottom: 0.55rem; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-soft); }

/* Icon chip sitting at the top of a card / phase / feature. */
.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    margin-bottom: 1.15rem;
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    color: var(--accent-strong);
    font-size: 1.4rem;
}
.card-icon.is-data {
    background: var(--accent-2-soft);
    border-color: rgba(47, 217, 201, 0.4);
    color: var(--accent-2-strong);
}

.tier-card { display: flex; flex-direction: column; }
.tier-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity 0.18s;
}
.tier-card:hover::after { opacity: 1; }
.tier-subtitle {
    font-family: var(--font-mono);
    color: var(--accent-2-strong);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: -0.1rem 0 1rem;
}
.tier-attrs { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.tier-attrs li {
    padding: 0.5rem 0;
    color: var(--text-soft);
    font-size: 0.96rem;
    border-bottom: 1px solid var(--border);
}
.tier-attrs li:last-child { border-bottom: 0; }
.tier-attrs strong { color: var(--text); }

/* ---------------------------------------------------------------------
 * Phase list (How it works)
 * --------------------------------------------------------------------- */
/* Connected vertical timeline — a node + a line running down the left. */
.phase-list { list-style: none; padding: 0; margin: 0; position: relative; }
.phase-list::before {
    content: "";
    position: absolute;
    left: 1.35rem;
    top: 1.4rem;
    bottom: 1.4rem;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2) 60%, transparent);
    opacity: 0.5;
}
.phase {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.85rem 1.85rem 1.85rem 4.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 16px 40px -28px rgba(0, 0, 0, 0.85);
    transition: border-color 0.18s, transform 0.18s;
}
.phase:hover { border-color: var(--border-accent); transform: translateX(2px); }
.phase-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.85rem; }
.phase-number {
    position: absolute;
    left: 0.65rem;
    top: 1.85rem;
    flex-shrink: 0;
    width: 2.7rem; height: 2.7rem;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 5px var(--bg), 0 8px 20px -8px var(--accent-glow);
}
.phase-header h2 { margin-bottom: 0; font-size: clamp(1.4rem, 2.4vw, 1.7rem); }
.phase-duration {
    margin: 0;
    font-family: var(--font-mono);
    color: var(--accent-2-strong);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.phase p { color: var(--text-soft); }
.phase strong { color: var(--text); }
@media (max-width: 560px) {
    .phase-header { flex-direction: column; gap: 0.2rem; }
}

/* Mini "how it works" — numbered steps as a horizontal-ish stepper grid */
.how-it-works-mini {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}
@media (max-width: 860px) { .how-it-works-mini { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .how-it-works-mini { grid-template-columns: 1fr; } }
.how-it-works-mini li {
    counter-increment: step;
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.3rem 1.3rem;
    color: var(--text-soft);
    font-size: 0.98rem;
    transition: border-color 0.18s, transform 0.18s;
}
.how-it-works-mini li:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.how-it-works-mini li::before {
    content: "0" counter(step);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--accent-2-strong);
    margin-bottom: 0.7rem;
}
.how-it-works-mini strong { color: var(--text); display: block; margin-bottom: 0.2rem; }

/* ---------------------------------------------------------------------
 * "How we build" — technical-depth method block
 * --------------------------------------------------------------------- */
.method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (max-width: 760px) { .method-grid { grid-template-columns: 1fr; } }
.method-item {
    display: flex;
    gap: 1.1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 1.7rem;
    transition: border-color 0.18s, transform 0.18s;
}
.method-item:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.method-item .card-icon { flex-shrink: 0; margin-bottom: 0; }
.method-item h3 { margin-bottom: 0.4rem; }
.method-item p { color: var(--text-soft); margin: 0; }

/* Capability / stack chips — process + capability signalling, no proof data. */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.25rem; }
.chip {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: var(--text-soft);
    background: var(--bg-alt);
    border: 1px solid var(--border-strong);
    border-radius: 100px;
    padding: 0.45rem 0.95rem;
}
.chip::before { content: "› "; color: var(--accent-2); }

/* ---------------------------------------------------------------------
 * Comparison table (Model)
 * --------------------------------------------------------------------- */
.comparison-table-wrap {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 18px 50px -30px rgba(0, 0, 0, 0.9);
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    font-size: 0.96rem;
}
.comparison-table th, .comparison-table td {
    padding: 0.95rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.comparison-table thead th {
    background: var(--bg-alt);
    font-family: var(--font-display);
    font-weight: 650;
    color: var(--text);
    border-bottom: 2px solid var(--border-strong);
    white-space: nowrap;
}
/* Emphasise the AlurDigital column so the comparison lands. */
.comparison-table thead th.col-us {
    color: #fff;
    background: linear-gradient(180deg, var(--accent-soft), transparent), var(--bg-alt);
    border-bottom-color: var(--accent);
}
.comparison-table td.col-us {
    color: var(--text);
    background: var(--accent-soft);
    font-weight: 550;
}
.comparison-table tbody tr:last-child th, .comparison-table tbody tr:last-child td { border-bottom: 0; }
.comparison-table tbody th { color: var(--text); font-weight: 600; }
.comparison-table tbody td { color: var(--text-soft); }
.comparison-table tbody tr:hover td:not(.col-us) { background: rgba(255, 255, 255, 0.015); }

/* Mobile: the 6-column table is illegible at 390px. Reflow to a stack of
 * cards — one card per dimension, each comparator as a labelled row. */
@media (max-width: 760px) {
    .comparison-table-wrap { border: 0; box-shadow: none; overflow: visible; background: none; }
    .comparison-table { display: block; background: none; }
    .comparison-table thead { display: none; }
    .comparison-table tbody { display: block; }
    .comparison-table tbody tr {
        display: block;
        background: var(--bg-elevated);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 1rem;
        overflow: hidden;
    }
    .comparison-table tbody th[scope="row"] {
        display: block;
        background: var(--bg-alt);
        color: var(--text);
        font-family: var(--font-display);
        font-size: 1.05rem;
        padding: 0.9rem 1.1rem;
        border-bottom: 1px solid var(--border-strong);
    }
    .comparison-table tbody td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        align-items: baseline;
        padding: 0.7rem 1.1rem;
        border-bottom: 1px solid var(--border);
        text-align: right;
    }
    .comparison-table tbody td::before {
        content: attr(data-label);
        font-family: var(--font-mono);
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--text-mute);
        text-align: left;
        flex: 0 0 8.5rem;
    }
    .comparison-table tbody td.col-us::before { color: var(--accent-2-strong); }
    .comparison-table tbody td:last-child { border-bottom: 0; }
}

/* Bullet list reused on Services — accent-marked, more deliberate */
.bullet-list { list-style: none; padding: 0; margin: 0; color: var(--text-soft); }
.bullet-list li {
    position: relative;
    padding: 0.85rem 0 0.85rem 2rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.02rem;
}
.bullet-list li:last-child { border-bottom: 0; }
.bullet-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 1.25rem;
    width: 0.85rem; height: 0.5rem;
    border-left: 2px solid var(--accent-2);
    border-bottom: 2px solid var(--accent-2);
    transform: rotate(-45deg);
}
.bullet-list strong { color: var(--text); }

/* ---------------------------------------------------------------------
 * Contact form
 * --------------------------------------------------------------------- */
/* Two-column contact layout: form left, reassurance panel right. */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 880px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.contact-aside { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-aside-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 1.7rem;
}
.contact-aside-card h3 { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.contact-aside-card h3 .ki-duotone,
.contact-aside-card h3 .ki-outline { color: var(--accent-2-strong); font-size: 1.25rem; }
.contact-steps { list-style: none; padding: 0; margin: 0; }
.contact-steps li {
    position: relative;
    padding: 0 0 0 1.6rem;
    margin-bottom: 0.7rem;
    color: var(--text-soft);
    font-size: 0.96rem;
}
.contact-steps li:last-child { margin-bottom: 0; }
.contact-steps li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.55rem;
    width: 0.5rem; height: 0.5rem;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 4px var(--accent-2-soft);
}
.contact-promise {
    font-family: var(--font-mono);
    color: var(--accent-2-strong);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.contact-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 18px 50px -30px rgba(0, 0, 0, 0.9);
}
.form-row { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.form-row label { font-weight: 600; margin-bottom: 0.4rem; color: var(--text); font-size: 0.95rem; }
.form-row input,
.form-row select,
.form-row textarea {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 0.65rem 0.8rem;
    font-size: 1rem;
    font-family: inherit;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}
.form-row textarea { resize: vertical; min-height: 140px; }
.field-error { color: var(--error); font-size: 0.85rem; margin-top: 0.25rem; min-height: 1em; }
.validation-summary { color: var(--error); margin-bottom: 1rem; }
.validation-summary ul { padding-left: 1.25rem; margin: 0; }
.form-actions { margin-top: 1.25rem; }

/* ---------------------------------------------------------------------
 * Cookie banner — pinned bottom; JS-free
 * --------------------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-strong);
    padding: 1rem 1.5rem;
    z-index: 100;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
}
.cookie-banner-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-text { margin: 0; color: var(--text-soft); flex: 1 1 360px; font-size: 0.95rem; }
.cookie-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cookie-actions .btn { padding: 0.5rem 1rem; font-size: 0.95rem; }
.cookie-form { margin: 0; }

/* ---------------------------------------------------------------------
 * Cookie preferences dialog (footer "Cookie preferences" link)
 * --------------------------------------------------------------------- */
.footer-link-button {
    /* Looks like the other footer links but is a button (opens dialog) */
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--text-mute);
    font: inherit;
    cursor: pointer;
}
.footer-link-button:hover { color: var(--text); text-decoration: underline; }
.footer-link-button:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

.cookie-prefs-dialog {
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text);
    max-width: 560px;
    width: calc(100% - 2rem);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.cookie-prefs-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
}
.cookie-prefs-close-form {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0.5rem 0.5rem 0;
}
.cookie-prefs-close {
    background: none;
    border: 0;
    color: var(--text-mute);
    font-size: 1.6rem;
    line-height: 1;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.cookie-prefs-close:hover { color: var(--text); background: var(--bg-alt); }
.cookie-prefs-body { padding: 0 1.5rem 1.5rem; }
.cookie-prefs-intro {
    color: var(--text-soft);
    font-size: 0.95rem;
}
.cookie-category {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem 1rem;
    margin: 0 0 1rem;
    background: var(--bg-alt);
}
.cookie-category legend {
    padding: 0 0.4rem;
    font-weight: 600;
    color: var(--text);
}
.cookie-category-desc {
    margin: 0 0 0.6rem;
    color: var(--text-soft);
    font-size: 0.9rem;
}
.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.cookie-toggle input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}
.cookie-toggle input[type="checkbox"]:disabled {
    cursor: not-allowed;
}
.cookie-toggle input[type="checkbox"]:disabled + .cookie-toggle-label {
    color: var(--text-mute);
}
.cookie-toggle-label { color: var(--text); font-size: 0.95rem; }
.cookie-prefs-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.cookie-prefs-actions .btn { padding: 0.55rem 1.1rem; font-size: 0.95rem; }

/* ---------------------------------------------------------------------
 * Legacy status panel — kept so the Sprint-0 Error view still works
 * --------------------------------------------------------------------- */
.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: var(--max-width);
    margin: 2.5rem auto;
}
.status-line { color: var(--success); font-size: 0.95rem; }
.action {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
}
.action:hover { background: var(--accent-strong); }

/* ---------------------------------------------------------------------
 * Legal pages — Privacy Policy, Terms of Service
 *
 * Two-column layout on wide viewports: a sticky table-of-contents on the
 * left, the long-form body on the right. Stacks to a single column on
 * narrow viewports. Body uses a slightly tighter line-length than the
 * default --max-width so long-form copy stays readable.
 * --------------------------------------------------------------------- */
.legal-meta { color: var(--text-mute); font-size: 0.9rem; margin: 0; }

.legal-page {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 860px) {
    .legal-page { grid-template-columns: 1fr; gap: 1.5rem; }
}

.legal-toc {
    position: sticky;
    top: 5.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.25rem 1rem;
    font-size: 0.95rem;
}
.legal-toc h2 { font-size: 1rem; margin: 0 0 0.5rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.05em; }
.legal-toc ol { padding-left: 1.25rem; margin: 0; }
.legal-toc li { margin-bottom: 0.35rem; line-height: 1.4; }
.legal-toc a { color: var(--text-soft); }
.legal-toc a:hover { color: var(--text); }
@media (max-width: 860px) {
    .legal-toc { position: static; }
}

.legal-body { max-width: 720px; }
.legal-body h2 {
    font-size: 1.4rem;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    scroll-margin-top: 5rem;
}
.legal-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal-body h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    scroll-margin-top: 5rem;
}
.legal-body p { color: var(--text-soft); }
.legal-body ul { color: var(--text-soft); padding-left: 1.25rem; }
.legal-body li { margin-bottom: 0.5rem; }
.legal-body strong { color: var(--text); }
.legal-body code {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.05rem 0.35rem;
    font-size: 0.9em;
}

/* =====================================================================
 * Founder-host UNAUTHENTICATED welcome chrome
 *
 * The public marketing site borrows its header/footer from the Keen
 * shell. The founder host's cold-entry pages (apply / sign-in / reset)
 * are NOT inside the logged-in app, so they carry their own lightweight
 * chrome here — same typefaces, palette and elevation as site.css above,
 * no sidebar, no app shell. This is purely presentation for the
 * unauthenticated entry; the authenticated portal keeps its Keen sidebar.
 * ===================================================================== */
.welcome-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(120% 80% at 85% -10%, rgba(47, 217, 201, 0.07), transparent 55%),
        radial-gradient(110% 110% at 5% -5%, rgba(77, 124, 255, 0.12), transparent 55%),
        var(--bg);
}

.welcome-header {
    border-bottom: 1px solid var(--border);
    background: rgba(10, 12, 18, 0.72);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 20;
}
.welcome-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.05rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.welcome-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.18rem;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}
.welcome-brand:hover { text-decoration: none; color: #fff; }
.welcome-brand-mark {
    width: 1.85rem; height: 1.85rem;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 0.95rem;
    box-shadow: 0 6px 18px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.welcome-header-aside {
    font-size: 0.95rem;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.welcome-header-aside a { font-weight: 600; }
@media (max-width: 560px) {
    .welcome-header-aside .aside-label { display: none; }
}

.welcome-main { flex: 1 0 auto; }

.welcome-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}
.welcome-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem;
    color: var(--text-mute);
    font-size: 0.88rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    justify-content: space-between;
}

/* Two-column apply layout: welcome/what-happens-next left, form card right.
 * Mirrors .contact-grid but mobile collapses to a clean single stack with
 * the form first so a returning founder isn't scrolled past the welcome. */
.apply-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: 3rem;
    align-items: start;
}
@media (max-width: 900px) {
    /* minmax(0, 1fr) — a plain 1fr column has min-width: auto, so the form
     * column refused to shrink below the form card's intrinsic width
     * (inputs + 2rem padding) and ran ~32px off the right edge at 320px.
     * minmax(0, …) lets the column shrink to the viewport. */
    .apply-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .apply-intro { order: 1; }
    .apply-form-col { order: 2; min-width: 0; }
}
/* Belt-and-braces: ensure the reused contact-form/inputs never establish a
 * min-content wider than their column on the narrowest phones. */
.apply-form-col, .apply-intro { min-width: 0; }
.apply-form-col .contact-form { max-width: 100%; }
.apply-form-col .contact-form input,
.apply-form-col .contact-form select,
.apply-form-col .contact-form textarea { max-width: 100%; }

.apply-intro .hero-lede { margin-bottom: 2rem; }

/* "What you get / what happens next" cards reuse the contact-aside-card
 * and contact-steps styling already defined in site.css above. */
.apply-aside { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 0.5rem; }

/* The form card — reuse .contact-form's surface, add a heading row. */
.apply-form-card-head { margin-bottom: 1.5rem; }
.apply-form-card-head h2 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.apply-form-card-head p { color: var(--text-soft); margin: 0; font-size: 0.98rem; }

.apply-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.75rem 0 1.4rem;
}
.apply-alt { color: var(--text-soft); font-size: 0.95rem; margin: 0 0 0.9rem; }
.apply-signin-note { color: var(--text-mute); font-size: 0.92rem; margin: 0; }

/* A LinkedIn-style secondary button using the existing .btn system. */
.btn-linkedin {
    background: var(--bg-raised);
    color: var(--text);
    border-color: var(--border-strong);
    width: 100%;
    justify-content: center;
}
.btn-linkedin:hover { background: var(--bg-elevated); border-color: var(--accent); color: #fff; }

/* Sign-in / reset use a narrower single-column card. */
.welcome-narrow {
    max-width: 30rem;
    margin-inline: auto;
}

/* Inline checkbox row (Remember me) for the sign-in card. */
.form-row-inline { flex-direction: row; align-items: center; gap: 0.55rem; margin-bottom: 1.1rem; }
.form-row-inline label { margin: 0; font-weight: 500; color: var(--text-soft); }
.form-row-inline input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); cursor: pointer; }

/* Stacked secondary links under the sign-in card. */
.welcome-links { margin: 0; }
.welcome-links p { margin: 0 0 0.5rem; color: var(--text-mute); font-size: 0.93rem; }
.welcome-links p:last-child { margin-bottom: 0; }
