/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM - ContaFoco v2
   Modern, Professional, Trustworthy
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/GeistVF.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── COLOR TOKENS ── */
:root {
  /* Primary Palette */
  --color-primary-dark: #0F3A7D;
  --color-primary: #1E5BA8;
  --color-primary-light: #E3F0FF;
  
  /* Accent - Growth (Green) */
  --color-accent-dark: #0B7A4A;
  --color-accent: #1BA876;
  --color-accent-light: #E8F5F0;
  
  /* Warm - Action (Orange) */
  --color-warm-dark: #C85A1A;
  --color-warm: #E67E22;
  --color-warm-light: #FEF3E8;
  
  /* Neutral - Structure (Gray) */
  --color-neutral-dark: #1A1A1A;
  --color-neutral-medium: #666666;
  --color-neutral-light: #F5F5F5;
  --color-neutral-border: #E0E0E0;
  --color-white: #FFFFFF;
  
  /* Semantic */
  --color-success: #1BA876;
  --color-warning: #E67E22;
  --color-error: #D32F2F;
  --color-info: #1E5BA8;
  
  /* Legacy support */
  --bg: #F5F5F5;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #666666;
  --border: #E0E0E0;
  --blue: #1E5BA8;
  --blue-dark: #0F3A7D;
  --blue-tint: rgba(30, 91, 168, 0.07);
  --blue-light: #E3F0FF;
  --teal: #1BA876;
  --teal-tint: rgba(27, 168, 118, 0.09);
  --navy: #0F3A7D;
  --navy-2: #1E5BA8;
  
  /* Shadows */
  --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 36px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.18);
  
  /* Spacing Scale (8px base) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Typography */
  --font-family: "Geist", system-ui, -apple-system, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;
  
  /* Transitions */
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  
  /* Container */
  --container-max: 1320px;
  --container-padding: 20px;
}

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-neutral-dark);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-smooth);
}

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

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

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── TYPOGRAPHY ── */
h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  color: var(--color-primary-dark);
  margin: 0 0 var(--space-md) 0;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-neutral-dark);
  margin: 0 0 var(--space-md) 0;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-neutral-dark);
  margin: 0 0 var(--space-sm) 0;
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-neutral-dark);
  margin: 0 0 var(--space-sm) 0;
}

p {
  margin: 0 0 var(--space-md) 0;
  color: var(--color-neutral-medium);
  max-width: 65ch;
}

p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.small {
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: var(--color-neutral-medium);
}

/* ── LAYOUT ── */
.container {
  width: min(calc(100% - var(--container-padding) * 2), var(--container-max));
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-3xl) 0;
}

.section--alt {
  background: var(--color-white);
}

.section--tight {
  padding: var(--space-2xl) 0;
}

.section--soft {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(30, 91, 168, 0.04), transparent 42%),
    radial-gradient(circle at bottom right, rgba(27, 168, 118, 0.04), transparent 42%);
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .section--tight {
    padding: var(--space-lg) 0;
  }
}

/* ── GRID ── */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (min-width: 768px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── BUTTONS ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
}

.button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-smooth);
}

.button:hover::before {
  opacity: 1;
}

.button:active {
  transform: scale(0.98);
}

.button--primary {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.button--primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.button--secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.button--secondary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-dark);
}

.button--accent {
  background: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.button--accent:hover {
  background: var(--color-accent-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.button--warm {
  background: var(--color-warm);
  color: white;
  box-shadow: var(--shadow-sm);
}

.button--warm:hover {
  background: var(--color-warm-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.button--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-neutral-border);
}

.button--ghost:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.button--small {
  padding: 8px 16px;
  font-size: var(--font-size-sm);
}

.button--large {
  padding: 16px 32px;
  font-size: var(--font-size-lg);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── CARDS ── */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xs);
  transition: all var(--duration-normal) var(--ease-smooth);
  border: 1px solid var(--color-neutral-border);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--color-primary-light);
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

.card--bordered {
  border: 2px solid var(--color-neutral-border);
  box-shadow: none;
}

.card--bordered:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ── IMAGE CARDS ── */
.image-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-neutral-light);
}

.image-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.image-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 91, 168, 0.15),
    rgba(27, 168, 118, 0.1)
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-smooth);
  pointer-events: none;
}

.image-card:hover::after {
  opacity: 1;
}

.image-card:hover img {
  transform: scale(1.05);
}

/* ── FORMS ── */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--color-neutral-dark);
  font-size: var(--font-size-sm);
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-neutral-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  transition: all var(--duration-normal) var(--ease-smooth);
  background: var(--color-white);
  color: var(--color-neutral-dark);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

input::placeholder {
  color: var(--color-neutral-medium);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fade-in {
  animation: fadeIn var(--duration-normal) var(--ease-smooth);
}

.animate-slide-up {
  animation: slideUp var(--duration-normal) var(--ease-smooth);
}

/* ── UTILITY CLASSES ── */
.text-primary {
  color: var(--color-primary);
}

.text-accent {
  color: var(--color-accent);
}

.text-warm {
  color: var(--color-warm);
}

.text-muted {
  color: var(--color-neutral-medium);
}

.text-light {
  color: var(--color-neutral-light);
}

.bg-primary {
  background: var(--color-primary);
}

.bg-accent {
  background: var(--color-accent);
}

.bg-warm {
  background: var(--color-warm);
}

.bg-light {
  background: var(--color-neutral-light);
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root {
    --container-padding: 16px;
  }
  
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
  
  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hidden-desktop {
    display: none !important;
  }
}
