/* Migo Health · pre-launch landing page
   Tokens from the design handoff (DESIGN-HANDOFF.md). */

:root {
  --ink: #0B1F32;
  --ocean: #1F4E79;
  --ocean-hover: #163A5B;
  --coral: #F2704E;
  --sun: #F4B942;
  --sun-hover: #F7C969;
  --mist: #F3F6FA;
  --mist-hover: #E6ECF2;
  --line: #DDE4EB;
  --body: #515F6E;
  --soft: #D6E4F0;
  --white: #FFFFFF;

  --display: Nunito, sans-serif;
  --text: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', sans-serif;

  --shadow-card: 0 18px 44px rgba(11, 31, 50, .18);
  --shadow-badge: 0 14px 32px rgba(11, 31, 50, .18);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

a { color: var(--ocean); }
a:hover { color: var(--ocean-hover); }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

img, svg { display: block; }

h1, h2, h3, p { margin: 0; }

section { scroll-margin-top: 64px; }

/* Language: main.js sets <html lang="es"> for Spanish browsers. */
html:not([lang="es"]) .es { display: none !important; }
html[lang="es"] .en { display: none !important; }

/* ---------- Layout ---------- */

.container {
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
  padding-inline: clamp(20px, 5vw, 80px);
}

.two-col {
  padding-block: clamp(64px, 9vw, 120px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  column-gap: clamp(48px, 9vw, 160px);
  row-gap: 40px;
}
.two-col-start  { align-items: start; }
.two-col-center { align-items: center; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.eyebrow {
  font: 800 18px/1.2 var(--display);
  letter-spacing: .01em;
  color: var(--ocean);
}
.eyebrow-sun { color: var(--sun); }

h2 {
  font: 800 clamp(36px, 4.6vw, 64px)/1.02 var(--display);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.section-head > p,
.section-body > p {
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--body);
  text-wrap: pretty;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  transition: background .2s, color .2s, transform .2s;
}

.btn-header {
  padding: 13px 20px;
  font-size: 15px;
  line-height: 1;
  background: var(--white);
  color: var(--ink);
}
.btn-header:hover { background: var(--soft); color: var(--ink); }

.btn-primary {
  padding: 17px 28px;
  font-size: 17px;
  line-height: 1;
  background: var(--sun);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--sun-hover);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn-ghost {
  padding: 17px 28px;
  font-size: 17px;
  line-height: 1;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .22);
  color: var(--white);
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 18px/1.2 var(--display);
  color: var(--ocean);
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 4px;
  transition: color .2s;
}
.text-link:hover { color: var(--ink); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.header-inner {
  padding-block: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand { display: flex; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav {
  display: flex;
  gap: 2px;
}
.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font: 700 15px/1 var(--text);
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }

@media (max-width: 640px) {
  .nav { display: none; }
}

/* ---------- 01 Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.hero-inner {
  min-height: min(calc(100vh - 60px), 900px);
  padding: clamp(48px, 7vw, 104px) clamp(24px, 5vw, 80px) calc(clamp(48px, 7vw, 104px) + 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(36px, 8vw, 160px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: flex-start;
}

.hero-title {
  font: 800 clamp(52px, 6.6vw, 108px)/.94 var(--display);
  letter-spacing: -.045em;
  text-wrap: balance;
  max-width: 12ch;
  animation: rise .9s var(--ease) .1s backwards;
}
.hero-title .hl { color: var(--sun); }

.hero-lede {
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--soft);
  max-width: 46ch;
  text-wrap: pretty;
  animation: rise .9s var(--ease) .25s backwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  animation: rise .9s var(--ease) .4s backwards;
}

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  justify-self: end;
  box-sizing: border-box;
  padding: 28px 0 clamp(36px, calc(140px - 10vw), 110px) 28px;
  animation: rise 1s var(--ease) .3s backwards;
}

.photo {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 32px;
  overflow: hidden;
  background: var(--soft);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 10% 50%;
}

.coral-dot {
  position: absolute;
  right: -26px;
  top: 0;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--coral);
  pointer-events: none;
}

.msg-card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(260px, 72%);
  background: var(--white);
  color: var(--ink);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise .8s var(--ease) 1s backwards;
}

.msg-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.msg-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ocean);
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.msg-name { font: 800 15px/1.2 var(--display); }
.msg-kind { font-size: 12px; line-height: 1.2; color: var(--body); }

.msg-bubble {
  background: var(--mist);
  border-radius: 14px 14px 14px 4px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
}

.badge {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-badge);
  font: 800 15px/1.1 var(--display);
  animation: rise .8s var(--ease) 1.3s backwards;
}
.badge-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--sun);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 02 Who we are ---------- */

.who {
  background: var(--mist);
  position: relative;
  z-index: 1;
  margin-top: -40px;
  border-radius: 40px 40px 0 0;
}

/* ---------- 03 What we do ---------- */

.what { background: var(--white); }

.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.service {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.service:first-child { border-top-color: var(--ink); }
.service:last-child  { border-bottom: 1px solid var(--ink); }

.service h3 {
  font: 800 22px/1.2 var(--display);
  letter-spacing: -.01em;
  margin-bottom: 6px;
}
.service p {
  font-size: 17px;
  line-height: 1.5;
  color: var(--body);
}

/* ---------- 04 Contact + footer ---------- */

.contact {
  background: var(--ink);
  color: var(--white);
  border-radius: 40px 40px 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.contact .two-col { flex: 1; width: 100%; }

.contact .section-head > p { color: var(--soft); }

.contact-title {
  font: 800 clamp(48px, 7.4vw, 104px)/.96 var(--display);
  letter-spacing: -.04em;
}

.email-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  color: var(--white);
  text-decoration: none;
  transition: color .2s;
}
.email-row span {
  font: 800 clamp(22px, 2.6vw, 34px)/1.15 var(--display);
  overflow-wrap: anywhere;
}
.email-row svg { flex: none; }
.email-row:hover { color: var(--sun); }

.footer {
  width: 100%;
  padding-bottom: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  line-height: 1.4;
  color: var(--soft);
}

/* ---------- Motion ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
