/* ============================================================
   SafeClass — Theme / Design System compartilhado
   Importe ANTES do CSS específico de cada página.
   ============================================================ */
:root {
    /* Surfaces */
    --bg: #0a0a0b;
    --bg-2: #0e0e10;
    --surface: rgba(255, 255, 255, 0.024);
    --surface-2: rgba(255, 255, 255, 0.045);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    /* Brand */
    --brand: #f97316;
    --brand-bright: #fb923c;
    --brand-deep: #ea580c;
    --brand-soft: rgba(249, 115, 22, 0.12);
    --brand-glow: rgba(249, 115, 22, 0.45);

    /* Text */
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;

    /* Feedback */
    --ok: #22c55e;
    --ok-soft: rgba(34, 197, 94, 0.12);
    --err: #ef4444;
    --err-soft: rgba(239, 68, 68, 0.1);

    /* Shape */
    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;
    --r-full: 999px;

    /* Type */
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --max: 1200px;

    /* Motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--brand); color: #fff; }

h1, h2, h3, .logo, .display {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

a { color: inherit; }

.highlight, .hero-highlight {
    background: linear-gradient(120deg, var(--brand-bright), var(--brand-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================================
   Header / Nav
   ============================================================ */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(10, 10, 11, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
}

.logo-safe { color: var(--brand); }
.logo-class { color: var(--text); }

nav { display: flex; align-items: center; gap: 2rem; }

nav a, nav button {
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s var(--ease);
}

nav a:hover, nav button:hover { color: var(--text); }

.btn-primary {
    background: var(--brand);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: var(--r-full);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s var(--ease);
    box-shadow: 0 4px 20px -4px var(--brand-glow);
}

.btn-primary:hover {
    background: var(--brand-bright);
    transform: translateY(-1px);
    box-shadow: 0 8px 28px -6px var(--brand-glow);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 0.5rem 1.5rem 1.25rem;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.mobile-menu.active { display: block; }

.mobile-menu a, .mobile-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 0;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s var(--ease);
}

.mobile-menu a:hover, .mobile-menu button:hover { color: var(--brand); }

/* ============================================================
   Botões hero / CTA
   ============================================================ */
.btn-hero {
    padding: 1rem 2rem;
    border-radius: var(--r-full);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
    font-family: var(--font-sans);
}

.btn-hero svg { width: 20px; height: 20px; }

.btn-hero-primary {
    background: linear-gradient(135deg, var(--brand-bright), var(--brand-deep));
    color: #fff;
    box-shadow: 0 10px 36px -8px var(--brand-glow);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px -8px var(--brand-glow);
}

.btn-hero-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-hero-secondary:hover {
    background: var(--surface-2);
    border-color: var(--brand);
    transform: translateY(-2px);
}

/* ============================================================
   Liquid Glass — material translúcido reutilizável
   ============================================================ */
.glass {
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 42%, rgba(255, 255, 255, 0.01) 100%);
    background-color: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 24px 50px -24px rgba(0, 0, 0, 0.75);
    border-radius: var(--r-lg);
}

.glass-hover { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease); }

.glass-hover:hover {
    transform: translateY(-4px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 30px 60px -24px rgba(0, 0, 0, 0.85);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass { background-color: rgba(20, 20, 23, 0.92); }
}

/* ============================================================
   Utilitários: back-button, page-header
   ============================================================ */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s var(--ease);
    font-size: 0.95rem;
}

.back-button:hover { color: var(--text); }

.page-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.08;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ============================================================
   Formulários
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all 0.2s var(--ease);
}

.form-input::placeholder { color: var(--text-dim); }

.form-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

textarea.form-input { resize: vertical; min-height: 120px; }

/* ============================================================
   Footer
   ============================================================ */
footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem 2.5rem;
}

.footer-content { max-width: var(--max); margin: 0 auto; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-section p { color: var(--text-dim); }

.footer-section h3 {
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 0.65rem; }

.footer-section a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s var(--ease);
    font-size: 0.95rem;
}

.footer-section a:hover { color: var(--brand); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p { color: var(--text-dim); font-size: 0.9rem; }

.social-links { display: flex; gap: 0.75rem; }

.social-links a {
    color: var(--text-dim);
    transition: all 0.2s var(--ease);
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--r-full);
    border: 1px solid var(--border);
}

.social-links a:hover {
    color: var(--brand);
    border-color: var(--brand);
    transform: translateY(-2px);
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   Responsive base
   ============================================================ */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    nav { display: none; }
    .mobile-menu-btn { display: block; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
