/* ============================================================
   Bridgewell Transition Care — Global Stylesheet
   "Bridging the Gap from Hospital to Home"
   ============================================================ */

:root {
  --pine: #1e3a36;          /* deep pine teal — primary dark */
  --pine-soft: #2c4f4a;
  --pine-deep: #142925;
  --cream: #f5f0e6;         /* warm cream — page background */
  --cream-deep: #ece4d4;    /* deeper cream — alt sections   */
  --sand: #d9cdb6;
  --gold: #b99762;          /* muted gold accent             */
  --ink: #26302e;           /* body text                     */
  --ink-soft: #55625f;
  --white: #fdfcf9;
  --line: rgba(30, 58, 54, .18);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--pine);
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: .02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1.4rem;
}

.lede {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink-soft);
  max-width: 46em;
}

/* ---------- Layout helpers ---------- */

.wrap { width: min(1180px, 90vw); margin: 0 auto; }
.wrap-narrow { width: min(820px, 90vw); margin: 0 auto; }

section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.section-alt { background: var(--cream-deep); }
.section-dark { background: var(--pine); }
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark p { color: rgba(245, 240, 230, .82); }

.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 1.05rem 2.6rem;
  border: 1px solid var(--pine);
  color: var(--pine);
  background: transparent;
  cursor: pointer;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}

.btn:hover { background: var(--pine); color: var(--cream); }

.btn-solid { background: var(--pine); color: var(--cream); }
.btn-solid:hover { background: var(--pine-deep); border-color: var(--pine-deep); }

.btn-light { border-color: rgba(245, 240, 230, .75); color: var(--cream); }
.btn-light:hover { background: var(--cream); color: var(--pine); border-color: var(--cream); }

.link-underline {
  display: inline-block;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 400;
  padding-bottom: .55rem;
  border-bottom: 1px solid currentColor;
  transition: opacity .3s ease;
}
.link-underline:hover { opacity: .6; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  transition: background .35s ease, box-shadow .35s ease;
  padding: 1.3rem 0;
}

.site-header .wrap {
  width: min(1320px, 94vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header.scrolled,
body.solid-header .site-header {
  background: rgba(245, 240, 230, .96);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(6px);
}

.brand { display: flex; align-items: center; }

.brand-logo {
  height: 90px;
  width: auto;
  display: block;
}

body.hero-header .site-header:not(.scrolled) .brand-logo { filter: brightness(0) invert(1); }

.header-actions { display: flex; align-items: center; gap: 2rem; }

.header-book {
  font-size: .74rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--pine);
  padding-bottom: .4rem;
  border-bottom: 1px solid currentColor;
  transition: opacity .3s ease;
}
.header-book:hover { opacity: .65; }

body.hero-header .site-header:not(.scrolled) .header-book { color: var(--cream); }

/* Hamburger */
.menu-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  width: 40px;
  height: 32px;
  position: relative;
  z-index: 80;
}
.menu-toggle span {
  position: absolute;
  left: 6px;
  right: 6px;
  height: 1.5px;
  background: var(--pine);
  transition: transform .35s ease, opacity .3s ease, background .35s ease, top .35s ease;
}
.menu-toggle span:nth-child(1) { top: 9px; }
.menu-toggle span:nth-child(2) { top: 16px; }
.menu-toggle span:nth-child(3) { top: 23px; }

body.hero-header .site-header:not(.scrolled) .menu-toggle span { background: var(--cream); }
body.menu-open .menu-toggle span { background: var(--cream) !important; }

/* Keep the header (logo + toggle) above the open overlay */
body.menu-open .site-header {
  z-index: 80;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body.menu-open .brand-name,
body.menu-open .header-book { color: var(--cream) !important; }
body.menu-open .brand svg .logo-stroke { stroke: var(--cream) !important; }
body.menu-open .brand svg .logo-fill { fill: var(--cream) !important; }
body.menu-open .menu-toggle span:nth-child(1) { top: 16px; transform: rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { top: 16px; transform: rotate(-45deg); }

/* ---------- Overlay navigation ---------- */

.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--pine-deep);
  z-index: 70;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility .45s ease;
  overflow-y: auto;
}

body.menu-open .nav-overlay { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

.nav-overlay .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 6rem 0 4rem;
}

.nav-main { list-style: none; }
.nav-main li { margin: .35rem 0; }
.nav-main a {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  color: var(--cream);
  line-height: 1.35;
  transition: color .3s ease, padding-left .3s ease;
}
.nav-main a:hover { color: var(--gold); padding-left: .5rem; }

.nav-side {
  border-left: 1px solid rgba(245, 240, 230, .2);
  padding-left: 3rem;
}
.nav-side .eyebrow { color: var(--gold); }
.nav-side ul { list-style: none; margin-bottom: 2.5rem; }
.nav-side li { margin: .55rem 0; }
.nav-side a {
  color: rgba(245, 240, 230, .85);
  font-size: 1rem;
  letter-spacing: .04em;
  transition: color .3s ease;
}
.nav-side a:hover { color: var(--gold); }

.nav-side .nav-contact { color: rgba(245, 240, 230, .7); font-size: .95rem; line-height: 2; }
.nav-side .nav-contact a { color: var(--cream); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 115%, rgba(185, 151, 98, .28), transparent 55%),
    radial-gradient(ellipse at 85% -10%, rgba(90, 141, 131, .35), transparent 60%),
    linear-gradient(168deg, var(--pine-soft) 0%, var(--pine) 45%, var(--pine-deep) 100%);
  padding: 8rem 0 6rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600' viewBox='0 0 900 600'%3E%3Cg fill='none' stroke='%23f5f0e6' stroke-opacity='.05' stroke-width='1.4'%3E%3Cpath d='M-50 470 Q450 90 950 470'/%3E%3Cpath d='M-50 520 Q450 160 950 520'/%3E%3Cpath d='M-50 570 Q450 230 950 570'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center bottom;
}

.hero .wrap { position: relative; }

.hero .eyebrow { color: var(--sand); }

.hero h1 { color: var(--cream); margin-bottom: 1.6rem; }

.hero p {
  color: rgba(245, 240, 230, .85);
  max-width: 40em;
  margin: 0 auto 3rem;
  font-size: 1.15rem;
}

.hero-links {
  display: flex;
  gap: 3.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-links .link-underline { color: var(--cream); }

/* Inner-page hero */
.page-hero {
  padding: 11rem 0 5rem;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(185, 151, 98, .16), transparent 55%),
    var(--cream-deep);
  text-align: center;
}
.page-hero h1 { margin-bottom: 1.2rem; }
.page-hero .lede { margin: 0 auto; }

/* ---------- Cards & grids ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.6rem; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2.6rem 2.2rem;
  transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(30, 58, 54, .1); }

.card h3 { margin-bottom: .9rem; }
.card p { color: var(--ink-soft); font-size: .99rem; }
.card .feature-list { margin: .75rem 0 0; }
.card .feature-list li { padding: 0; font-size: .93rem; line-height: 1.45; margin-bottom: .3rem; }

.card .card-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--gold);
  line-height: 1;
  display: block;
  margin-bottom: 1.2rem;
}

.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.5rem;
  color: var(--gold);
}

/* Pillar cards on dark */
.section-dark .card {
  background: rgba(245, 240, 230, .05);
  border-color: rgba(245, 240, 230, .16);
}
.section-dark .card h3 { color: var(--cream); }
.section-dark .card p { color: rgba(245, 240, 230, .72); }
.section-dark .card:hover { box-shadow: none; background: rgba(245, 240, 230, .09); }
.section-dark .eyebrow { color: var(--gold); }

/* ---------- Split section ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.split-visual {
  min-height: 420px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(185, 151, 98, .35), transparent 60%),
    linear-gradient(160deg, var(--pine-soft), var(--pine-deep));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-visual svg { width: 62%; height: auto; opacity: .9; }

.split-visual figcaption {
  position: absolute;
  bottom: 1.6rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, .65);
}

/* ---------- Checklist / feature list ---------- */

.feature-list { list-style: none; margin: 2rem 0; }
.feature-list li {
  padding: .45rem 0;
  color: var(--ink-soft);
}
.feature-list strong { color: var(--pine); font-weight: 500; }

/* ---------- Steps (How It Works) ---------- */

.steps { counter-reset: step; display: grid; gap: 0; }

.step {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 2.5rem;
  padding: 2.8rem 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }

.step-num {
  font-family: var(--serif);
  font-size: 3.4rem;
  color: var(--gold);
  line-height: 1;
}

.step h3 { margin-bottom: .7rem; }
.step p { color: var(--ink-soft); }

/* ---------- FAQ accordion ---------- */

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }

.faq-q {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--pine);
  padding: 1.6rem 3rem 1.6rem 0;
  cursor: pointer;
  position: relative;
  line-height: 1.35;
}

.faq-q::after {
  content: "+";
  position: absolute;
  right: .4rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-weight: 200;
  font-size: 1.7rem;
  color: var(--gold);
  transition: transform .3s ease;
}

.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s ease;
}
.faq-a p { color: var(--ink-soft); padding: 0 0 1.8rem; max-width: 60em; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.form-grid .full { grid-column: 1 / -1; }

label {
  display: block;
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--pine);
  margin-bottom: .55rem;
  font-weight: 400;
}

input, select, textarea {
  width: 100%;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pine);
  padding: .65rem 0;
  border-radius: 0;
  outline: none;
  transition: border-color .3s ease;
}

input:focus, select:focus, textarea:focus { border-bottom-color: var(--gold); }

textarea { resize: vertical; min-height: 120px; }

.form-note { font-size: .88rem; color: var(--ink-soft); margin-top: 1.4rem; }

.form-success {
  display: none;
  background: var(--pine);
  color: var(--cream);
  padding: 1.4rem 1.8rem;
  margin-top: 2rem;
  font-size: .98rem;
}

.form-error {
  display: none;
  background: var(--cream-deep);
  border-left: 2px solid var(--gold);
  color: var(--ink-soft);
  padding: 1.4rem 1.8rem;
  margin-top: 2rem;
  font-size: .95rem;
}
.form-error a { text-decoration: underline; color: var(--pine); }

/* Honeypot field — hidden from sighted users, still reachable by bots that fill every input */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Resource / article cards ---------- */

.article-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .35s ease, box-shadow .35s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(30, 58, 54, .1); }

.article-card-band {
  height: 10px;
  background: linear-gradient(90deg, var(--gold), var(--sand));
}
.article-card-band.band-2 { background: linear-gradient(90deg, var(--pine-soft), #5a8d83); }
.article-card-band.band-3 { background: linear-gradient(90deg, #8c6f4a, var(--gold)); }
.article-card-band.band-4 { background: linear-gradient(90deg, var(--pine), var(--pine-soft)); }

.article-card-body { padding: 2.2rem 2rem 2.4rem; display: flex; flex-direction: column; flex: 1; }

.article-card .tag {
  font-size: .68rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.article-card h3 { font-size: 1.4rem; margin-bottom: .8rem; }
.article-card p { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.article-card .link-underline { font-size: .72rem; margin-top: 1.6rem; color: var(--pine); }

/* ---------- Article page ---------- */

.article-body { padding-top: 2rem; }
.article-body h2 { font-size: 1.9rem; margin: 2.8rem 0 1rem; }
.article-body p { margin-bottom: 1.3rem; color: var(--ink-soft); }
.article-body ul, .article-body ol { margin: 0 0 1.5rem 1.3rem; color: var(--ink-soft); }
.article-body li { margin: .5rem 0; }

.article-meta {
  font-size: .74rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

.callout {
  border-left: 2px solid var(--gold);
  background: var(--cream-deep);
  padding: 1.6rem 2rem;
  margin: 2.4rem 0;
  color: var(--ink-soft);
  font-size: .98rem;
}

/* ---------- CTA band ---------- */

.cta-band {
  background:
    radial-gradient(ellipse at 80% 120%, rgba(185, 151, 98, .3), transparent 60%),
    var(--pine);
  text-align: center;
}
.cta-band h2 { color: var(--cream); margin-bottom: 1.2rem; }
.cta-band p { color: rgba(245, 240, 230, .8); max-width: 42em; margin: 0 auto 2.6rem; }

/* ---------- Quote / statement ---------- */

.statement {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.4;
  color: var(--pine);
  max-width: 26em;
  margin: 0 auto;
}
.statement em { color: var(--gold); font-style: italic; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--pine-deep);
  color: rgba(245, 240, 230, .75);
  padding: 5rem 0 2.5rem;
  font-size: .95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgba(245, 240, 230, .15);
}

.footer-brand .brand-name { color: var(--cream); font-size: 1.6rem; }
.footer-brand p { margin-top: 1.4rem; max-width: 30em; font-size: .93rem; line-height: 1.9; }

.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.15rem;
  margin-top: .8rem;
}

.site-footer h4 {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

.site-footer ul { list-style: none; }
.site-footer li { margin: .55rem 0; }
.site-footer a { transition: color .3s ease; }
.site-footer a:hover { color: var(--gold); }

.footer-bottom {
  padding-top: 2.2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(245, 240, 230, .5);
}

.footer-disclaimer {
  margin-top: 2.2rem;
  font-size: .8rem;
  color: rgba(245, 240, 230, .5);
  line-height: 1.8;
  max-width: 72em;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: none; }

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

/* ---------- Section images ---------- */

.section-img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.split .section-img {
  height: 100%;
  min-height: 320px;
  max-height: 480px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split-visual { min-height: 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-overlay { align-items: flex-start; }
  .nav-overlay .wrap { grid-template-columns: 1fr; gap: 2.5rem; align-content: start; padding-top: 8rem; }
  .nav-side { border-left: 0; padding-left: 0; border-top: 1px solid rgba(245,240,230,.2); padding-top: 2rem; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 64px 1fr; gap: 1.4rem; }
  .step-num { font-size: 2.4rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-book { display: none; }
  .hero-links { gap: 2rem; }
  .eyebrow { letter-spacing: .2em; }
  .statement { font-size: clamp(1.4rem, 5vw, 1.7rem); }
}
