/* ==========================================================================
   VETCLIN POLICLÍNICA — DESIGN TOKENS & BASE SYSTEM
   Direção Editorial Internacional | Identidade Oficial VetClin (Jarinu, SP)
   ========================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-italic.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette — Official VetClin Identity Elevated for Editorial Luxury */
  --vet-blue: #0072bc;
  --vet-blue-deep: #00558e;
  --vet-navy: #063f66;
  --vet-abyss: #04243b;
  --vet-abyss-deep: #031a2b;
  --vet-sky: #6cb8e2;

  --vet-green: #2c8a47;
  --vet-green-deep: #1f6f36;
  --vet-green-bright: #46b863;
  --vet-green-soft: rgba(44, 138, 71, 0.1);

  --vet-amber: #e68a1e;
  --vet-amber-warm: #f2a43c;
  --vet-amber-soft: rgba(230, 138, 30, 0.12);

  /* WhatsApp Action Tokens */
  --wa-bg: #188a42;
  --wa-bg-hover: #137035;
  --wa-ring: rgba(24, 138, 66, 0.34);

  /* Organic Editorial Surfaces */
  --bg-ivory: #f9f8f4;
  --bg-paper: #ffffff;
  --bg-mist: #eff4f8;
  --bg-mist-deep: #e4edf5;
  --bg-sage: #f2f6f3;

  /* Ink & Contrast Hierarchy (WCAG AA/AAA) */
  --ink-primary: #0a2236;
  --ink-heading: #063252;
  --ink-body: #334c61;
  --ink-muted: #566e82;
  --ink-on-dark: #f7fafc;
  --ink-on-dark-soft: rgba(247, 250, 252, 0.8);
  --ink-on-dark-muted: rgba(247, 250, 252, 0.62);

  /* Hairlines & Subtle Depth */
  --line-subtle: rgba(6, 63, 102, 0.1);
  --line-medium: rgba(6, 63, 102, 0.18);
  --line-strong: rgba(0, 114, 188, 0.32);
  --line-on-dark: rgba(255, 255, 255, 0.14);
  --line-on-dark-strong: rgba(255, 255, 255, 0.28);

  --shadow-whisper: 0 2px 10px rgba(4, 36, 59, 0.04);
  --shadow-card: 0 12px 32px -12px rgba(4, 36, 59, 0.09), 0 2px 6px rgba(4, 36, 59, 0.03);
  --shadow-elevated: 0 24px 60px -18px rgba(4, 36, 59, 0.18);
  --shadow-dark: 0 28px 64px -20px rgba(0, 0, 0, 0.42);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Fluid Type Scale */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md: 1.0625rem;    /* 17px */
  --text-lg: 1.1875rem;    /* 19px */
  --text-xl: clamp(1.375rem, 1.2rem + 0.6vw, 1.6875rem);
  --text-h3: clamp(1.5rem, 1.3rem + 0.8vw, 1.95rem);
  --text-h2: clamp(2.125rem, 1.55rem + 2.2vw, 3.35rem);
  --text-h1: clamp(2.5rem, 1.75rem + 3.1vw, 4.45rem);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  /* Spacing & Layout */
  --container-max: 1260px;
  --container-narrow: 1080px;
  --gutter: clamp(1.25rem, 3.6vw, 2.75rem);
  --section-space: clamp(4.75rem, 8.5vw, 8.25rem);
  --header-h: 78px;

  /* Motion */
  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 220ms;
  --dur-med: 460ms;
  --dur-slow: 820ms;
}

/* Reset & Semantic Defaults */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-ivory);
  color: var(--ink-body);
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.68;
  color: var(--ink-body);
  background-color: var(--bg-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Focus Accessibility */
:focus-visible {
  outline: 2px solid var(--vet-amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip Navigation Link */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 2000;
  padding: 12px 20px;
  background: var(--vet-abyss);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-elevated);
  transition: top var(--dur-fast) var(--ease-editorial);
}

.skip-link:focus {
  top: 16px;
}

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

.container--narrow {
  max-width: var(--container-narrow);
}

/* Editorial Typography Utilities */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vet-blue-deep);
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--vet-green) 0%, var(--vet-blue) 100%);
  border-radius: 2px;
  flex-shrink: 0;
}

.eyebrow--light {
  color: rgba(247, 250, 252, 0.84);
}

.eyebrow--light::before {
  background: linear-gradient(90deg, var(--vet-amber-warm) 0%, var(--vet-green-bright) 100%);
}

.display-h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-wrap: balance;
}

.display-h1 em,
.display-h2 em,
.display-h3 em {
  font-style: italic;
  font-weight: 500;
}

.display-h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-wrap: balance;
}

.display-h2--light {
  color: var(--ink-on-dark);
}

.display-h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
}

.section-lead {
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  line-height: 1.72;
  color: var(--ink-body);
  max-width: 60ch;
}

.section-lead--light {
  color: var(--ink-on-dark-soft);
}

.tnum {
  font-variant-numeric: lining-nums tabular-nums;
}

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

/* Scroll Reveal System — Graceful Progressive Enhancement */
.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-slow) var(--ease-editorial),
    transform var(--dur-slow) var(--ease-editorial);
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .reveal--delay-1 { transition-delay: 80ms; }
.js-ready .reveal--delay-2 { transition-delay: 160ms; }
.js-ready .reveal--delay-3 { transition-delay: 240ms; }
.js-ready .reveal--delay-4 { transition-delay: 320ms; }

/* Respect Reduced Motion Strictly */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js-ready .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
