/* ============================================
   EMAIL MARKETING FLOW — "Automation Pipeline"
   Page accent: #06B6D4 (Cyan)
   ============================================ */

/* ---------- Hero ---------- */
.email-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    overflow: hidden;
    background: radial-gradient(ellipse at 70% 30%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
}

.email-hero .pipeline-svg {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translate(0, -50%);
    width: 460px;
    height: 460px;
    opacity: 0.16;
    z-index: 0;
}

/* Automation Flow Diagram Animations */
.pipeline-node {
    fill: #000;
    stroke: #06B6D4;
    stroke-width: 2;
    transition: r 0.3s ease, fill 0.3s ease;
}

.pipeline-node.trigger {
    fill: #06B6D4;
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6));
    animation: trigger-pulse 2s infinite alternate;
}

.pipeline-node:hover {
    r: 10px;
    fill: #06B6D4;
    cursor: pointer;
}

.pipeline-path {
    stroke: #06B6D4;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: draw-path 3.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pipeline-path.branch-1 { animation-delay: 0.8s; }
.pipeline-path.branch-2 { animation-delay: 1.5s; }

@keyframes trigger-pulse {
    0% { filter: drop-shadow(0 0 3px rgba(6, 182, 212, 0.4)); }
    100% { filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.8)); }
}

@keyframes draw-path {
    to { stroke-dashoffset: 0; }
}

/* ---------- Stats Row ---------- */
.email-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.email-metric-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--space-md);
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.email-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #06B6D4, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.email-metric-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.05);
}

.email-metric-card:hover::before {
    opacity: 1;
}

.email-metric-card .metric-icon {
    color: #06B6D4;
    margin-bottom: var(--space-sm);
}

.email-metric-card .metric-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.email-metric-card .metric-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Interactive Email Journey Builder Visualizer ---------- */
.journey-container {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.journey-visual {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    padding: 1rem 0;
}

.journey-step-card {
    background: var(--color-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid #06B6D4;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.journey-step-card:hover {
    transform: translateX(4px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.08);
}

.journey-step-card h4 {
    margin: 0 0 0.25rem 0;
    color: #fff;
    font-size: 0.95rem;
}

.journey-step-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.journey-connector-line {
    position: absolute;
    left: 20px;
    top: 2rem;
    bottom: 2rem;
    width: 2px;
    background: rgba(6, 182, 212, 0.2);
    z-index: 1;
}

/* ---------- Subscriber LTV & Flow Revenue Calculator ---------- */
.retention-calculator {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: var(--space-lg);
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.retention-calculator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #06B6D4, #22d3ee, #06B6D4);
}

.calc-inputs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.calc-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.calc-field input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1.05rem;
    transition: border-color 0.3s ease;
}

.calc-field input:focus {
    outline: none;
    border-color: #06B6D4;
}

.calc-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.calc-result-item {
    text-align: center;
}

.calc-result-item .result-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #06B6D4;
}

.calc-result-item .result-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

/* ---------- Methodology Steps ---------- */
.email-methodology {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
    margin-top: var(--space-lg);
}

.email-methodology::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3), #06B6D4, rgba(6, 182, 212, 0.3), transparent);
}

.email-methodology-step {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 0.5rem;
}

.email-methodology-step .step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #06B6D4;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
    margin: 0 auto var(--space-sm);
    position: relative;
    z-index: 2;
}

.email-methodology-step h4 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: #fff;
}

.email-methodology-step p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
    max-width: 100%;
}

/* ---------- FAQ Accordion ---------- */
.email-faq details {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
}

.email-faq details summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    transition: color 0.3s ease;
}

.email-faq details summary::-webkit-details-marker { display: none; }

.email-faq details summary::after {
    content: '+';
    font-size: 1.5rem;
    color: #06B6D4;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.email-faq details[open] summary::after {
    transform: rotate(45deg);
}

.email-faq details summary:hover { color: #06B6D4; }

.email-faq details .faq-answer {
    padding-top: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 90%;
}

/* ---------- CTA ---------- */
.email-cta {
    text-align: center;
    padding: var(--space-xl) 0;
    background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
    border-top: 1px solid var(--color-border);
}

.email-cta .btn-primary {
    background: #06B6D4;
    color: #000;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.email-cta .btn-primary:hover {
    background: transparent;
    color: #06B6D4;
    border: 1px solid #06B6D4;
}

/* ---------- Section Label ---------- */
.email-label {
    color: #06B6D4;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
    display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .email-stats-row { grid-template-columns: repeat(2, 1fr); }
    .email-methodology { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
    .email-methodology::before { display: none; }
    .calc-inputs { grid-template-columns: repeat(2, 1fr); }
    .calc-results { grid-template-columns: 1fr; }
    .email-hero .pipeline-svg { display: none; }
}

@media (max-width: 768px) {
    .email-stats-row { grid-template-columns: 1fr; }
    .email-methodology { grid-template-columns: 1fr; }
    .calc-inputs { grid-template-columns: 1fr; }
}
