/* SecureMedAssist — institutional landing page styles */

:root {
  --navy: #0D2040;
  --navy-deep: #091830;
  --off-white: #F6F4EF;
  --gray-light: #EDEAE3;
  --teal: #2A7A85;
  --teal-dark: #226069;
  --gold: #B8935A;
  --text-body: #374151;
  --text-muted: #6B7280;
  --white: #FFFFFF;
  --border: #DCD8CF;
  --radius: 5px;
  --maxw: 1120px;
  --shadow-card: 0 1px 2px rgba(13, 32, 64, 0.06), 0 8px 24px rgba(13, 32, 64, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-body);
  background: var(--off-white);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  color: var(--navy);
  font-weight: 700;
  line-height: 1.22;
  margin: 0;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-dark); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 16px;
}

.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head h2 { font-size: 32px; }
.section-head .lede { font-size: 19px; color: var(--text-muted); margin-top: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); }
.btn-ghost-teal {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--teal);
}
.btn-ghost-teal:hover { background: rgba(42, 122, 133, 0.08); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.nav.is-scrolled {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(13, 32, 64, 0.04);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand svg { display: block; }
.brand-name {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--navy);
  letter-spacing: .2px;
}
.nav .btn { height: 42px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* subtle institutional grid, no images */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 90% at 75% 10%, #000 35%, transparent 75%);
  mask-image: radial-gradient(120% 90% at 75% 10%, #000 35%, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  padding: 96px 0 88px;
}
.hero h1 {
  color: var(--white);
  font-size: 52px;
  line-height: 1.16;
  margin: 0 0 22px;
}
.hero .sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-bottom: 30px;
}
.hero .eyebrow { color: var(--teal); }
.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 34px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}
.trust-row .item { display: inline-flex; align-items: center; gap: 7px; }
.trust-row .item svg { flex: none; }
.trust-row .sep { color: rgba(255, 255, 255, 0.3); }

.for-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 30px;
}
.for-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  margin-right: 4px;
}
.for-pill {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(95, 181, 191, 0.45);
  border-radius: 999px;
  padding: 5px 13px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 24px;
}
.hero-card .eyebrow { margin-bottom: 18px; }

/* ---------- Section backgrounds ---------- */
.bg-offwhite { background: var(--off-white); }
.bg-gray { background: var(--gray-light); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy .lede { color: rgba(255, 255, 255, 0.8); }

/* ---------- Benefits ---------- */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.benefit {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.benefit:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(13, 32, 64, 0.08), 0 16px 36px rgba(13, 32, 64, 0.10);
}
.benefit-ico {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(42, 122, 133, 0.1);
  border: 1px solid rgba(42, 122, 133, 0.22);
  margin-bottom: 18px;
}
.benefit h3 { font-size: 20px; margin-bottom: 10px; }
.benefit p { font-size: 15.5px; color: var(--text-body); }

/* ---------- Audiences (dual) ---------- */
.bg-white { background: var(--white); }
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.audience-card {
  position: relative;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.audience-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--teal);
}
.audience-card:nth-child(2)::before { background: var(--gold); }
.aud-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal-dark);
  background: rgba(42, 122, 133, 0.1);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 16px;
}
.aud-tag-navy { color: #7a5f2e; background: rgba(184, 147, 90, 0.16); }
.audience-card h3 { font-size: 21px; margin-bottom: 18px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  font-size: 15.5px;
  color: var(--text-body);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--teal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5 9-11'/%3E%3C/svg%3E") center / 12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5 9-11'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.audience-card:nth-child(2) .check-list li::before { background: var(--gold); }

/* ---------- Problem ---------- */
.prose-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.prose-cols p { color: var(--text-body); }
.prose-cols .stat {
  font-family: "Libre Baskerville", Georgia, serif;
  color: var(--teal-dark);
  font-weight: 700;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}
.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
}
.step .num {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--teal);
  display: block;
  margin-bottom: 10px;
}
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { font-size: 15.5px; color: var(--text-body); }
.step .pill {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--teal-dark);
  background: rgba(42, 122, 133, 0.1);
  border-radius: 999px;
  padding: 4px 12px;
}

.flow-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 24px;
  box-shadow: var(--shadow-card);
}
.flow-card h3 {
  font-size: 18px;
  text-align: center;
  margin-bottom: 8px;
}
.flow-card .flow-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.flow-svg { width: 100%; height: auto; display: block; }

/* ---------- Compliance cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.compliance-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 24px 22px;
}
.compliance-card .ico {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(42, 122, 133, 0.18);
  border: 1px solid rgba(42, 122, 133, 0.4);
  margin-bottom: 14px;
}
.compliance-card h3 { font-size: 17px; color: var(--white); margin-bottom: 8px; }
.compliance-card p { font-size: 14.5px; color: rgba(255, 255, 255, 0.78); }

/* ---------- Reviewers ---------- */
.reviewers { text-align: center; }
.reviewers .inner { max-width: 720px; margin: 0 auto; }
.reviewers p { color: var(--text-body); font-size: 18px; }
.reviewers .btn { margin-top: 12px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-intro h2 { font-size: 32px; }
.contact-intro h2 + p { margin-top: 16px; }
.contact-intro p { color: var(--text-body); }
.contact-aside {
  margin-top: 24px;
  border-left: 3px solid var(--teal);
  padding-left: 16px;
}
.contact-aside .label { font-weight: 600; color: var(--navy); }
.form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-body);
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 122, 133, 0.18);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 110px; }
.field .err {
  display: none;
  color: #B4232A;
  font-size: 13px;
  margin-top: 5px;
}
.field.invalid input,
.field.invalid textarea { border-color: #B4232A; }
.field.invalid .err { display: block; }
.form-note {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  margin: 4px 0 18px;
}
.form .btn { width: 100%; }
.form-success {
  background: rgba(42, 122, 133, 0.08);
  border: 1px solid var(--teal);
  border-radius: 10px;
  padding: 40px 28px;
  text-align: center;
}
.form-success svg { margin-bottom: 14px; }
.form-success h3 { color: var(--navy); font-size: 22px; margin-bottom: 8px; }
.form-success p { color: var(--text-body); }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255, 255, 255, 0.8); padding: 48px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 28px;
  align-items: center;
}
.footer .brand-name { color: var(--white); }
.footer-center { text-align: center; font-size: 14px; }
.footer-center a { color: rgba(255, 255, 255, 0.85); }
.footer-right { text-align: right; }
.footer-right a {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 2px;
}
.footer-right a:hover { border-color: var(--teal); }

/* ---------- Terms page ---------- */
.legal-header {
  background: var(--navy);
  color: var(--white);
  padding: 28px 0;
}
.legal-header .nav-inner { height: auto; }
.legal-header .brand-name { color: var(--white); }
.legal-header .back {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.legal-hero { padding: 56px 0 0; }
.legal-hero h1 { font-size: 38px; }
.legal-hero p { color: var(--text-muted); margin-top: 12px; }

.tablist {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin: 32px 0 0;
}
.tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 12px 18px;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--teal); }
.tab:hover { color: var(--navy); }

.legal-body { padding: 36px 0 96px; }
.legal-panel { max-width: 800px; }
.legal-panel[hidden] { display: none; }
.legal-panel h2 { font-size: 24px; margin: 32px 0 12px; }
.legal-panel h2:first-child { margin-top: 0; }
.legal-panel h3 { font-size: 18px; margin: 22px 0 8px; }
.legal-panel p, .legal-panel li { font-size: 16px; color: var(--text-body); }
.legal-panel ul { padding-left: 22px; }
.legal-panel li { margin-bottom: 6px; }
.legal-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.legal-toc {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px 18px 0;
  margin: 24px 0 32px;
}
.legal-toc .toc-title {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 0 0 8px 42px;
}
.legal-toc ol {
  margin: 0;
  padding-left: 42px;
  color: var(--text-muted);
  columns: 2;
  column-gap: 32px;
}
.legal-toc li { font-size: 14.5px; margin-bottom: 4px; }
@media (max-width: 640px) {
  .legal-toc ol { columns: 1; }
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp .6s ease forwards; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 64px 0; }
  .hero h1 { font-size: 38px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  .prose-cols { grid-template-columns: 1fr; gap: 22px; }
  .steps { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  section { padding: 60px 0; }
  .hero h1 { font-size: 32px; }
  .section-head h2 { font-size: 26px; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .footer-center, .footer-right { text-align: center; }
  .nav .btn { padding: 0 16px; }
}
