/* ============================================
   BASE.CSS — Design Tokens & Reset
   Liliane Cunha Psicologia
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

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

ul, ol {
  list-style: none;
}

/* --- Custom Properties: Liliane Cunha Palette --- */
:root {
  /* Brand Colors */
  --verde-profundo:  #2D5E4B;
  --rosa-antigo:     #C4A08A;
  --creme-claro:     #F5F0EB;
  --grafite-suave:   #3B3B3B;
  --areia:           #D4C5B5;

  /* Semantic Mapping */
  --color-primary:       var(--verde-profundo);
  --color-primary-hover: #245040;
  --color-primary-light: #3A7A62;
  --color-secondary:     var(--rosa-antigo);
  --color-secondary-hover: #B08D76;
  --color-bg:            var(--creme-claro);
  --color-bg-alt:        #EDE7E0;
  --color-bg-dark:       #E5DDD5;
  --color-text:          var(--grafite-suave);
  --color-text-muted:    #6B6B6B;
  --color-text-faint:    #9A9A9A;
  --color-border:        var(--areia);
  --color-surface:       #FDFBF8;
  --color-surface-2:     #F9F5F0;
  --color-white:         #FFFFFF;
  --color-whatsapp:      #25D366;
  --color-whatsapp-hover:#20BD5A;

  /* Typography Scale (fluid) */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --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;
  --space-32: 8rem;

  /* Radius */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(59,59,59,0.05);
  --shadow-md:  0 4px 12px rgba(59,59,59,0.08);
  --shadow-lg:  0 8px 30px rgba(59,59,59,0.1);
  --shadow-xl:  0 12px 40px rgba(59,59,59,0.12);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 600ms;

  /* Font families */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Work Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --container-padding: clamp(var(--space-4), 5vw, var(--space-8));
}

/* --- Base Typography --- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
}

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

.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;
}

/* --- Focus States --- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Selection --- */
::selection {
  background-color: var(--color-secondary);
  color: var(--color-text);
}

/* Smooth scroll anchor offset for sticky header */
:target {
  scroll-margin-top: 100px;
}
