/* MedAcademy — Landing Page tokens */

@font-face {
  font-family: 'Barbara';
  src: url('assets/fonts/Barbara.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --purple: #36057C;
  --purple-deep: #280358;
  --lilac: #AC8BFC;
  --lilac-soft: #C9B5FD;
  --offwhite: #F5F2FA;
  --mint: #7DD3AE;
  --white: #FFFFFF;
  --ink: #1A0840;
  --gray-500: #8B7FA8;
  --gray-300: #D4CFE0;
  --gray-100: #EDEAF4;

  /* Type */
  --font-brand: 'Barbara', 'Sora', system-ui, sans-serif;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Spacing rhythm */
  --section-y: 120px;
  --container: 1280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

::selection { background: var(--lilac); color: var(--purple); }

/* Display headings */
.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.h-display-italic {
  font-style: italic;
  font-weight: 800;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--lilac);
  color: var(--purple);
  box-shadow: 0 8px 24px -10px rgba(54, 5, 124, 0.5);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--lilac-soft);
  box-shadow: 0 14px 30px -10px rgba(172, 139, 252, 0.7);
}

.btn-solid {
  background: var(--purple);
  color: var(--white);
}
.btn-solid:hover {
  transform: translateY(-1px);
  background: var(--purple-deep);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.55);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.08); }

.btn-outline-lilac {
  background: transparent;
  color: var(--purple);
  box-shadow: inset 0 0 0 1.5px var(--lilac);
}
.btn-outline-lilac:hover {
  background: var(--lilac);
  color: var(--purple);
}

.btn-lg {
  padding: 22px 36px;
  font-size: 18px;
}

/* Pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.005em;
}

.pill-lilac { background: var(--lilac); color: var(--purple); }
.pill-purple { background: var(--purple); color: var(--white); }
.pill-outline { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.4); color: var(--white); }

/* Section */
.section {
  padding: var(--section-y) 0;
  position: relative;
}

.section-purple { background: var(--purple); color: var(--white); }
.section-offwhite { background: var(--offwhite); }
.section-deep { background: var(--purple-deep); color: var(--white); }

/* Watermark backgrounds */
.watermark-pictos {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  overflow: hidden;
}

/* Float anim */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px) scale(0.92) rotate(0deg); }
  to { opacity: 1; transform: var(--card-final-transform, none); }
}

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

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

.float { animation: float-y 5s ease-in-out infinite; }
.float-slow { animation: float-y 7s ease-in-out infinite; }
.float-delay { animation-delay: -2.5s; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Compact density mode */
body.compact {
  --section-y: 80px;
}

/* ============================================
   RESPONSIVE — Tablet (≤1024px) and Mobile (≤640px)
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-y: 88px;
    --container: 100%;
  }
  .container { padding: 0 24px; }

  /* Nav: hide menu links, keep logo + CTA + burger */
  .nav-desktop-links { display: none !important; }
  .nav-burger { display: flex !important; }
  .nav-cta-secondary { display: none !important; }

  /* Hero: stack */
  .hero-grid { grid-template-columns: 1fr !important; gap: 48px !important; }
  .hero-title { font-size: 56px !important; }
  .hero-cards { height: 460px !important; width: 460px; max-width: 100%; margin: 0 auto; }
  .trio-big { width: 220px !important; height: 290px !important; top: 10px !important; left: 10px !important; }
  .trio-med-a { width: 150px !important; height: 200px !important; top: 0 !important; right: 0 !important; }
  .trio-med-b { width: 140px !important; height: 180px !important; top: 310px !important; left: 0 !important; }
  .trio-chip { bottom: 230px !important; right: 10px !important; padding: 10px 14px !important; }

  /* Section heading split */
  .section-head-row { flex-direction: column; align-items: flex-start !important; gap: 20px !important; }
  .section-h2 { font-size: 44px !important; }

  /* Grids */
  .aprovados-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .aprovacoes-reel-wrap { grid-template-columns: minmax(0, 320px) 1fr !important; gap: 32px !important; padding: 32px !important; }
  .metodo-grid { grid-template-columns: 1fr !important; }
  .reels-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .depoimentos-grid { grid-template-columns: 1fr !important; }
  .faq-grid { grid-template-columns: 1fr !important; gap: 48px !important; }

  /* CTA */
  .cta-h2 { font-size: 56px !important; }

  /* Footer */
  .footer-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 36px !important; }

  /* Top bar: shorter */
  .topbar-cta-link { display: none; }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --section-y: 64px;
  }
  body { font-size: 15px; }
  .container { padding: 0 18px; }

  /* Top bar: tighter */
  .topbar { font-size: 11px !important; padding: 8px 0 !important; }
  .topbar-text { font-size: 11px; }

  /* Nav padding */
  .navbar-row { padding: 12px 18px !important; }
  .nav-cta-primary { display: none !important; }

  /* Hero */
  .hero-section { padding-top: 48px !important; padding-bottom: 64px !important; }
  .hero-title { font-size: 40px !important; line-height: 1.05 !important; }
  .hero-sub { font-size: 16px !important; }
  .hero-buttons { flex-direction: column; align-items: stretch !important; }
  .hero-buttons .btn { justify-content: center; width: 100%; }
  .btn-lg { padding: 16px 22px !important; font-size: 16px !important; }
  /* Hero on mobile — reorganize trio + reel + chip into a non-overlapping grid */
  .hero-cards {
    height: auto !important;
    min-height: 600px !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
  }
  /* Big rotating card — full width, top */
  .trio-big {
    width: calc(100% - 8px) !important;
    height: 220px !important;
    top: 4px !important;
    left: 4px !important;
    right: auto !important;
    transform: rotate(0deg) !important;
    border-radius: 18px !important;
  }
  /* Medium cards — side by side below */
  .trio-med-a {
    width: calc(50% - 6px) !important;
    height: 180px !important;
    top: 236px !important;
    left: 0 !important;
    right: auto !important;
    transform: rotate(0deg) !important;
  }
  .trio-med-b {
    width: calc(50% - 6px) !important;
    height: 180px !important;
    top: 236px !important;
    left: auto !important;
    right: 0 !important;
    transform: rotate(0deg) !important;
  }
  /* Bottom row: chip + reel side by side */
  .trio-chip {
    display: inline-flex !important;
    top: 432px !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    width: calc(50% - 6px) !important;
    padding: 14px !important;
    justify-content: center;
  }
  .trio-chip .h-display { font-size: 28px !important; }
  .trio-chip > div:last-child { font-size: 10px !important; }

  .hero-card-reel {
    display: block !important;
    width: calc(50% - 6px) !important;
    height: 160px !important;
    right: 0 !important;
    bottom: auto !important;
    top: 432px !important;
    left: auto !important;
  }

  /* Trust bar */
  .trustbar { gap: 20px !important; padding: 28px 0 !important; }
  .trustbar-hospital { font-size: 14px !important; }

  /* Section headings */
  .section-h2 { font-size: 34px !important; }
  .eyebrow { font-size: 11px; }

  /* Aprovados — 2 cols on phone */
  .aprovados-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .aprovado-card { padding: 10px !important; }

  /* Aprovacoes reel — stack on phone */
  .aprovacoes-reel-wrap { grid-template-columns: 1fr !important; gap: 24px !important; padding: 24px !important; border-radius: 20px !important; }
  .aprovacoes-reel-wrap .aprovacoes-reel { max-width: 320px; margin: 0 auto; }
  .aprovacoes-reel-wrap h3 { font-size: 28px !important; }

  /* Método */
  .metodo-card { padding: 24px !important; grid-template-columns: 1fr !important; gap: 14px !important; }
  .metodo-card svg { width: 42px !important; height: 42px !important; }
  .metodo-num { font-size: 22px !important; }
  .metodo-title { font-size: 18px !important; }

  /* Reels — 2 cols */
  .reels-grid { gap: 12px !important; }

  /* Depoimentos */
  .depoimento-card { padding: 24px !important; }
  .depoimento-quote { font-size: 16px !important; }

  /* FAQ */
  .faq-question { font-size: 14px !important; }
  .faq-pictos { grid-template-columns: repeat(4, 50px) !important; }

  /* CTA */
  .cta-h2 { font-size: 38px !important; }
  .cta-sub { font-size: 16px !important; }
  .cta-button { font-size: 16px !important; padding: 18px 24px !important; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .footer-bottom { flex-direction: column; align-items: flex-start !important; }

  /* Watermarks: lighter on mobile */
  .watermark-pictos { opacity: 0.04 !important; }

  /* Tweaks panel: keep usable */
}

/* Depoimentos carousel */
.depoimentos-carousel::-webkit-scrollbar { display: none; }
.depoimentos-carousel { -ms-overflow-style: none; }

@media (max-width: 1024px) {
  .depo-card { flex: 0 0 calc((100% - 40px) / 3) !important; min-width: 220px !important; }
  .depo-arrow { display: none !important; }
}

@media (max-width: 720px) {
  .depo-card { flex: 0 0 calc((100% - 20px) / 2) !important; min-width: 180px !important; }
}

@media (max-width: 480px) {
  .depo-card { flex: 0 0 78% !important; min-width: 0 !important; }
}

/* Mobile nav drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--purple);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(172,139,252,0.2);
  letter-spacing: -0.02em;
}
.mobile-drawer .drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.mobile-drawer .drawer-close {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(172,139,252,0.15);
  color: white;
  font-size: 20px;
}

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--offwhite);
  color: var(--purple);
  align-items: center;
  justify-content: center;
}
.nav-burger svg { display: block; }

/* Helpers */
.lilac { color: var(--lilac); }
.purple { color: var(--purple); }
.italic { font-style: italic; }

/* Card glass */
.glass {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
}
