/*
Theme Name: Meridian Health Solutions
Theme URI: https://meridianhealthsolutions.net/
Description: Lightweight launch theme for Meridian Health Solutions.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: meridian
*/

:root {
  --night: #0e1c1e;
  --night-2: #142628;
  --night-line: rgba(242, 238, 230, 0.12);
  --ivory: #f2eee6;
  --ivory-2: #e9e3d7;
  --paper: #faf8f3;
  --ink: #142224;
  --ink-soft: #55625f;
  --line: #d9d1c2;
  --brass: #b48a5a;
  --brass-lt: #c9a476;
  --mist: #a9b6b2;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain over everything, very low */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
img, svg { display: block; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Utility bar ---------- */
.utility {
  background: #0a1516;
  color: var(--mist);
  border-bottom: 1px solid var(--night-line);
}
.utility .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 38px;
}
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--ivory); }
.status i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brass-lt);
  box-shadow: 0 0 0 0 rgba(201, 164, 118, .6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 164, 118, .55); }
  70% { box-shadow: 0 0 0 8px rgba(201, 164, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 164, 118, 0); }
}

/* ---------- Nav ---------- */
.nav {
  position: absolute;
  left: 0; right: 0;
  top: 39px;
  z-index: 10;
  color: var(--ivory);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  border-bottom: 1px solid var(--night-line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.wordmark svg { width: 66px; height: 66px; flex: none; }
footer .wordmark svg { width: 76px; height: 76px; }
.wordmark span { display: flex; flex-direction: column; line-height: 1; }
.wordmark b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.wordmark small {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brass-lt);
  margin-top: 6px;
}
.nav ul {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}
.nav ul a {
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  color: rgba(242, 238, 230, 0.78);
  transition: color .2s;
}
.nav ul a:hover { color: var(--ivory); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 16px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.btn svg { width: 18px; height: 10px; transition: transform .25s; }
.btn:hover svg { transform: translateX(4px); }
.btn-brass { background: var(--brass); color: #0e1c1e; }
.btn-brass:hover { background: var(--brass-lt); }
.btn-ghost { border-color: rgba(242, 238, 230, .3); color: var(--ivory); }
.btn-ghost:hover { border-color: var(--ivory); }
.btn-sm { padding: 11px 18px; font-size: 14px; }
.nav .btn-ghost { border-color: rgba(201, 164, 118, .55); }
.nav .btn-ghost:hover { border-color: var(--brass-lt); }
:focus-visible { outline: 2px solid var(--brass-lt); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 700px at 78% 45%, rgba(180, 138, 90, 0.10), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(84, 120, 116, 0.18), transparent 60%),
    var(--night);
  color: var(--ivory);
  padding-top: 92px;
  overflow: hidden;
}
.hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(820px, calc(100vh - 38px - 92px));
  padding: 96px 0 72px;
}
.hero-label {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--brass-lt);
  margin-bottom: 36px;
}
.hero-label::before {
  content: "";
  width: 44px; height: 1px;
  background: currentColor;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(50px, 7.4vw, 124px);
  line-height: 0.96;
  letter-spacing: -0.018em;
  max-width: 1180px;
  margin-bottom: 64px;
}
.hero h1 em {
  font-style: italic;
  color: var(--brass-lt);
}
.hero-sub {
  display: grid;
  grid-template-columns: minmax(0, 560px) auto;
  justify-content: space-between;
  align-items: end;
  gap: 32px 64px;
}
.hero p.lede {
  font-size: 19px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(242, 238, 230, 0.76);
}
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--night-line);
}
.hero-facts > div {
  padding: 30px 32px 40px 0;
  border-right: 1px solid var(--night-line);
}
.hero-facts > div + div { padding-left: 32px; }
.hero-facts > div:last-child { border-right: 0; }
.hero-facts .mono { color: var(--brass-lt); display: block; margin-bottom: 10px; }
.hero-facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 6px;
}
.hero-facts p { font-size: 15px; color: rgba(242, 238, 230, 0.6); }

/* ---------- Sections ---------- */
section.block { padding: clamp(88px, 11vw, 160px) 0; }

.sec-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  margin-bottom: clamp(56px, 7vw, 96px);
}
.sec-head .mono { color: var(--brass); padding-top: 14px; }
.sec-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 900px;
}
.sec-head h2 em { font-style: italic; color: var(--brass); }

/* Approach */
.approach { background: var(--paper); }
.principles { border-top: 1px solid var(--line); }
.principle {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 40px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.principle .num {
  font-family: var(--serif);
  font-size: 64px;
  line-height: .8;
  color: var(--brass);
  font-weight: 400;
}
.principle h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
}
.principle h3 .mono { display: block; color: var(--ink-soft); margin-bottom: 12px; font-family: var(--mono); font-size: 11px; font-weight: 400; }
.principle p { color: var(--ink-soft); font-size: 17px; max-width: 520px; padding-top: 4px; }

/* Origin */
.origin {
  background: var(--ivory);
  position: relative;
  overflow: hidden;
}
.origin-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
}
.origin .mono.k { color: var(--brass); padding-top: 18px; }
.origin blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.005em;
  max-width: 1000px;
}
.origin blockquote::before {
  content: "\201C";
  display: block;
  font-size: 1.9em;
  line-height: .6;
  color: var(--brass);
  margin-bottom: 18px;
}
.origin .attrib {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 1000px;
  font-size: 15.5px;
  color: var(--ink-soft);
}
.origin .attrib a { color: var(--ink); text-underline-offset: 4px; text-decoration-color: var(--brass); }

/* Purchasing */
.purchasing {
  background: var(--night);
  color: var(--ivory);
}
.purchasing .sec-head .mono { color: var(--brass-lt); }
.purchasing .sec-head h2 em { color: var(--brass-lt); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--night-line);
  counter-reset: step;
}
.step {
  position: relative;
  padding: 40px 32px 48px 0;
}
.step + .step { padding-left: 32px; border-left: 1px solid var(--night-line); }
.step::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px; height: 7px;
  background: var(--brass-lt);
  transform: rotate(45deg);
}
.step + .step::before { left: -4px; }
.step .mono { color: var(--brass-lt); display: block; margin-bottom: 22px; }
.step h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.step p { color: rgba(242, 238, 230, 0.64); font-size: 16px; }
.remit {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.remit .methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.remit .methods span {
  border: 1px solid var(--night-line);
  padding: 10px 16px;
  font-size: 14.5px;
  color: rgba(242, 238, 230, 0.82);
}
.remit .methods span b { color: var(--brass-lt); font-weight: 500; margin-right: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }

/* Access form */
.access { background: var(--paper); }
.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.access h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 4.8vw, 70px);
  line-height: 1.02;
  margin: 22px 0 28px;
}
.access h2 em { font-style: italic; color: var(--brass); }
.access .intro p { color: var(--ink-soft); max-width: 440px; margin-bottom: 36px; }
.access .intro .mono { color: var(--brass); }
.direct {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  max-width: 440px;
}
.direct .mono { color: var(--ink-soft); display: block; margin-bottom: 8px; }
.direct a { font-family: var(--serif); font-size: 26px; text-decoration: none; border-bottom: 1px solid var(--brass); }

form.request {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 52px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 28px;
  box-shadow: 0 40px 80px -50px rgba(14, 28, 30, 0.35);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 0 12px;
  border-radius: 0;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b48a5a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 24px;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--brass); }
.form-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 8px;
}
.form-foot small { color: var(--ink-soft); font-size: 13.5px; max-width: 320px; line-height: 1.5; }
.btn-dark { background: var(--night); color: var(--ivory); }
.btn-dark:hover { background: #1c3336; }

/* Footer */
footer {
  background: #0a1516;
  color: rgba(242, 238, 230, 0.6);
  padding: 88px 0 36px;
  overflow: hidden;
}
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 72px;
}
.foot-top .mono { color: var(--brass-lt); display: block; margin-bottom: 16px; }
.foot-top p, .foot-top a { font-size: 15.5px; color: rgba(242, 238, 230, 0.72); text-decoration: none; }
.foot-top a:hover { color: var(--ivory); }
.foot-top .wordmark { color: var(--ivory); margin-bottom: 22px; }
.foot-top .lead { max-width: 360px; }
.giant {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 15.5vw, 236px);
  line-height: .8;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 238, 230, 0.14);
  white-space: nowrap;
  user-select: none;
  margin: 0 0 40px -0.04em;
}
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  border-top: 1px solid var(--night-line);
  padding-top: 26px;
  font-size: 13.5px;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .status i { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav ul li.link { display: none; }
  .hero-main { min-height: 0; padding: 88px 0 72px; }
  .hero-sub { grid-template-columns: 1fr; }
  .sec-head, .origin-grid, .remit { grid-template-columns: 1fr; gap: 18px; }
  .sec-head .mono, .origin .mono.k { padding-top: 0; }
  .principle { grid-template-columns: 90px minmax(0, 1fr); }
  .principle p { grid-column: 2; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(3)::before { left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--night-line); }
  .access-grid { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-top > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .utility .hide-sm { display: none; }
  .utility .wrap { justify-content: center; }
  .nav .wrap { height: 76px; }
  .nav .btn { display: none; }
  .wordmark b { font-size: 21px; }
  .hero { padding-top: 76px; }
  .hero-main { padding: 64px 0 52px; }
  .hero h1 { margin-bottom: 40px; }
  .hero p.lede { font-size: 17px; }
  .hero .ctas .btn { width: 100%; justify-content: center; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts > div, .hero-facts > div + div { padding: 22px 0 24px; border-right: 0; }
  .hero-facts > div + div { border-top: 1px solid var(--night-line); }
  .principle { grid-template-columns: 1fr; gap: 14px; padding: 36px 0; }
  .principle p { grid-column: 1; }
  .principle .num { font-size: 48px; }
  .principle h3 { font-size: 30px; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 32px 0 36px; border-left: 0; }
  .step + .step { border-top: 1px solid var(--night-line); }
  .step::before, .step + .step::before { left: 0; }
  form.request { grid-template-columns: 1fr; padding: 24px 20px 28px; }
  .form-foot .btn { width: 100%; justify-content: center; }
  .foot-top { grid-template-columns: 1fr; }
}

/* ---------- WordPress additions ---------- */
body { position: relative; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  grid-column: 1 / -1;
  border-left: 2px solid var(--brass);
  background: var(--ivory);
  padding: 14px 18px;
  font-size: 15px;
}
.request-sent {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 52px);
  box-shadow: 0 40px 80px -50px rgba(14, 28, 30, 0.35);
}
.request-sent h3 { font-family: var(--serif); font-weight: 500; font-size: 36px; line-height: 1.1; margin: 14px 0 14px; }
.request-sent p { color: var(--ink-soft); }
.request-sent .mono { color: var(--brass); }

/* Inner pages (privacy policy and anything added later) */
.page-band {
  background: var(--night);
  color: var(--ivory);
  padding: calc(92px + 72px) 0 64px;
}
.page-title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 72px); line-height: 1.05; }
.prose { max-width: 760px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin-top: 1.6em; }
.prose h2 { font-size: 36px; }
.prose h3 { font-size: 28px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose a { text-decoration-color: var(--brass); text-underline-offset: 3px; }
.page-body { padding: clamp(56px, 8vw, 104px) 0; }
@media (max-width: 640px) { .page-band { padding-top: calc(76px + 48px); } }
