/* =========================================================
   Meridian Health Specialists — Stylesheet
   Design tokens live as CSS custom properties in :root
   ========================================================= */

/* ---------- Fonts (self-hosted) ---------- */
@font-face{
  font-family:"Fraunces";
  src:url("../fonts/text/fraunces-400.woff2") format("woff2");
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Fraunces";
  src:url("../fonts/text/fraunces-500.woff2") format("woff2");
  font-weight:500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Fraunces";
  src:url("../fonts/text/fraunces-600.woff2") format("woff2");
  font-weight:600; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Fraunces";
  src:url("../fonts/text/fraunces-700.woff2") format("woff2");
  font-weight:700; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Fraunces";
  src:url("../fonts/text/fraunces-900.woff2") format("woff2");
  font-weight:900; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Inter";
  src:url("../fonts/text/inter-400.woff2") format("woff2");
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Inter";
  src:url("../fonts/text/inter-500.woff2") format("woff2");
  font-weight:500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Inter";
  src:url("../fonts/text/inter-600.woff2") format("woff2");
  font-weight:600; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Inter";
  src:url("../fonts/text/inter-700.woff2") format("woff2");
  font-weight:700; font-style:normal; font-display:swap;
}

/* ---------- Design tokens ---------- */
:root{
  /* Color */
  --ink:            #123b66;   /* headings / dark text */
  --teal:           #0E6B72;   /* brand primary */
  --teal-deep:      #123b66;   /* primary hover / dark sections */
  --horizon:        #EAF4F4;   /* light tint background */
  --coral:          #cd413b;   /* warm accent / CTA */
  --coral-deep:     #a62d28;   /* CTA hover */
  --sage:           #A9C9A4;   /* healing secondary accent */
  --cloud:          #FBFAF7;   /* base background */
  --line:           #E3E1D9;   /* hairline borders on cloud */

  /* Type */
  --font-display:"Fraunces", ui-serif, Georgia, serif;
  --font-body:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Layout */
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 45px -25px rgba(22,50,63,.35);
  --shadow-card: 0 12px 30px -18px rgba(22,50,63,.28);
  --container-max: 1240px;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--cloud);
  font-size:1rem;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,.font-display{
  font-family:var(--font-display);
  color:var(--teal-deep);
  letter-spacing:-0.01em;
}
h2{ font-weight:600; }
p{ color:#3e4e60; }
footer p{color:#C9D6DA;}
a{ color:var(--teal); text-decoration:none; }
a:hover{ color:var(--coral); }
::selection{ background:var(--coral); color:#fff; }

.eyebrow{
  font-family:var(--font-body);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--coral);
  display:inline-flex;
  align-items:center;
  gap:.55rem;
}
.eyebrow::before{
  content:"";
  width:26px; height:2px;
  background:var(--coral);
  display:inline-block;
}

.section-pad{ padding-block: clamp(4rem, 7vw, 7rem); }
.container-xl-custom{ max-width:var(--container-max); margin-inline:auto; padding-inline:1.25rem; }

/* Focus visibility */
a:focus-visible, button:focus-visible, .btn:focus-visible{
  outline:3px solid var(--coral);
  outline-offset:3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

/* Logo Wrapper */
.logo-icon{
    display: inline-block;
    overflow: hidden;
    width: 500px;
    height: 410px;
    aspect-ratio: 1 / 1;
    line-height: 0;
}

/* Logo Image */
.logo-icon img{
    display: block;
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: cover;
    object-position: left center;
}

/* Tablet */
@media (max-width: 991px){
    .logo-icon{
        width: 150px;
    }
}

/* Mobile */
@media (max-width: 767px){
    .logo-icon{
        width: 120px;
    }
}

/* Small Mobile */
@media (max-width: 480px){
    .logo-icon{
        width: 100%;
        height:320px;
    }
}


/* ---------- Buttons ---------- */
.btn-brand{
  background:var(--coral);
  border:none;
  color:#fff;
  font-weight:600;
  padding:.85rem 1.7rem;
  border-radius:999px;
  transition:transform .25s ease, background .25s ease, box-shadow .25s ease;
  box-shadow:0 14px 28px -14px rgba(244,128,91,.65);
}
.btn-brand:hover{ background:var(--coral-deep); color:#fff; transform:translateY(-2px); }
.btn-outline-brand{
  border:1.5px solid rgba(22,50,63,.2);
  color:var(--ink);
  font-weight:600;
  padding:.85rem 1.7rem;
  border-radius:999px;
  background:transparent;
  transition:all .25s ease;
}
.btn-outline-brand:hover{ border-color:var(--teal); color:var(--teal); background:var(--horizon); }
.btn-ghost-light{
  color:#fff; border:1.5px solid rgba(255,255,255,.4);
  border-radius:999px; padding:.85rem 1.7rem; font-weight:600;
  transition:all .25s ease;
}
.btn-ghost-light:hover{ background:rgba(255,255,255,.12); color:#fff; border-color:#fff; }

/* =========================================================
   Navbar
   ========================================================= */
.site-nav{
  padding-block:1.15rem;
  background:rgba(251,250,247,.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid transparent;
  transition:padding .3s ease, box-shadow .3s ease, border-color .3s ease, background .3s ease;
}
.site-nav.is-scrolled{
  padding-block:.65rem;
  background:rgba(251,250,247,.96);
  box-shadow:0 8px 24px -18px rgba(22,50,63,.4);
  border-bottom-color:var(--line);
}
.brand{
  display:flex; align-items:center; gap:.7rem;
  font-family:var(--font-display); font-weight:700; font-size:1.2rem; color:var(--ink);
}
.brand img{ height:80px; transition:transform .3s ease; }
/*.brand:hover img{ transform:rotate(-8deg) scale(1.05); }*/
.brand:hover{ color:var(--ink); }
.brand .brand-sub{ display:block; font-family:var(--font-body); font-weight:500; font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; color:var(--teal); }

.navbar-nav .nav-link{
  font-weight:600; color:var(--ink); padding:.5rem 1rem !important;
  position:relative;
}
.navbar-nav .nav-link::after{
  content:""; position:absolute; left:1rem; right:1rem; bottom:.15rem; height:2px;
  background:var(--coral); transform:scaleX(0); transform-origin:left; transition:transform .25s ease;
}
.navbar-nav .nav-link:hover::after, .navbar-nav .nav-link.active::after{ transform:scaleX(1); }
.navbar-nav .nav-link:hover{ color:var(--teal); }
.dropdown-menu{ border:none; border-radius:var(--radius-sm); box-shadow:var(--shadow-card); padding:.5rem; }
.dropdown-item{ border-radius:8px; padding:.55rem .8rem; font-weight:500; }
.dropdown-item:hover{ background:var(--horizon); color:var(--teal); }

/* =========================================================
   Hero
   ========================================================= */
.hero{
  position:relative;
  overflow:hidden;
  padding-top:clamp(3rem, 6vw, 5.5rem);
  padding-bottom:clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(60% 55% at 88% 12%, rgba(169,201,164,.35), transparent 70%),
    radial-gradient(50% 50% at 5% 90%, rgba(244,128,91,.14), transparent 70%),
    var(--cloud);
}
.hero::after{
  content:"";
  position:absolute; inset:-10%;
  z-index:0; pointer-events:none;
  background:radial-gradient(40% 40% at 82% 8%, rgba(169,201,164,.30), transparent 70%);
  animation: ambientDrift 10s ease-in-out infinite alternate;
}
.hero > .container-xl-custom{ position:relative; z-index:1; }
@keyframes ambientDrift{
  0%{ transform:translate(0,0) scale(1); }
  100%{ transform:translate(-18px,14px) scale(1.08); }
}
.hero-copy{ max-width:600px; }
.hero-title{
  font-size:clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight:700;
  line-height:1.08;
  margin-block:1.1rem 1.2rem;
}
.hero-title em{ font-style:italic; color:var(--teal); }
.hero-lede{ font-size:1.12rem; max-width:50ch; }
.hero-actions{ display:flex; flex-wrap:wrap; gap:.9rem; margin-top:2rem; }

.hero-visual{ position:relative; }
.pulse-wrap{
  position:relative; background:var(--ink); border-radius:var(--radius-lg);
  padding:2.2rem 1.4rem 1.6rem; box-shadow:var(--shadow-soft); overflow:hidden;
  animation: pulseWrapFloat 6s ease-in-out infinite;
}
.pulse-wrap::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(60% 60% at 20% 0%, rgba(14,107,114,.55), transparent 70%);
}
.pulse-wrap svg{ position:relative; width:100%; height:auto; display:block; }
@keyframes pulseWrapFloat{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-7px); }
}
/* Looping heartbeat trace: draws in, glows, sweeps off, restarts — endlessly */
#pulseLine{
  stroke-dasharray:1060 1060;
  animation: pulseLoop 4.6s cubic-bezier(.45,0,.2,1) infinite;
}
@keyframes pulseLoop{
  0%{   stroke-dashoffset:1060; filter:drop-shadow(0 0 0 rgba(244,128,91,0)); }
  35%{  stroke-dashoffset:0;    filter:drop-shadow(0 0 0 rgba(244,128,91,0)); }
  55%{  stroke-dashoffset:0;    filter:drop-shadow(0 0 10px rgba(244,128,91,.85)); }
  78%{  stroke-dashoffset:0;    filter:drop-shadow(0 0 0 rgba(244,128,91,0)); }
  100%{ stroke-dashoffset:-1060;filter:drop-shadow(0 0 0 rgba(244,128,91,0)); }
}
.pulse-caption{ position:relative; display:flex; justify-content:space-between; color:#EAF4F4; font-size:.8rem; margin-top:.6rem; font-weight:500; }
.pulse-caption strong{ color:#fff; font-family:var(--font-display); font-size:1rem; }

.float-card{
  position:absolute; background:#fff; border-radius:var(--radius-md);
  box-shadow:var(--shadow-card); padding:1rem 1.2rem; display:flex; align-items:center; gap:.8rem;
  opacity:0; transform:translateY(18px);
  animation: floatIn .7s ease forwards;
}
.float-card .fc-icon{
  width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  font-size:1.15rem; flex-shrink:0;
}
.float-card small{ display:block; color:#7E8B92; font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.float-card strong{ font-family:var(--font-display); font-size:1.05rem; color:var(--ink); }
.float-card--a{
  top:-6%; left:-8%;
  animation: floatIn .7s ease 1.9s forwards, cardBob 4s ease-in-out 2.6s infinite;
}
.float-card--a .fc-icon{ background:var(--horizon); color:var(--teal); }
.float-card--b{
  bottom:-7%; right:-6%;
  animation: floatIn .7s ease 2.2s forwards, cardBob 4.6s ease-in-out 2.9s infinite;
}
.float-card--b .fc-icon{ background:#FCE9E1; color:var(--coral); }
@keyframes floatIn{ to{ opacity:1; transform:translateY(0); } }
@keyframes cardBob{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-8px); }
}
@media (max-width: 991.98px){
  .float-card{ position:static; margin-top:1rem; animation:floatIn .5s ease forwards !important; transform:none; opacity:1; }
}

/* =========================================================
   Trust / stats strip
   ========================================================= */
.stats-strip{
  background:var(--teal-deep);
  color:#fff;
  padding-block:2.6rem;
}
.stat-item{ text-align:center; }
.stat-num{
  font-family:var(--font-display); font-weight:700; font-size:clamp(1.9rem,3.4vw,2.6rem);
  color:#fff; display:block; line-height:1;
}
.stat-label{ color:#BFDADB; font-size:.82rem; font-weight:500; letter-spacing:.03em; margin-top:.4rem; }

/* =========================================================
   Services mosaic
   ========================================================= */
.service-card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-md);
  padding:1.8rem 1.6rem; height:100%;
  transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position:relative; overflow:hidden;
}
.service-card::after{
  content:""; position:absolute; inset:auto -30% -30% auto; width:140px; height:140px;
  background:var(--horizon); border-radius:50%; transition:transform .4s ease, background .4s ease;
  transform:scale(0); z-index:0;
}
.service-card:hover::after{ transform:scale(1); }
.service-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow-card); border-color:transparent; }
.service-card .sc-icon{
  width:50px; height:50px; border-radius:14px; background:var(--horizon); color:var(--teal);
  display:flex; align-items:center; justify-content:center; font-size:1.35rem; margin-bottom:1.1rem;
  position:relative; z-index:1; transition:background .3s ease, color .3s ease, transform .3s ease;
}
.service-card:hover .sc-icon{ background:var(--coral); color:#fff; transform:rotate(-6deg); }
.service-card h3{ font-size:1.12rem; font-weight:600; position:relative; z-index:1; }
.service-card p{ font-size:.92rem; margin-bottom:.9rem; position:relative; z-index:1; }
.service-card .sc-link{ font-weight:700; font-size:.85rem; position:relative; z-index:1; display:inline-flex; align-items:center; gap:.35rem; }
.service-card .sc-link i{ transition:transform .25s ease; }
.service-card:hover .sc-link i{ transform:translateX(4px); }
.service-card--feature{ background:var(--ink); color:#fff; border:none; }
.service-card--feature h3, .service-card--feature .eyebrow{ color:#fff; }
.service-card--feature p{ color:#C9D6DA; }
.service-card--feature .sc-icon{ background:rgba(255,255,255,.12); color:var(--sage); }

/* =========================================================
   Mission
   ========================================================= */
.mission-art{ position:relative; }
.mission-art svg{ width:100%; height:auto; filter:drop-shadow(0 25px 40px rgba(22,50,63,.18)); }
.mission-list{ list-style:none; padding:0; margin:1.6rem 0 0; }
.mission-list li{
  display:flex; gap:.8rem; align-items:flex-start; padding:.6rem 0; border-top:1px solid var(--line);
}
.mission-list li:first-child{ border-top:none; }
.mission-list i{ color:var(--sage); font-size:1.2rem; margin-top:.15rem; }

/* =========================================================
   Education / video teaser
   ========================================================= */
.edu-band{ background:var(--horizon); border-radius:var(--radius-lg); padding:clamp(2rem,4vw,3.2rem); }
.edu-card{
  background:#fff; border-radius:var(--radius-md); overflow:hidden; box-shadow:var(--shadow-card);
  transition:transform .3s ease;
}
.edu-card:hover{ transform:translateY(-5px); }
.edu-thumb{
  aspect-ratio:16/10; background:linear-gradient(135deg,var(--teal),var(--teal-deep));
  display:flex; align-items:center; justify-content:center; position:relative;
}
.edu-thumb .play-btn{
  width:56px; height:56px; border-radius:50%; background:rgba(255,255,255,.92);
  display:flex; align-items:center; justify-content:center; color:var(--coral); font-size:1.3rem;
  transition:transform .25s ease;
}
.edu-card:hover .play-btn{ transform:scale(1.1); }
.edu-thumb .tag{
  position:absolute; top:.8rem; left:.8rem; background:rgba(22,50,63,.55); color:#fff;
  font-size:.68rem; font-weight:600; padding:.25rem .6rem; border-radius:999px; letter-spacing:.03em;
}
.edu-body{ padding:1.1rem 1.2rem 1.3rem; }
.edu-body h4{ font-size:.98rem; font-weight:600; line-height:1.4; }

/* =========================================================
   Blog / posts
   ========================================================= */
.post-card{ background:#fff; border-radius:var(--radius-md); border:1px solid var(--line); padding:1.6rem; height:100%; transition:box-shadow .3s ease, transform .3s ease; }
.post-card:hover{ box-shadow:var(--shadow-card); transform:translateY(-4px); }
.post-date{ font-size:.78rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--teal); }
.post-card h3{ font-size:1.08rem; font-weight:600; margin:.5rem 0 .6rem; line-height:1.4; }
.post-card p{ font-size:.9rem; }
.post-meta{ display:flex; align-items:center; gap:1rem; font-size:.8rem; color:#7E8B92; margin-top:1rem; }

/* =========================================================
   CTA banner
   ========================================================= */
.cta-band{
  background:linear-gradient(120deg, var(--coral) 0%, #E9714B 60%, var(--teal-deep) 130%);
  border-radius:var(--radius-lg);
  padding:clamp(2.4rem,5vw,3.6rem);
  color:#fff;
  position:relative; overflow:hidden;
}
.cta-band::before{
  content:""; position:absolute; width:340px; height:340px; border-radius:50%;
  background:rgba(255,255,255,.08); right:-90px; top:-120px;
}
.cta-band h2{ color:#fff; }
.cta-band p{ color:rgba(255,255,255,.9); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{ background:#0d2a49; color:#C9D6DA; padding-top:4rem; }
.site-footer h5{ color:#fff; font-family:var(--font-display); font-weight:600; margin-bottom:1rem; font-size:1.05rem; }
.site-footer a{ color:#C9D6DA; }
.site-footer a:hover{ color:var(--coral); }
.footer-links{ list-style:none; padding:0; margin:0; }
.footer-links li{ margin-bottom:.55rem; font-size:.92rem; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.12); margin-top:2.6rem; padding-block:1.4rem; font-size:.82rem; color:#8FA2A8; }
.social-icon{
  width:38px; height:38px; border-radius:50%; border:1px solid rgba(255,255,255,.2);
  display:inline-flex; align-items:center; justify-content:center; margin-right:.5rem; transition:all .25s ease;
}
.social-icon:hover{ background:var(--coral); border-color:var(--coral); color:#fff; }

/* =========================================================
   Scroll reveal utility (JS toggles .is-visible)
   ========================================================= */
.reveal{ opacity:0; transform:translateY(28px); transition:opacity .7s ease, transform .7s ease; }
.reveal.is-visible{ opacity:1; transform:translateY(0); }
.reveal-stagger > *{ transition-delay:calc(var(--i, 0) * 90ms); }

/* Back to top */
.back-to-top{
  position:fixed; right:1.4rem; bottom:1.4rem; width:46px; height:46px; border-radius:50%;
  background:var(--ink); color:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow-card); opacity:0; visibility:hidden; transform:translateY(10px);
  transition:all .3s ease; z-index:1000; border:none;
}
.back-to-top.is-shown{ opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top:hover{ background:var(--coral); }

/* Divider pulse strip between sections */
.pulse-divider{ height:34px; overflow:hidden; }
.pulse-divider svg{ width:100%; height:100%; }
.pulse-divider path{ stroke:var(--line); stroke-width:2; fill:none; }

/* =========================================================
   Responsive refinements — full device range
   ========================================================= */

/* Prevent any accidental horizontal scroll on small screens */
html, body{ overflow-x:hidden; max-width:100%; }
img, svg{ max-width:100%; height:auto; }

/* Large desktop / wide monitors: let hero breathe a little more */
@media (min-width: 1400px){
  .container-xl-custom{ max-width:1320px; }
  .hero-title{ font-size:3.9rem; }
}

/* Tablets (portrait) */
@media (max-width: 991.98px){
  .hero-visual{ margin-top:1rem; }
  .stat-item{ padding-inline:.25rem; }
  .service-card{ padding:1.5rem 1.3rem; }
}

/* Small tablets / large phones */
@media (max-width: 767.98px){
  .section-pad{ padding-block:clamp(3rem, 10vw, 4.5rem); }
  .hero-title{ font-size:clamp(2rem, 8vw, 2.6rem); }
  .hero-lede{ font-size:1rem; }
  .cta-band .text-lg-end{ text-align:left !important; }
  .cta-band .btn{ width:100%; margin-inline:0 !important; }
  .cta-band .col-lg-4 .btn + .btn{ margin-top:.6rem; }
}

/* Phones */
@media (max-width: 575.98px){
    .site-nav{ padding-block:0;}
    .navbar-collapse {padding-bottom: 20px;}
  .brand{ font-size:1.02rem; gap:.5rem; }
  .brand img{ width: auto; height: 60px; }
  .brand-sub{ font-size:.6rem; }
  .eyebrow{ font-size:.7rem; }
  .hero-actions{ flex-direction:column; align-items:stretch; }
  .hero-actions .btn{ width:100%; text-align:center; }
  .pulse-caption{ font-size:.72rem; }
  .float-card{ padding:.85rem 1rem; }
  .stat-num{ font-size:1.6rem; }
  .stat-label{ font-size:.72rem; }
  .service-card{ padding:1.4rem 1.2rem; }
  .cta-band h2{ font-size:1.5rem; }
}

/* Very small phones */
@media (max-width: 360px){
  .container-xl-custom{ padding-inline:1rem; }
  .hero-title{ font-size:1.85rem; }
  .btn-brand, .btn-outline-brand, .btn-ghost-light{ padding:.75rem 1.3rem; font-size:.92rem; }
}
