/* ============================================================
   ESTRAMENTE — MAIN CSS DESIGN SYSTEM
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── CSS CUSTOM PROPERTIES ─────────────────────────────── */
:root {
  /* Brand Colors */
  --primary:        #033771;
  --primary-light:  #0550AA;
  --primary-dark:   #021E42;
  --primary-glow:   rgba(3, 55, 113, 0.4);
  --accent:         #3496D1;
  --accent-light:   #68B4E4;
  --accent-dark:    #216A99;

  /* Backgrounds — Light Theme */
  --bg-base:        #FFFFFF;
  --bg-surface:     #F4F7FF;
  --bg-card:        #FFFFFF;
  --bg-elevated:    #EBF0FF;
  --bg-hover:       #DDEAFF;

  /* Glassmorphism — Light */
  --glass-bg:       rgba(255, 255, 255, 0.85);
  --glass-border:   rgba(3, 55, 113, 0.12);
  --glass-blur:     blur(20px);
  --glass-shadow:   0 8px 32px rgba(3, 55, 113, 0.08);

  /* Text — Brand Blue */
  --text-primary:   #033771;
  --text-secondary: #2D5A9E;
  --text-muted:     #7A98C4;
  --text-accent:    #3496D1;

  /* Status */
  --success:        #16A34A;
  --warning:        #D97706;
  --error:          #DC2626;
  --info:           #2563EB;

  /* Borders */
  --border-subtle:  rgba(3, 55, 113, 0.07);
  --border-default: rgba(3, 55, 113, 0.14);
  --border-accent:  rgba(52, 150, 209, 0.35);

  /* Spacing */
  --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;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Font sizes */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

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

  /* Shadows — Light-friendly */
  --shadow-sm:  0 2px 8px rgba(3, 55, 113, 0.08);
  --shadow-md:  0 4px 20px rgba(3, 55, 113, 0.1);
  --shadow-lg:  0 8px 40px rgba(3, 55, 113, 0.12);
  --shadow-xl:  0 20px 60px rgba(3, 55, 113, 0.15);
  --shadow-accent: 0 4px 20px rgba(52, 150, 209, 0.25);
  --shadow-primary: 0 4px 20px rgba(3, 55, 113, 0.25);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   500ms ease;
  --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-base:     1;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    1000;
  --z-overlay:  900;
  --z-toast:    1100;

  /* Layout */
  --container-max: 1280px;
  --navbar-height: 80px;
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 6vw, var(--text-7xl)); }
h2 { font-size: clamp(1.75rem, 4vw, var(--text-5xl)); }
h3 { font-size: clamp(1.25rem, 3vw, var(--text-3xl)); }
h4 { font-size: clamp(1.1rem, 2vw, var(--text-xl)); }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}

input, select, textarea {
  font-family: var(--font-body);
  outline: none;
}

ul, ol { list-style: none; }

::selection {
  background: var(--primary);
  color: white;
}

/* ─── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: rgba(3, 55, 113, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

@media (max-width: 768px) {
  .container { padding: 0 var(--space-4); }
}

/* ─── SECTION ─────────────────────────────────────────────── */
.section {
  padding: var(--space-24) 0;
}

.section-sm {
  padding: var(--space-16) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(52, 150, 209, 0.1);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-title span {
  color: var(--accent);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}

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

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

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

/* ─── FLEX UTILITIES ─────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ─── TEXT UTILITIES ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

/* ─── GRADIENT TEXT ──────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── DIVIDER ─────────────────────────────────────────────── */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: var(--radius-full);
  margin: var(--space-4) auto;
}

/* ─── BADGE ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(3, 55, 113, 0.85);
  color: #FFFFFF;
  border: 1px solid rgba(3, 55, 113, 1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.badge-accent {
  background: rgba(52, 150, 209, 0.85);
  color: #FFFFFF;
  border: 1px solid var(--accent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.badge-success {
  background: rgba(34, 197, 94, 0.85);
  color: #FFFFFF;
  border: 1px solid var(--success);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ─── STARS ───────────────────────────────────────────────── */
.stars {
  display: flex;
  gap: 2px;
  color: var(--accent);
  font-size: var(--text-sm);
}

/* ─── OVERLAY ─────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ─── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Scroll animation classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }

/* ─── TOAST NOTIFICATIONS ─────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 100px;
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  background: #FFFFFF;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: slideInRight 0.3s ease;
  pointer-events: all;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.info    { border-left: 3px solid var(--info); }

/* ─── HIDDEN ──────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
