/* ============================================
   FreyAI Visions - Agentic Backoffice Sprint
   ============================================ */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
    padding: 8px 16px;
    background: var(--accent-primary);
    color: #131516;
    text-decoration: none;
    font-size: 14px;
}

.skip-link:focus {
    left: 0;
    width: auto;
    height: auto;
}

.kb-page {
    --kb-ink: #101314;
    --kb-panel: #191d1f;
    --kb-panel-soft: #202528;
    --kb-line: rgba(232, 228, 223, 0.12);
    --kb-copy: #d9d4cd;
    --kb-muted: #aaa199;
    --kb-copper: #c8956c;
    --kb-green: #6f9f7d;
    --kb-cyan: #75a8b6;
    --kb-amber: #d1aa5f;
    background: var(--kb-ink);
    color: var(--kb-copy);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.kb-page * {
    min-width: 0;
}

.kb-nav {
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 32px;
    background: rgba(16, 19, 20, 0.94);
    border-bottom: 1px solid var(--kb-line);
    backdrop-filter: blur(18px);
}

.kb-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--text-primary);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 19px;
    text-decoration: none;
}

.kb-nav-brand img {
    border-radius: 6px;
}

.kb-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kb-nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
}

.kb-nav-links a:hover,
.kb-nav-links a:focus-visible {
    color: var(--text-primary);
}

.kb-nav-cta {
    padding: 0 14px;
    border: 1px solid rgba(200, 149, 108, 0.5);
    border-radius: 8px;
    color: var(--text-primary) !important;
}

.kb-nav-cta:hover,
.kb-nav-cta:focus-visible {
    border-color: var(--kb-copper);
    background: rgba(200, 149, 108, 0.1);
}

.kb-nav a:focus-visible,
.kb-btn:focus-visible {
    outline: 2px solid var(--kb-copper);
    outline-offset: 3px;
}

.kb-hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--kb-line);
}

.kb-hero-picture,
.kb-hero-picture img,
.kb-hero-shade {
    position: absolute;
    inset: 0;
}

.kb-hero-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 55% 34%;
    filter: saturate(0.82) contrast(1.05);
}

.kb-hero-shade {
    background:
        linear-gradient(90deg, rgba(16, 19, 20, 0.96) 0%, rgba(16, 19, 20, 0.84) 42%, rgba(16, 19, 20, 0.34) 100%),
        linear-gradient(180deg, rgba(16, 19, 20, 0.15) 0%, rgba(16, 19, 20, 0.82) 100%);
}

.kb-hero-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 96px 0 72px;
}

.kb-kicker,
.kb-section-label {
    color: var(--kb-copper);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.kb-hero h1 {
    max-width: 720px;
    margin: 12px 0 18px;
    color: var(--text-primary);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(48px, 7vw, 86px);
    font-weight: 400;
    line-height: 0.95;
    overflow-wrap: break-word;
    word-break: normal;
}

.kb-hero-lead {
    max-width: 650px;
    color: var(--kb-copy);
    font-size: 22px;
    line-height: 1.45;
}

.kb-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.kb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.kb-btn-primary {
    background: var(--kb-copper);
    color: #151719;
}

.kb-btn-primary:hover,
.kb-btn-primary:focus-visible {
    background: #ddb18d;
}

.kb-btn-secondary {
    border: 1px solid rgba(232, 228, 223, 0.28);
    color: var(--text-primary);
    background: rgba(16, 19, 20, 0.42);
}

.kb-btn-secondary:hover,
.kb-btn-secondary:focus-visible {
    border-color: var(--kb-copper);
    background: rgba(200, 149, 108, 0.1);
}

.kb-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: min(720px, 100%);
    margin-top: 44px;
}

.kb-metrics div {
    padding: 16px;
    border: 1px solid rgba(232, 228, 223, 0.18);
    border-radius: 8px;
    background: rgba(16, 19, 20, 0.6);
}

.kb-metrics dt {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 800;
}

.kb-metrics dd {
    margin-top: 4px;
    color: var(--kb-muted);
    font-size: 13px;
}

.kb-section {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 76px 0;
}

.kb-section-head {
    max-width: 760px;
    margin-bottom: 34px;
}

.kb-section-head h2,
.kb-copy-block h2,
.kb-security h2,
.kb-final-cta h2 {
    margin: 8px 0 12px;
    color: var(--text-primary);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 400;
    line-height: 1.05;
    overflow-wrap: break-word;
    word-break: normal;
}

.kb-section-head p,
.kb-copy-block p,
.kb-security p {
    color: var(--kb-muted);
    font-size: 17px;
    line-height: 1.65;
}

.kb-flow-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    list-style: none;
}

.kb-flow-step,
.kb-day,
.kb-scope-card,
.kb-price-card,
.kb-board-item {
    border: 1px solid var(--kb-line);
    border-radius: 8px;
    background: var(--kb-panel);
}

.kb-flow-step {
    min-height: 230px;
    padding: 18px;
    position: relative;
}

.kb-flow-step::after {
    content: "";
    position: absolute;
    top: 32px;
    right: -15px;
    width: 28px;
    height: 1px;
    background: rgba(200, 149, 108, 0.45);
}

.kb-flow-step:last-child::after {
    display: none;
}

.kb-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(200, 149, 108, 0.14);
    color: var(--kb-copper);
    font-weight: 800;
}

.kb-flow-step h3,
.kb-day h3,
.kb-scope-card h3,
.kb-price-card h3,
.kb-board-item h3 {
    margin: 18px 0 8px;
    color: var(--text-primary);
    font-size: 18px;
}

.kb-flow-step p,
.kb-day p,
.kb-scope-card li,
.kb-price-card p,
.kb-board-item p {
    color: var(--kb-muted);
    font-size: 14px;
    line-height: 1.55;
}

.kb-band {
    background: #171b1c;
    border-top: 1px solid var(--kb-line);
    border-bottom: 1px solid var(--kb-line);
}

.kb-band-inner {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 76px 0;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 48px;
    align-items: center;
}

.kb-workflow-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.kb-board-item {
    min-height: 168px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(32, 37, 40, 0.96), rgba(25, 29, 31, 0.96));
}

.kb-board-item span {
    display: inline-block;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.kb-board-item-intake span { color: var(--kb-cyan); }
.kb-board-item-draft span { color: var(--kb-amber); }
.kb-board-item-review span { color: var(--kb-copper); }
.kb-board-item-send span { color: var(--kb-green); }

.kb-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.kb-day {
    min-height: 218px;
    padding: 18px;
}

.kb-day span {
    color: var(--kb-copper);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.kb-scope-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.kb-scope-card {
    padding: 24px;
}

.kb-scope-card ul {
    padding: 0;
    margin: 16px 0 0;
    list-style: none;
}

.kb-scope-card li {
    position: relative;
    padding: 7px 0 7px 22px;
}

.kb-scope-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 17px;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--kb-copper);
}

.kb-price-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.kb-price-card {
    padding: 26px;
}

.kb-price-card-featured {
    border-color: rgba(200, 149, 108, 0.75);
    background: #202120;
}

.kb-price {
    margin: 16px 0 14px;
    color: var(--text-primary);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 42px;
    line-height: 1;
}

.kb-price span {
    display: block;
    margin-top: 6px;
    color: var(--kb-copper);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 800;
}

.kb-security {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 76px;
    padding: 34px;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 40px;
    border: 1px solid rgba(111, 159, 125, 0.45);
    border-radius: 8px;
    background: rgba(111, 159, 125, 0.08);
}

.kb-final-cta {
    padding: 70px 24px;
    text-align: center;
    background: #1d201d;
    border-top: 1px solid var(--kb-line);
    border-bottom: 1px solid var(--kb-line);
}

.kb-final-cta h2 {
    max-width: 760px;
    margin: 0 auto 24px;
}

.kb-footer {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--text-muted);
}

.kb-footer a {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
}

.kb-footer a:hover,
.kb-footer a:focus-visible {
    color: var(--text-primary);
}

@media (max-width: 1100px) {
    .kb-flow-list,
    .kb-days {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kb-flow-step::after {
        display: none;
    }

    .kb-band-inner,
    .kb-security {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .kb-nav {
        align-items: center;
        inline-size: 100vw !important;
        width: 100%;
        max-width: 100vw;
        gap: 12px;
        padding: 12px 16px;
        overflow: hidden;
    }

    .kb-nav-brand span {
        display: none;
    }

    .kb-nav-links {
        flex: 0 1 auto;
        justify-content: flex-end;
        flex-wrap: wrap;
        min-width: 0;
        max-inline-size: calc(100vw - 78px);
        gap: 6px 14px;
    }

    .kb-nav-links a {
        font-size: 13px;
    }

    .kb-nav-links a:not(.kb-nav-cta) {
        display: none;
    }

    .kb-nav-cta {
        min-width: 0;
        max-width: 152px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .kb-hero {
        min-height: 72vh;
    }

    .kb-hero-picture img {
        object-position: 58% 20%;
    }

    .kb-hero-shade {
        background:
            linear-gradient(180deg, rgba(16, 19, 20, 0.8) 0%, rgba(16, 19, 20, 0.96) 78%),
            linear-gradient(90deg, rgba(16, 19, 20, 0.88) 0%, rgba(16, 19, 20, 0.42) 100%);
    }

    .kb-hero-inner,
    .kb-section,
    .kb-band-inner,
    .kb-security,
    .kb-footer {
        inline-size: calc(100vw - 32px) !important;
        width: calc(100vw - 32px) !important;
        max-width: calc(100vw - 32px) !important;
        margin-left: auto;
        margin-right: auto;
    }

    .kb-hero-inner {
        padding: 68px 0 48px;
    }

    .kb-hero h1 {
        max-width: 100%;
        font-size: 40px;
        line-height: 1;
        overflow-wrap: anywhere;
    }

    .kb-hero-lead {
        width: 100%;
        max-width: 100%;
        font-size: 18px;
        overflow-wrap: anywhere;
    }

    .kb-section-head,
    .kb-copy-block {
        width: 100%;
        max-width: 100%;
    }

    .kb-section-head h2,
    .kb-copy-block h2,
    .kb-security h2,
    .kb-final-cta h2 {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .kb-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .kb-btn {
        width: 100%;
    }

    .kb-metrics,
    .kb-flow-list,
    .kb-days,
    .kb-scope-grid,
    .kb-price-grid,
    .kb-workflow-board {
        grid-template-columns: 1fr;
    }

    .kb-section,
    .kb-band-inner {
        padding: 54px 0;
    }

    .kb-scope-card,
    .kb-price-card,
    .kb-security {
        padding: 22px;
    }
}

@media (max-width: 480px) {
    .kb-nav-brand span {
        display: none;
    }

    .kb-nav-links {
        gap: 4px 10px;
    }

    .kb-nav-cta {
        padding: 0 10px;
    }

    .kb-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .kb-btn {
        width: 100%;
    }

    .kb-hero h1 {
        font-size: 34px;
    }

    .kb-section-head h2,
    .kb-copy-block h2,
    .kb-security h2,
    .kb-final-cta h2 {
        font-size: 32px;
        overflow-wrap: anywhere;
    }
}
