/* ==========================================================================
   Page Variants - Injected sections styling
   For full-page variants v46+
   ========================================================================== */

/* ─── Scroll reveal base ─── */
.mill-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.mill-reveal.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Section enter (adaptive scroll) ─── */
.mill-section-enter {
    will-change: transform, opacity;
}

/* ─── Adaptive hero content ─── */
.mill-adaptive-hero {
    will-change: transform, opacity;
}

/* ─── Shared section styles ─── */
.pv-section {
    padding: 100px 0;
    position: relative;
}

/* ─── Features Grid ─── */
.pv-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
}
.pv-feature-card {
    padding: 32px 28px;
    border-radius: 16px;
    background: var(--gradient-surface);
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
}
.pv-feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(159, 122, 234, 0.12);
}
.pv-feature-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    margin-bottom: 20px;
}
.pv-feature-icon svg { width: 24px; height: 24px; }
.pv-feature-card h3 {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}
.pv-feature-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ─── Stats / Social Proof ─── */
.pv-stats { padding: 60px 0; }
.pv-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    text-align: center;
}
.pv-stat-value {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}
.pv-stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Use Cases ─── */
.pv-usecase-list {
    max-width: 720px;
    margin: 48px auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.pv-usecase {
    display: flex;
    gap: 20px;
    padding: 24px;
    border-radius: 12px;
    background: var(--gradient-surface);
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-normal);
}
.pv-usecase:hover { border-color: var(--color-primary); }
.pv-usecase-num {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
    width: 40px;
}
.pv-usecase-body h3 {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}
.pv-usecase-body p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ─── Comparison Table ─── */
.pv-cmp-table-wrap {
    max-width: 700px;
    margin: 48px auto 0;
    overflow-x: auto;
}
.pv-cmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.pv-cmp-table th, .pv-cmp-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.pv-cmp-table th {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pv-cmp-table td { color: var(--color-text-secondary); }
.pv-cmp-us {
    color: var(--color-primary) !important;
    font-weight: 600;
}

/* ─── Roadmap ─── */
.pv-roadmap-timeline {
    max-width: 600px;
    margin: 48px auto 0;
    position: relative;
    padding-left: 32px;
}
.pv-roadmap-timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 0; bottom: 0;
    width: 2px;
    background: var(--color-border);
}
.pv-roadmap-item {
    position: relative;
    padding-bottom: 32px;
}
.pv-roadmap-dot {
    position: absolute;
    left: -32px; top: 4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: var(--color-surface-solid);
    z-index: 1;
}
.pv-roadmap-done .pv-roadmap-dot {
    background: var(--color-primary);
    box-shadow: 0 0 12px var(--color-primary-glow);
}
.pv-roadmap-date {
    font-size: 0.75rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.pv-roadmap-content h4 {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 4px 0;
}
.pv-roadmap-content p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ─── FAQ ─── */
.pv-faq-list {
    max-width: 720px;
    margin: 48px auto 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pv-faq-item {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color var(--transition-normal);
}
.pv-faq-item:hover, .pv-faq-item.open { border-color: var(--color-primary); }
.pv-faq-q {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
}
.pv-faq-q::after {
    content: '+';
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}
.pv-faq-item.open .pv-faq-q::after { transform: rotate(45deg); }
.pv-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pv-faq-item.open .pv-faq-a { max-height: 300px; }
.pv-faq-a p {
    padding: 0 20px 18px;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ─── HIW Pipeline variant ─── */
.pv-hiw-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 48px;
    flex-wrap: wrap;
}
.pv-hiw-step {
    text-align: center;
    padding: 24px 20px;
    max-width: 200px;
}
.pv-hiw-step-icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    margin: 0 auto 16px;
}
.pv-hiw-step-icon svg { width: 28px; height: 28px; }
.pv-hiw-step h3 {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}
.pv-hiw-step p {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}
.pv-hiw-connector {
    width: 48px; height: 2px;
    background: var(--color-border);
    position: relative;
    flex-shrink: 0;
}
.pv-hiw-pulse {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    top: -3px;
    animation: pvPulseMove 2s ease-in-out infinite;
}
@keyframes pvPulseMove {
    0% { left: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: calc(100% - 8px); opacity: 0; }
}

/* ─── HIW Orbital variant ─── */
.pv-hiw-orbital {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    margin: 48px auto 0;
}
.pv-hiw-canvas {
    width: 100%; height: 100%;
    display: block;
}
.pv-hiw-center-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
    text-shadow: 0 0 20px var(--color-primary-glow);
    pointer-events: none;
}
.pv-hiw-orbit-labels {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}
.pv-hiw-orbit-label {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ─── HIW Layers variant ─── */
.pv-hiw-layers {
    max-width: 600px;
    margin: 48px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pv-hiw-layer {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    background: var(--gradient-surface);
    border: 1px solid var(--color-border);
}
.pv-hiw-layer-bar {
    width: 4px; height: 48px;
    border-radius: 2px;
    background: var(--layer-color, var(--color-primary));
    flex-shrink: 0;
}
.pv-hiw-layer-content h4 {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}
.pv-hiw-layer-content p {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .pv-section { padding: 60px 0; }
    .pv-feature-grid { grid-template-columns: 1fr; gap: 16px; }
    .pv-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .pv-hiw-pipeline { flex-direction: column; }
    .pv-hiw-connector { width: 2px; height: 32px; }
    .pv-hiw-pulse { animation-name: pvPulseMoveV; }
    @keyframes pvPulseMoveV {
        0% { top: 0; left: -3px; opacity: 0; }
        20% { opacity: 1; }
        80% { opacity: 1; }
        100% { top: calc(100% - 8px); left: -3px; opacity: 0; }
    }
    .pv-cmp-table { font-size: 0.8rem; }
    .pv-cmp-table th, .pv-cmp-table td { padding: 10px 12px; }
}
