/* ═══════════════════════════════════════════════════════
   TRIPLEX APPS — Design System
   Aesthetic: Tech-Craft Minimal
   Fonts: Space Grotesk (display) + DM Sans (body)
   ═══════════════════════════════════════════════════════ */

:root {
    /* ── Color Story ── */
    --bg:           #fafbfc;
    --bg-alt:       #f0f2f5;
    --surface:      #ffffff;
    --text:         #111827;
    --text-muted:   #6b7280;
    --accent:       #2563eb;
    --accent-soft:  rgba(37, 99, 235, 0.08);
    --accent-glow:  rgba(37, 99, 235, 0.25);
    --border:       #e5e7eb;
    --border-subtle:#f3f4f6;
    --dev-amber:    #f59e0b;

    /* ── Shadows ── */
    --shadow-sm:    0 1px 2px rgb(0 0 0 / 0.04);
    --shadow-md:    0 4px 16px rgb(0 0 0 / 0.06);
    --shadow-lg:    0 12px 40px rgb(0 0 0 / 0.08);
    --shadow-card:  0 2px 12px rgb(0 0 0 / 0.04), 0 0 0 1px var(--border);

    /* ── Spacing ── */
    --space-xs:     0.5rem;
    --space-sm:     1rem;
    --space-md:     1.5rem;
    --space-lg:     3rem;
    --space-xl:     5rem;
    --space-2xl:    8rem;

    /* ── Radii ── */
    --radius:       16px;
    --radius-sm:    8px;
    --radius-full:  100px;

    /* ── Timing ── */
    --ease:         cubic-bezier(0.16, 1, 0.3, 1);
    --duration:     0.4s;
}

/* ── Dark Mode ── */
.dark-mode {
    --bg:           #09090b;
    --bg-alt:       #18181b;
    --surface:      #1c1c21;
    --text:         #f4f4f5;
    --text-muted:   #a1a1aa;
    --accent:       #60a5fa;
    --accent-soft:  rgba(96, 165, 250, 0.1);
    --accent-glow:  rgba(96, 165, 250, 0.2);
    --border:       #27272a;
    --border-subtle:#1f1f23;
    --shadow-sm:    0 1px 2px rgb(0 0 0 / 0.2);
    --shadow-md:    0 4px 16px rgb(0 0 0 / 0.3);
    --shadow-lg:    0 12px 40px rgb(0 0 0 / 0.4);
    --shadow-card:  0 2px 12px rgb(0 0 0 / 0.2), 0 0 0 1px var(--border);
}

/* ═══════════════════ RESET ═══════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

h1, h2, h3, h4, .logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.15;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ═══════════════════ HEADER ═══════════════════ */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

header.scrolled {
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.logo-text {
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: var(--text);
}

.logo-text span {
    color: var(--accent);
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover { color: var(--accent); }

.btn-nav {
    background: var(--accent);
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.btn-nav:hover {
    opacity: 0.9;
}

/* Nav Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#theme-toggle {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    cursor: pointer;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background 0.2s, border-color 0.2s;
}

#theme-toggle:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.light-mode .icon-dark  { display: block; }
.light-mode .icon-light { display: none; }
.dark-mode  .icon-dark  { display: none; }
.dark-mode  .icon-light { display: block; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════ BUTTONS ═══════════════════ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: #fff;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border);
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.btn-white {
    display: inline-block;
    background: #fff;
    color: var(--accent);
    padding: 1rem 2.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgb(255 255 255 / 0.2);
}

/* ═══════════════════ OVERLINE ═══════════════════ */
.overline {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.text-accent {
    color: var(--accent);
}

/* ═══════════════════ HERO ═══════════════════ */
.hero {
    position: relative;
    padding: calc(72px + var(--space-2xl)) 0 var(--space-2xl);
    overflow: hidden;
}

.hero-grain {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
    pointer-events: none;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: var(--space-xl);
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: var(--space-lg);
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero-brand {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-float {
    width: 280px;
    height: 280px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px var(--accent-glow));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

.hero-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}

.hero-divider svg {
    width: 100%;
    height: 80px;
}

/* ═══════════════════ SECTION HEAD ═══════════════════ */
.section-head {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-head h2 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-head > p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ═══════════════════ SISTEMAS ═══════════════════ */
.sistemas {
    padding: var(--space-xl) 0 var(--space-2xl);
    background: var(--bg-alt);
}

.system-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.system-row:last-child { margin-bottom: 0; }

.system-row.reverse { direction: rtl; }
.system-row.reverse > * { direction: ltr; }

.system-visual {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.system-visual img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.system-row:hover .system-visual img {
    transform: scale(1.04);
}

.dev-ribbon {
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--dev-amber);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 40px;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
}

.system-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
}

.system-badge--dev {
    color: var(--dev-amber);
}

.system-info h3 {
    font-size: 1.8rem;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.system-info > p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: var(--space-md);
}

.feature-list {
    margin-bottom: var(--space-md);
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.35rem 0;
}

.feature-list li i {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.coming-soon-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(245, 158, 11, 0.1);
    color: var(--dev-amber);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ═══════════════════ EM BREVE ═══════════════════ */
.proximos {
    padding: var(--space-2xl) 0;
}

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-md);
}

.upcoming-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.upcoming-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.upcoming-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-soft);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--accent);
}

.upcoming-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.upcoming-card > p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: var(--space-md);
}

.upcoming-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.upcoming-tags span {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    color: var(--accent);
}

/* ═══════════════════ CTA ═══════════════════ */
.cta {
    padding: var(--space-xl) 0 var(--space-2xl);
}

.cta-box {
    background: var(--accent);
    padding: var(--space-2xl) var(--space-xl);
    border-radius: 28px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
    pointer-events: none;
}

.cta-box h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.cta-box p {
    font-size: 1.15rem;
    opacity: 0.85;
    margin-bottom: var(--space-lg);
}

/* ═══════════════════ FOOTER ═══════════════════ */
footer {
    padding: var(--space-xl) 0 var(--space-lg);
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.footer-brand p {
    margin-top: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 280px;
}

.footer-col h4 {
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-col p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.social-row {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-sm);
}

.social-row a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.social-row a:hover { color: var(--accent); }

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ═══════════════════ SCROLL REVEAL ═══════════════════ */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 900px) {
    .hero-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-copy { order: 2; }
    .hero-brand { order: 1; }
    .hero-actions { justify-content: center; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-logo-float { width: 180px; height: 180px; }

    .system-row,
    .system-row.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .system-visual { order: 1; }
    .system-info  { order: 2; }

    .nav-links { display: none; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: var(--space-md);
        gap: var(--space-sm);
        box-shadow: var(--shadow-md);
    }

    .hamburger { display: flex; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

@media (max-width: 500px) {
    .upcoming-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1 {
        font-size: 2rem;
    }
}
