/* ============================================================
   WORKROOMLY PAGES — Premium Page Styles
   ============================================================ */

:root {
    --pages-bg: #ffffff;
    --pages-ink: #0f172a;
    --pages-muted: #64748b;
    --pages-primary: #1457e6;
    --pages-primary-soft: rgba(20, 87, 230, 0.06);
    --pages-accent: #635bff;
    --pages-teal: #0f9f8f;
    --pages-border: rgba(15, 23, 42, 0.06);
    --pages-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --pages-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 20px 48px rgba(0, 0, 0, 0.04);
    --pages-radius: 20px;
}

* { box-sizing: border-box; }

body.pages-page {
    margin: 0;
    color: var(--pages-ink);
    background: var(--pages-bg);
    overflow-x: hidden;
}

.pages-page main { overflow: clip; }

.pages-page main h1,
.pages-page main h2,
.pages-page main h3,
.pages-page main h4 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: -0.025em;
    color: var(--pages-ink);
    margin: 0;
}

.pages-page main p,
.pages-page main li {
    color: var(--pages-muted);
    margin: 0;
}

/* ============================================================
   HERO — Dark premium
   ============================================================ */
.pages-hero {
    position: relative;
    padding: 160px 0 80px;
    background: #050d1f;
    color: #ffffff;
    overflow: hidden;
    text-align: center;
}

.pages-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 30%, rgba(20, 87, 230, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 80% 70%, rgba(15, 159, 143, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.pages-hero-center {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pages-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 18px;
    border-radius: 100px;
    background: rgba(79, 196, 255, 0.08);
    border: 1px solid rgba(79, 196, 255, 0.2);
    color: #7dd3fc;
    letter-spacing: 0.06em;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 32px;
    animation: pagesFadeUp 0.6s ease both;
}

.pages-hero-chip i { font-size: 0.7rem; color: #4fc4ff; }

.pages-hero-title {
    font-family: 'Space Grotesk', system-ui, sans-serif !important;
    font-size: clamp(2.6rem, 5vw, 4.2rem) !important;
    font-weight: 700 !important;
    margin: 0 0 24px !important;
    line-height: 1.06 !important;
    letter-spacing: -0.03em !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-wrap: balance;
    animation: pagesFadeUp 0.6s ease both;
    animation-delay: 0.1s;
}

.pages-hero-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.14rem;
    line-height: 1.7;
    margin: 0 auto 40px;
    max-width: 560px;
    animation: pagesFadeUp 0.6s ease both;
    animation-delay: 0.2s;
}

.pages-hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 48px;
    animation: pagesFadeUp 0.6s ease both;
    animation-delay: 0.3s;
}

.pages-hero-btn-primary {
    padding: 16px 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1457e6 0%, #635bff 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(20, 87, 230, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.pages-hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(20, 87, 230, 0.5);
    color: #ffffff;
}

.pages-hero-btn-secondary {
    padding: 16px 28px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.pages-hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.pages-hero-btn-secondary i { font-size: 0.72rem; margin-left: 6px; }

.pages-hero-stats {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    animation: pagesFadeUp 0.6s ease both;
    animation-delay: 0.4s;
}

.pages-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 160px;
}

.pages-hero-stat-value {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.pages-hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    line-height: 1.4;
}

.pages-hero-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

.pages-hero-image {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 48px auto 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 32px 72px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: pagesFadeUp 0.8s ease both;
    animation-delay: 0.5s;
}

.pages-hero-image img { width: 100%; height: auto; display: block; }

@keyframes pagesFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTIONS — Shared
   ============================================================ */
.pages-section {
    position: relative;
    padding: clamp(6rem, 10vw, 9rem) 0;
}

.pages-section-header {
    max-width: 640px;
    margin: 0 auto clamp(3.5rem, 6vw, 5rem);
    text-align: center;
}

.pages-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 100px;
    background: var(--pages-primary-soft);
    border: 1px solid rgba(20, 87, 230, 0.12);
    color: var(--pages-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.pages-eyebrow i { font-size: 0.68rem; }

.pages-section-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--pages-ink);
    text-wrap: balance;
    margin-bottom: 20px;
}

.pages-section-title::after { display: none !important; content: none !important; }

.pages-section-desc {
    font-size: 1.1rem;
    line-height: 1.72;
    color: var(--pages-muted);
    max-width: 540px;
    margin: 0 auto;
}

/* Value strip */
.pages-value-strip {
    padding: clamp(3.5rem, 5vw, 5rem) 0;
    background: #fafbfd;
    border-bottom: 1px solid var(--pages-border);
}

.pages-value-strip-inner {
    display: flex;
    justify-content: center;
    width: 100%;
}

.pages-value-strip p {
    font-size: 1.12rem;
    line-height: 1.75;
    color: var(--pages-muted);
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    text-wrap: balance;
}

/* ============================================================
   FLOW — 4-step
   ============================================================ */
.pages-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.pages-flow-card {
    padding: clamp(24px, 3vw, 32px);
    border-radius: var(--pages-radius);
    background: #ffffff;
    border: 1px solid var(--pages-border);
    box-shadow: var(--pages-shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pages-flow-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pages-shadow-md);
}

.pages-flow-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--pages-primary-soft);
    color: var(--pages-primary);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.pages-flow-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.pages-flow-card p {
    font-size: 0.92rem;
    line-height: 1.62;
}

/* ============================================================
   ROUTING — Dark section
   ============================================================ */
.pages-routing {
    background: #050d1f;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.pages-routing::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 30% 20%, rgba(20, 87, 230, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 70% 80%, rgba(15, 159, 143, 0.07) 0%, transparent 50%);
    pointer-events: none;
}

.pages-routing .pages-section-header { position: relative; z-index: 1; }
.pages-routing .pages-eyebrow { color: #7dd3fc; background: rgba(79, 196, 255, 0.08); border-color: rgba(79, 196, 255, 0.2); }
.pages-routing .pages-section-title { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.pages-routing .pages-section-desc { color: rgba(255, 255, 255, 0.55); }

.pages-routing-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.pages-routing-card {
    padding: clamp(24px, 3vw, 32px);
    border-radius: var(--pages-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pages-routing-card:hover {
    border-color: rgba(79, 196, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
}

.pages-routing-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(110, 231, 183, 0.12);
    margin-bottom: 18px;
}

.pages-routing-icon i {
    font-size: 1rem;
    color: #6ee7b7;
}

.pages-routing-card h3 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.pages-routing-card p {
    color: rgba(255, 255, 255, 0.6) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ============================================================
   CAPABILITIES
   ============================================================ */
.pages-capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pages-capability-card {
    padding: clamp(28px, 3.5vw, 40px) clamp(24px, 3vw, 32px);
    border-radius: var(--pages-radius);
    background: #ffffff;
    border: 1px solid var(--pages-border);
    box-shadow: var(--pages-shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pages-capability-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pages-shadow-md);
    border-color: rgba(20, 87, 230, 0.12);
}

.pages-capability-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--pages-primary-soft);
    margin-bottom: 20px;
}

.pages-capability-icon i {
    font-size: 1.1rem;
    color: var(--pages-primary);
}

.pages-capability-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.pages-capability-card p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--pages-muted);
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.pages-final {
    padding-bottom: clamp(6rem, 10vw, 10rem);
}

.pages-final-panel {
    border-radius: 28px;
    background: linear-gradient(135deg, #06195d 0%, #0d4edb 56%, #0f8fb8 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 40px 80px rgba(5, 13, 31, 0.25);
    padding: clamp(36px, 5vw, 60px);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(200px, auto);
    align-items: center;
    gap: clamp(24px, 4vw, 48px);
    position: relative;
    overflow: hidden;
}

.pages-final-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(20, 87, 230, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.pages-final-content { position: relative; z-index: 1; }

.pages-final-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pages-final-panel h2 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1.08;
    max-width: 13ch;
    margin-bottom: 14px;
}

.pages-final-panel p {
    color: rgba(255, 255, 255, 0.65) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.65) !important;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 48ch;
}

.pages-final-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pages-final-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 12px;
    background: #ffffff;
    color: #0d45b1;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pages-final-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    color: #0d45b1;
}

.pages-final-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pages-final-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

/* ============================================================
   REVEAL
   ============================================================ */
.pages-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.pages-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pages-reveal[data-lag="1"] { transition-delay: 0.08s; }
.pages-reveal[data-lag="2"] { transition-delay: 0.16s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1199px) {
    .pages-flow-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 991px) {
    .pages-capabilities-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pages-final-panel {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pages-final-panel h2 { max-width: none; }
    .pages-final-panel p { max-width: none; margin-left: auto; margin-right: auto; }
    .pages-final-actions { align-items: center; }
}

@media (max-width: 767px) {
    .pages-hero {
        padding: 130px 0 60px;
    }

    .pages-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .pages-hero-btn-primary,
    .pages-hero-btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .pages-hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .pages-hero-stat-divider { display: none; }

    .pages-section {
        padding: clamp(4rem, 8vw, 6rem) 0;
    }

    .pages-flow-grid,
    .pages-routing-grid,
    .pages-capabilities-grid {
        grid-template-columns: 1fr;
    }

    .pages-final-panel {
        padding: 28px 24px;
        text-align: left;
    }

    .pages-final-actions { width: 100%; }
    .pages-final-btn-primary,
    .pages-final-btn-secondary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .pages-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .pages-hero-chip,
    .pages-hero-title,
    .pages-hero-subtitle,
    .pages-hero-actions,
    .pages-hero-stats,
    .pages-hero-image {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
