/* ───────────── Security Page ───────────── */

.security-hero {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    overflow: hidden;
}

.security-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 400px at 15% 20%, rgba(59, 130, 246, 0.12), transparent 60%),
        radial-gradient(700px 400px at 85% 80%, rgba(37, 99, 235, 0.08), transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.security-hero-inner {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 56px;
    align-items: center;
}

@media (max-width: 840px) {
    .security-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
}

/* ── Shield stage + assembly animation ── */
.shield-stage {
    position: relative;
    width: 280px;
    height: 320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shield-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 20px 40px rgba(37, 99, 235, 0.35));
}

.shield-aura {
    transform-origin: center;
    opacity: 0;
    animation: aura-in 0.6s ease-out 1.6s forwards, aura-breathe 4s ease-in-out 2.2s infinite;
}

@keyframes aura-in {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 0.7; transform: scale(1); }
}

@keyframes aura-breathe {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 0.85; transform: scale(1.04); }
}

.shield-body .shield-piece {
    opacity: 0;
    transform-origin: 80px 90px;
}

/* Four pieces fly in from four corners */
.shield-piece-tl { animation: piece-tl 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards; }
.shield-piece-tr { animation: piece-tr 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s forwards; }
.shield-piece-bl { animation: piece-bl 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards; }
.shield-piece-br { animation: piece-br 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s forwards; }

@keyframes piece-tl {
    from { opacity: 0; transform: translate(-80px, -60px) rotate(-25deg); }
    to   { opacity: 1; transform: translate(0, 0) rotate(0); }
}
@keyframes piece-tr {
    from { opacity: 0; transform: translate(80px, -60px) rotate(25deg); }
    to   { opacity: 1; transform: translate(0, 0) rotate(0); }
}
@keyframes piece-bl {
    from { opacity: 0; transform: translate(-80px, 80px) rotate(25deg); }
    to   { opacity: 1; transform: translate(0, 0) rotate(0); }
}
@keyframes piece-br {
    from { opacity: 0; transform: translate(80px, 80px) rotate(-25deg); }
    to   { opacity: 1; transform: translate(0, 0) rotate(0); }
}

.shield-border {
    opacity: 0;
    animation: border-in 0.5s ease-out 1.3s forwards;
}

@keyframes border-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Checkmark draws itself once shield is assembled */
.shield-check {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    opacity: 0;
    animation:
        check-appear 0.01s linear 1.5s forwards,
        check-draw 0.6s cubic-bezier(0.65, 0, 0.35, 1) 1.5s forwards;
}

@keyframes check-appear {
    to { opacity: 1; }
}
@keyframes check-draw {
    from { stroke-dashoffset: 120; }
    to   { stroke-dashoffset: 0; }
}

/* Outward-pulsing rings during assembly */
.shield-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 140px;
    height: 140px;
    margin-left: -70px;
    margin-top: -70px;
    border-radius: 50%;
    border: 2px solid rgba(96, 165, 250, 0.5);
    opacity: 0;
    pointer-events: none;
}

.shield-ring-1 { animation: ring-pulse 2.2s ease-out 1.6s infinite; }
.shield-ring-2 { animation: ring-pulse 2.2s ease-out 2.3s infinite; }
.shield-ring-3 { animation: ring-pulse 2.2s ease-out 3.0s infinite; }

@keyframes ring-pulse {
    0%   { opacity: 0.7; transform: scale(0.6); }
    70%  { opacity: 0;   transform: scale(1.6); }
    100% { opacity: 0;   transform: scale(1.6); }
}

/* ── Mission copy ── */
.security-mission {
    animation: mission-in 0.6s ease-out 1.8s both;
}

@keyframes mission-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.security-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #60a5fa;
    padding: 5px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 100px;
    margin-bottom: 18px;
}

.security-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 18px;
}

@media (max-width: 640px) {
    .security-title { font-size: 1.75rem; }
}

.security-lede {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 32px;
}

.security-lede strong {
    color: #bfdbfe;
    font-weight: 600;
}

/* ── Pillars ── */
.security-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.pillar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.pillar:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.35);
    background: var(--bg-card-hover);
}

.pillar-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.pillar-icon svg { width: 22px; height: 22px; }

.pillar h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.pillar p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ── Listing area (reuses blog grid) ── */
.security-posts {
    animation: posts-in 0.5s ease-out 2.2s both;
}

@keyframes posts-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.security-card::before {
    background: linear-gradient(90deg, transparent, #60a5fa, transparent) !important;
}

.security-card:hover {
    border-color: rgba(96, 165, 250, 0.4) !important;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .shield-aura,
    .shield-body .shield-piece,
    .shield-border,
    .shield-check,
    .shield-ring,
    .security-mission,
    .security-posts {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
    }
}
