/* ============================================
   PowerEase Custom Homepage Styles
   All styles scoped with .pe- prefix — no global pollution
   ============================================ */

.pe-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0d2a05 0%, #1a4a2a 50%, #0d2a05 100%);
    color: #fff;
}

.pe-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(254, 194, 6, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 144, 217, 0.1) 0%, transparent 40%);
}

.pe-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.pe-hero-content {
    max-width: 700px;
}

.pe-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.pe-badge-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pe-pulse 2s infinite;
}

@keyframes pe-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.pe-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.pe-gradient-text {
    background: linear-gradient(135deg, #FEC206 0%, #FEC206 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pe-hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
}

.pe-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.pe-btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.pe-btn-primary {
    background: linear-gradient(135deg, #FEC206 0%, #FEC206 100%);
    color: #0d2a05;
}

.pe-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(254, 194, 6, 0.3);
}

.pe-btn-ghost {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.pe-btn-ghost:hover {
    background: rgba(255,255,255,0.2);
}

.pe-btn-light {
    background: #fff;
    color: #0d2a05;
}

.pe-btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.pe-btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
}

.pe-hero-stats {
    display: flex;
    gap: 3rem;
}

.pe-stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #FEC206;
    font-variant-numeric: tabular-nums;
}

.pe-stat span {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.pe-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.pe-scroll-hint span {
    display: block;
    width: 2px;
    height: 40px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.pe-scroll-hint span::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: #FEC206;
    animation: pe-scroll 2s infinite;
}

@keyframes pe-scroll {
    0% { top: -20px; }
    100% { top: 40px; }
}

/* Sections */
.pe-section {
    padding: 6rem 0;
}

.pe-white { background: #fff; }
.pe-gray { background: #f8f9fa; }

.pe-section-head {
    text-align: center;
    margin-bottom: 3.5rem;
}

.pe-eyebrow {
    display: inline-block;
    color: #FEC206;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.pe-section-head h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.pe-section-head p {
    font-size: 1.1rem;
    color: #666;
}

/* Cards */
.pe-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.pe-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 18px;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.pe-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.pe-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.pe-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.pe-card p {
    color: #666;
    line-height: 1.6;
}

/* Tiles */
.pe-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.pe-tile {
    background: #fff;
    padding: 1.5rem;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.pe-tile:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: #FEC206;
}

.pe-tile-icon {
    flex: 0 0 4rem;
    width: 4rem;
    height: 4rem;
}

.pe-tile-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pe-tile-body {
    flex: 1 1 auto;
    min-width: 0;
}

.pe-tile h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: #1a1a1a;
}

.pe-tile p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.pe-tile-link {
    color: #FEC206;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Features - Why PowerEase */
.pe-section-head-narrow {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.pe-section-head-narrow h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.pe-features-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.pe-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
    background: #f7f8f5;
    border: 1px solid rgba(13, 42, 5, 0.08);
    border-radius: 18px;
    padding: 1.35rem 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pe-feature-item:hover {
    box-shadow: 0 16px 32px rgba(13, 42, 5, 0.08);
}

.pe-feature-icon {
    flex: 0 0 4rem;
    width: 4rem;
    height: 4rem;
}

.pe-feature-icon img {
    width: 100%;
    height: auto;
    display: block;
}

.pe-feature-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.35rem;
}

.pe-feature-body p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #666;
    margin: 0;
}

/* Official Distributor */
.pe-distributor {
    position: relative;
    background: linear-gradient(135deg, #091a3a 0%, #0c2b5c 50%, #0a1f45 100%);
    color: #fff;
    overflow: hidden;
    padding: 5rem 0;
}

.pe-distributor-stars {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.9) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.6) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 48px 48px, 72px 72px, 96px 96px;
    background-position: 0 0, 24px 24px, 12px 12px;
    pointer-events: none;
}

.pe-distributor-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.pe-distributor-content {
    max-width: 520px;
}

.pe-distributor-badge {
    width: 4.25rem;
    height: 4.25rem;
    margin-bottom: 1.25rem;
}

.pe-distributor-badge svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pe-distributor h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.75rem;
}

.pe-gold-text {
    background: linear-gradient(135deg, #FEC206 0%, #FEC206 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pe-distributor-sub {
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    margin: 0 0 1.25rem;
}

.pe-distributor-divider {
    width: 4rem;
    height: 3px;
    background: #FEC206;
    margin: 0 0 1.25rem;
}

.pe-distributor-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    margin: 0 0 2rem;
}

.pe-distributor-logos {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
}

.pe-logo-deye {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.pe-logo-divider {
    width: 2px;
    height: 1.25rem;
    background: rgba(255,255,255,0.3);
}

.pe-logo-pe {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.pe-logo-pe::before {
    content: "";
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    background: linear-gradient(135deg, #FEC206 0%, #FEC206 100%);
    border-radius: 50%;
}

.pe-distributor-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pe-distributor-image img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

/* CTA Banner */
.pe-cta {
    background: linear-gradient(135deg, #0d2a05 0%, #1a4a2a 100%);
    padding: 4rem 0;
    color: #fff;
}

.pe-cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pe-cta h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pe-cta p {
    color: rgba(255,255,255,0.8);
}

.pe-cta-actions {
    display: flex;
    gap: 1rem;
}

/* Scroll appearance — fade in, matching Odoo "On Appearance".
   Hidden only after JS opts in, so the page stays readable if the script does not run. */
html.pe-animate [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
}

html.pe-animate [data-reveal="left"] {
    transform: translate3d(-36px, 0, 0);
}

html.pe-animate [data-reveal="right"] {
    transform: translate3d(36px, 0, 0);
}

html.pe-animate [data-reveal].pe-visible {
    opacity: 1;
    transform: none;
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1) var(--pe-reveal-delay, 0s),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1) var(--pe-reveal-delay, 0s),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.pe-tile[data-reveal].pe-visible:hover,
.pe-feature-item[data-reveal].pe-visible:hover {
    transform: translateY(-4px);
    transition-delay: 0s;
}

.pe-card[data-reveal].pe-visible:hover {
    transform: translateY(-5px);
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    html.pe-animate [data-reveal],
    html.pe-animate [data-reveal].pe-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Responsive */
@media (max-width: 968px) {
    .pe-grid-3, .pe-features-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .pe-distributor-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .pe-distributor-content {
        max-width: 100%;
    }
    .pe-distributor-image {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .pe-distributor-image img {
        width: 100%;
        max-width: 680px;
    }
    .pe-hero-stats {
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .pe-container {
        padding: 0 1rem;
    }
    .pe-grid-3, .pe-grid-4, .pe-features-4 {
        grid-template-columns: 1fr;
    }
    .pe-hero-title {
        font-size: 2rem;
    }
    .pe-hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    .pe-distributor h2 {
        font-size: 1.85rem;
    }
    .pe-distributor-logos {
        flex-wrap: wrap;
    }
    .pe-distributor-image img {
        max-width: 100%;
    }
}

/* ==================== Rebate calculator modal ==================== */

.pe-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pe-modal.is-open {
    display: flex;
}

.pe-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.pe-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border: none;
    border-radius: 16px;
    box-shadow: none;
    padding: 1.5rem;
}

.pe-modal-dialog .pe-pdrs {
    background: transparent;
    padding: 0;
}

/* Fully adapted simple calculator — strip full-page pane styling */
.pe-modal-dialog .pane,
.pane.pe-simple-calc {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
}

.pe-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #333;
    z-index: 2;
}

.pe-modal-close:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Simple calculator inside modal */
.pe-simple-calc {
    padding: 0;
}

.pe-simple-calc .sec-head {
    margin: 0 0 1.25rem;
    color: #1B1F2E;
    font-size: 1.75rem;
}

.pe-simple-calc .cml-hint {
    display: none;
}

.pe-simple-calc .rz-row {
    margin-bottom: 1.1rem;
    align-items: stretch;
}

.pe-simple-calc .rz-lbl {
    flex-basis: 5rem;
    color: #1B1F2E;
}

.pe-simple-calc .cml-money {
    margin-top: 1.5rem;
    background: #fff;
    border: 1px solid #DCDCDA;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pe-simple-calc .cml-total {
    align-items: center;
}

.pe-simple-calc .cml-total > b {
    font-size: 1.85rem;
    color: #1a4a2a;
}

.pe-simple-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pe-simple-actions .btn-primary,
.pe-simple-actions .btn-ghost {
    min-width: 8.5rem;
    justify-content: center;
}

.pe-simple-actions .btn-ghost {
    background: #fff;
}

.pe-summary-form {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.pe-summary-form input[type="email"] {
    flex: 1 1 220px;
    padding: 0.6rem 0.9rem;
    border: 1px solid #DCDCDA;
    border-radius: 999px;
    font-size: 0.95rem;
}

.pe-summary-form-msg {
    width: 100%;
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
}

.pe-summary-success {
    color: #0F6E56;
}

.pe-summary-error {
    color: #B3362A;
}

@media (max-width: 640px) {
    .pe-modal-dialog {
        padding: 1.25rem;
        max-height: 95vh;
    }
    .pe-simple-actions,
    .pe-summary-form {
        flex-direction: column;
    }
    .pe-summary-form input[type="email"] {
        width: 100%;
    }
}
