*, *::before, *::after {
  box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&display=swap');

@layer tokens, base, layout, components, utilities;

@layer tokens {
  :root {
    /* Colors - Premium Deep Blue & RGB */
    --color-bg: #01040a;
    --color-bg-alt: #020817;
    --color-surface: rgba(255, 255, 255, 0.03);
    --color-surface-brighter: rgba(255, 255, 255, 0.06);
    
    --color-primary: #10b981; /* Emerald */
    --color-secondary: #00d2ff; /* Tech Blue */
    --color-accent: #14b8a6; /* Teal */
    
    --gradient-rgb: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #00d2ff 100%);
    --gradient-premium: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    
    --color-text-main: #ffffff;
    --color-text-dim: #94a3b8;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-glow: rgba(16, 185, 129, 0.4);
    
    /* Spacing & Scaling */
    --space-8: 1.5rem;
    --space-16: 3rem;
    --space-32: 4rem;
    
    /* Effects */
    --glow-primary: 0 0 20px rgba(16, 185, 129, 0.3);
    --glow-secondary: 0 0 20px rgba(0, 210, 255, 0.3);
    --radius-premium: 1.25rem;
  }
}

@layer base {
  body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  h1, h2, h3, .font-heading {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }

  p {
    color: var(--color-text-dim);
    line-height: 1.7;
  }
}

@layer components {
  /* Premium Glass Container */
  .premium-card {
    background: var(--color-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-premium);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
  }

  .premium-card:hover {
    border-color: var(--color-border-glow);
    transform: translateY(-8px);
  }

  .premium-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-premium);
    pointer-events: none;
  }

  /* RGB Badge */
  .badge-rgb {
    display: inline-flex;
    padding: 0.5rem 1.25rem;
    background: var(--gradient-rgb);
    color: #000;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-radius: 2rem;
    letter-spacing: 0.1em;
    box-shadow: var(--glow-primary);
  }

  /* High Impact Button */
  .btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    background: #fff;
    color: #000;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
  }

  .btn-premium:hover {
    background: var(--color-primary);
    color: #000;
    box-shadow: var(--glow-primary);
    transform: scale(1.05);
  }

  .btn-secondary {
    display: inline-flex;
    padding: 1.25rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: #fff;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
  }

  .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
  }

  /* Header System */
  .header-main {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(1, 4, 10, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 8rem;
    position: relative;
    transition: all 0.4s ease;
  }

  .header-logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 10;
  }

  .header-banner {
    height: 5.5rem;
    width: 14rem;
    object-fit: fill;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
  }

  .header-nav {
    position: absolute;
    right: 1.5rem;
    display: flex;
    gap: 2.5rem;
  }

  @media (max-width: 1024px) {
    .header-nav { display: none; }
    .header-container { height: 8rem; }
    .header-banner { height: 5.5rem; width: 12rem; }
  }

  .nav-link {
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--color-text-dim);
    transition: all 0.3s ease;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .nav-link:hover {
    color: #fff;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
}

@layer utilities {
  .text-highlight {
    background: var(--gradient-rgb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .text-impressionam {
    background: linear-gradient(to right, #00d2ff, #9d50bb, #f06292);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .badge-cyan {
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
  }

  .project-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
  }

  .card-gradient-overlay {
    background: linear-gradient(to top, rgba(1, 4, 10, 0.9) 0%, rgba(1, 4, 10, 0.4) 50%, transparent 100%);
  }

  .partner-card {
    background: rgba(16, 185, 129, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3.5rem 4rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: min(100%, 340px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
  }

  .partner-card:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #00ff9d;
    box-shadow: 0 0 40px rgba(0, 255, 157, 0.3), inset 0 0 20px rgba(0, 255, 157, 0.15);
    transform: translateY(-8px);
  }

  .partner-card .corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid #00ff9d;
    opacity: 0.8;
    z-index: 5;
  }

  .corner-tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
  .corner-tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
  .corner-bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
  .corner-br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

  @keyframes neon-pulse {
    0%, 100% { opacity: 0.8; box-shadow: 0 0 10px rgba(0, 255, 157, 0.2); }
    50% { opacity: 1; box-shadow: 0 0 20px rgba(0, 255, 157, 0.4); }
  }

  .partner-card .corner {
    animation: neon-pulse 2s infinite ease-in-out;
  }

  .strategic-divider {
    height: 100px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(16, 185, 129, 0.5), transparent);
    position: relative;
    @media (max-width: 1024px) { display: none; }
  }

  .strategic-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary);
  }

  .premium-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    isolation: isolate;
  }

  .premium-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
  }

  .card-gradient-overlay {
    background: linear-gradient(to top, rgba(1, 4, 10, 0.95), transparent 60%);
    transition: all 0.5s ease;
    z-index: 2;
  }

  .premium-card:hover .card-gradient-overlay {
    background: linear-gradient(to top, rgba(1, 4, 10, 1), transparent 70%);
  }

  .premium-card .card-content {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
  }

  .premium-card:hover .card-content {
    transform: translateY(-5px);
  }

  .premium-card:hover .gallery-image {
    transform: scale(1.1);
  }
    position: absolute;
    inset: -20px;
    background: var(--color-primary);
    filter: blur(80px);
    opacity: 0.1;
    z-index: -1;
  }

  .bg-hero {
    background-image: linear-gradient(to bottom, rgba(1, 4, 10, 0.4), rgba(1, 4, 10, 0.95)), 
                      url('imagens/amazonled_hero_city_night_1776773677683.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: ken-burns 20s ease infinite alternate;
    padding-block: clamp(8rem, 15vh, 15rem) 4rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
  }

  @keyframes ken-burns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
  }

  .hud-overlay {
    position: absolute;
    inset: 0;
    background-image: 
      radial-gradient(circle at 2px 2px, rgba(16, 185, 129, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
    z-index: 1;
    pointer-events: none;
  }

  .hud-grid {
    position: absolute;
    inset: 0;
    background: 
      linear-gradient(rgba(16, 185, 129, 0.02) 1px, transparent 1px),
      linear-gradient(90deg, rgba(16, 185, 129, 0.02) 1px, transparent 1px);
    background-size: 100px 100px;
    z-index: 1;
    pointer-events: none;
  }

  .hud-grid::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 5%;
    width: 200px;
    height: 100px;
    border-left: 2px solid var(--color-primary);
    border-top: 2px solid var(--color-primary);
    opacity: 0.3;
  }

  .hud-grid::after {
    content: 'HD RES // 8K DAKTRONICS';
    position: absolute;
    bottom: 10%;
    right: 5%;
    font-size: 0.6rem;
    font-family: monospace;
    color: var(--color-primary);
    letter-spacing: 0.2em;
    opacity: 0.5;
  }

  .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
  }

  .service-card {
    position: relative;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 18rem;
  }

  .service-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.04);
  }

  .service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--card-glow, transparent), transparent 70%);
    opacity: 0.1;
    transition: opacity 0.5s ease;
  }

  .service-card:hover::after {
    opacity: 0.2;
  }

  .service-card .hud-tag {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: monospace;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    opacity: 0.3;
    pointer-events: none;
  }

  /* Variations */
  .card-green { --card-glow: #10b981; border-color: rgba(16, 185, 129, 0.2); }
  .card-green:hover { border-color: #10b981; box-shadow: 0 0 30px rgba(16, 185, 129, 0.15); }
  
  .card-blue { --card-glow: #00d2ff; border-color: rgba(0, 210, 255, 0.2); }
  .card-blue:hover { border-color: #00d2ff; box-shadow: 0 0 30px rgba(0, 210, 255, 0.15); }
  
  .card-red { --card-glow: #ef4444; border-color: rgba(239, 68, 68, 0.2); }
  .card-red:hover { border-color: #ef4444; box-shadow: 0 0 30px rgba(239, 68, 68, 0.15); }
  
  .card-yellow { --card-glow: #f59e0b; border-color: rgba(245, 158, 11, 0.2); }
  .card-yellow:hover { border-color: #f59e0b; box-shadow: 0 0 30px rgba(245, 158, 11, 0.15); }

  .service-card i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  }

  .service-card:hover i {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 10px var(--card-glow));
  }

  .diff-container {
    padding: 5rem;
  }

  @media (max-width: 768px) {
    .diff-container { padding: 2.5rem 1.5rem; border-radius: 2rem !important; }
    .diff-container h2 { margin-bottom: 2.5rem !important; }
  }

  .diff-module {
    padding: 2rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .diff-module:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-primary);
    transform: translateY(-5px);
  }

  .diff-module i {
    transition: all 0.4s ease;
  }

  /* RGB Brand Icons */
  .icon-blue { color: #014ddd !important; filter: drop-shadow(0 0 8px rgba(1, 77, 221, 0.4)); }
  .icon-green { color: #9ce600 !important; filter: drop-shadow(0 0 8px rgba(156, 230, 0, 0.4)); }
  .icon-red { color: #f91f0a !important; filter: drop-shadow(0 0 8px rgba(249, 31, 10, 0.4)); }

  .diff-module:hover i {
    transform: scale(1.1);
  }

  .diff-module:hover .icon-blue { filter: drop-shadow(0 0 15px rgba(1, 77, 221, 0.8)); }
  .diff-module:hover .icon-green { filter: drop-shadow(0 0 15px rgba(156, 230, 0, 0.8)); }
  .diff-module:hover .icon-red { filter: drop-shadow(0 0 15px rgba(249, 31, 10, 0.8)); }

  .diff-meta {
    font-family: monospace;
    font-size: 0.6rem;
    letter-spacing: 0.2rem;
    color: var(--color-primary);
    opacity: 0.5;
    text-transform: uppercase;
  }

  .led-power-on {
    display: inline-block;
    animation: led-flicker 3s infinite alternate;
  }

  .led-l { color: #10FF00; text-shadow: 0 0 10px rgba(16, 255, 0, 0.5); }
  .led-e { color: #ff0000; text-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
  .led-d { color: #0088ff; text-shadow: 0 0 10px rgba(0, 136, 255, 0.5); }

  @keyframes led-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
      opacity: 1;
    }
    20%, 24%, 55% {
      opacity: 0.2;
      text-shadow: none !important;
    }
  }

  .led-power-on span {
    animation: led-flicker 4s infinite alternate;
  }
  
  .led-power-on .led-l { animation-delay: 0.1s; }
  .led-power-on .led-e { animation-delay: 0.2s; }
  .led-power-on .led-d { animation-delay: 0.3s; }

  /* Footer Design System - Emerald Aura Version */
  .footer-main {
    padding-block: 8rem 4rem;
    background: 
      radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.15), transparent 65%),
      radial-gradient(circle at 100% 100%, rgba(1, 77, 221, 0.05), transparent 40%),
      #01040a;
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
  }

  /* Scanline effect for footer top */
  .footer-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    animation: scanline-move 4s infinite linear;
  }

  @keyframes scanline-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }


  .footer-title {
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.9;
  }


  .footer-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0.1), transparent);
  }

  .footer-link {
    text-decoration: none;
    color: var(--color-text-dim);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

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

  .social-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .social-icon:hover {
    background: #fff;
    color: #000;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: #fff;
  }

  .social-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    stroke-width: 2px;
  }
}

/* Base structural sections */
.section-padding {
  padding-block: 8rem;
}

@media (max-width: 768px) {
  .section-padding { padding-block: 5rem; }
  
  .cta-responsive-card {
    padding: 3rem 1.5rem !important;
  }
  
  .btn-premium {
    width: 100%;
    justify-content: center;
    padding: 1rem 0.75rem !important;
    font-size: 0.9rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .footer-main { padding-block: 5rem 3rem; }
  
  .bg-hero {
    padding-bottom: 4rem !important;
    min-height: auto;
  }

  .partner-card {
    padding: 2rem 1.5rem !important;
  }
}

/* Base structural sections */
.section-padding { padding-block: var(--space-32); }
.container { max-width: 80rem; margin-inline: auto; padding-inline: 1.5rem; }

@media (max-width: 768px) {
  :root { --space-32: 4rem; }
  .btn-premium, .btn-secondary { width: 100%; justify-content: center; }
}
