/* ==========================================================================
   Galen Family Health Office — design tokens
   ========================================================================== */

:root {
  --bg:            #EEEFEA;
  --bg-alt:        #E4E6DC;
  --surface:       #F8F8F3;
  --surface-line:  rgba(20, 28, 24, 0.12);
  --ink:           #141C18;
  --ink-soft:      #43493F;
  --ink-faint:     #6B7167;
  --brass:         #8C6F2C;
  --brass-bright:  #A9853A;
  --verdigris:     #3F5D54;
  --verdigris-soft:#5C7A70;

  --dark-ink:      #ECE9DD;
  --dark-ink-soft: #B8B6A6;
  --dark-brass:    #C9A15C;

  --font-display: "Newsreader", "Iowan Old Style", "Georgia", serif;
  --font-body: "Libre Franklin", "Segoe UI", system-ui, sans-serif;

  --max-w: 1180px;
  --edge: clamp(20px, 5vw, 72px);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, blockquote {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

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

::selection {
  background: var(--brass);
  color: var(--bg);
}

html {
  scrollbar-color: var(--brass) var(--bg-alt);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb {
  background: var(--brass);
  border-radius: 999px;
  border: 3px solid var(--bg-alt);
}
::-webkit-scrollbar-thumb:hover { background: var(--brass-bright); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  border-bottom: 1px solid var(--surface-line);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .mark { color: var(--brass); flex-shrink: 0; }
.mark-draw circle,
.mark-draw line,
.mark-draw path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body.is-loaded .mark-draw circle { stroke-dashoffset: 0; transition-delay: 0.05s; }
body.is-loaded .mark-draw line { stroke-dashoffset: 0; transition-delay: 0.35s; }
body.is-loaded .mark-draw path { stroke-dashoffset: 0; transition-delay: 0.55s; }
.wordmark-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
}
.wordmark-sub {
  font-family: var(--font-body);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.88rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--brass); }
.nav-cta {
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 9px 16px;
  color: var(--ink) !important;
}
.nav-cta:hover {
  background: var(--ink);
  color: var(--bg) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--ink);
  width: 100%;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 65px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px var(--edge);
    gap: 22px;
    font-size: 1.1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-cta { margin-top: 8px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px var(--edge) 80px;
  text-align: center;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.8s ease;
}
body.is-loaded .hero-canvas { opacity: 0.5; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.hero-inner > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
body.is-loaded .hero-inner > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.3s; }
body.is-loaded .hero-inner > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.45s; }
body.is-loaded .hero-inner > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.6s; }
body.is-loaded .hero-inner > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.75s; }

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass);
}
.eyebrow-dark { color: var(--brass); }
.eyebrow-light { color: var(--dark-brass); }

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--verdigris);
}

.hero-lede {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--brass); border-color: var(--brass); color: #10150E; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-faint);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-wide { width: 100%; padding: 15px 28px; font-size: 0.95rem; }

/* ==========================================================================
   Sections — shared
   ========================================================================== */

.section {
  padding: 108px 0;
  background: var(--bg);
}
.section-alt { background: var(--bg-alt); }
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--edge);
}

.section-head { max-width: 700px; margin-bottom: 64px; }
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.18;
  margin-top: 14px;
  color: var(--ink);
}
.section-dek {
  margin-top: 18px;
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.grid-editorial {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
}
.col-label { position: sticky; top: 110px; align-self: start; }
.rule { width: 40px; height: 1px; background: var(--surface-line); margin-top: 18px; }
.rule-light { background: rgba(232, 230, 219, 0.14); }

.lead-copy {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 34px;
}

.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1.3;
  color: var(--verdigris);
  border-left: 2px solid var(--brass);
  padding-left: 28px;
  margin: 40px 0;
}

.body-copy {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 640px;
  margin-top: 20px;
}
.body-copy-emphasis { color: var(--ink); }

@media (max-width: 860px) {
  .grid-editorial { grid-template-columns: 1fr; gap: 24px; }
  .col-label { position: static; display: flex; align-items: center; gap: 16px; }
  .rule { margin-top: 0; }
}

/* ==========================================================================
   Timeline (capabilities)
   ========================================================================== */

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--surface-line);
  border: 1px solid var(--surface-line);
}

.timeline-item {
  background: var(--surface);
  padding: 40px 34px 44px;
  display: flex;
  flex-direction: column;
}

.timeline-marker {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 22px;
}
.timeline-marker span {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass);
  border: 1px solid var(--brass);
  padding: 5px 12px;
  border-radius: 999px;
}

.timeline-content h3 {
  font-size: 1.32rem;
  line-height: 1.28;
  margin-bottom: 14px;
}
.timeline-intro {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.timeline-content ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timeline-content li {
  font-size: 0.95rem;
  color: var(--ink);
  padding-left: 18px;
  position: relative;
}
.timeline-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: var(--verdigris);
}

@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; }
}

.ai-note {
  margin-top: 1px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 32px 34px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-top: none;
}
.ai-note-icon { color: var(--verdigris); flex-shrink: 0; margin-top: 2px; }
.ai-note p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.7; }
.ai-note strong { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Membership stats
   ========================================================================== */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--surface-line);
  border: 1px solid var(--surface-line);
  margin: 36px 0 36px;
  max-width: 720px;
}
.stat-card {
  background: var(--surface);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-figure {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-label {
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Who we serve
   ========================================================================== */

.serve-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1px;
  background: var(--surface-line);
  border: 1px solid var(--surface-line);
}
.serve-card {
  background: var(--surface);
  padding: 40px;
}
.serve-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.serve-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.pill-list li {
  font-size: 0.84rem;
  color: var(--ink);
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  padding: 7px 14px;
}

@media (max-width: 780px) {
  .serve-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Why Galen — advantages
   ========================================================================== */

.advantage-list {
  display: flex;
  flex-direction: column;
  margin-top: 36px;
  max-width: 640px;
}
.advantage-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 22px 0;
  border-top: 1px solid var(--surface-line);
}
.advantage-item:last-child { border-bottom: 1px solid var(--surface-line); }
.advantage-item h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--ink);
}
.advantage-item p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   Leadership
   ========================================================================== */

.leadership-group { margin-bottom: 52px; }
.leadership-group:last-of-type { margin-bottom: 44px; }
.leadership-group-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--verdigris);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--surface-line);
}

.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px 32px;
}
.leader-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.leader-role {
  font-size: 0.86rem;
  color: var(--brass);
  margin-bottom: 6px;
}
.leader-affil {
  font-size: 0.84rem;
  color: var(--ink-faint);
  line-height: 1.5;
}

.founder-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: 760px;
  padding-top: 36px;
  border-top: 1px solid var(--surface-line);
}
.founder-attrib {
  display: block;
  margin-top: 16px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ==========================================================================
   Contact
   ========================================================================== */

.section-contact {
  background: var(--ink);
  color: var(--dark-ink, #ECE9DD);
}
.section-contact .grid-editorial {
  grid-template-columns: 1fr;
  gap: 40px;
}
.section-contact .col-label {
  position: static;
  display: block;
  color: var(--dark-ink-soft);
}
.section-title-light { color: #ECE9DD; }
.section-dek-light { color: #B8B6A6; }
.contact-direct { margin-top: 20px; }
.contact-direct a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--dark-brass, #C9A15C);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  margin-right: 32px;
}
.contact-direct a:hover { border-color: currentColor; }
.contact-note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #8A8778;
}

.contact-form {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 560px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.form-row-split > div { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 560px) {
  .form-row-split { grid-template-columns: 1fr; }
}

.contact-form label {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #B8B6A6;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: rgba(236, 233, 221, 0.06);
  border: 1px solid rgba(236, 233, 221, 0.22);
  border-radius: 2px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: #ECE9DD;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--dark-brass, #C9A15C);
}
.contact-form textarea { resize: vertical; }
.contact-form select { appearance: none; }

.form-status {
  font-size: 0.9rem;
  color: var(--dark-brass, #C9A15C);
  min-height: 1.2em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: #8A8778;
  padding: 44px 0 40px;
  border-top: 1px solid rgba(236, 233, 221, 0.1);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--edge);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wordmark-footer { color: #ECE9DD; gap: 8px; }
.wordmark-footer .mark { color: var(--dark-brass, #C9A15C); }
.wordmark-footer span { font-family: var(--font-display); font-size: 0.98rem; }
.footer-tagline { font-size: 0.88rem; color: #B8B6A6; }
.footer-legal { font-size: 0.78rem; color: #6E6C60; max-width: 640px; line-height: 1.6; margin-top: 6px; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
