/* ==========================================================================
   ElectroPC — Base Styles / Reset / Typography / Utilities
   ========================================================================== */

/* ---- Modern Reset ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-normal);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Fix for body when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text-link-hover);
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--color-text);
    text-wrap: balance;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
    color: var(--color-text-secondary);
    text-wrap: pretty;
}

::selection {
    background-color: var(--color-primary);
    color: var(--color-primary-text);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ---- Scrollbar styling ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-tertiary);
}

/* ==========================================================================
   Layout — Containers
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--lg { max-width: var(--container-lg); }
.container--xl { max-width: var(--container-xl); }
.container--2xl { max-width: var(--container-2xl); }
.container--full { max-width: 100%; }

/* ---- Section Spacing ---- */
.section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
}

.section--sm {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

.section--lg {
    padding-top: var(--space-32);
    padding-bottom: var(--space-32);
}

/* ---- Section Header (title + subtitle) ---- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-12);
}

.section-header__label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-4);
}

.section-header__title {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-extrabold);
    margin-bottom: var(--space-4);
}

.section-header__subtitle {
    font-size: var(--fs-md);
    color: var(--color-text-secondary);
    line-height: var(--lh-relaxed);
}

/* ---- Grid System ---- */
.grid {
    display: grid;
    gap: var(--space-6);
}

.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: 1024px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn--primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    background: var(--gradient-brand-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-1px);
    color: #fff;
}

.btn--secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn--secondary:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn--ghost:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.btn--whatsapp {
    background: #25d366;
    color: #fff;
}

.btn--whatsapp:hover {
    background: #1da851;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}

/* Glow button effect (gradient border + pulse) */
.btn--glow {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #0064FF, #A130FF, #CC1CF7);
    color: #fff;
    box-shadow: 0 0 15px rgba(0,100,255,0.3), 0 0 30px rgba(161,48,255,0.15);
    transition: all var(--transition-base);
}

.btn--glow:hover {
    box-shadow: 0 0 25px rgba(0,100,255,0.5), 0 0 50px rgba(161,48,255,0.25), 0 0 80px rgba(204,28,247,0.15);
    transform: translateY(-2px);
    color: #fff;
}

/* Glass button */
.btn--glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
}

.btn--glass:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
    transform: translateY(-1px);
}

[data-theme="light"] .btn--glass {
    background: rgba(0,0,0,0.04);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--color-text);
}

[data-theme="light"] .btn--glass:hover {
    background: rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.15);
    color: var(--color-text);
}

.btn--lg {
    font-size: var(--fs-base);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-xl);
}

.btn--sm {
    font-size: var(--fs-xs);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
}

.btn--full {
    width: 100%;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-2px);
}

.card--glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-color: var(--glass-border);
}

.card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: var(--color-primary-light);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.card__icon svg {
    width: 24px;
    height: 24px;
}

.card__title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-2);
}

.card__text {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-relaxed);
}

.card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
    margin-top: var(--space-4);
    transition: gap var(--transition-fast);
}

.card__link:hover {
    gap: var(--space-3);
    color: var(--color-primary-hover);
}

.card__link svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    background: var(--color-badge-bg);
    color: var(--color-badge-text);
}

.badge--success {
    background: rgba(16,185,129,0.1);
    color: var(--color-success);
}

.badge--warning {
    background: rgba(245,158,11,0.1);
    color: var(--color-warning);
}

.badge--accent {
    background: rgba(6,182,212,0.1);
    color: var(--color-accent);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gradient {
    background: linear-gradient(135deg, #0064FF, #A130FF, #CC1CF7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient--animated {
    background: linear-gradient(-45deg, #0064FF, #A130FF, #CC1CF7, #0064FF);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 6s ease infinite;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

/* Fade in animation for scroll reveals */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ==========================================================================
   Responsive typography
   ========================================================================== */

@media (max-width: 768px) {
    h1 { font-size: var(--fs-3xl); }
    h2 { font-size: var(--fs-2xl); }
    h3 { font-size: var(--fs-xl); }

    .section { padding-top: var(--space-12); padding-bottom: var(--space-12); }
    .section--lg { padding-top: var(--space-20); padding-bottom: var(--space-20); }

    .section-header__title { font-size: var(--fs-2xl); }

    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
}
