/**
 * Prysm Edge — Shared Page Theme
 * Extracted from homepage (index.html) design language.
 * Include on all sub-pages for consistent styling.
 */

/* ============================================================
   BASE STYLES
   ============================================================ */
body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #ffffff;
    color: #171717;
    overflow-x: hidden;
}

/* ============================================================
   TEXT GRADIENTS
   ============================================================ */
.text-gradient {
    background: linear-gradient(135deg, #171717 0%, #404040 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-gradient-orange {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-gradient-gold {
    background: linear-gradient(135deg, #d4af37 0%, #eac155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   BACKGROUNDS
   ============================================================ */
.engineer-grid {
    background-image:
        linear-gradient(rgba(229,229,229,0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(229,229,229,0.5) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ============================================================
   CARDS (from homepage bento/testimonial patterns)
   ============================================================ */
.card-pe {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-pe:hover {
    border-color: #f97316;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
    transform: translateY(-4px);
}

/* Hover-lift cards (from homepage lane cards) */
.hover-lift {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(249,115,22,0.3);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

/* Fade in up on scroll (IntersectionObserver driven) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid children */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* Hero slide-in from left */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
.slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Hero visual float-in from right */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
.slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
    opacity: 0;
}

/* Floating animation for hero visuals */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Pulse ring for SVG hubs */
@keyframes ringPulse {
    0% { transform: scale(0.5); opacity: 0.8; stroke-width: 4; }
    100% { transform: scale(2.2); opacity: 0; stroke-width: 1; }
}

/* Node float for SVG elements */
@keyframes nodeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Beam flow for SVG connection lines */
@keyframes beamFlow {
    0% { stroke-dashoffset: 40; opacity: 0.4; }
    50% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0.4; }
}

/* Counter animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stat bar animation */
@keyframes barGrow {
    from { width: 0; }
    to { width: var(--bar-width, 100%); }
}
.bar-animate {
    animation: barGrow 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    width: 0;
}

/* ============================================================
   HERO SVG PATTERNS (reusable across pages)
   ============================================================ */
.svg-hero-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    fill: none;
    stroke: #f97316;
    animation: ringPulse 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
}

.network-node {
    fill: white;
    stroke: #d1d1d1;
    stroke-width: 2.5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: nodeFloat 3s ease-in-out infinite;
}

.network-node.hub {
    fill: #f97316;
    stroke: #ea580c;
    stroke-width: 3;
    animation: none;
}

.node-beam {
    stroke: #f97316;
    stroke-width: 1.5;
    stroke-dasharray: 4 6;
    opacity: 0.35;
    transition: opacity 0.4s;
}

/* ============================================================
   SECTION SPACING (consistent with homepage)
   ============================================================ */
.section-padding {
    padding: 6rem 1.5rem;
}
@media (min-width: 1024px) {
    .section-padding {
        padding: 6rem 3rem;
    }
}

/* ============================================================
   STAT CARDS — matches homepage "Real Results" section exactly.
   Usage:
     <div class="stat-card">
       <div class="stat-card-header">
         <div class="stat-icon"><i data-lucide="zap" class="w-6 h-6"></i></div>
         <span class="stat-category">Efficiency</span>
       </div>
       <div class="stat-number">10–30%</div>
       <div class="stat-label">Energy Savings</div>
       <div class="stat-desc">Direct reduction in utility costs.</div>
     </div>
   ============================================================ */
.stat-card {
    padding: 2rem;
    background: #fafafa;
    border-radius: 2rem;
    border: 1px solid #f5f5f5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.06), 0 4px 10px -2px rgba(0,0,0,0.03);
    transform: translateY(-4px);
}
.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.stat-icon {
    padding: 0.75rem;
    background: white;
    border-radius: 0.75rem;
    color: #ea580c;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: inline-flex;
    transition: transform 0.3s ease;
}
.stat-card:hover .stat-icon {
    transform: scale(1.1);
}
.stat-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: #a3a3a3;
    font-family: 'Manrope', sans-serif;
}
.stat-number {
    font-family: 'Barlow', sans-serif !important;
    font-size: 3rem;
    font-weight: 400 !important;
    color: #171717;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}
.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #171717;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 0.75rem;
}
.stat-desc {
    font-size: 0.875rem;
    color: #737373;
    font-family: 'Manrope', sans-serif;
    line-height: 1.6;
}

/* Compact inline stats (hero rows, no card) */
.stat-inline-number {
    font-family: 'Barlow', sans-serif !important;
    font-size: 2rem;
    font-weight: 700 !important;
    color: #ea580c;
    line-height: 1.1;
}
.stat-inline-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #737373;
    font-family: 'Manrope', sans-serif;
    margin-top: 0.25rem;
}

/* ============================================================
   FOOTER CTA (matches homepage exactly)
   ============================================================ */
.footer-cta {
    padding: 8rem 1.5rem;
    background: linear-gradient(to bottom right, #23150d, #000000);
}

/* ============================================================
   HEADING FONT ENFORCEMENT
   Loaded last — overrides Tailwind CDN preflight reset so that
   all h1-h6 elements always render in Barlow regardless of
   which page they appear on.
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Barlow', sans-serif !important;
}

/* Display heading defaults — editorial weight + tight tracking.
   !important is required to win over Tailwind's .font-bold class rule
   (class specificity beats element specificity without it).
   h3 and below are left unforced so card/content headings keep
   their per-element weight as designed. */
h1, h2 {
    font-weight: 400 !important;
    letter-spacing: -0.025em !important;
}

/* === From: template-contact.php === */

/* ── CUBE ANIMATION — scoped to #cube-hero to prevent design-system.css conflicts ── */
/* design-system.css defines .cube-scene/.cube-group/.cube-unit with flex layout,
   skewY(-20deg) transform, and cubeFloat/facePulse animations that break this cube.
   Scoping with #cube-hero fully overrides those. */

/* Desktop-only: hide cube container on mobile */
@media (max-width: 1023px) {
    #cube-hero { display: none !important; }
}

#cube-hero .cube-scene {
    position: relative;
    top: -60px;
    transform: skewY(-20deg);
    display: block;   /* reset design-system.css display: flex */
    gap: unset;
}

#cube-hero .cube-group {
    position: relative;
    z-index: 2;
    display: block;   /* reset design-system.css display: flex */
    gap: unset;
}
#cube-hero .cube-group:nth-child(2) {
    z-index: 1;
    translate: -60px -60px;
}
#cube-hero .cube-group:nth-child(3) {
    z-index: 3;
    translate: 60px 60px;
}

#cube-hero .cube-col {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 30px;
    translate: calc(-70px * var(--x)) calc(-60px * var(--y));
}

/* Front face */
#cube-hero .cube-unit {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #e5e5e5;
    z-index: calc(1 * var(--i));
    transition: background 1.5s ease, filter 1.5s ease;
    transform: none;    /* reset design-system.css skewY(-20deg) on each unit */
    animation: none;    /* reset design-system.css cubeFloat / facePulse */
}
#cube-hero .cube-unit:hover {
    transition: background 0s, filter 0s;
    background: #f97316;
    filter: drop-shadow(0 0 28px rgba(249, 115, 22, 0.75));
}

/* Left face */
#cube-hero .cube-unit::before {
    content: "";
    position: absolute;
    top: 0;         /* reset design-system.css top: -8px */
    right: auto;    /* reset any right value from design-system.css */
    left: -40px;
    width: 40px;
    height: 100%;
    background: #d0d0d0;
    transform-origin: right;
    transform: skewY(45deg);
    transition: background 1.5s ease;
}
#cube-hero .cube-unit:hover::before {
    transition: background 0s;
    background: #ea580c;
}

/* Top face */
#cube-hero .cube-unit::after {
    content: "";
    position: absolute;
    top: -40px;
    right: auto;    /* reset design-system.css right: -14px */
    left: 0;
    width: 100%;
    height: 40px;
    background: #f0f0f0;
    transform-origin: bottom;
    transform: skewX(45deg);
    transition: background 1.5s ease;
}
#cube-hero .cube-unit:hover::after {
    transition: background 0s;
    background: #fb923c;
}

/* ── INQUIRY NAV CARDS ── */
.nav-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-card:hover {
    transform: translateX(5px);
    border-color: #ea580c;
}
.nav-card:hover .nav-icon  { background-color: #ea580c; color: white; }
.nav-card:hover .nav-arrow { transform: translateX(4px); color: #ea580c; }

/* ── 2-SLIDE FORM ── */
.form-slides-outer {
    overflow: hidden;
    position: relative;
}
/* Track is 200% wide — each slide is 50% of track = 100% of visible area */
.form-slides-track {
    display: flex;
    width: 200%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-slide {
    width: 50%;   /* 50% of 200% track = exactly 100% of outer container */
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Form fields */
.form-field {
    width: 100%;
    padding: 12px 16px;
    background: #fafafa;
    border: 1.5px solid #e5e5e5;
    border-radius: 12px;
    font-size: 14px;
    color: #171717;
    font-family: 'Manrope', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field:focus {
    outline: none;
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.08);
    background: white;
}
.form-field::placeholder { color: #a3a3a3; }

/* Field label */
.field-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #737373;
    margin-bottom: 8px;
    font-family: 'Manrope', sans-serif;
}

/* Step progress dots */
.step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #e5e5e5;
    transition: all 0.3s ease;
}
.step-dot.active {
    background: #ea580c;
    width: 24px;
    border-radius: 4px;
}

/* Validation error state */
.form-field.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

/* Next button disabled */
#form-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === From: template-contact-diagnostic.php === */

/* ── SVG ANIMATIONS ── */
@keyframes nodeFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-7px); }
}
@keyframes pulseRing {
    0%   { transform: scale(1); opacity: 0.35; }
    100% { transform: scale(2.5); opacity: 0; }
}
.pulse-ring {
    fill: none;
    stroke: #f97316;
    stroke-width: 1;
    transform-origin: 260px 260px;
    animation: pulseRing 3s ease-out infinite;
}

/* ── SELECTION CHIPS ── */
.sel-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #e5e5e5;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #525252;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    font-family: 'Manrope', sans-serif;
}
.sel-chip:hover { border-color: #f97316; color: #ea580c; }
.sel-chip.active { background: #fff7ed; border-color: #ea580c; color: #ea580c; }
.sel-chip .chip-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #d4d4d4;
    flex-shrink: 0;
    transition: background 0.18s;
}
.sel-chip.active .chip-dot { background: #ea580c; }

/* ── DELIVERABLE ITEMS ── */
.deliverable-item { display: flex; gap: 14px; align-items: flex-start; }
.deliverable-icon {
    width: 40px; height: 40px;
    background: rgba(249,115,22,0.08);
    border: 1px solid rgba(249,115,22,0.2);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #ea580c;
}

/* === From: template-contact-maintenance.php === */
/* Note: .form-field, .field-label, .step-dot, .form-slides-*, .sel-chip
   are covered above. Additional styles below. */

/* radio chips — only one selectable per group */
.sel-chip.radio.active { background: #fff7ed; border-color: #ea580c; color: #ea580c; }

/* ── TIER PANEL CARDS ── */
.tier-card {
    padding: 14px 16px;
    border: 1.5px solid #e5e5e5;
    border-radius: 14px;
    background: white;
    transition: border-color 0.2s;
}
.tier-card.featured { border-color: #ea580c; background: #fff7ed; }

/* === From: template-contact-partners.php === */
/* Note: .form-field, .field-label, .step-dot, .form-slides-*, .sel-chip
   are covered above. Additional styles below. */

/* ── PARTNER TYPE CARDS ── */
.partner-card {
    padding: 14px 16px;
    border: 1.5px solid #e5e5e5;
    border-radius: 14px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.partner-card:hover { border-color: #ea580c; }

/* ── NETWORK SVG ── */
@keyframes packetFlow {
    0%   { offset-distance: 0%;   opacity: 0;   }
    5%   { opacity: 1; }
    90%  { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}
@keyframes nodeGlow {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(249,115,22,0)); }
    50%       { filter: drop-shadow(0 0 8px rgba(249,115,22,0.5)); }
}
@keyframes hubPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    40%       { opacity: 0.25; transform: scale(1.7); }
}
