/* ============================================================
   Eagle Doc APIs Page — Page-Specific Styles
   ============================================================ */


/* ── 0. Hero Enhancements ──────────────────────────────────── */

/* Hero badge */
.apis-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #1a2f6e;
    background: rgba(26, 47, 110, 0.08);
    border: 1px solid rgba(26, 47, 110, 0.15);
    margin-bottom: 16px;
    animation: apisBadgeFadeIn 0.6s ease-out both;
}

@keyframes apisBadgeFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ── 1. Floating 3D Parallax Document Cards ─────────────────
   Four document cards float at different z-depths in a 3D
   perspective space, responding to mouse movement.
   ────────────────────────────────────────────────────────── */

.apis-parallax-scene {
    position: relative;
    width: 100%;
    height: 400px;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    transform-style: preserve-3d;
}

/* ── Shared card base ── */
.apis-float-card {
    position: absolute;
    width: 180px;
    background: #fff;
    border-radius: 16px;
    padding: 20px 18px 18px;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    will-change: transform;
    transform-style: preserve-3d;
    cursor: default;
    border: 1px solid rgba(26, 47, 110, 0.08);
}

.apis-float-card:hover {
    z-index: 20 !important;
    box-shadow:
        0 16px 48px rgba(26, 47, 110, 0.22),
        0 4px 16px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-6px) scale(1.03) !important;
}

/* ── Card positions + idle float animations ── */
.apis-float-card--invoice {
    top: 15%;
    left: 8%;
    z-index: 4;
    box-shadow:
        0 8px 40px rgba(26, 47, 110, 0.18),
        0 2px 12px rgba(0, 0, 0, 0.06);
    animation: apisFloat1 6s ease-in-out infinite, apisCardEntry 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.apis-float-card--receipt {
    top: 5%;
    right: 10%;
    z-index: 3;
    box-shadow:
        0 6px 32px rgba(6, 182, 212, 0.16),
        0 2px 10px rgba(0, 0, 0, 0.05);
    animation: apisFloat2 7s ease-in-out infinite, apisCardEntry 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.12s both;
}

.apis-float-card--bank {
    bottom: 8%;
    left: 18%;
    z-index: 2;
    box-shadow:
        0 6px 32px rgba(124, 58, 237, 0.16),
        0 2px 10px rgba(0, 0, 0, 0.05);
    animation: apisFloat3 8s ease-in-out infinite, apisCardEntry 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.24s both;
}

.apis-float-card--passport {
    bottom: 12%;
    right: 5%;
    z-index: 3;
    box-shadow:
        0 6px 32px rgba(20, 184, 166, 0.16),
        0 2px 10px rgba(0, 0, 0, 0.05);
    animation: apisFloat4 6.5s ease-in-out infinite, apisCardEntry 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.36s both;
}

/* ── Idle floating keyframes ── */
@keyframes apisFloat1 {
    0%, 100% { transform: translateY(0) rotateX(2deg) rotateY(-3deg); }
    50%      { transform: translateY(-12px) rotateX(-1deg) rotateY(-1deg); }
}
@keyframes apisFloat2 {
    0%, 100% { transform: translateY(0) rotateX(-1deg) rotateY(4deg); }
    50%      { transform: translateY(-10px) rotateX(2deg) rotateY(2deg); }
}
@keyframes apisFloat3 {
    0%, 100% { transform: translateY(0) rotateX(1deg) rotateY(2deg); }
    50%      { transform: translateY(-14px) rotateX(-2deg) rotateY(-2deg); }
}
@keyframes apisFloat4 {
    0%, 100% { transform: translateY(0) rotateX(-2deg) rotateY(-2deg); }
    50%      { transform: translateY(-10px) rotateX(1deg) rotateY(3deg); }
}

@keyframes apisCardEntry {
    from { opacity: 0; transform: translateY(60px) rotateX(15deg) scale(0.85); }
    to   { opacity: 1; transform: translateY(0)    rotateX(0)     scale(1);    }
}

/* ── Card icon ── */
.apis-float-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 10px;
}

.apis-float-card--invoice .apis-float-card__icon  { background: rgba(26, 47, 110, 0.10); color: #1a2f6e; }
.apis-float-card--receipt .apis-float-card__icon   { background: rgba(6, 182, 212, 0.10);  color: #06b6d4; }
.apis-float-card--bank .apis-float-card__icon      { background: rgba(124, 58, 237, 0.10); color: #7c3aed; }
.apis-float-card--passport .apis-float-card__icon  { background: rgba(20, 184, 166, 0.10); color: #14b8a6; }

/* ── Card label ── */
.apis-float-card__label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.01em;
    margin-bottom: 10px;
}

/* ── Skeleton lines ── */
.apis-float-card__lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.apis-float-card__lines span {
    display: block;
    height: 5px;
    background: #e5e7eb;
    border-radius: 2px;
}

/* ── Badge ── */
.apis-float-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.apis-float-card__badge--green  { background: rgba(16, 185, 129, 0.12); color: #059669; }
.apis-float-card__badge--blue   { background: rgba(6, 182, 212, 0.12);  color: #0891b2; }
.apis-float-card__badge--purple { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.apis-float-card__badge--teal   { background: rgba(20, 184, 166, 0.12); color: #0d9488; }

/* ── Decorative glow orb ── */
.apis-parallax-orb {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(26, 47, 110, 0.18) 0%,
        rgba(99, 102, 241, 0.06) 50%,
        transparent 72%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
    animation: apisOrbPulse 5s ease-in-out infinite;
}

@keyframes apisOrbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
    50%      { transform: translate(-50%, -50%) scale(1.2); opacity: 1;   }
}

/* ── Hover lift effect — merged into .apis-float-card:hover above ── */

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
    .apis-float-card,
    .apis-parallax-orb {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
    .apis-float-card--invoice  { transform: rotateX(2deg) rotateY(-3deg); }
    .apis-float-card--receipt  { transform: rotateX(-1deg) rotateY(4deg); }
    .apis-float-card--bank     { transform: rotateX(1deg) rotateY(2deg); }
    .apis-float-card--passport { transform: rotateX(-2deg) rotateY(-2deg); }
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .apis-parallax-scene {
        height: 340px;
        perspective: 900px;
    }
    .apis-float-card { width: 156px; padding: 16px 14px 14px; }
    .apis-float-card--invoice  { top: 12%; left: 5%;  }
    .apis-float-card--receipt  { top: 3%;  right: 5%; }
    .apis-float-card--bank     { bottom: 5%; left: 12%; }
    .apis-float-card--passport { bottom: 8%; right: 2%; }
}

@media (max-width: 767px) {
    .apis-parallax-scene { display: none; }
}


/* ── 2. Benefits section icon override (FontAwesome <i> elements) ── */

/* Match .invoice-step-icon — uniform brand colour on brand-light background */
.benefits-icon {
    background: var(--color-brand-light);
}

.benefits-icon i {
    font-size: 26px;
    color: var(--color-brand);
    display: block;
}


/* ── 3. Explainer Section ──────────────────────────────────── */

.apis-explainer-section {
    padding: 80px 0 72px;
    background: var(--color-bg);
}

/* ── Header block: label + title + subtitle ── */
.apis-explainer-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 48px;
}

.apis-section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #1a2f6e;
    background: rgba(26, 47, 110, 0.08);
    border: 1px solid rgba(26, 47, 110, 0.12);
    margin-bottom: 16px;
}

.apis-explainer-header h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.apis-explainer-lead {
    font-size: 1.0625rem;
    color: var(--color-text-muted);
    line-height: 1.75;
    margin: 0;
}

/* ── 6-card fact grid ── */
.apis-facts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}

.apis-fact-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.apis-fact-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 32px rgba(26, 47, 110, 0.10),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

.apis-fact-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 14px;
}

.apis-fact-icon--indigo  { background: rgba(26, 47, 110, 0.10);  color: #1a2f6e; }
.apis-fact-icon--cyan    { background: rgba(6, 182, 212, 0.10);   color: #06b6d4; }
.apis-fact-icon--purple  { background: rgba(124, 58, 237, 0.10);  color: #7c3aed; }
.apis-fact-icon--teal    { background: rgba(20, 184, 166, 0.10);  color: #14b8a6; }
.apis-fact-icon--emerald { background: rgba(16, 185, 129, 0.10);  color: #059669; }
.apis-fact-icon--blue    { background: rgba(59, 130, 246, 0.10);  color: #3b82f6; }

.apis-fact-card .apis-fact-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #222222;
    line-height: 1.45;
    margin: 0;
}

@media (max-width: 767px) {
    .apis-facts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .apis-fact-card {
        padding: 22px 16px;
    }
}

@media (max-width: 480px) {
    .apis-facts-grid {
        grid-template-columns: 1fr;
    }
}


/* ── 4. CTA Buttons ────────────────────────────────────────── */

.apis-cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}


/* ── 5. Complete API Suite — 7-card JSON showcase grid ─────── */

.apis-cap-section {
    padding: 80px 0;
    background: #f7f7fc;
}

.apis-cap-section > .container > h2 {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.apis-cap-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    max-width: 680px;
    margin: 0 auto 48px;
}

.apis-cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.apis-cap-card {
    border-radius: 16px;
    border: 1px solid var(--color-border);
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.apis-cap-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

/* ── Card header ── */
.apis-cap-header {
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.apis-cap-header-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.apis-cap-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.apis-cap-card--receipt   .apis-cap-icon { background: #d1fae5; color: #059669; }
.apis-cap-card--invoice   .apis-cap-icon { background: #ede9fe; color: #1a2f6e; }
.apis-cap-card--bankstmt  .apis-cap-icon { background: #e0f2fe; color: #0369a1; }
.apis-cap-card--resume    .apis-cap-icon { background: #fef3c7; color: #d97706; }
.apis-cap-card--idcard    .apis-cap-icon { background: #ccfbf1; color: #0d9488; }
.apis-cap-card--anydoc   .apis-cap-icon { background: #f0fdf4; color: #16a34a; }
.apis-cap-card--sigext    .apis-cap-icon { background: #fce7f3; color: #db2777; }

.apis-cap-header-text h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 4px;
}

.apis-cap-header-text p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

.apis-cap-learn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-brand);
    text-decoration: none;
}

.apis-cap-learn:hover {
    text-decoration: underline;
    color: var(--color-brand-hover);
}

/* ── Dark JSON preview panel ── */
.apis-cap-json {
    background: #0f172a;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Browser-chrome dots via multi-background */
.apis-cap-json::before {
    content: '';
    display: block;
    height: 32px;
    background-color: #1e293b;
    background-image:
        radial-gradient(circle, #ef4444 0, #ef4444 4px, transparent 4px),
        radial-gradient(circle, #f59e0b 0, #f59e0b 4px, transparent 4px),
        radial-gradient(circle, #22c55e 0, #22c55e 4px, transparent 4px);
    background-size: 10px 10px, 10px 10px, 10px 10px;
    background-repeat: no-repeat;
    background-position: 14px 50%, 30px 50%, 46px 50%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.apis-cap-json-filename {
    font-size: 0.6rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.06em;
    font-family: 'Courier New', monospace;
    padding: 10px 16px 4px;
}

.apis-cap-json-body {
    padding: 0 16px 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

/* Each JSON line: one-shot staggered slide-in on page load */
.apis-cap-json-line {
    font-size: 0.72rem;
    font-family: 'Courier New', Courier, monospace;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    animation-name: apisCapLineFadeIn;
    animation-duration: 0.35s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
}

@keyframes apisCapLineFadeIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0);    }
}

/* Syntax colour tokens */
.apis-cap-json-line .k { color: #7dd3fc; } /* key    — sky blue  */
.apis-cap-json-line .s { color: #86efac; } /* string — green     */
.apis-cap-json-line .n { color: #fdba74; } /* number — orange    */
.apis-cap-json-line .b { color: #f8fafc; } /* brace/punct        */

/* Staggered delays: 9 lines × 0.14 s apart */
.apis-cap-json-line:nth-child(1) { animation-delay: 0.10s; }
.apis-cap-json-line:nth-child(2) { animation-delay: 0.24s; }
.apis-cap-json-line:nth-child(3) { animation-delay: 0.38s; }
.apis-cap-json-line:nth-child(4) { animation-delay: 0.52s; }
.apis-cap-json-line:nth-child(5) { animation-delay: 0.66s; }
.apis-cap-json-line:nth-child(6) { animation-delay: 0.80s; }
.apis-cap-json-line:nth-child(7) { animation-delay: 0.94s; }
.apis-cap-json-line:nth-child(8) { animation-delay: 1.08s; }
.apis-cap-json-line:nth-child(9) { animation-delay: 1.22s; }

/* ── Field-name chips (inside dark panel) ── */
.apis-cap-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px 16px;
}

.apis-cap-chip {
    font-size: 0.65rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.apis-cap-card--receipt  .apis-cap-chip { background: rgba(5,   150, 105, 0.18); color: #6ee7b7; }
.apis-cap-card--invoice  .apis-cap-chip { background: rgba(79,   70, 229, 0.18); color: #a5b4fc; }
.apis-cap-card--bankstmt .apis-cap-chip { background: rgba(3,   105, 161, 0.18); color: #7dd3fc; }
.apis-cap-card--resume   .apis-cap-chip { background: rgba(217, 119,   6, 0.18); color: #fcd34d; }
.apis-cap-card--idcard   .apis-cap-chip { background: rgba(13,  148, 136, 0.18); color: #5eead4; }
.apis-cap-card--anydoc   .apis-cap-chip { background: rgba(22,  163,  74, 0.18); color: #86efac; }
.apis-cap-card--sigext   .apis-cap-chip { background: rgba(219,  39, 119, 0.18); color: #f9a8d4; }

/* ── Use-case badges (light chips inside card header) ── */
.apis-cap-usecases {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.apis-cap-usecase {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 100px;
    background: var(--color-bg-subtle, #f1f1f9);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .apis-cap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .apis-cap-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .apis-cap-json-line {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .apis-cap-card:hover {
        transform: none;
    }
}


/* ── 6. Industries section ─────────────────────────────────── */

.apis-industries-section {
    padding: 80px 0;
    background: #f7f7fc;
}

.apis-industries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.apis-industry-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 24px;
}

.apis-industry-icon {
    width: 44px;
    height: 44px;
    background: var(--color-brand-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--color-brand);
    margin-bottom: 14px;
}

.apis-industry-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.apis-industry-card p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

@media (max-width: 900px) {
    .apis-industries-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .apis-industries-grid { grid-template-columns: 1fr; }
}


/* ── 7. Data Privacy (compact) ─────────────────────────────── */

.apis-privacy-section {
    padding: 48px 0;
}

.apis-privacy-section h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--color-text);
}

.apis-privacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.apis-privacy-card {
    background: var(--color-surface);
    border-radius: 10px;
    padding: 24px 20px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apis-privacy-card:hover {
    border-color: var(--color-border-strong);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.apis-privacy-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--color-brand-light);
}

.apis-privacy-icon i {
    font-size: 18px;
    color: var(--color-brand);
}

.apis-privacy-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.apis-privacy-card p {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .apis-privacy-grid,
    .apis-benefits-grid { grid-template-columns: 1fr; gap: 16px; }
    .apis-privacy-section,
    .apis-benefits-section { padding: 36px 0; }
}


/* ── 8. Key Benefits (compact) ─────────────────────────────── */

.apis-benefits-section {
    padding: 48px 0;
}

.apis-benefits-section h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--color-text);
}

.apis-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .apis-benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .apis-benefits-grid { grid-template-columns: 1fr; }
}
