/*
 * Medicya — design tokens v2 (2026-05-20)
 *
 * Typography: Newsreader (display serif) + Inter Tight (sans body).
 * Free Google Fonts. Premium upgrade path: replace with Tiempos Headline + Söhne
 * woff2 files via @font-face. Both are ~$200-300 USD each at klim.co.nz.
 *
 * Layout: mobile-first. Desktop overrides at min-width: 720px.
 */

:root {
  --primary: #0E7A65;
  --primary-hi: #14997D;
  --forest: #06231F;
  --mint: #7DE3C5;
  --whatsapp: #25D366;
  --whatsapp-hi: #1EBE5C;
  --cream: #FAF8F0;
  --cream-soft: #F4F0E2;
  --ink: #0A1F1A;
  --ink-2: #3D544D;
  --ink-3: #6B7E78;
  --rule: #E5DFCC;
  --serif: 'Newsreader', 'Tiempos Headline', Georgia, 'Times New Roman', serif;
  --sans: 'Inter Tight', 'Söhne', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 88px; scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hi); }

/* ==========================================================================
 * Topbar (mobile-first, tiny strip)
 * ========================================================================== */
.topbar {
  background: var(--forest);
  color: rgba(255,255,255,0.80);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 20px;
  text-align: center;
  letter-spacing: 0.005em;
}
.topbar a { color: var(--mint); font-weight: 600; text-decoration: none; }
.topbar a:hover { color: #fff; }

/* ==========================================================================
 * Nav
 * ========================================================================== */
nav.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,240,0.94);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--rule);
}
nav.site .row {
  max-width: 1240px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
nav.site .logo {
  display: inline-flex; align-items: center;
  text-decoration: none; height: 32px;
}
nav.site .logo img {
  height: 28px; width: auto; display: block;
  transition: opacity .15s ease;
}
nav.site .logo:hover img { opacity: 0.85; }
nav.site .links { display: none; }
nav.site .cta {
  padding: 9px 16px; border-radius: 999px;
  background: var(--forest); color: #fff;
  font-size: 13.5px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  letter-spacing: -0.005em;
}
nav.site .cta:hover { background: #0a3a32; }

/* ==========================================================================
 * Containers
 * ========================================================================== */
main { max-width: 1100px; margin: 0 auto; padding: 48px 20px; }
main.narrow { max-width: 720px; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
 * Breadcrumbs
 * ========================================================================== */
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 24px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }

/* ==========================================================================
 * Eyebrow
 * ========================================================================== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(14,122,101,0.10); color: var(--primary);
  font-family: var(--sans);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; text-decoration: none;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--primary); }

/* ==========================================================================
 * Typography
 * ========================================================================== */
h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 9vw, 60px); line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink); text-wrap: balance;
  margin: 16px 0 16px;
}
h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 5.5vw, 40px); line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--ink); text-wrap: balance;
  margin: 40px 0 14px;
}
h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: 18px; line-height: 1.3;
  color: var(--ink); margin: 24px 0 10px;
  letter-spacing: -0.005em;
}

.lede {
  font-family: var(--sans); font-weight: 400;
  font-size: 18px; line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 32px;
  text-wrap: balance; max-width: 640px;
}

p, li {
  font-size: 16.5px; line-height: 1.7;
  color: var(--ink-2);
}
p { margin: 0 0 18px; }
ul, ol { padding-left: 22px; margin: 0 0 22px; }
li { margin-bottom: 8px; }
strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; color: var(--ink-2); }

/* ==========================================================================
 * Buttons & CTAs
 * ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px; border-radius: 999px;
  font-family: var(--sans); font-size: 15.5px; font-weight: 600;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  letter-spacing: -0.005em;
  border: 0;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-whatsapp {
  background: var(--whatsapp); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(37,211,102,0.55);
}
.btn-whatsapp:hover { background: var(--whatsapp-hi); color: #fff; }
.btn-whatsapp svg { width: 22px; height: 22px; flex-shrink: 0; }

.btn-primary {
  background: var(--forest); color: #fff;
}
.btn-primary:hover { background: #0a3a32; color: #fff; }

.btn-secondary {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--rule);
}
.btn-secondary:hover { border-color: var(--ink); background: var(--cream-soft); }

.btn-block { width: 100%; }

.link-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 500;
  color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: rgba(10,31,26,0.25);
}
.link-secondary:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ==========================================================================
 * Newsletter form
 * ========================================================================== */
.newsletter-form {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 520px; width: 100%;
  background: #fff; padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--rule);
  box-shadow: 0 12px 32px -16px rgba(6,35,31,0.10);
}
.newsletter-form input[type="email"] {
  flex: 1; border: 1.5px solid var(--rule); outline: 0;
  background: var(--cream);
  padding: 14px 18px; height: 52px;
  border-radius: 999px;
  font-family: var(--sans); font-size: 15.5px; color: var(--ink);
  min-width: 0;
  transition: border-color .15s ease, background .15s ease;
}
.newsletter-form input[type="email"]:focus { border-color: var(--primary); background: #fff; }
.newsletter-form input[type="email"]::placeholder { color: var(--ink-3); }
.newsletter-form button {
  padding: 14px 24px; height: 50px;
  background: var(--forest); color: #fff;
  border: 0; border-radius: 999px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  letter-spacing: -0.005em; cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}
.newsletter-form button:hover { background: #0a3a32; }
.newsletter-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.form-note {
  font-size: 13px; color: var(--ink-3); margin: 12px 0 0;
  max-width: 520px; line-height: 1.55;
}
.form-success {
  background: rgba(14,122,101,0.08);
  border: 1px solid rgba(14,122,101,0.20);
  border-radius: 16px;
  padding: 16px 20px;
  color: var(--ink); font-size: 14.5px;
  max-width: 520px;
  display: none; margin-top: 16px;
}
.form-success.show { display: block; }
.honeypot { position: absolute; left: -9999px; opacity: 0; width: 1px; height: 1px; }

/* ==========================================================================
 * Footer
 * ========================================================================== */
footer.site {
  background: var(--forest); color: rgba(255,255,255,0.70);
  padding: 56px 0 28px; margin-top: 48px;
}
footer.site .row {
  max-width: 1240px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
footer.site .brand { grid-column: span 2; margin-bottom: 8px; }
footer.site h4 {
  color: #fff; font-family: var(--sans);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; margin: 0 0 14px;
}
footer.site a { color: rgba(255,255,255,0.74); font-size: 14px; text-decoration: none; }
footer.site a:hover { color: #fff; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
footer.site .brand .name {
  display: block; margin: 0 0 14px;
}
footer.site .brand .name img {
  height: 28px; width: auto; display: block;
}
footer.site .brand p {
  font-size: 14px; line-height: 1.6;
  color: rgba(255,255,255,0.62);
  margin: 0 0 14px; max-width: 360px;
}
footer.site .legal {
  max-width: 1240px; margin: 40px auto 0; padding: 24px 20px 0;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-family: var(--sans); font-size: 12px;
  color: rgba(255,255,255,0.50); line-height: 1.65;
}
footer.site .legal p { margin: 0 0 8px; color: rgba(255,255,255,0.55); }
footer.site .legal strong { color: rgba(255,255,255,0.75); font-weight: 600; }
footer.site .legal a { color: rgba(255,255,255,0.78); text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
 * Desktop overrides
 * ========================================================================== */
@media (min-width: 720px) {
  body { font-size: 17px; line-height: 1.6; }
  main { padding: 64px 32px; }
  .container { padding: 0 32px; }
  nav.site .row { padding: 16px 32px; }
  nav.site .links {
    display: flex; gap: 26px; align-items: center;
  }
  nav.site .links a {
    color: var(--ink-2); font-size: 14.5px; font-weight: 500;
    text-decoration: none; letter-spacing: -0.005em;
  }
  nav.site .links a:hover { color: var(--ink); }
  nav.site .links a[aria-current="page"] { color: var(--primary); }
  nav.site .cta { padding: 10px 18px; font-size: 14px; }
  .topbar { font-size: 13px; padding: 9px 24px; }

  h1 { font-size: clamp(48px, 5.5vw, 68px); margin: 18px 0 18px; }
  h2 { font-size: clamp(32px, 3.6vw, 44px); margin: 56px 0 16px; }
  h3 { font-size: 19px; margin: 28px 0 12px; }
  .lede { font-size: 19.5px; line-height: 1.55; }
  p, li { font-size: 17px; }

  .newsletter-form { flex-direction: row; padding: 6px; border-radius: 999px; gap: 10px; }
  .newsletter-form input[type="email"] {
    background: transparent; border: 0;
    padding: 14px 18px; border-radius: 999px;
  }
  .newsletter-form input[type="email"]:focus { background: var(--cream); }
  .newsletter-form button { width: auto; }

  footer.site { padding: 72px 0 32px; margin-top: 56px; }
  footer.site .row {
    grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding: 0 32px;
  }
  footer.site .brand { grid-column: span 1; margin-bottom: 0; }
  footer.site .brand p { max-width: 320px; }
  footer.site h4 { font-size: 12px; }
  footer.site a { font-size: 14.5px; }
  footer.site .legal { padding: 28px 32px 0; }

  main { padding: 72px 32px 64px; }
}

@media (min-width: 1024px) {
  main { padding: 80px 32px 72px; }
}
