/* ============================================================
   DIGITALSTREETZ — DESIGN SYSTEM
   main.css — Brutalista / Editorial
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap');

/* ---- TOKENS ---- */
:root {
    /* Cores escuras */
    --black:       #080808;
    --dark:        #0F0F0F;
    --dark-2:      #161616;
    --dark-3:      #1F1F1F;

    /* Cores claras — editorial */
    --cream:       #F2EDE4;
    --cream-2:     #EAE4D9;
    --cream-3:     #DDD8CE;
    --white:       #FFFFFF;
    --off-white:   #F8F6F2;

    /* Texto claro (sobre escuro) */
    --text-light:  #FFFFFF;
    --text-muted-light: rgba(255,255,255,0.5);

    /* Texto escuro (sobre creme) */
    --text-dark:   #080808;
    --text-muted-dark: #7A7268;

    /* Acentos */
    --accent:      #E8290B;   /* Vermelho brutalista */
    --accent-2:    #FF4520;   /* Vermelho mais vivo */
    --cyan:        #00E5C8;
    --yellow:      #F0E040;

    /* Borders */
    --border-light: rgba(8,8,8,0.12);
    --border-dark:  rgba(255,255,255,0.1);

    /* Aliases — portfolio/case-study CSS shorthand */
    --bg:       #080808;   /* = --black */
    --bg-alt:   #0F0F0F;   /* = --dark  */
    --surface:  #161616;   /* = --dark-2 */
    --surface-2: #1F1F1F;  /* = --dark-3 */
    --border:   rgba(255,255,255,0.1);
    --muted:    rgba(255,255,255,0.5);
    --muted-2:  rgba(255,255,255,0.25);

    /* Fontes */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body:    'DM Sans', sans-serif;

    /* Tamanhos de texto */
    --text-xs:   0.6875rem;   /* 11px */
    --text-sm:   0.8125rem;   /* 13px */
    --text-base: 1rem;        /* 16px */
    --text-md:   1.125rem;    /* 18px */
    --text-lg:   1.25rem;     /* 20px */
    --text-xl:   1.5rem;      /* 24px */
    --text-2xl:  2rem;        /* 32px */
    --text-3xl:  2.75rem;     /* 44px */
    --text-4xl:  3.5rem;      /* 56px */
    --text-5xl:  5rem;        /* 80px */

    /* Fluid hero sizes */
    --text-hero:    clamp(3.5rem, 8vw, 8.5rem);
    --text-mega:    clamp(5rem, 13vw, 12rem);
    --text-section: clamp(2.2rem, 5vw, 5rem);

    /* Line heights */
    --leading-tight:  1.0;
    --leading-snug:   1.2;
    --leading-normal: 1.6;

    /* Letter spacing */
    --tracking-tight:   -0.04em;
    --tracking-normal:   0em;
    --tracking-wide:     0.06em;
    --tracking-widest:   0.22em;

    /* Espaçamento */
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --container: 1360px;
    --gutter:    clamp(1.5rem, 4vw, 3.5rem);

    /* Transitions */
    --ease-expo:   cubic-bezier(0.19, 1, 0.22, 1);
    --ease-out:    cubic-bezier(0, 0, 0.2, 1);
    --t-fast:      0.18s var(--ease-out);
    --t-base:      0.36s var(--ease-out);
    --t-slow:      0.7s var(--ease-expo);

    /* Z-index */
    --z-nav:   900;
    --z-float: 800;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-dark);
    background: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---- SEÇÃO BASE ---- */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ---- CONTAINER ---- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ---- REVEAL ANIMATIONS (CSS-based, zero flicker) ---- */

/* Initial states — hidden before IntersectionObserver fires */
[data-reveal="fade"] {
    opacity: 0;
    transform: translateY(28px);
}
[data-reveal="fade-up"] {
    opacity: 0;
    transform: translateY(50px);
}
[data-reveal="fade-right"] {
    opacity: 0;
    transform: translateX(-40px);
}
[data-reveal="fade-left"] {
    opacity: 0;
    transform: translateX(40px);
}
[data-reveal="scale"] {
    opacity: 0;
    transform: scale(0.88);
}
/* headline is handled by GSAP — no CSS initial state */
[data-reveal="headline"] {
    /* words inside get hidden by GSAP individually */
}

/* Revealed state — added by IntersectionObserver */
[data-reveal].revealed {
    opacity: 1;
    transform: none;
    transition: opacity 0.75s var(--ease-expo), transform 0.75s var(--ease-expo);
}

/* ---- TIPOGRAFIA ---- */
.display-hero {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

.display-mega {
    font-family: var(--font-display);
    font-size: var(--text-mega);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

.display-section {
    font-family: var(--font-display);
    font-size: var(--text-section);
    font-weight: 700;
    line-height: var(--leading-snug);
    letter-spacing: -0.025em;
}

.display-sm {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: var(--leading-snug);
    letter-spacing: -0.02em;
}

.display-md {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--white);
}

.eyebrow {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
}

.eyebrow--dark   { color: var(--text-muted-dark); }
.eyebrow--light  { color: var(--text-muted-light); }
.eyebrow--accent { color: var(--accent); }
.eyebrow--cyan   { color: var(--cyan); }
.eyebrow--red    { color: rgba(0,0,0,0.45); }

/* ---- WORD SPLIT (GSAP hero) ---- */
.word-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}
.word {
    display: inline-block;
    will-change: transform;
}

/* ---- BOTÕES ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.9em 1.8em;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--t-base);
    white-space: nowrap;
    border-radius: 0;
}

/* Botão principal — vermelho sobre escuro */
.btn--red {
    background: var(--accent);
    color: var(--white);
    border: 2px solid var(--accent);
}
.btn--red:hover {
    background: #C52208;
    border-color: #C52208;
    transform: translateY(-2px);
}

/* Nav CTA — compact red pill with arrow */
.btn--nav-cta {
    font-size: 0.68rem;
    padding: 0.65em 1.3em;
    letter-spacing: 0.12em;
    gap: 0.5em;
}
.btn--nav-cta svg {
    transition: transform var(--t-base);
    flex-shrink: 0;
}
.btn--nav-cta:hover svg {
    transform: translateX(3px);
}

/* Botão outline escuro (sobre creme) */
.btn--dark {
    background: transparent;
    color: var(--black);
    border: 2px solid var(--black);
}
.btn--dark:hover {
    background: var(--black);
    color: var(--white);
}

/* Botão outline branco (sobre fundos escuros) */
.btn--white {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
}
.btn--white:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    color: var(--white);
}

/* Botão filled escuro (sobre creme) */
.btn--black {
    background: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
}
.btn--black:hover {
    background: var(--dark-3);
    border-color: var(--dark-3);
    transform: translateY(-2px);
}

/* Botão outline claro (sobre escuro) */
.btn--light {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}
.btn--light:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

/* Botão ghost texto */
.btn--ghost-dark {
    background: transparent;
    color: var(--black);
    border: 2px solid transparent;
    padding-left: 0;
    gap: 0.6em;
}
.btn--ghost-dark:hover { gap: 1em; }

.btn--ghost-light {
    background: transparent;
    color: var(--white);
    border: 2px solid transparent;
    padding-left: 0;
    gap: 0.6em;
    opacity: 0.7;
}
.btn--ghost-light:hover { opacity: 1; gap: 1em; }

/* Generic ghost — inherits context color (for use on dark bg) */
.btn--ghost {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
}
.btn--ghost:hover { border-color: var(--white); }

/* WhatsApp */
.btn--whatsapp {
    background: #1FAA5C;
    color: var(--white);
    border: 2px solid #1FAA5C;
}
.btn--whatsapp:hover {
    background: #178A4A;
    border-color: #178A4A;
    transform: translateY(-2px);
}

.btn--lg { padding: 1.1em 2.4em; font-size: var(--text-xs); }

/* ---- UTILITIES ---- */
.accent-line {
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin-bottom: 1.5rem;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar       { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); }

/* ---- SELECTION ---- */
::selection {
    background: var(--accent);
    color: var(--white);
}

/* ---- RESPONSIVE BUTTONS ---- */
@media (max-width: 767px) {
    .btn--lg { padding: 0.9em 1.8em; }
}
