/* ============================================================
   MLS — Maria Luiza Salles | Identidade Visual
   Estruturação Contratual
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Josefin+Sans:wght@100;200;300;400;600&display=swap');

/* ============================================================
   Tokens de Design — Variáveis CSS
   ============================================================ */
:root {

  /* ============================================================
     PALETA DA MARCA — fonte única de verdade
     Somente duas cores cromáticas existem no projeto:
       #80664B (marrom)  e  #DEC9B2 (bege)
     Todos os demais tons são mesclas dessas duas com branco/preto
     puros, mantendo o matiz da marca (~31°) em toda a escala.
     ============================================================ */
  --brand-brown: #80664B; /* exato — da identidade visual */
  --brand-beige: #DEC9B2; /* exato — da identidade visual */

  /* Canais RGB para composições translúcidas — rgb(var(--x) / alpha) */
  --rgb-brown:      128 102 75;  /* #80664B */
  --rgb-beige:      222 201 178; /* #DEC9B2 */
  --rgb-brown-700:   70  56 41;  /* marrom 55% — sombras e véus */
  --rgb-beige-50:   247 242 236; /* bege 25% + branco   */

  /* Escala do marrom — concentrada em torno de #80664B, como na
     identidade. As superfícies ficam entre 70% e 100% do marrom, em vez
     de descerem até quase preto, onde o arredondamento perde o matiz. */
  --brown-700: #463829; /* marrom 55% — texto sobre fundo claro */
  --brown-600: #5A4734; /* marrom 70% — texto secundário e rodapé */
  --brown-500: #64503A; /* marrom 78% — hero */
  --brown-450: #6D5740; /* marrom 85% — sobre e CTA final */
  --brown-400: var(--brand-brown);
  --brown-300: #8A7259; /* marrom +  8% branco */
  --brown-200: #A08C78; /* marrom + 25% branco */

  /* Escala do bege — mesclas com branco e com o marrom da marca */
  --beige-400: #C2AB93; /* bege 70% + marrom 30% */
  --beige-300: var(--brand-beige);
  --beige-200: #E4D3C0; /* bege + 18% branco */
  --beige-100: #F0E7DC; /* bege + 55% branco */
  --beige-50:  #F7F2EC; /* bege + 75% branco */

  /* --- Tokens de Cor (apontam para a escala acima) --- */
  --color-primary:        var(--brown-400); /* #80664B exato */
  --color-primary-dark:   var(--brown-450);
  --color-primary-light:  var(--brown-200);

  --color-secondary:      var(--beige-300); /* #DEC9B2 exato */
  --color-secondary-dark: var(--beige-400);
  --color-secondary-light:var(--beige-50);

  --color-white:          #FFFFFF;
  --color-off-white:      var(--beige-50);
  --color-dark:           var(--brown-600); /* rodapé */
  --color-deep:           var(--brown-500); /* hero */

  /* --- Cores Semânticas --- */
  --color-bg:             var(--beige-50);
  --color-bg-alt:         var(--beige-100);
  --color-surface:        var(--color-white);
  --color-border:         var(--beige-200);

  --color-text:           var(--brown-700); /* 10.1:1 sobre o fundo claro */
  --color-text-muted:     var(--brown-600); /* secundário, 7.9:1 sobre o fundo */
  --color-text-inverse:   var(--beige-50);  /* sobre fundos escuros */

  --color-accent:         var(--color-primary);
  --color-accent-hover:   var(--color-primary-dark);

  /* --- Tipografia — Famílias --- */
  --font-serif:    'Cormorant Garamond', Georgia, serif; /* Títulos — autoridade e elegância jurídica */
  --font-sans:     'Josefin Sans', 'Helvetica Neue', sans-serif; /* Corpo, labels, nav — replica o logo */

  /* --- Tipografia — Escala de tamanhos (fluid) --- */
  /* Rótulos de botão e navegação: mantidos compactos para não estourar
     a navbar, que já opera no limite de largura */
  --text-ui:    clamp(0.70rem, 1.5vw, 0.75rem);    /* 11–12px */

  --text-xs:    clamp(0.75rem, 1.6vw, 0.8125rem);  /* 12–13px */
  --text-sm:    clamp(0.875rem, 1.9vw, 0.9375rem); /* 14–15px */
  --text-base:  clamp(1rem, 2.1vw, 1.0625rem);     /* 16–17px */
  --text-md:    clamp(1.0625rem, 2.3vw, 1.1875rem);/* 17–19px */
  --text-lg:    clamp(1.15rem, 2.5vw, 1.25rem);  /* 18–20px */
  --text-xl:    clamp(1.35rem, 3vw,   1.5rem);   /* 22–24px */
  --text-2xl:   clamp(1.75rem, 4vw,   2rem);     /* 28–32px */
  --text-3xl:   clamp(2.25rem, 5vw,   2.75rem);  /* 36–44px */
  --text-4xl:   clamp(2.75rem, 6vw,   3.5rem);   /* 44–56px */
  --text-5xl:   clamp(3.25rem, 7.5vw, 4.5rem);   /* 52–72px */

  /* --- Tipografia — Pesos --- */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;

  /* --- Tipografia — Espaçamento de letras --- */
  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.08em;
  --tracking-wider:   0.15em;
  --tracking-widest:  0.25em;

  /* --- Tipografia — Altura de linha --- */
  --leading-tight:   1.2;
  --leading-snug:    1.4;
  --leading-normal:  1.6;
  --leading-relaxed: 1.8;

  /* --- Espaçamento (escala 4px) --- */
  --space-1:   0.25rem;  /*  4px */
  --space-2:   0.5rem;   /*  8px */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1rem;     /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2rem;     /* 32px */
  --space-10:  2.5rem;   /* 40px */
  --space-12:  3rem;     /* 48px */
  --space-16:  4rem;     /* 64px */
  --space-20:  5rem;     /* 80px */
  --space-24:  6rem;     /* 96px */
  --space-32:  8rem;     /* 128px */

  /* --- Bordas --- */
  --radius-sm:   6px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-full: 9999px;

  --border-thin:   1px solid var(--color-border);
  --border-medium: 2px solid var(--color-border);
  --border-accent: 1px solid var(--color-primary);

  /* --- Sombras --- */
  --shadow-sm:  0 1px 4px   rgb(var(--rgb-brown-700) / 0.10);
  --shadow-md:  0 4px 16px  rgb(var(--rgb-brown-700) / 0.14);
  --shadow-lg:  0 12px 40px rgb(var(--rgb-brown-700) / 0.18);
  --shadow-xl:  0 24px 64px rgb(var(--rgb-brown-700) / 0.22);

  /* --- Transições --- */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   500ms ease;
  --transition-smooth: 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* --- Layout --- */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1200px;
  --container-2xl:  1400px;

  --section-padding-y: clamp(var(--space-16), 8vw, var(--space-32));
  --section-padding-x: clamp(var(--space-6),  5vw, var(--space-16));

  /* --- Z-Index --- */
  --z-base:    0;
  --z-raised:  10;
  --z-overlay: 100;
  --z-modal:   200;
  --z-nav:     300;
  --z-toast:   400;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-light); /* Josefin Sans tem mais presença no weight 300 */
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
}

/* ============================================================
   Classes Tipográficas Utilitárias
   ============================================================ */

.heading-display {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

.heading-1 {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

.heading-2 {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.heading-3 {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

/* Labels em caixa alta — estilo marca */
.label-upper {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-primary);
}

.body-text {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

/* ============================================================
   Utilitários de Cor
   ============================================================ */
.bg-primary    { background-color: var(--color-primary); }
.bg-secondary  { background-color: var(--color-secondary); }
.bg-surface    { background-color: var(--color-surface); }
.bg-alt        { background-color: var(--color-bg-alt); }

.text-primary  { color: var(--color-primary); }
.text-muted    { color: var(--color-text-muted); }
.text-inverse  { color: var(--color-text-inverse); }


/* ============================================================
   Animações de Entrada (Reveal)
   Fade + leve elevação ao entrar na viewport — discreto e elegante
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal--left  { transform: translateX(-32px); }
.reveal--right { transform: translateX(32px); }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Entrada do hero — imediata ao carregar, sem esperar scroll */
.hero__eyebrow,
.hero__heading,
.hero__sub,
.hero__actions,
.hero__pillars {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-reveal 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__eyebrow { animation-delay: 120ms; }
.hero__heading { animation-delay: 260ms; }
.hero__sub     { animation-delay: 420ms; }
.hero__actions { animation-delay: 560ms; }
.hero__pillars { animation-delay: 680ms; }

@keyframes hero-reveal {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__eyebrow,
  .hero__heading,
  .hero__sub,
  .hero__actions,
  .hero__pillars {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
