/* ============================================================
   base.css | Reset + Design Tokens + Foundations
   Clínica Gustavo Martins | Redesign 2026
   ============================================================ */

/* ---------- Google Fonts | Montserrat ---------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

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

/* ---------- CSS Custom Properties (Light | Default) ---------- */
:root {
  /* Palette | Light (cream) */
  --bg:          #FFFFFF;
  --bg-surface:  #F4F7FB;
  --text:        #0B1D3A;
  --text-muted:  #2E4068;
  --text-faint:  #6A7E9C;
  --accent:      #C9A84C;
  --accent-hover:#AA8A2E;
  --border:      rgba(11,29,58,0.08);
  --divider:     rgba(11,29,58,0.05);
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.08);

  /* Typography | Montserrat only */
  --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale (clamp for fluid) */
  --text-xs:    0.75rem;   /* 12px */
  --text-sm:    0.875rem;  /* 14px */
  --text-base:  1rem;      /* 16px */
  --text-lg:    1.125rem;  /* 18px */
  --text-xl:    1.25rem;   /* 20px */
  --text-2xl:   1.5rem;    /* 24px */
  --text-3xl:   clamp(1.75rem, 2.5vw, 2.25rem);   /* 28-36px */
  --text-4xl:   clamp(2rem, 3vw, 3rem);            /* 32-48px */
  --text-hero:  clamp(3rem, 7vw, 5rem);            /* 48-80px */

  /* Spacing scale */
  --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: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out:cubic-bezier(0.4, 0, 0.2, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --header-h: 72px;
}

/* ---------- Dark Section Overrides ---------- */
.section-dark {
  --bg:          #0B1D3A;
  --bg-surface:  #132B52;
  --text:        #F0EFE8;
  --text-muted:  #9AAEC8;
  --text-faint:  #4A6080;
  --accent:      #C9A84C;
  --accent-hover:#D4BC72;
  --border:      rgba(201,168,76,0.15);
  --divider:     rgba(201,168,76,0.08);
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.5);

  background-color: var(--bg);
  color: var(--text);
}

/* ---------- Document Reset ---------- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  min-height: 100dvh;
}

/* ---------- Typography Reset ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  text-wrap: balance;
}

p {
  line-height: 1.65;
  color: var(--text-muted);
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

iframe {
  border: 0;
}

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

/* ---------- Focus visible ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Selection ---------- */
::selection {
  background-color: var(--accent);
  color: #fff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-faint);
  border-radius: 3px;
}

/* ---------- Reduced motion ---------- */
@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;
  }
}
