/* ============================================================
   BASE.CSS — Reset, Design Tokens, Tipografia
   Guia Guaratiba · Litoral Baiano
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Paleta: Litoral Baiano */
  --color-ocean:        #0077B6;
  --color-ocean-dark:   #005F96;
  --color-ocean-light:  #00B4D8;
  --color-sky:          #90E0EF;
  --color-foam:         #CAF0F8;
  --color-green:        #2D6A4F;
  --color-green-light:  #40916C;
  --color-green-pale:   #D8F3DC;
  --color-sand:         #F4E4C1;
  --color-sand-mid:     #EDD9A3;
  --color-sand-dark:    #C9A96E;
  --color-white:        #FFFFFF;
  --color-off-white:    #FAFCFF;

  /* Neutros */
  --color-gray-50:   #F8FAFC;
  --color-gray-100:  #F1F5F9;
  --color-gray-200:  #E2E8F0;
  --color-gray-300:  #CBD5E1;
  --color-gray-400:  #94A3B8;
  --color-gray-500:  #64748B;
  --color-gray-600:  #475569;
  --color-gray-700:  #334155;
  --color-gray-800:  #1E293B;
  --color-gray-900:  #0F172A;

  /* Semânticas */
  --color-text:         #1A2332;
  --color-text-muted:   #5A6B7D;
  --color-text-light:   #8FA3B8;
  --color-border:       #E2E8F0;
  --color-border-light: #F1F5F9;
  --color-bg:           #FAFCFF;
  --color-bg-card:      #FFFFFF;
  --color-success:      #059669;
  --color-warning:      #D97706;
  --color-error:        #DC2626;

  /* Highlight de busca */
  --color-highlight:    rgba(0, 180, 216, 0.18);
  --color-highlight-border: rgba(0, 119, 182, 0.4);

  /* Tipografia */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Escala fluida de tamanhos */
  --text-xs:   clamp(0.7rem,   1.4vw, 0.8rem);
  --text-sm:   clamp(0.8rem,   1.7vw, 0.9rem);
  --text-base: clamp(0.9rem,   1.9vw, 1rem);
  --text-md:   clamp(1rem,     2.1vw, 1.1rem);
  --text-lg:   clamp(1.1rem,   2.4vw, 1.25rem);
  --text-xl:   clamp(1.25rem,  3vw,   1.5rem);
  --text-2xl:  clamp(1.5rem,   3.5vw, 2rem);
  --text-3xl:  clamp(2rem,     4.5vw, 2.75rem);
  --text-4xl:  clamp(2.5rem,   6vw,   3.75rem);
  --text-5xl:  clamp(3rem,     7vw,   5rem);

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

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

  /* Sombras suaves (inspiração marinha) */
  --shadow-xs:  0 1px 2px rgba(0, 60, 120, 0.05);
  --shadow-sm:  0 1px 4px rgba(0, 60, 120, 0.06), 0 1px 2px rgba(0, 60, 120, 0.04);
  --shadow-md:  0 4px 12px rgba(0, 60, 120, 0.08), 0 2px 4px rgba(0, 60, 120, 0.05);
  --shadow-lg:  0 8px 24px rgba(0, 60, 120, 0.10), 0 4px 8px rgba(0, 60, 120, 0.06);
  --shadow-xl:  0 16px 40px rgba(0, 60, 120, 0.12), 0 8px 16px rgba(0, 60, 120, 0.07);
  --shadow-card-hover: 0 12px 32px rgba(0, 119, 182, 0.16), 0 4px 12px rgba(0, 119, 182, 0.10);

  /* Transições */
  --ease-out:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in:    cubic-bezier(0.55, 0.055, 0.675, 0.19);
  --ease-inout: cubic-bezier(0.645, 0.045, 0.355, 1.0);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   400ms;
  --duration-slower: 600ms;

  --transition-fast:   var(--duration-fast) var(--ease-out);
  --transition-base:   var(--duration-base) var(--ease-out);
  --transition-slow:   var(--duration-slow) var(--ease-out);
  --transition-spring: var(--duration-slow) var(--ease-spring);

  /* Z-index */
  --z-below:   -1;
  --z-base:     1;
  --z-raised:  10;
  --z-sticky:  100;
  --z-overlay: 500;
  --z-modal:   1000;
  --z-toast:   2000;

  /* Layout */
  --container-max: 1400px;
  --container-pad: clamp(var(--sp-4), 5vw, var(--sp-12));
  --header-h: 4rem;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Imagens e mídia */
img,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  object-fit: cover;
}

/* Links */
a {
  color: var(--color-ocean);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-ocean-dark);
}

/* Listas */
ul, ol {
  list-style: none;
}

/* Botões base */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  line-height: 1;
}

/* Inputs base */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* Tipografia base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

p {
  line-height: 1.7;
}

/* ── Utilitários de Acessibilidade ────────────────────────── */
.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-visible {
  outline: 2px solid var(--color-ocean);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-ocean-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-ocean);
}

/* ── Skip Link (acessibilidade) ───────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-6);
  background: var(--color-ocean);
  color: var(--color-white);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: top var(--transition-fast);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--sp-4);
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* ── Seleção de texto ─────────────────────────────────────── */
::selection {
  background: var(--color-foam);
  color: var(--color-ocean-dark);
}
