/* ============================================================
   HOMEPAGE SECTIONS — ported from the Peruvian staging site
   (fu7uro.space). Provides:
     - .impl-options-section  (Implementation Options, 3 cards)
     - .industry-showcase     (live-call grid, added separately)
   ============================================================ */

/* ===== IMPLEMENTATION OPTIONS ===== */
.impl-options-section {
    padding: 52px 0 80px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.impl-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.impl-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 18px;
}

.impl-title span {
    background: linear-gradient(135deg, #ec4899, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.impl-subtitle {
    font-size: 1.05rem;
    color: #475569;
    max-width: 640px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.impl-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 900px) {
    .impl-cards { grid-template-columns: 1fr; max-width: 520px; }
}

.impl-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.impl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ec4899, #a855f7);
}

.impl-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(168, 85, 247, 0.12);
}

.impl-icon-area {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.04), rgba(168, 85, 247, 0.07));
    padding: 28px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(168, 85, 247, 0.08);
    height: 190px;
}

.impl-svg {
    width: 100%;
    max-width: 200px;
    height: 150px;
    overflow: visible;
}

.impl-card-content {
    padding: 24px 26px 28px;
}

.impl-option-num {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ec4899, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.impl-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.3;
}

.impl-card-desc {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.75;
}

/* ===== IMPL ANIMATIONS: Card 1 - Conditional Forwarding ===== */
@keyframes phoneRing {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    5%  { transform: rotate(-10deg) translateX(-2px); }
    10% { transform: rotate(10deg)  translateX(2px);  }
    15% { transform: rotate(-10deg) translateX(-2px); }
    20% { transform: rotate(10deg)  translateX(2px);  }
    25% { transform: rotate(0deg)   translateX(0);    }
}

@keyframes waveRing {
    0%   { opacity: 0.8; transform: scale(1); }
    60%  { opacity: 0; transform: scale(1.7); }
    100% { opacity: 0; transform: scale(1.7); }
}

@keyframes transferIn {
    0%, 30%   { opacity: 0; transform: translateX(-6px); }
    50%, 80%  { opacity: 1; transform: translateX(0); }
    95%, 100% { opacity: 0; }
}

@keyframes agentIn {
    0%, 42%   { opacity: 0; transform: scale(0.6); }
    62%, 85%  { opacity: 1; transform: scale(1); }
    95%, 100% { opacity: 0; transform: scale(0.9); }
}

.impl-card:nth-child(1) .phone-body {
    animation: phoneRing 5s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.impl-card:nth-child(1) .ring-wave.w1 {
    animation: waveRing 5s ease-in-out infinite 0.2s;
    transform-box: fill-box;
    transform-origin: center;
}

.impl-card:nth-child(1) .ring-wave.w2 {
    animation: waveRing 5s ease-in-out infinite 0.5s;
    transform-box: fill-box;
    transform-origin: center;
}

.impl-card:nth-child(1) .transfer-group {
    animation: transferIn 5s ease-in-out infinite;
}

.impl-card:nth-child(1) .agent-icon {
    animation: agentIn 5s ease-in-out infinite;
}

/* ===== IMPL ANIMATIONS: Card 2 - After Hours ===== */
@keyframes signShowOpen {
    0%, 38%  { opacity: 1; transform: scaleX(1); }
    45%      { opacity: 0; transform: scaleX(0.05); }
    100%     { opacity: 0; transform: scaleX(0.05); }
}

@keyframes signShowClosed {
    0%, 45%  { opacity: 0; transform: scaleX(0.05); }
    52%      { opacity: 1; transform: scaleX(1); }
    100%     { opacity: 1; transform: scaleX(1); }
}

@keyframes moonRise {
    0%, 48%  { opacity: 0; transform: translateY(6px); }
    62%, 90% { opacity: 0.85; transform: translateY(0); }
    100%     { opacity: 0.85; transform: translateY(0); }
}

@keyframes starsTwinkle {
    0%, 50%   { opacity: 0; }
    65%       { opacity: 1; }
    80%       { opacity: 0.5; }
    90%, 100% { opacity: 1; }
}

.impl-card:nth-child(2) .sign-open {
    animation: signShowOpen 6s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.impl-card:nth-child(2) .sign-closed {
    animation: signShowClosed 6s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.impl-card:nth-child(2) .moon-icon {
    animation: moonRise 6s ease-in-out infinite;
}

.impl-card:nth-child(2) .stars-icon {
    animation: starsTwinkle 6s ease-in-out infinite 0.4s;
}

/* ===== IMPL ANIMATIONS: Card 3 - Full Integration ===== */
@keyframes dashFlow {
    0%   { stroke-dashoffset: 80;  opacity: 0.4; }
    50%  { stroke-dashoffset: 0;   opacity: 1;   }
    100% { stroke-dashoffset: -80; opacity: 0.4; }
}

@keyframes outerPulse {
    0%, 100% { opacity: 0.08; transform: scale(1); }
    50%      { opacity: 0.22; transform: scale(1.18); }
}

@keyframes innerPulse {
    0%, 100% { opacity: 0.18; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(1.08); }
}

.impl-card:nth-child(3) .dl1 { animation: dashFlow 2.8s linear infinite 0s;   }
.impl-card:nth-child(3) .dl2 { animation: dashFlow 2.8s linear infinite 0.5s; }
.impl-card:nth-child(3) .dl3 { animation: dashFlow 2.8s linear infinite 1s;   }
.impl-card:nth-child(3) .dl4 { animation: dashFlow 2.8s linear infinite 1.5s; }

.impl-card:nth-child(3) .center-pulse-outer {
    animation: outerPulse 2.8s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.impl-card:nth-child(3) .center-pulse {
    animation: innerPulse 2.8s ease-in-out infinite 0.3s;
    transform-box: fill-box;
    transform-origin: center;
}

/* ============================================================
   INDUSTRY SHOWCASE — per-industry live call grid
   Uses CSS :has() to drive card-level glow from the shared
   agent-call helper's .agent-call-active class on the button.
   ============================================================ */
.industry-showcase {
    background: #07070f;
    padding: 88px 0 90px;
    position: relative;
    overflow: hidden;
}
.industry-showcase::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(ellipse, rgba(139,92,246,0.07) 0%, transparent 65%);
    pointer-events: none;
}

.isc-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 999px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.22);
    color: #34d399;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 44px;
}
.isc-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
    animation: iscLivePulse 2s ease-in-out infinite;
}
@keyframes iscLivePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    50% { opacity: 0.6; transform: scale(0.85); box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}

.isc-headline {
    font-size: clamp(2.1rem, 5vw, 4rem);
    font-weight: 900;
    color: white;
    line-height: 1.1;
    margin-bottom: 18px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: -0.01em;
}
.isc-headline em {
    font-style: normal;
    background: linear-gradient(90deg, #53DBF2, #CE9EEC, #3A7FF2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.isc-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.45);
    max-width: 520px;
    margin: 0 auto 64px;
    line-height: 1.7;
}

.isc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1080px;
    margin: 0 auto;
    align-items: start;
}
@media (max-width: 900px) { .isc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .isc-grid { grid-template-columns: 1fr; } }

.isc-card {
    background: rgba(255,255,255,0.022);
    border: 1px solid var(--accent-border);
    border-top: 3px solid var(--accent);
    border-radius: 18px;
    padding: 30px 22px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
    box-shadow: 0 4px 28px var(--accent-glow), 0 1px 4px rgba(0,0,0,0.5);
}
.isc-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
    opacity: 0.75;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.isc-card:hover {
    transform: translateY(-7px);
    background: rgba(255,255,255,0.042);
    border-color: var(--accent-border);
    box-shadow: 0 24px 64px rgba(0,0,0,0.45), 0 0 0 1px var(--accent-border);
}
.isc-card:hover::after { opacity: 1; }

.isc-card:has(.isc-call-btn.agent-call-active) {
    border-color: var(--accent) !important;
    background: rgba(255,255,255,0.04) !important;
    animation: iscCardGlow 2.5s ease-in-out infinite;
}
@keyframes iscCardGlow {
    0%, 100% { box-shadow: 0 0 0 2px var(--accent-border), 0 16px 48px rgba(0,0,0,0.4); }
    50% { box-shadow: 0 0 0 3px var(--accent), 0 0 36px var(--accent-glow), 0 16px 48px rgba(0,0,0,0.4); }
}

.isc-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}
.isc-card:hover .isc-icon-wrap {
    transform: scale(1.12);
    box-shadow: 0 0 22px var(--accent-glow);
}
.isc-icon-wrap i { font-size: 1.6rem; color: var(--accent); }

.isc-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.isc-metric {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}
.isc-metric-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.32);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

/* Benefits block — collapsed by default, expands on hover (desktop) or
   when JS adds .isc-expanded (mobile tap). Placed between metric-label
   and the call button so the CTA always sits flush to the card bottom. */
.isc-benefits {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    text-align: left;
    position: relative;
    z-index: 1;
    margin: 0;
    transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.32s ease,
                margin 0.32s ease;
}
.isc-pain {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
    margin: 0 0 12px;
    padding: 14px 0 0;
    border-top: 1px solid var(--accent-border);
    font-weight: 500;
}
.isc-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.isc-features li {
    position: relative;
    padding-left: 22px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.55;
    margin-bottom: 8px;
}
.isc-features li:last-child { margin-bottom: 0; }
.isc-features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent);
    font-size: 0.78rem;
}

/* Hover-expand (desktop) — only activated on devices that actually hover.
   Touch devices use the .isc-expanded class driven by JS tap-to-toggle. */
@media (hover: hover) {
    .isc-card:hover .isc-benefits,
    .isc-card:focus-within .isc-benefits {
        max-height: 360px;
        opacity: 1;
        margin-bottom: 14px;
    }
}
.isc-card.isc-expanded .isc-benefits {
    max-height: 360px;
    opacity: 1;
    margin-bottom: 14px;
}

/* Amplified glow when the card is expanded — pulls attention without
   overpowering the neighbor cards in the same row. */
@media (hover: hover) {
    .isc-card:hover {
        box-shadow:
            0 26px 64px rgba(0, 0, 0, 0.5),
            0 0 0 1px var(--accent),
            0 0 48px var(--accent-glow);
    }
}
.isc-card.isc-expanded {
    transform: translateY(-7px);
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--accent);
    box-shadow:
        0 26px 64px rgba(0, 0, 0, 0.5),
        0 0 0 1px var(--accent),
        0 0 48px var(--accent-glow);
}

.isc-call-btn {
    width: 100%;
    padding: 13px 16px;
    border-radius: 999px;
    border: 1px solid var(--accent-border);
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, var(--accent-bg) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: auto;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    text-shadow: none;
}
.isc-call-btn::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transition: left 0.5s ease;
}
.isc-call-btn:hover::before { left: 100%; }
.isc-call-btn:hover {
    transform: scale(1.04);
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, var(--accent-bg) 100%);
    box-shadow: 0 8px 26px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
    border-color: var(--accent);
}
.isc-call-btn.agent-call-connecting {
    opacity: 0.75;
    pointer-events: none;
    color: rgba(255,255,255,0.85);
}
/* Active state takes precedence over per-accent colors */
.isc-call-btn.agent-call-active {
    background: linear-gradient(90deg, #dc2626, #ef4444) !important;
    border-color: rgba(239,68,68,0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(239,68,68,0.35);
}

.isc-footer-note {
    text-align: center;
    color: rgba(255,255,255,0.18);
    font-size: 0.76rem;
    margin-top: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
