/* ============================================================================
   Techco Power Engineering — SPW v4.0 Modern Stylesheet
   Location: /assets/css/style.css
   Author: Arcta Studio — Optimized for 2025+
   ========================================================================= */

/* ============================================================================
   1. MODERN VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
    /* BRAND COLORS - Enhanced contrast & harmony */
    --primary: #e7c46a;
    --primary-glow: rgba(231, 196, 106, 0.4);
    --secondary: #66e1ff;
    --secondary-glow: rgba(102, 225, 255, 0.3);
    --accent: #ff7a59;
    --accent-glow: rgba(255, 122, 89, 0.3);
    --text: #ffffff;
    --muted: #cfcfcf;
    --dark: #050809;
    --darker: #030506;

    /* GRADIENT SYSTEM */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, #f4d285 100%);
    --gradient-dark: linear-gradient(135deg, var(--dark) 0%, #0a0e10 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);

    /* UI STYLES - Modern glass morphism */
    --panel: rgba(255, 255, 255, 0.08);
    --panel-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--primary-glow);
    --radius: 16px;
    --radius-lg: 24px;

    /* MODERN ANIMATION TIMINGS */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

    /* STATUS COLORS */
    --ok: #10b981;
    --err: #ef4444;

    /* TYPOGRAPHY - Modern scale */
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
    --font-heading: "Inter", system-ui, -apple-system, sans-serif;
}

/* ============================================================================
   2. ENHANCED RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--darker);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px;
    overflow-x: hidden;
}

/* ============================================================================
   3. MODERN TYPOGRAPHY SYSTEM
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.02em;
}

h1 { 
    font-size: clamp(2.5rem, 4vw + 1rem, 4rem);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 { 
    font-size: clamp(2rem, 3vw + 0.5rem, 3rem);
    color: var(--primary);
}

h3 { 
    font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
}

p {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.8;
}

/* ============================================================================
   4. ENHANCED LINKS & BUTTONS
   ========================================================================== */
a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
}

a:hover { 
    color: var(--primary);
}

/* Modern Button System */
button, .cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--gradient-primary);
    color: #111;
    padding: 1.25rem 2.5rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

button::before, .cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s var(--ease-out-expo);
}

button:hover, .cta:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
}

button:hover::before, .cta:hover::before {
    left: 100%;
}

/* Secondary Button Variant */
.btn-secondary {
    background: var(--gradient-glass);
    color: var(--text);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
}

.btn-secondary:hover {
    background: var(--panel);
    border-color: var(--primary);
}

/* CTA GROUP UTILITY (optional wrapper) */
.cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}
.cta-group .cta {
    min-width: 220px;
    text-align: center;
}

/* ============================================================================
   5. ENHANCED HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--dark) 80%);
    z-index: 1;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: brightness(0.6) contrast(1.1);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); }
}

.hero-content {
    max-width: 880px;
    margin: 0 auto;
    padding: 3rem 2rem;
    animation: slideUp 1s var(--ease-out-expo) both;
}

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

.hero h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    margin-bottom: 1.5rem;
    animation-delay: 0.2s;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    animation-delay: 0.4s;
}

/* Hero button-row fix without HTML changes:
   targets the paragraph that follows the lead paragraph in hero. */
.hero .hero-content .lead + p {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.hero .hero-content .lead + p .cta {
    min-width: 220px;
}

/* ============================================================================
   6. MODERN PANELS & CARDS
   ========================================================================== */
.panel {
    background: var(--panel);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 3rem;
    transition: all 0.4s var(--ease-smooth);
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    transition: all 0.4s var(--ease-out-expo);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s var(--ease-out-expo);
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-hover), 0 0 40px var(--primary-glow);
    border-color: var(--primary);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    margin-top: 1.5rem;
    color: #eaf7ff;
    font-size: 1.4rem;
    font-weight: 700;
}

.card p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================================================
   7. ENHANCED GRID SYSTEM
   ========================================================================== */
.grid {
    display: grid;
    gap: 2rem;
}

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

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================================
   8. MODERN FORMS
   ========================================================================== */
.form {
    max-width: 640px;
    margin: 0 auto;
}

.form form {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.form-group {
    position: relative;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.3s var(--ease-smooth);
    backdrop-filter: blur(10px);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-glow);
    transform: translateY(-2px);
}

.form label {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .form .row { grid-template-columns: 1fr; }
}

/* ============================================================================
   CONTACT FORM — CONSENT CHECKBOX
   ---------------------------------------------------------------------------
   Purpose: Styles the "I agree to the Privacy Policy" consent row.
   Location: /contact.php form footer
   Context:
     - Aligns checkbox + text in one horizontal row
     - Ensures mobile/tablet responsiveness (text wraps neatly after checkbox)
     - Uses project brand variables (--primary, --secondary, --muted)
   Notes:
     - `accent-color` applied to checkbox for modern browser branding
     - On hover, Privacy Policy link changes from secondary to primary color
     - Accessible: large hit area, cursor pointer on label & checkbox
   ========================================================================= */
.form-consent {
  display: flex;
  align-items: center;
  margin: 1rem 0;
}

.form-consent label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  cursor: pointer;
}

.form-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-consent a {
  color: var(--secondary);
  text-decoration: underline;
  transition: color 0.3s var(--ease-smooth);
}

.form-consent a:hover {
  color: var(--primary);
}


/* ============================================================================
   9. ENHANCED UTILITIES & HELPERS
   ========================================================================== */
.section {
    padding: 6rem 0;
    position: relative;
}

.section h2 {
    font-size: clamp(2.5rem, 4vw + 1rem, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section p.lead {
    color: var(--muted);
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
}

.hint {
    font-size: 0.95rem;
    color: var(--secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    transition: all 0.3s var(--ease-smooth);
}

.hint:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* ============================================================================
   10. MODERN HEADER SCROLL EFFECTS
   ========================================================================== */
header.scrolled,
.tpe-header.scrolled {
    background: rgba(5, 8, 9, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.4s var(--ease-out-expo);
}

/* ============================================================================
   11. MODERN FOOTER ENHANCEMENTS
   ========================================================================== */
.tpe-footer {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    padding: 4rem 1rem;
    color: var(--muted);
    font-size: 1rem;
    position: relative;
}

.tpe-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-wrap {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Enhanced Footer Top */
.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer-logo img {
    height: 60px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    transition: all 0.4s var(--ease-out-expo);
}

.footer-logo img:hover {
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 0 25px var(--primary-glow));
}

.footer-nav ul {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav ul li a {
    color: var(--muted);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s var(--ease-smooth);
}

.footer-nav ul li a:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Enhanced Footer Middle */
.footer-middle {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
}

.footer-contact h4,
.footer-socials h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-contact p a {
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact p a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Enhanced Social Icons */
.footer-socials ul {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-socials ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--gradient-glass);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    transition: all 0.4s var(--ease-out-expo);
}

.footer-socials ul li a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 24px var(--primary-glow);
}

.footer-socials ul li a img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s var(--ease-out-expo);
}

.footer-socials ul li a:hover img {
    transform: scale(1.2);
}

/* Enhanced Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.95rem;
}

.footer-bottom .built-by a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s var(--ease-smooth);
}

.footer-bottom .built-by a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================================================
   12. SCROLL ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.6s var(--ease-out-expo);
    }
    
    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading animation for cards */
@keyframes cardLoad {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card {
    animation: cardLoad 0.6s var(--ease-out-expo) both;
}

/* Stagger animation for grid items */
.grid > *:nth-child(1) { animation-delay: 0.1s; }
.grid > *:nth-child(2) { animation-delay: 0.2s; }
.grid > *:nth-child(3) { animation-delay: 0.3s; }
.grid > *:nth-child(4) { animation-delay: 0.4s; }
.grid > *:nth-child(5) { animation-delay: 0.5s; }
.grid > *:nth-child(6) { animation-delay: 0.6s; }

/* ============================================================================
   13. RESPONSIVE ENHANCEMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    .panel {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .footer-middle {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-nav ul {
        gap: 1rem;
    }
    
    .footer-nav ul li a {
        padding: 0.5rem;
    }

    /* Ensure hero CTAs stack nicely on phones */
    .hero .hero-content .lead + p .cta {
        min-width: 260px;
        width: 100%;
    }
}

/* High-DPI displays enhancement */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-media img {
        filter: brightness(0.55) contrast(1.15);
    }
}

/* ============================================================================
   FORM SELECT — CUSTOM STYLES (Overrides browser default look)
   ========================================================================== */
.form-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.form-select-wrapper select {
  appearance: none;            /* Remove native arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 1.25rem 1.5rem;
  padding-right: 3rem;         /* Space for custom arrow */
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.4;
  transition: all 0.3s var(--ease-smooth);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.form-select-wrapper select:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  box-shadow: 0 0 0 4px var(--primary-glow);
  transform: translateY(-2px);
}

/* Custom dropdown arrow */
.form-select-wrapper::after {
  content: "▼";
  font-size: 0.75rem;
  color: var(--primary);
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: color 0.3s var(--ease-smooth);
}

.form-select-wrapper:hover::after {
  color: var(--secondary);
}
