/*
 * home.css — PATRICK INNOVATOR OPTIM SRL
 * Styles for front-page.php
 * Light theme: green + orange, farm/grain aesthetic
 * All colors via CSS custom properties — zero hardcoded values (Rule 1)
 * ==========================================================================
 */


/* ==========================================================================
   GRAIN BACKGROUND CANVAS
   Fixed canvas behind all content — JS draws floating seed particles
   ========================================================================== */

.pat-grain-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

/* All page sections sit above the canvas */
.pat-hero,
.pat-ticker,
.pat-services,
.pat-value,
.pat-process,
.pat-trust,
.pat-cta {
    position: relative;
    z-index: 1;
}


/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.pat-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 120px;   /* header ~68px + breathing room (Rule 14) — PNRR integrat in header */
    padding-bottom: 80px;
    background-color: var(--pat-bg-main);
}

/* Decorative wheat SVGs — absolute positioned, gentle sway */
.pat-hero__wheat {
    position: absolute;
    top: 0;
    width: 120px;
    height: 400px;
    pointer-events: none;
    z-index: 0;
    animation: pat-wheat-sway 6s ease-in-out infinite;
    transform-origin: bottom center;
}

.pat-hero__wheat--left {
    left: 2%;
    animation-delay: 0s;
}

.pat-hero__wheat--right {
    right: 2%;
    animation-delay: -3s;
    animation-direction: alternate-reverse;
}

@keyframes pat-wheat-sway {
    0%   { transform: rotate(-4deg); }
    50%  { transform: rotate(4deg);  }
    100% { transform: rotate(-4deg); }
}

/* Hero content layout */
.pat-hero .pat-container {
    width: 100%;
}

.pat-hero__content {
    max-width: 720px;
}

/* Badge */
.pat-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--pat-green-subtle);
    border: 1px solid var(--pat-border-active);
    border-radius: 99px;
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pat-green-deep);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.pat-hero__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pat-green);
    box-shadow: 0 0 10px var(--pat-green);
    flex-shrink: 0;
    animation: pat-pulse 2s ease-in-out infinite;
}

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

/* Hero Title */
.pat-hero__title {
    font-family: var(--pat-font-main);
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    font-weight: 800;
    color: var(--pat-text-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Hero Description */
.pat-hero__desc {
    font-size: 1.1rem;
    color: var(--pat-text-secondary);
    line-height: 1.75;
    max-width: 600px;
    margin: 0 0 36px 0;
}

/* Hero Actions */
.pat-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 0;
}

/* Floating farm cards — positioned in the visual area */
.pat-hero__visual {
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    pointer-events: none;
    z-index: 2;
}

.pat-hero__float-card {
    background: var(--pat-bg-panel);
    border: 1px solid var(--pat-border-light);
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 32px rgba(21, 128, 61, 0.10);
    min-width: 220px;
    animation: pat-float 4s ease-in-out infinite;
}

.pat-hero__float-card--1 { animation-delay: 0s;    }
.pat-hero__float-card--2 { animation-delay: -1.4s; }
.pat-hero__float-card--3 { animation-delay: -2.8s; }

@keyframes pat-float {
    0%, 100% { transform: translateY(0);   }
    50%       { transform: translateY(-8px); }
}

.pat-float-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pat-float-text {
    font-size: 0.82rem;
    color: var(--pat-text-secondary);
    font-weight: 500;
    line-height: 1.3;
}

.pat-float-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 2px;
}


/* ==========================================================================
   TICKER
   ========================================================================== */

.pat-ticker {
    background: var(--pat-gradient);
    overflow: hidden;
    padding: 14px 0;
    white-space: nowrap;
}

.pat-ticker__track {
    display: inline-flex;
    gap: 0;
    animation: pat-ticker-scroll 28s linear infinite;
}

@keyframes pat-ticker-scroll {
    0%   { transform: translateX(0);     }
    100% { transform: translateX(-50%);  }
}

.pat-ticker__item {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 32px;
    position: relative;
}

.pat-ticker__item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}


/* ==========================================================================
   SERVICES / PRODUCTS SECTION
   ========================================================================== */

.pat-services {
    padding: 100px 0;
    background-color: var(--pat-bg-secondary);
}

.pat-services__header {
    margin-bottom: 56px;
}

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

/* Service Card */
.pat-service-card {
    background: var(--pat-bg-panel);
    border: 1px solid var(--pat-border-subtle);
    border-radius: 16px;
    padding: 32px 28px;
    transition: all var(--pat-transition);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pat-service-card:hover {
    border-color: var(--pat-border-active);
    background: var(--pat-bg-panel-hover);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(21, 128, 61, 0.12);
}

/* Featured card — slightly larger visual weight */
.pat-service-card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: linear-gradient(135deg, var(--pat-green-subtle) 0%, var(--pat-bg-panel) 60%);
    border-color: var(--pat-border-active);
}

.pat-service-card--featured .pat-service-card__content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Icon variants */
.pat-service-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pat-service-card__icon--green {
    background: var(--pat-green-subtle);
    color: var(--pat-green-deep);
}

.pat-service-card__icon--orange {
    background: var(--pat-orange-subtle);
    color: var(--pat-orange-deep);
}

.pat-service-card__title {
    font-family: var(--pat-font-main);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pat-text-primary);
    margin: 0;
    line-height: 1.3;
}

.pat-service-card--featured .pat-service-card__title {
    font-size: 1.2rem;
}

.pat-service-card__desc {
    font-size: 0.9rem;
    color: var(--pat-text-secondary);
    line-height: 1.7;
    margin: 0;
    flex-grow: 1;
}

/* Tags — small pills */
.pat-service-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.pat-service-card__tags span {
    display: inline-block;
    background: var(--pat-green-subtle);
    color: var(--pat-green-deep);
    border-radius: 99px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}


/* ==========================================================================
   VALUE / WHY US SECTION
   ========================================================================== */

.pat-value {
    padding: 100px 0;
    background-color: var(--pat-bg-main);
}

.pat-value__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.pat-value__content {
    display: flex;
    flex-direction: column;
}

/* Feature items */
.pat-value__features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 36px;
}

.pat-value-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.pat-value-feature__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--pat-green-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.pat-value-feature h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--pat-text-primary);
    margin: 0 0 6px 0;
}

.pat-value-feature p {
    font-size: 0.88rem;
    color: var(--pat-text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* Metrics 2x2 grid */
.pat-value__metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pat-metric-card {
    background: var(--pat-bg-panel);
    border: 1px solid var(--pat-border-subtle);
    border-radius: 20px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all var(--pat-transition);
    text-align: left;
}

.pat-metric-card:hover {
    border-color: var(--pat-border-active);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(21, 128, 61, 0.10);
}

.pat-metric-card__number {
    font-family: var(--pat-font-main);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    background: var(--pat-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Orange variant for alternating cards */
.pat-metric-card:nth-child(even) .pat-metric-card__number {
    background: var(--pat-gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pat-metric-card__label {
    font-size: 0.82rem;
    color: var(--pat-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.4;
}


/* ==========================================================================
   PROCESS SECTION
   ========================================================================== */

.pat-process {
    padding: 100px 0;
    background-color: var(--pat-bg-secondary);
}

.pat-process__header {
    margin-bottom: 60px;
}

/* Horizontal timeline with connecting line */
.pat-process__timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}

/* Connecting line between steps */
.pat-process__timeline::before {
    content: '';
    position: absolute;
    top: 42px;
    left: calc(12.5% + 24px);
    right: calc(12.5% + 24px);
    height: 2px;
    background: linear-gradient(90deg,
        var(--pat-green) 0%,
        var(--pat-orange) 50%,
        var(--pat-green) 100%
    );
    z-index: 0;
    opacity: 0.35;
}

.pat-process-step {
    background: var(--pat-bg-panel);
    border: 1px solid var(--pat-border-subtle);
    border-radius: 18px;
    padding: 32px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all var(--pat-transition);
    position: relative;
    z-index: 1;
    margin: 0 8px;
}

.pat-process-step:first-child { margin-left: 0; }
.pat-process-step:last-child  { margin-right: 0; }

.pat-process-step:hover {
    border-color: var(--pat-border-active);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(21, 128, 61, 0.12);
}

/* Step number circle — green gradient */
.pat-process-step__number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--pat-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
}

/* Orange accent on even steps */
.pat-process-step:nth-child(even) .pat-process-step__number {
    background: var(--pat-gradient-orange);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.25);
}

.pat-process-step__icon {
    color: var(--pat-text-muted);
}

.pat-process-step h3 {
    font-family: var(--pat-font-main);
    font-size: 1rem;
    font-weight: 700;
    color: var(--pat-text-primary);
    margin: 0;
    line-height: 1.3;
}

.pat-process-step p {
    font-size: 0.87rem;
    color: var(--pat-text-secondary);
    line-height: 1.7;
    margin: 0;
    flex-grow: 1;
}


/* ==========================================================================
   TRUST / TESTIMONIALS SECTION
   ========================================================================== */

.pat-trust {
    padding: 100px 0;
    background-color: var(--pat-bg-main);
}

.pat-trust__header {
    margin-bottom: 56px;
}

.pat-trust__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

/* Testimonial card */
.pat-trust-card {
    background: var(--pat-bg-panel);
    border: 1px solid var(--pat-border-subtle);
    border-radius: 18px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: all var(--pat-transition);
}

.pat-trust-card:hover {
    border-color: var(--pat-border-active);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(21, 128, 61, 0.10);
}

/* Orange stars */
.pat-trust-card__stars {
    display: flex;
    gap: 4px;
    color: var(--pat-orange);
    font-size: 1rem;
}

.pat-trust-card__text {
    font-size: 0.95rem;
    color: var(--pat-text-secondary);
    line-height: 1.75;
    margin: 0;
    font-style: italic;
    flex-grow: 1;
}

.pat-trust-card__author {
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--pat-border-light);
    padding-top: 18px;
    margin-top: auto;
}

/* Avatar with green gradient */
.pat-trust-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pat-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
}

.pat-trust-card__name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pat-text-primary);
}

.pat-trust-card__role {
    font-size: 0.8rem;
    color: var(--pat-text-muted);
    margin-top: 2px;
}

/* Trust badges row */
.pat-trust__badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.pat-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--pat-bg-panel);
    border: 1px solid var(--pat-border-light);
    border-radius: 99px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pat-text-secondary);
    transition: all 0.3s ease;
}

.pat-trust-badge:hover {
    border-color: var(--pat-border-active);
    background: var(--pat-green-subtle);
    color: var(--pat-green-deep);
}


/* ==========================================================================
   CTA SECTION — Dark green background, white text
   ========================================================================== */

.pat-cta {
    padding: 100px 0;
    background-color: var(--pat-footer-bg);
    position: relative;
    overflow: hidden;
}

/* Subtle radial glow behind content */
.pat-cta::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(34, 197, 94, 0.10) 0%,
        transparent 65%
    );
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.pat-cta__box {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 720px;
    margin: 0 auto;
}

/* Override section-label color on dark bg */
.pat-cta .pat-section-label {
    color: var(--pat-green-light);
}

.pat-cta .pat-section-label::before {
    background: var(--pat-green-light);
}

/* Override section-title on dark bg */
.pat-cta .pat-section-title {
    color: #ffffff;
    text-align: center;
}

.pat-cta__desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin: 0 0 40px 0;
    max-width: 580px;
}

.pat-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* Outline button variant for dark bg */
.pat-cta .pat-btn--outline {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

.pat-cta .pat-btn--outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.55);
}


/* ==========================================================================
   REVEAL ANIMATIONS (Rule 25: .visible CSS pattern)
   ========================================================================== */

/* Base reveal state handled in global-styles.css (.pat-reveal / .pat-reveal.visible) */


/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* 1100px — collapse 3-col grids, stack process */
@media (max-width: 1100px) {
    .pat-services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pat-service-card--featured {
        grid-column: 1 / -1;
    }

    .pat-process__timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .pat-process__timeline::before {
        display: none;
    }

    .pat-process-step {
        margin: 0;
    }

    .pat-hero__visual {
        display: none;
    }
}

/* 900px — stack value section, shrink trust grid */
@media (max-width: 900px) {
    .pat-value__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .pat-value__metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .pat-trust__grid {
        grid-template-columns: 1fr;
    }
}

/* 768px — mobile adjustments */
@media (max-width: 768px) {
    .pat-hero {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .pat-hero__title {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .pat-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pat-hero__actions .pat-btn {
        justify-content: center;
    }

    .pat-services,
    .pat-value,
    .pat-process,
    .pat-trust,
    .pat-cta {
        padding: 64px 0;
    }

    .pat-services__grid {
        grid-template-columns: 1fr;
    }

    .pat-service-card--featured {
        grid-column: 1 / 1;
    }

    .pat-process__timeline {
        grid-template-columns: 1fr;
    }

    .pat-value__metrics {
        grid-template-columns: 1fr 1fr;
    }

    .pat-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pat-cta__actions .pat-btn {
        justify-content: center;
    }

    .pat-trust__badges {
        gap: 10px;
    }
}

/* 480px — single column everywhere */
@media (max-width: 480px) {
    .pat-value__metrics {
        grid-template-columns: 1fr;
    }

    .pat-trust-badge {
        width: 100%;
        justify-content: center;
    }
}
