/* ============================================================
   Common — Marketing site shared styles
   Uses tokens from colors_and_type.css
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--canvas-cream);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 600px) {
  .container { padding: 0 20px; }
}

/* ===== Buttons ===== */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-full);
  height: 48px;
  min-height: 44px;
  padding: 0 26px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0;
}
.btn .arrow {
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary { background: var(--brand-teal); color: #fff; }
.btn-primary:hover { background: var(--brand-teal-bright); }
.btn-primary:active { background: var(--brand-teal-deep); }

.btn-light { background: #fff; color: var(--fg-1); }
.btn-light:hover { background: #ebeded; }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.36);
}
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.06); }

.btn-outline-dark {
  background: transparent;
  color: var(--fg-1);
  border: 1px solid var(--hairline-strong);
}
.btn-outline-dark:hover { background: var(--fg-1); color: #fff; }

.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 76px;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--hairline-dark);
}
.site-header.on-light.is-solid {
  background: rgba(240, 242, 242, 0.94);
  border-bottom-color: var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
}
.nav-brand { display: flex; align-items: center; }
.nav-brand img { height: 26px; width: auto; }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.74);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
  letter-spacing: 0;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.site-header.on-light .nav-links a { color: var(--fg-3); }
.site-header.on-light .nav-links a:hover,
.site-header.on-light .nav-links a.active { color: var(--fg-1); }

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

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: var(--radius-full);
  color: #fff;
  align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
}
.site-header.on-light .menu-toggle { color: var(--fg-1); border-color: var(--hairline-strong); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-right .btn { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ===== Mobile drawer ===== */
.mobile-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(13,13,13,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
  z-index: 200;
}
.mobile-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 80%;
  max-width: 380px;
  background: var(--canvas-ink);
  color: #fff;
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  display: flex; flex-direction: column;
  padding: 28px 28px 32px;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer .close {
  align-self: flex-end;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-full);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-bottom: 32px;
}
.mobile-drawer nav {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: auto;
}
.mobile-drawer nav a {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline-dark);
}
.mobile-drawer .drawer-cta {
  margin-top: 32px;
  width: 100%;
  height: 56px;
  font-size: 16px;
}

/* ===== Sections ===== */
.section {
  padding: clamp(72px, 10vw, 128px) 0;
  position: relative;
}
.section.ink { background: var(--canvas-ink); color: #fff; }
.section.cream { background: var(--canvas-cream); color: var(--fg-1); }
.section.white { background: #fff; color: var(--fg-1); }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}
.section.ink .eyebrow { color: #8FCBCB; }

.section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 920px;
  text-wrap: balance;
}
.section .lede {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 660px;
  margin: 0;
}
.section.ink .lede { color: var(--on-dark-2); }

/* ===== Section header layout ===== */
.section-head {
  margin-bottom: clamp(48px, 6vw, 72px);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--canvas-ink);
  color: var(--on-dark-2);
  padding: 80px 0 32px;
  border-top: 1px solid var(--hairline-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin: 0 0 20px;
}
.site-footer .brand-col img { height: 24px; margin-bottom: 20px; }
.site-footer .brand-col p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-dark-2);
  max-width: 340px;
  margin: 0;
}
.site-footer ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.site-footer a {
  color: var(--on-dark-2);
  font-size: 15px;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--hairline-dark);
  padding-top: 28px;
  font-size: 13px;
  color: var(--on-dark-3);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .links { display: flex; gap: 20px; }
.footer-bottom a { color: var(--on-dark-3); font-size: 13px; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ===== Form ===== */
.contact-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}
.section.ink .contact-card { background: var(--surface-elevated); border-color: var(--hairline-dark); color: #fff; }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  margin-bottom: 8px;
  letter-spacing: 0;
}
.section.ink .field label { color: var(--on-dark-3); }

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg-1);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.field textarea {
  height: 96px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.5;
}
.section.ink .field input,
.section.ink .field select,
.section.ink .field textarea {
  background: var(--canvas-ink);
  border-color: var(--hairline-dark);
  color: #fff;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: var(--shadow-focus);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M3 5l4 4 4-4' fill='none' stroke='%23555858' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.section.ink .field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M3 5l4 4 4-4' fill='none' stroke='%23B5B8B8' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-submit-btn {
  width: 100%;
  height: 56px;
  font-size: 16px;
  margin-top: 8px;
}

.form-microcopy {
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 16px;
  line-height: 1.5;
  text-align: center;
}
.section.ink .form-microcopy { color: var(--on-dark-3); }

.form-success {
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-out);
}
.form-success.show { opacity: 1; pointer-events: auto; }
.form-success .check {
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--brand-teal);
}
.section.ink .form-success .check { background: rgba(46,107,107,0.18); color: #8FCBCB; }
.form-success h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.form-success p { font-size: 15px; color: var(--fg-3); margin: 0; max-width: 320px; line-height: 1.5; }
.section.ink .form-success p { color: var(--on-dark-2); }

.contact-form.hide { opacity: 0; pointer-events: none; transition: opacity var(--dur-slow) var(--ease-out); }

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.fade-up.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Final CTA / contact section ===== */
.final-cta {
  background: var(--canvas-ink);
  color: #fff;
}
.final-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 16px 0 24px;
  text-wrap: balance;
}
.final-cta .body {
  font-size: 18px;
  line-height: 1.55;
  color: var(--on-dark-2);
  max-width: 480px;
  margin: 0 0 36px;
}
.value-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 16px;
}
.value-list li {
  display: flex; align-items: flex-start; gap: 14px;
  font-size: 16px;
  color: #fff;
  line-height: 1.45;
}
.value-list li::before {
  content: "";
  width: 18px; height: 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.32);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'><path d='M5 9l3 3 5-6' stroke='%238FCBCB' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  flex: none;
  margin-top: 1px;
}

@media (max-width: 860px) {
  .final-cta-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ===== Band CTA ===== */
.band-cta {
  background: var(--canvas-ink);
  color: #fff;
  text-align: center;
  padding: clamp(80px, 10vw, 128px) 0;
}
.band-cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 900px;
  margin: 0 auto 20px;
  text-wrap: balance;
}
.band-cta .subline {
  font-size: 18px;
  color: var(--on-dark-2);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

/* ===== Card ===== */
.card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.card:hover { border-color: var(--fg-3); box-shadow: var(--shadow-1); }
.section.ink .card {
  background: var(--surface-elevated);
  border-color: var(--hairline-dark);
  color: #fff;
}
.section.ink .card:hover { border-color: rgba(255,255,255,0.24); }

/* ===== Selection ===== */
::selection { background: var(--brand-teal); color: #fff; }

/* ===== Language Toggle ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 12px;
}
.lang-opt {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  padding: 2px 4px;
  transition: color 0.2s;
}
.lang-opt.is-active {
  color: rgba(255,255,255,1);
}
.lang-sep {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
}

/* ===== Hero proof line ===== */
.hero-proof {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 32px;
}

/* ===== Risk note ===== */
.risk-note {
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.45);
  margin-top: 20px;
  max-width: 480px;
  line-height: 1.5;
}

/* ===== Patient view nudge ===== */
.patient-view-nudge { text-align: center; margin-top: 40px; }
.patient-view-nudge a {
  font-size: 14px;
  color: var(--brand-teal, #8FCBCB);
  text-decoration: underline;
  text-decoration-color: rgba(143,203,203,0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.patient-view-nudge a:hover { text-decoration-color: var(--brand-teal, #8FCBCB); }

/* ===== Patient view back link ===== */
.patient-view-back { text-align: center; margin-bottom: 8px; }
.patient-view-back a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.patient-view-back a:hover { color: rgba(255,255,255,0.8); }

/* ===== WhatsApp sticky button ===== */
.wa-sticky {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 900;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.wa-sticky:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(37,211,102,0.5); }
@media (max-width: 600px) {
  .wa-sticky { width: 48px; height: 48px; bottom: 16px; right: 16px; }
}
