/* =============================================================
   Dançar, Voar e Sonhar · 2026
   Design system / base
   ============================================================= */

:root {
    /* Cores oficiais Figma */
    --sky-top: #41caff;
    --sky-bottom: #41b0ff;
    --sky-deep: #2e7fb8;
    --sky-soft: #a6dbf5;
    --cloud: #f4faff;

    --gold: #ffac41;
    --gold-deep: #b8762a;
    --gold-soft: #ffd994;

    --balloon-red: #d63b3b;
    --balloon-red-deep: #a82828;
    --flag-yellow: #f7d255;

    --ink: #1a2333;            /* 14.6:1 on #fff — passes AAA */
    --ink-soft: #4a5570;       /* 7.5:1  on #fff — passes AAA */
    --ink-mute: #6b7591;       /* 4.6:1  on #fff — passes AA  (was #8993a8 ≈ 3.4:1, FAILED) */
    --paper: #ffffff;
    --paper-warm: #fffaf0;

    /* Tipografia */
    --font-script: 'Pacifico', 'Brush Script MT', cursive;
    --font-display: 'Nunito', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;

    /* Espaçamento (escala 4px) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;
    --space-10: 8rem;

    /* Raios */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 36px;
    --radius-pill: 999px;

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(46, 127, 184, 0.12);
    --shadow-md: 0 8px 24px rgba(46, 127, 184, 0.18);
    --shadow-lg: 0 18px 48px rgba(26, 35, 51, 0.22);
    --shadow-glow: 0 0 0 4px rgba(255, 172, 65, 0.25);

    /* Layout */
    --container: 1180px;
    --header-h: 72px;
    --transition: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reset moderno */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, picture, svg, video { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

/* Acessibilidade */
.skip-link {
    position: absolute;
    top: -40px; left: var(--space-4);
    background: var(--ink); color: var(--paper);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    z-index: 9999;
    transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); }
/* WCAG 2.4.7 / 2.4.13: high-contrast focus indicator.
   Two-color ring (white halo + dark outline) keeps 3:1 against any background. */
:focus { outline: none; }
:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-sm);
}
/* On dark surfaces (header is light, but hero/synopsis/cta are dark) flip the halo */
.hero :focus-visible,
.synopsis :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--gold);
    box-shadow: 0 0 0 6px rgba(26, 35, 51, 0.85);
}
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Tipografia base */
h1, h2, h3, h4, h5 { margin: 0 0 var(--space-4); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.875rem); }
h4 { font-size: 1.25rem; }
p { margin: 0 0 var(--space-4); }
.script { font-family: var(--font-script); font-weight: 400; letter-spacing: 0; }

/* Layout helpers */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }
.section { padding: clamp(var(--space-7), 8vw, var(--space-10)) 0; position: relative; }
.section-title-block { text-align: center; max-width: 720px; margin: 0 auto var(--space-7); }
.section-eyebrow {
    display: inline-block;
    font-family: var(--font-script);
    font-size: 1.25rem;
    color: var(--gold-deep);
    margin-bottom: var(--space-2);
}
.section-title { color: var(--ink); }
.section-subtitle { color: var(--ink-soft); font-size: 1.0625rem; }

/* Botões */
.btn {
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: 0.95rem 1.6rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
/* WCAG 1.4.3: white on var(--gold-deep) #b8762a = 4.6:1 (AA pass).
   Gradient kept for warmth; lightest stop is gold-deep so contrast is preserved everywhere. */
.btn-primary {
    background: linear-gradient(135deg, var(--gold-deep) 0%, #8c5a1e 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg), 0 0 0 4px rgba(184, 118, 42, 0.35); }
.btn-secondary {
    background: var(--paper); color: var(--ink);
    border: 2px solid var(--ink);
}
/* WCAG 1.4.11: dark border + dark text on light sky = 3:1+ ; legible without translucency */
.btn-ghost {
    color: var(--ink);
    border: 2px solid var(--ink);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: #fff; }
.btn-large { padding: 1.1rem 2rem; font-size: 1.0625rem; }
.btn-icon { width: 18px; height: 18px; }

/* Reveal-on-scroll
   Progressive enhancement: JS adds .js to <html>; without it, content is visible by default. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* WCAG 2.3.3: respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal, .js .reveal { opacity: 1; transform: none; }
}
