/* ========================================
   PAGE: webs.php
   Only styles unique to this page.
   Shared styles live in variables/base/animations/components.
   ======================================== */

/* Body background (complex radial gradients) */
body {
    position: relative;
    background:
        radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.45), transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(236, 72, 153, 0.35), transparent 45%),
        radial-gradient(circle at 20% 85%, rgba(6, 182, 212, 0.4), transparent 55%),
        radial-gradient(circle at 75% 75%, rgba(251, 191, 36, 0.35), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.25), transparent 60%),
        linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: bg-flow 30s ease infinite;
}

/* Gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.2), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.2), transparent 45%);
    animation: gradient-shift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
}

button {
    font-family: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--c-purple);
    outline-offset: 2px;
}

/* Section padding override */
section {
    padding: 72px 0;
}

/* Container breakpoints */
@media (min-width: 1600px) {
    .container { width: min(1600px, 92%); }
}

@media (min-width: 2000px) {
    .container { width: min(1800px, 90%); }
}

/* ========================================
   HERO (webs-specific layout)
   ======================================== */
.hero {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
    background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-alt) 100%);
    position: relative;
    overflow: hidden;
    max-width: none;
    text-align: left;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(124, 58, 237, 0.1);
    color: var(--c-primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    color: var(--c-text);
    /* Override components.css gradient text */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--c-text);
    background-clip: unset;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--c-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.hero-subtitle strong {
    color: var(--c-text);
}

.hero-platforms {
    font-size: 1rem;
    color: var(--c-text);
    margin-bottom: var(--space-lg);
}

.hero-platforms p {
    margin: var(--space-xs) 0;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   SECTION HEADER (non-gradient h2 override)
   Webs page uses plain color h2, not gradient
   ======================================== */
.section-header {
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
}

.section-header h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    color: var(--c-text);
    /* Override the gradient text from components.css */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--c-text);
    background-clip: unset;
}

.section-header p {
    color: var(--c-text-secondary);
    font-size: 1.1rem;
}

/* ========================================
   3D CSS CUBE (unique to webs page)
   ======================================== */
.showcase-section {
    padding: 48px 0 72px;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.showcase-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--c-text);
    /* Override gradient text */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--c-text);
    background-clip: unset;
}

.showcase-content p {
    color: var(--c-text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.showcase-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.showcase-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--c-text);
    font-weight: 500;
    border-bottom: 1px solid rgba(124, 58, 237, .1);
}

.showcase-features li:last-child {
    border-bottom: none;
}

.showcase-features .feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--c-purple) 0%, var(--c-teal) 100%);
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.showcase-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

.cube-container {
    position: relative;
    width: 360px;
    height: 360px;
    perspective: 1200px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 30s infinite ease-in-out;
}

.cube-face {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.3), inset 0 0 30px rgba(124, 58, 237, 0.1);
    backface-visibility: visible;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(0, 212, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.cube-face img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.cube-front  { transform: rotateY(0deg) translateZ(180px); }
.cube-back   { transform: rotateY(180deg) translateZ(180px); }
.cube-back img { transform: rotateY(180deg); }
.cube-right  { transform: rotateY(90deg) translateZ(180px); }
.cube-left   { transform: rotateY(-90deg) translateZ(180px); }
.cube-top    { transform: rotateX(90deg) translateZ(180px); }
.cube-top img { transform: rotateZ(90deg); }
.cube-bottom { transform: rotateX(-90deg) translateZ(180px); }
.cube-bottom img { transform: rotateZ(-90deg); }

@keyframes cubeRotate {
    0%, 3% { transform: rotateX(-10deg) rotateY(0deg); }
    14%, 19% { transform: rotateX(-5deg) rotateY(-90deg); }
    30%, 35% { transform: rotateX(5deg) rotateY(-180deg); }
    46%, 51% { transform: rotateX(-5deg) rotateY(-270deg); }
    62%, 67% { transform: rotateX(-90deg) rotateY(-270deg); }
    78%, 83% { transform: rotateX(90deg) rotateY(-270deg); }
    94%, 100% { transform: rotateX(-10deg) rotateY(-360deg); }
}

.cube-container .dot {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    animation: float 10s ease-in-out infinite;
    z-index: -1;
}

.cube-container .dot.tl { left: -70px; top: -70px; background: var(--c-purple); }
.cube-container .dot.br { right: -70px; bottom: -70px; background: var(--c-teal); animation-delay: 1.5s; }

/* ========================================
   WEB TYPE CARDS (unique to webs page)
   ======================================== */
.webs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.web-type-card {
    padding: 36px;
    background: rgba(255,255,255,.92);
    border: 2px solid rgba(124, 58, 237, .2);
    border-radius: 20px;
    backdrop-filter: blur(15px) saturate(1.3);
    transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(124, 58, 237, .1);
    text-align: center;
}

.web-type-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(124, 58, 237, .25);
    border-color: rgba(124, 58, 237, .5);
    background: rgba(255,255,255,.98);
}

.web-type-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--c-purple) 0%, var(--c-teal) 100%);
    color: #fff;
    font-size: 2.2rem;
    margin: 0 auto 20px;
    box-shadow:
        0 10px 30px rgba(124, 58, 237, .4),
        0 2px 8px rgba(0, 0, 0, .2),
        inset 0 1px 0 rgba(255, 255, 255, .3),
        inset 0 -2px 0 rgba(0, 0, 0, .2);
    transition: all .3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .2);
}

.web-type-icon::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .15) 0%, transparent 50%);
    pointer-events: none;
}

.web-type-card:hover .web-type-icon {
    transform: scale(1.1) rotate(5deg) translateY(-2px);
    box-shadow:
        0 15px 40px rgba(124, 58, 237, .5),
        0 4px 12px rgba(0, 0, 0, .3),
        inset 0 1px 0 rgba(255, 255, 255, .4),
        inset 0 -2px 0 rgba(0, 0, 0, .3);
}

.web-type-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--c-text);
}

.web-type-card p {
    color: var(--c-text-secondary);
    line-height: 1.6;
    font-size: 1.05rem;
}

.web-type-card strong {
    color: var(--c-text);
}

/* ========================================
   INTEGRATIONS GRID (webs-specific layout)
   ======================================== */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.integration-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 24px;
    background: rgba(255,255,255,.92);
    border-radius: 14px;
    border: 2px solid rgba(124, 58, 237, .2);
    backdrop-filter: blur(15px) saturate(1.3);
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(124, 58, 237, .08);
}

.integration-item:hover {
    transform: translateX(8px);
    border-color: rgba(124, 58, 237, .5);
    background: rgba(255,255,255,.98);
    box-shadow: 0 8px 25px rgba(124, 58, 237, .2);
}

.integration-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.integration-item strong {
    display: block;
    color: var(--c-text);
    margin-bottom: 2px;
    font-weight: 600;
}

.integration-item span {
    font-size: 0.9rem;
    color: var(--c-text-secondary);
}

/* ========================================
   PRICING TABLE (webs-specific table layout)
   ======================================== */
.pricing-section {
    background: var(--c-white);
}

.pricing-note {
    background: rgba(124, 58, 237, 0.08);
    border-left: 4px solid var(--c-primary);
    padding: var(--space-md) var(--space-lg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: var(--space-xl);
    color: var(--c-text-secondary);
    font-style: normal;
}

.pricing-table-wrapper {
    overflow-x: auto;
    margin-bottom: var(--space-lg);
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.pricing-table th,
.pricing-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}

.pricing-table th {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: var(--c-white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-table tr:last-child td {
    border-bottom: none;
}

.pricing-table tr:hover td {
    background: rgba(124, 58, 237, 0.03);
}

.pricing-table td:last-child {
    font-weight: 700;
    color: var(--c-primary);
    white-space: nowrap;
}

.pricing-includes,
.pricing-excludes {
    margin-bottom: var(--space-md);
}

.pricing-includes strong,
.pricing-excludes strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--c-text);
}

.pricing-includes p,
.pricing-excludes p {
    color: var(--c-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.pricing-disclaimer {
    background: var(--c-bg-alt);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--c-text-tertiary);
    font-size: 0.9rem;
    text-align: center;
}

/* ========================================
   METHODOLOGY GRID (webs-specific 3-col)
   ======================================== */
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.method-step {
    padding: 36px;
    background: rgba(255,255,255,.92);
    border: 2px solid rgba(124, 58, 237, .2);
    border-radius: 20px;
    backdrop-filter: blur(15px) saturate(1.3);
    transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(124, 58, 237, .1);
}

.method-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(124, 58, 237, .25);
    border-color: rgba(124, 58, 237, .5);
    background: rgba(255,255,255,.98);
}

.method-step b {
    display: block;
    margin-bottom: 12px;
    font-size: 1.3rem;
    color: var(--c-purple);
    font-weight: 800;
}

.method-step h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--c-text);
}

.method-step p {
    color: var(--c-text-secondary);
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ========================================
   FAQ ACCORDION (webs-specific styling)
   ======================================== */
.faqs-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255,255,255,.92);
    border: 2px solid rgba(124, 58, 237, .2);
    border-radius: 16px;
    margin-bottom: 12px;
    overflow: hidden;
    backdrop-filter: blur(15px) saturate(1.3);
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(124, 58, 237, .08);
}

.faq-item:hover {
    border-color: rgba(124, 58, 237, .4);
    box-shadow: 0 8px 25px rgba(124, 58, 237, .15);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text);
    cursor: pointer;
    transition: all var(--transition-base);
}

.faq-question:hover {
    color: var(--c-primary);
}


.faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--c-text-secondary);
    line-height: 1.7;
}

.faq-answer strong {
    color: var(--c-text);
}

/* ========================================
   CTA SECTION (webs-specific override)
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    color: var(--c-white);
    text-align: center;
    max-width: none;
    padding: 72px 0;
}

.cta-section h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    color: var(--c-white);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--c-white);
    background-clip: unset;
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--c-white);
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

/* ========================================
   CARDS-GRID override (4-col for webs)
   ======================================== */
.cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ========================================
   CARD overrides (webs-specific styling)
   ======================================== */
.card {
    padding: 32px;
    border-radius: 20px;
    border: 2px solid rgba(124, 58, 237, .2);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(15px) saturate(1.3);
    box-shadow: 0 4px 20px rgba(124, 58, 237, .1);
}

.card:hover {
    box-shadow: 0 20px 50px rgba(124, 58, 237, .25);
    border-color: rgba(124, 58, 237, .5);
    background: rgba(255,255,255,.98);
}

.card h3 {
    margin: .8rem 0 .4rem;
}

/* ========================================
   CARD-ICON override (purple-teal gradient)
   Webs uses purple->teal vs pink->purple in auto-ia
   ======================================== */
.card-icon {
    background: linear-gradient(145deg, var(--c-purple) 0%, var(--c-teal) 100%);
    box-shadow:
        0 10px 30px rgba(124, 58, 237, .4),
        0 2px 8px rgba(0, 0, 0, .2),
        inset 0 1px 0 rgba(255, 255, 255, .3),
        inset 0 -2px 0 rgba(0, 0, 0, .2);
}

.card:hover .card-icon {
    box-shadow:
        0 15px 40px rgba(124, 58, 237, .5),
        0 4px 12px rgba(0, 0, 0, .3),
        inset 0 1px 0 rgba(255, 255, 255, .4),
        inset 0 -2px 0 rgba(0, 0, 0, .3);
}

/* ========================================
   FORM overrides (webs-specific)
   ======================================== */
.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: var(--c-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-xl);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    width: 100%;
    height: auto;
    font-size: 0.9rem;
    color: var(--c-text-secondary);
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--c-primary);
}

.form-checkbox a {
    color: var(--c-primary);
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE: 980px
   ======================================== */
@media (max-width: 980px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .showcase-image { order: -1; }

    .cube-container {
        width: 220px;
        height: 220px;
    }

    .cube-face {
        width: 220px;
        height: 220px;
        padding: 12px;
    }

    .cube-front  { transform: rotateY(0deg) translateZ(110px); }
    .cube-back   { transform: rotateY(180deg) translateZ(110px); }
    .cube-right  { transform: rotateY(90deg) translateZ(110px); }
    .cube-left   { transform: rotateY(-90deg) translateZ(110px); }
    .cube-top    { transform: rotateX(90deg) translateZ(110px); }
    .cube-bottom { transform: rotateX(-90deg) translateZ(110px); }

    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .webs-grid { grid-template-columns: repeat(2, 1fr); }
    .integrations-grid { grid-template-columns: repeat(2, 1fr); }
    .methodology-grid { grid-template-columns: 1fr; }
}

/* ========================================
   RESPONSIVE: 768px
   ======================================== */
@media (max-width: 768px) {
    body {
        padding-top: 65px;
    }

    section {
        padding: var(--space-2xl) 0;
    }

    .hero {
        padding-top: var(--space-2xl);
    }

    .hero h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .pricing-table th,
    .pricing-table td {
        padding: var(--space-sm);
        font-size: 0.875rem;
    }
}

/* ========================================
   RESPONSIVE: 640px
   ======================================== */
@media (max-width: 640px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Disable gradient animations on small mobile */
    body, body::before {
        animation: none !important;
        background-attachment: scroll;
    }

    .container { width: 96%; max-width: 100%; }

    .showcase-image { min-height: auto; }

    /* All grids to single column on small mobile */
    .cards-grid { grid-template-columns: 1fr !important; }
    .webs-grid { grid-template-columns: 1fr !important; }
    .integrations-grid { grid-template-columns: 1fr !important; }

    .section-header h2 { font-size: 1.5rem !important; }
    .hero h1 { font-size: 1.75rem !important; }

    .card { padding: 20px; }
    .card h3 { font-size: 1.15rem; }
    .card-icon { width: 56px; height: 56px; font-size: 1.4rem; }

    .web-type-card { padding: 24px; }
    .web-type-icon { width: 64px; height: 64px; font-size: 1.8rem; }

    .method-step { padding: 24px; }
    .method-step b { font-size: 1.1rem; }

    /* 3D Cube bigger for mobile – nearly full width */
    .cube-container {
        --cube-size: min(80vw, 340px);
        width: var(--cube-size);
        height: var(--cube-size);
        perspective: 900px;
    }

    .cube-face {
        width: var(--cube-size);
        height: var(--cube-size);
        padding: 14px;
    }

    .cube-front  { transform: rotateY(0deg) translateZ(calc(var(--cube-size) / 2)); }
    .cube-back   { transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2)); }
    .cube-right  { transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2)); }
    .cube-left   { transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2)); }
    .cube-top    { transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2)); }
    .cube-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2)); }

    .cube-container .dot {
        width: 140px;
        height: 140px;
    }

    .cube-container .dot.tl { left: -50px; top: -50px; }
    .cube-container .dot.br { right: -50px; bottom: -50px; }
}
