/* CaseIQ Security Page — premium legal-tech trust */

:root {
    --sec-alt: #fbfbfc;
    --sec-soft: #f8f8f7;
    --sec-neutral: #f4f4f2;
    --sec-border: #e8e8e6;
    --sec-purple-tint: rgba(121, 54, 233, 0.08);
    --sec-shadow: 0 12px 40px rgba(44, 62, 80, 0.07);
    --sec-shadow-sm: 0 4px 20px rgba(44, 62, 80, 0.06);
    --sec-radius: 16px;
    --sec-radius-lg: 22px;
    --sec-section-pad: clamp(4.25rem, 5.5vw, 6.25rem);
    --sec-section-pad-compact: clamp(3.5rem, 4.5vw, 5rem);
}

body.sec-page {
    background: var(--white);
    color: var(--text-dark);
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

.sec-page .site-main { overflow-x: hidden; }

.sec-bg-white { background: var(--white); }
.sec-bg-alt { background: var(--sec-alt); }
.sec-bg-soft { background: var(--sec-soft); }

.sec-divider {
    height: 1px;
    max-width: 1160px;
    margin: 0 auto;
    background: var(--sec-border);
}

.sec-eyebrow,
.sec-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-purple);
    margin-bottom: 0.65rem;
}

.sec-display {
    font-size: clamp(2.2rem, 4.2vw, 3.35rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
}

.sec-highlight { color: var(--primary-purple); }

.sec-section-head {
    font-size: clamp(1.55rem, 2.8vw, 2.15rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.sec-section-head--major {
    font-size: clamp(1.85rem, 3.1vw, 2.45rem);
}

.sec-lead,
.sec-body {
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin: 0;
}

.sec-lead { max-width: 34rem; margin-bottom: 1rem; }

.sec-micro {
    margin: 0.85rem 0 0;
    font-size: 0.84rem;
    color: var(--text-gray);
}

.sec-text-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--primary-purple);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.94rem;
}

.sec-text-link:hover { text-decoration: underline; }

.sec-section-intro { max-width: 640px; margin-bottom: 1.25rem; }
.sec-section-intro--center { text-align: center; margin-inline: auto; }

.sec-check-list {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
}

.sec-check-list li {
    position: relative;
    padding-inline-start: 1.3rem;
    margin-bottom: 0.45rem;
    font-size: 0.94rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.sec-check-list li::before {
    content: '✓';
    position: absolute;
    inset-inline-start: 0;
    color: var(--primary-purple);
    font-weight: 700;
}

.sec-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.sec-reveal.is-visible { opacity: 1; transform: translateY(0); }

.sec-hero,
.sec-flow,
.sec-pillars,
.sec-access,
.sec-layers,
.sec-privacy,
.sec-scenarios,
.sec-faq,
.sec-final {
    padding: var(--sec-section-pad) 0;
}

.sec-section--compact,
.sec-account {
    padding: var(--sec-section-pad-compact) 0;
}

/* Hero */
.sec-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
    align-items: center;
}

.sec-hero-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

.sec-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.sec-trust-chip {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--sec-border);
    background: var(--white);
    color: var(--text-dark);
}

.sec-chip {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: var(--sec-neutral);
    color: var(--text-gray);
    border: 1px solid var(--sec-border);
}

.sec-chip--purple {
    background: var(--primary-purple-light);
    color: var(--primary-purple-dark);
    border-color: rgba(121, 54, 233, 0.2);
}

/* Hero architecture diagram */
.sec-hero-visual {
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius-lg);
    padding: 1.35rem 1.15rem;
    box-shadow: var(--sec-shadow);
    max-width: 100%;
}

.sec-arch { display: flex; flex-direction: column; gap: 0; }

.sec-arch-node {
    background: var(--sec-neutral);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius);
    padding: 0.7rem 0.9rem;
    opacity: 0.45;
    transform: scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.sec-arch-node.is-active {
    opacity: 1;
    transform: scale(1);
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px var(--sec-purple-tint);
    background: var(--white);
}

.sec-arch-label {
    display: block;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-purple);
    margin-bottom: 0.15rem;
}

.sec-arch-node strong { font-size: 0.9rem; }

.sec-arch-line {
    height: 1.1rem;
    display: flex;
    justify-content: center;
    position: relative;
}

.sec-arch-line i {
    display: block;
    width: 2px;
    height: 100%;
    background: var(--sec-border);
    position: relative;
    overflow: hidden;
}

.sec-arch-line i::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-purple);
    opacity: 0;
}

.sec-hero.is-live .sec-arch-line i::after {
    animation: sec-pulse 2.8s ease infinite;
}

@keyframes sec-pulse {
    0% { top: -100%; opacity: 0; }
    30% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.sec-arch-note {
    margin: 0.85rem 0 0;
    font-size: 0.72rem;
    color: var(--text-gray);
    text-align: center;
}

/* Flow */
.sec-flow-track {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 0.45rem;
    align-items: stretch;
    max-width: 920px;
    margin: 0 auto;
}

.sec-flow-step {
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius);
    padding: 1rem 0.75rem;
    text-align: center;
    opacity: 0.4;
    transition: opacity 0.4s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.sec-flow-step.is-active {
    opacity: 1;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px var(--sec-purple-tint);
}

.sec-flow-num {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--primary-purple);
    margin-bottom: 0.3rem;
}

.sec-flow-step strong { display: block; font-size: 0.9rem; margin-bottom: 0.2rem; }
.sec-flow-step span { font-size: 0.72rem; color: var(--text-gray); }

.sec-flow-arrow {
    display: flex;
    align-items: center;
    color: var(--primary-purple);
    opacity: 0.45;
    font-size: 0.85rem;
}

/* Pillars */
.sec-pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.sec-pillar {
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius);
    padding: 1.25rem;
    box-shadow: var(--sec-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sec-pillar:hover {
    transform: translateY(-3px);
    box-shadow: var(--sec-shadow);
    border-color: rgba(121, 54, 233, 0.25);
}

.sec-pillar-icon {
    font-size: 1.1rem;
    color: var(--primary-purple);
    margin-bottom: 0.65rem;
}

.sec-pillar h3 { font-size: 1rem; margin: 0 0 0.4rem; }
.sec-pillar > p { margin: 0 0 0.75rem; font-size: 0.88rem; color: var(--text-gray); line-height: 1.5; }

.sec-pillar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sec-pillar-list li {
    position: relative;
    padding-inline-start: 1.1rem;
    font-size: 0.82rem;
    color: var(--text-gray);
    margin-bottom: 0.35rem;
    line-height: 1.45;
}

.sec-pillar-list li::before {
    content: '✓';
    position: absolute;
    inset-inline-start: 0;
    color: var(--primary-purple);
    font-size: 0.72rem;
    font-weight: 700;
}

/* Matrix */
.sec-matrix-wrap { max-width: 820px; margin: 0 auto; }

.sec-matrix-roles {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.sec-matrix-role {
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: 999px;
    padding: 0.42rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: var(--text-gray);
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.sec-matrix-role.is-active,
.sec-matrix-role:hover {
    border-color: var(--primary-purple);
    background: var(--primary-purple-light);
    color: var(--primary-purple-dark);
}

.sec-matrix-card {
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius-lg);
    overflow: hidden;
    box-shadow: var(--sec-shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sec-matrix-head {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--sec-border);
    background: var(--sec-neutral);
}

.sec-matrix-head strong { display: block; font-size: 1rem; margin: 0.2rem 0; }

.sec-matrix-disclaimer {
    display: block;
    font-size: 0.72rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

.sec-matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.sec-matrix-table th,
.sec-matrix-table td {
    padding: 0.75rem 0.65rem;
    text-align: center;
    font-size: 0.84rem;
    border-bottom: 1px solid var(--sec-border);
}

.sec-matrix-table thead th { background: var(--white); font-weight: 700; font-size: 0.78rem; }
.sec-matrix-table tbody th { text-align: start; font-weight: 600; padding-inline-start: 1rem; }

.sec-matrix-table tbody tr {
    transition: background 0.35s ease;
}

.sec-matrix-table tbody tr.is-highlight {
    background: var(--primary-purple-light);
}

.sec-check { color: var(--primary-purple); font-size: 0.82rem; }
.sec-dash { color: var(--text-gray); opacity: 0.6; }

/* Layers */
.sec-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
    align-items: center;
}

.sec-split--4060 { grid-template-columns: 1.05fr 0.95fr; }

.sec-layers-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sec-layer {
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    opacity: 0.4;
    transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.35s ease, background 0.35s ease;
}

.sec-layer.is-active {
    opacity: 1;
    transform: translateY(0);
    border-color: var(--primary-purple);
    background: var(--primary-purple-light);
    color: var(--primary-purple-dark);
}

/* Privacy visual */
.sec-privacy-concepts {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
}

.sec-privacy-concept {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: 12px;
}

.sec-privacy-concept strong { font-size: 0.88rem; }
.sec-privacy-concept span { font-size: 0.78rem; color: var(--text-gray); }

.sec-privacy-visual {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sec-privacy-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem;
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius);
    box-shadow: var(--sec-shadow-sm);
}

.sec-privacy-node {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.55rem;
    background: var(--sec-neutral);
    border-radius: 8px;
}

.sec-privacy-node.is-accent {
    background: var(--primary-purple-light);
    color: var(--primary-purple-dark);
}

.sec-privacy-node.is-blocked {
    background: var(--sec-neutral);
    color: var(--text-gray);
    opacity: 0.7;
    text-decoration: line-through;
}

.sec-privacy-arrow { color: var(--text-gray); font-size: 0.8rem; }

.sec-privacy-path--block { opacity: 0.75; }

/* Scenarios */
.sec-scenario-module {
    max-width: 880px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius-lg);
    overflow: hidden;
    box-shadow: var(--sec-shadow-sm);
}

.sec-scenario-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--sec-border);
    background: var(--sec-neutral);
}

.sec-scenario-tab {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.sec-scenario-tab.is-active,
.sec-scenario-tab:hover {
    color: var(--primary-purple-dark);
    background: var(--white);
    border-bottom-color: var(--primary-purple);
}

.sec-scenario-panel { padding: 1.25rem; }

.sec-scenario-path {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
    animation: sec-fade 0.4s ease;
}

.sec-scenario-path.is-active { display: flex; }

@keyframes sec-fade {
    from { opacity: 0.5; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.sec-scenario-path span {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.65rem;
    background: var(--sec-neutral);
    border-radius: 999px;
    border: 1px solid var(--sec-border);
}

.sec-scenario-path span.is-end {
    background: var(--primary-purple-light);
    border-color: rgba(121, 54, 233, 0.2);
    color: var(--primary-purple-dark);
}

.sec-scenario-path i { color: var(--primary-purple); font-size: 0.7rem; opacity: 0.6; }

.sec-scenario-note {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-gray);
}

/* FAQ */
.sec-faq-list { margin-top: 0.5rem; }

.sec-faq-item {
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius);
    margin-bottom: 0.55rem;
    background: var(--white);
    overflow: hidden;
}

.sec-faq-trigger {
    width: 100%;
    text-align: start;
    padding: 0.95rem 1.1rem;
    font-size: 0.94rem;
    font-weight: 700;
    font-family: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    position: relative;
    padding-inline-end: 2rem;
}

.sec-faq-trigger::after {
    content: '+';
    position: absolute;
    inset-inline-end: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-purple);
    font-weight: 700;
}

.sec-faq-item.is-open .sec-faq-trigger::after { content: '−'; }

.sec-faq-panel {
    padding: 0 1.1rem 1rem;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sec-faq-panel p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.55;
}

.sec-faq-panel[hidden] { display: none; }

/* Final CTA */
.sec-final-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: var(--sec-radius-lg);
    padding: clamp(1.85rem, 3.5vw, 2.75rem);
    text-align: center;
    max-width: 940px;
    margin: 0 auto;
    box-shadow: var(--sec-shadow);
    overflow: hidden;
}

.sec-final-mini {
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    width: 9.5rem;
    background: var(--white);
    border: 1px solid var(--sec-border);
    border-radius: 12px;
    box-shadow: var(--sec-shadow-sm);
    overflow: hidden;
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    transition: opacity 0.55s ease 0.2s, transform 0.55s ease 0.2s;
}

.sec-final-card.is-live .sec-final-mini {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.sec-final-mini-bar {
    font-size: 0.58rem;
    font-weight: 600;
    padding: 0.35rem 0.5rem;
    background: var(--sec-neutral);
    border-bottom: 1px solid var(--sec-border);
    color: var(--text-gray);
}

.sec-final-mini-body {
    padding: 0.55rem 0.6rem;
    font-size: 0.68rem;
    text-align: start;
}

.sec-final-mini-body p { margin: 0.35rem 0 0; color: var(--text-gray); font-size: 0.64rem; }

.sec-final-card .sec-section-head { max-width: 32rem; margin-inline: auto; }
.sec-final-card .sec-body { max-width: 34rem; margin: 0 auto 1.1rem; }
.sec-final-card .sec-hero-cta { justify-content: center; }

/* Responsive */
@media (max-width: 1024px) {
    .sec-pillar-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .sec-hero-grid,
    .sec-split {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sec-split--4060 { grid-template-columns: 1fr; }

    .sec-flow-track {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .sec-flow-arrow {
        justify-content: center;
        transform: rotate(-90deg);
        padding: 0.1rem 0;
    }

    .sec-final-mini { position: static; margin: 0 auto 1rem; width: 100%; max-width: 12rem; }

    .sec-matrix-table { font-size: 0.78rem; }
    .sec-matrix-table th,
    .sec-matrix-table td { padding: 0.55rem 0.35rem; }
}

@media (max-width: 640px) {
    .sec-hero-cta { flex-direction: column; }
    .sec-hero-cta .btn { width: 100%; justify-content: center; }
    .sec-scenario-tab { flex: 1 1 100%; text-align: center; }
    .sec-scenario-path { flex-direction: column; }
    .sec-scenario-path i { transform: rotate(-90deg); }
}

@media (prefers-reduced-motion: reduce) {
    .sec-reveal,
    .sec-arch-node,
    .sec-flow-step,
    .sec-layer,
    .sec-final-mini,
    .sec-scenario-path,
    .sec-pillar {
        transition: none;
        animation: none;
        opacity: 1;
        transform: none;
    }

    .sec-hero.is-live .sec-arch-line i::after { animation: none; }
    .sec-arch-node,
    .sec-flow-step,
    .sec-layer { opacity: 1; }
}
