/* CCRx — patient-first healthcare service. Warm, calm, humane. */

:root {
  --bg: #f8faf9;           /* soft clinical white */
  --bg-soft: #edf3f3;      /* pale teal */
  --bg-panel: #ffffff;
  --ink: #353d40;          /* Joe's charcoal */
  --ink-soft: #525e62;
  --ink-mute: #647478;
  --line: #d3dfe0;
  --line-soft: #e3ebeb;
  --accent: #105b69;       /* Joe's deep healthcare teal */
  --accent-deep: #0c4651;
  --accent-soft: #dcebee;
  --clay: #105b69;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(42, 45, 40, 0.04);
  --shadow-md: 0 6px 20px rgba(42, 45, 40, 0.06);
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Instrument Sans", "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* ---------- HEADER ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 104px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.brand-mark {
  color: var(--accent);
  flex-shrink: 0;
}
.brand-word {
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
}
.brand-x { color: var(--accent); font-weight: 600; }
.brand-logo { width: 160px; height: auto; mix-blend-mode: multiply; }
.brand { flex-shrink: 0; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 32px);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a {
  color: var(--ink-soft);
  transition: color .18s ease;
}
.site-nav a:hover { color: var(--accent); }

.portal-link {
  color: var(--accent) !important;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.portal-link:hover { border-bottom-color: var(--accent); }

@media (max-width: 720px) {
  .header-inner { flex-direction: column; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .brand-logo { width: 152px; }
  .site-nav { justify-content: center; flex-wrap: wrap; gap: 10px 18px; font-size: 13px; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-link {
  color: var(--accent);
  padding: 14px 6px;
  font-weight: 500;
}
.btn-link:hover { color: var(--accent-deep); }
.btn-block { display: flex; width: 100%; margin-top: 20px; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.eyebrow, .section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 24px 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before, .section-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(28px, 3.4vw, 40px);
  max-width: 24ch;
  margin-bottom: 20px;
  font-weight: 500;
}

.section-lede {
  color: var(--ink-soft);
  max-width: 62ch;
  font-size: 17px;
  margin: 0 0 48px;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: clamp(40px, 6vw, 70px) 0 clamp(72px, 10vw, 120px);
  background: var(--bg);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}
.hero-copy { max-width: 640px; }
.hero h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  font-weight: 500;
  color: var(--ink);
}
.hero h1 .soft {
  color: var(--ink-mute);
  font-weight: 400;
}
.lede {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 40px;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Decorative hero motif — organic sage curve */
.hero-motif {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  margin-left: auto;
  color: var(--accent);
}
.hero-motif svg { width: 100%; height: 100%; display: block; }
@media (max-width: 900px) {
  .hero-motif { max-width: 240px; margin: 8px 0 0; }
}

/* ---------- APPROACH (narrative pillars) ---------- */
.approach {
  padding: clamp(40px, 5.5vw, 64px) 0 clamp(80px, 11vw, 128px);
  background: var(--bg-panel);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.approach-header { max-width: 720px; margin: 0 0 72px; }

.narrative {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.narrative-row {
  display: grid;
  grid-template-columns: 160px 1fr 1.2fr;
  gap: clamp(20px, 4vw, 64px);
  padding: clamp(32px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
@media (max-width: 780px) {
  .narrative-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.narrative-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.narrative-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.narrative-body {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  max-width: 52ch;
}

/* ---------- SERVICES STRIP ---------- */
.services {
  padding: clamp(40px, 5.5vw, 60px) 0 clamp(80px, 11vw, 120px);
  background: var(--bg);
}
.services-header {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
  margin-bottom: 56px;
}
@media (max-width: 780px) {
  .services-header { grid-template-columns: 1fr; }
}
.services-header p {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0;
  max-width: 52ch;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .service-grid { grid-template-columns: 1fr; } }

.service-item {
  padding: 32px 24px 32px 0;
  border-right: 1px solid var(--line);
}
.service-item:last-child { border-right: 0; }
@media (max-width: 900px) {
  .service-item:nth-child(2) { border-right: 0; padding-right: 0; }
  .service-item:nth-child(1), .service-item:nth-child(3) { padding-right: 24px; }
  .service-item:nth-child(2), .service-item:nth-child(4) { padding-left: 24px; }
}
@media (max-width: 520px) {
  .service-item { border-right: 0; padding: 28px 0 !important; border-bottom: 1px solid var(--line); }
  .service-item:last-child { border-bottom: 0; }
}
.service-item .service-num {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--clay);
  margin-bottom: 16px;
  display: block;
}
.service-item h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 10px;
}
.service-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}

/* ---------- PRODUCTS TEASER (on landing) ---------- */
.products-teaser {
  padding: clamp(40px, 5.5vw, 60px) 0 clamp(80px, 11vw, 120px);
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.teaser-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 780px) { .teaser-inner { grid-template-columns: 1fr; } }
.teaser-copy p {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 46ch;
  margin: 0 0 32px;
}
.teaser-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.teaser-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}
.teaser-list li:last-child { border-bottom: 0; }
.teaser-list li strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
}
.teaser-list li span {
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- PRODUCTS PAGE ---------- */
.products-page {
  padding: clamp(36px, 5vw, 60px) 0 clamp(80px, 11vw, 128px);
  background: var(--bg);
}
.products-page-header { max-width: 720px; margin: 0 0 72px; }
.products-page-header h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 20px;
  color: var(--ink);
}
.products-page-header p {
  color: var(--ink-soft);
  font-size: 18px;
  max-width: 62ch;
  margin: 0;
}

.product-group {
  margin-top: 72px;
}
.product-group:first-of-type { margin-top: 0; }

.group-header {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 40px;
}
.group-header h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.group-header p {
  margin: 0 0 0 auto;
  color: var(--ink-mute);
  font-size: 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-left: 1px solid var(--line);
}
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .product-grid { grid-template-columns: 1fr; border-left: 0; } }

.product-card {
  padding: 32px 28px;
  background: transparent;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin-top: -1px;
  transition: background .2s ease;
}
.product-card:hover { background: var(--bg-panel); }

.product-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.25;
}
.product-card h3 sup {
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-mute);
  vertical-align: super;
  margin-left: 1px;
}
.product-card .product-formula {
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
}
.product-card .product-meta {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.product-card .product-meta > div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: baseline;
}
.product-card .product-meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.product-card .product-meta dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.product-card .product-meta sup { color: var(--accent); font-size: 10px; }

.disclaimer {
  margin-top: 56px;
  color: var(--ink-mute);
  font-size: 13px;
  font-style: italic;
  max-width: 78ch;
  line-height: 1.6;
}

/* ---------- CONTACT ---------- */
.contact {
  padding: clamp(40px, 5.5vw, 64px) 0 clamp(80px, 11vw, 128px);
  background: var(--bg-panel);
  border-top: 1px solid var(--line-soft);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 900px) { .contact-inner { grid-template-columns: 1fr; } }
.contact-copy p {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 44ch;
  margin: 0;
}
.contact-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
}
.contact-card dl {
  margin: 0;
  display: grid;
  gap: 24px;
}
.contact-card dt {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.contact-card dd {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.contact-card dd a { color: var(--ink); }
.contact-card dd a:hover { color: var(--accent); }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--bg);
  color: var(--ink-mute);
  padding: 24px 0 32px;
  border-top: 1px solid var(--line-soft);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}
@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}
.footer-brand svg { color: var(--accent); }
.footer-brand img { width: 160px; height: auto; mix-blend-mode: multiply; }
@media (max-width: 720px) { .footer-brand { justify-content: center; } }
.footer-meta, .footer-address {
  margin: 0;
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.5;
}
.footer-address { text-align: right; }
@media (max-width: 720px) {
  .footer-address { text-align: center; }
}

/* ---------- PORTAL PAGE ---------- */
.portal-body { background: var(--bg); }
.portal-main {
  min-height: calc(100vh - 104px - 140px);
  display: flex;
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 12vw, 160px);
}
.portal-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.portal-inner .eyebrow {
  justify-content: center;
  margin-bottom: 28px;
}
.portal-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 84px);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.05;
}
.portal-inner h1 em {
  font-style: normal;
  color: var(--accent);
}
.portal-inner .lede {
  margin: 0 auto 24px;
  text-align: center;
}
.portal-cta-note {
  color: var(--ink-mute);
  font-size: 15px;
  margin: 0 auto 36px;
  max-width: 44ch;
}
.portal-inner .hero-cta { justify-content: center; }

/* ---------- MOTION / A11Y ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
