/* ═══════════════════════════════════════════════════════════════════
   PEPTIDO — Neo-Clinical Design System
   ═══════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:         #F0F2F5;
  --bg-white:   #FFFFFF;
  --bg-alt:     #E8ECF1;
  --bg-dark:    #1A2332;

  /* Primary – Azul médico */
  --blue-50:    #EEF5FF;
  --blue-100:   #D9E8FF;
  --blue-200:   #B3D1FF;
  --blue-500:   #2563EB;
  --blue-600:   #1D4ED8;
  --blue-700:   #1E40AF;

  /* Teal clínico */
  --teal-500:   #0D9488;
  --teal-600:   #0F766E;

  /* Status */
  --mint:       #10B981;
  --amber:      #F59E0B;
  --coral:      #EF4444;
  --violet:     #7C3AED;

  /* Text */
  --text:       #111827;
  --text-sec:   #4B5563;
  --text-ter:   #9CA3AF;
  --text-white: #FFFFFF;

  /* Borders */
  --border:     #E5E7EB;
  --border-light: #F3F4F6;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl:  0 20px 50px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.04);

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-pill: 50px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 24px;
}

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

.section-dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

/* ─── Grids ──────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ─── Typography ─────────────────────────────────────────────────── */
h1 { font-size: clamp(32px, 5.5vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: 22px; font-weight: 700; line-height: 1.3; }
h4 { font-size: 17px; font-weight: 600; }

.text-sm  { font-size: 14px; }
.text-xs  { font-size: 12px; }
.text-sec { color: var(--text-sec); }
.text-ter { color: var(--text-ter); }
.text-blue { color: var(--blue-500); }
.text-mono { font-family: 'JetBrains Mono', monospace; }
.font-bold { font-weight: 700; }
.font-600  { font-weight: 600; }

/* Upper badge labels */
.label-upper {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-ter);
}

/* ─── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}

.card-sm { padding: 20px; border-radius: var(--radius-md); }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-500);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}
.btn-primary:hover {
  background: var(--blue-600);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ─── Badge / Pills ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Category badge colors */
.badge-cat-recovery    { background: #ECFDF5; color: #059669; }
.badge-cat-recovery .badge-dot { background: #10B981; }

.badge-cat-gh          { background: #EEF5FF; color: #2563EB; }
.badge-cat-gh .badge-dot { background: #3B82F6; }

.badge-cat-antiage     { background: #F0FDFA; color: #0D9488; }
.badge-cat-antiage .badge-dot { background: #14B8A6; }

.badge-cat-longevity   { background: #F5F3FF; color: #7C3AED; }
.badge-cat-longevity .badge-dot { background: #8B5CF6; }

.badge-cat-cognitive   { background: #FFF7ED; color: #D97706; }
.badge-cat-cognitive .badge-dot { background: #F59E0B; }

.badge-cat-immunity    { background: #FFF1F2; color: #E11D48; }
.badge-cat-immunity .badge-dot { background: #F43F5E; }

.badge-cat-metabolism  { background: #FFFBEB; color: #B45309; }
.badge-cat-metabolism .badge-dot { background: #F59E0B; }

/* Level badges */
.badge-beginner    { background: #ECFDF5; color: #059669; }
.badge-intermediate { background: #FFFBEB; color: #B45309; }
.badge-advanced    { background: #FFF1F2; color: #E11D48; }

/* Tag chips */
.tag-chip {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-sec);
}

/* ─── Section Headers ────────────────────────────────────────────── */
.section-header {
  margin-bottom: 40px;
}

.section-header h2 {
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-sec);
  font-size: 17px;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

/* ─── NAVBAR ─────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(240,242,245,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-logo-icon {
  width: 72px;
  height: 72px;
  border-radius: 0;
  object-fit: contain;
  flex-shrink: 0;
  background: none;
}

.navbar-logo-text {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.navbar-links {
  display: flex;
  gap: 2px;
  align-items: center;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sec);
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background: var(--blue-50);
  color: var(--blue-500);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Logout button */
.nav-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px !important;
  border-radius: var(--radius-sm);
  color: var(--text-sec) !important;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
}
.nav-logout:hover {
  opacity: 1;
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.lang-btn {
  padding: 5px 10px;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sec);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: var(--blue-500);
  color: #fff;
}

.lang-btn:hover:not(.active) {
  background: var(--bg-alt);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-dark);
  color: #9CA3AF;
  padding: 56px 24px 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-logo-icon {
  width: 72px;
  height: 72px;
  border-radius: 0;
  object-fit: contain;
  background: none;
}

.footer-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.footer-tagline {
  font-size: 14px;
  color: #6B7280;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 14px;
  color: #9CA3AF;
  transition: color 0.2s;
}
.footer-link:hover { color: #fff; }

.footer-disclaimer {
  font-size: 13px;
  line-height: 1.6;
  color: #6B7280;
}

.footer-copy {
  margin-top: 12px;
  color: #4B5563;
  font-size: 12px;
}

/* ─── Animations ─────────────────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-animate="fade-up"] { transform: translateY(20px); }
[data-animate="fade-in"] { transform: none; }
[data-animate="slide-right"] { transform: translateX(-20px); }

[data-animate].animated {
  opacity: 1;
  transform: none;
}

/* ─── Utility ────────────────────────────────────────────────────── */
.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-3   { margin-top: 12px; }
.mt-4   { margin-top: 16px; }
.mt-6   { margin-top: 24px; }
.mb-1   { margin-bottom: 4px; }
.mb-2   { margin-bottom: 8px; }
.mb-4   { margin-bottom: 16px; }
.mb-6   { margin-bottom: 24px; }
.pt-navbar { padding-top: 80px; }
.w-full { width: 100%; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

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

  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 4px;
  }
  .navbar-links.open { display: flex; }

  .hamburger { display: flex; }

  .nav-link { width: 100%; }

  .section { padding: 60px 20px; }

  h2 { font-size: 28px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 32px; }
  .btn { padding: 12px 20px; font-size: 14px; }
}
