/* Joe Chouinard Counseling — shared stylesheet */

:root {
  --bg: #faf6f0;
  --bg-alt: #f1e8dc;
  --sage: #2e4374;
  --sage-dark: #1f2e52;
  --sage-light: #dde3f0;
  --ink: #2b2318;
  --ink-soft: #6b5f4f;
  --border: #e6dbc8;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.2em; color: var(--ink-soft); }

a { color: var(--sage-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / nav */
header.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 500;
}
.brand span { color: var(--sage-dark); }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: var(--ink);
  font-size: 0.95rem;
}
nav.main-nav a:hover { color: var(--sage-dark); }
nav.main-nav a.active {
  color: var(--sage-dark);
  font-weight: 600;
  border-bottom: 2px solid var(--sage-dark);
  padding-bottom: 2px;
}

.hamburger { display: none; }

/* Visible keyboard focus. Mouse users never see this; keyboard users need it. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--sage-dark);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Nav dropdown. Opens on hover for mouse users and on :focus-within for keyboard
   users, so it needs no JavaScript and cannot get stuck open. */
nav.main-nav li.has-dropdown { position: relative; }
nav.main-nav .caret {
  display: inline-block;
  border: 4px solid transparent;
  border-top-color: currentColor;
  margin-left: 5px;
  transform: translateY(2px);
}
/* Invisible bridge so the menu survives the mouse crossing the gap below the link. */
nav.main-nav li.has-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 20px;
}
nav.main-nav .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 20px);
  left: -18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 6px 8px;
  box-shadow: 0 10px 28px rgba(43, 35, 24, 0.12);
  z-index: 60;
}
nav.main-nav li.has-dropdown:hover .dropdown,
nav.main-nav li.has-dropdown:focus-within .dropdown { display: block; }
.dropdown-cols { display: flex; gap: 6px; }
.dropdown-col { min-width: 236px; }
.dropdown-head {
  font-family: var(--serif);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 4px;
  padding: 0 14px;
}
nav.main-nav .dropdown ul {
  display: block;
  list-style: none;
  gap: 0;
  margin: 0 0 6px;
  padding: 0;
}
nav.main-nav .dropdown a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  white-space: nowrap;
  border-radius: 8px;
}
nav.main-nav .dropdown a:hover {
  background: var(--bg-alt);
  color: var(--sage-dark);
  text-decoration: none;
}
/* Catch-all row, so the dropdown never reads as the complete list of what
   Joe treats. Someone looking for grief or anger has somewhere to go. */
nav.main-nav a.dropdown-all {
  display: block;
  margin: 2px 8px 0;
  padding: 10px 6px 4px;
  border-top: 1px solid var(--border);
  border-radius: 0;
  color: var(--sage-dark);
  font-weight: 500;
}
nav.main-nav a.dropdown-all:hover { background: none; text-decoration: underline; }

/* The two-column menu is 496px wide and hangs off the right edge of the window
   below roughly 1156px, because it's anchored to a nav item that sits well right
   of centre. Stack the columns below 1200px, which leaves a margin of error. */
@media (max-width: 1200px) {
  .dropdown-cols { display: block; }
  .dropdown-col { min-width: 0; }
}

/* "Does this sound like you" lists. */
ul.symptoms { list-style: none; padding: 0; margin: 0 0 28px; }
ul.symptoms li {
  position: relative;
  padding: 9px 0 9px 26px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
ul.symptoms li::before {
  content: "\2014";
  position: absolute;
  left: 2px;
  color: var(--sage);
}

/* Writing brief left in place of copy only Joe can supply. Every one of these
   has to be gone before the page ships. */
.needs-joe {
  border: 2px dashed #c9922f;
  background: #fdf7ea;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 26px;
  font-size: 0.92rem;
  color: #6b5324;
}
.needs-joe strong {
  display: block;
  margin-bottom: 6px;
  color: #7a5a12;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.needs-joe ul { margin: 8px 0 0; padding-left: 18px; }
.needs-joe li { margin-bottom: 4px; }
.needs-joe p:last-child { margin-bottom: 0; color: #6b5324; }

/* Hub cards — a whole card that is one link. */
a.card-link {
  display: block;
  text-decoration: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.card-link:hover {
  border-color: var(--sage);
  box-shadow: 0 8px 22px rgba(43, 35, 24, 0.08);
}
a.card-link h3 { color: var(--sage-dark); }
a.card-link p { color: var(--ink-soft); }

/* Placeholder warning. Delete this rule once the draft pages carry real copy. */
.draft-banner {
  background: #8a2b2b;
  color: #fff;
  text-align: center;
  padding: 11px 16px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.nav-cta {
  background: var(--sage);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  text-decoration: none !important;
}
.nav-cta:hover { background: var(--sage-dark); }

/* Hero */
.hero {
  padding: 80px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none !important;
}
.btn-primary { background: var(--sage); color: #fff !important; }
.btn-primary:hover { background: var(--sage-dark); }
.btn-outline {
  border: 1px solid var(--ink);
  color: var(--ink) !important;
}
.btn-outline:hover { background: var(--ink); color: #fff !important; }

.portrait-frame {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  background: var(--sage-light);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait-placeholder {
  text-align: center;
  color: var(--sage-dark);
  padding: 24px;
  font-size: 0.9rem;
}
.portrait-placeholder .initials {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

/* Highlight strip */
.highlights {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
}
.highlights .container {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.highlight-item {
  flex: 1;
  min-width: 200px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.highlight-item strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-bottom: 0; }

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pill {
  background: var(--sage-light);
  color: var(--sage-dark);
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.9rem;
}
a.pill {
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
a.pill:hover,
a.pill:focus-visible {
  background: var(--sage);
  color: #fff;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 860px) {
  .card-grid-3 { grid-template-columns: 1fr; }
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}
.card h3 { margin-bottom: 10px; }

/* Office photos (Home page, location section) */
.office-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.office-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
@media (max-width: 600px) {
  .office-gallery { grid-template-columns: 1fr; }
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  counter-reset: step;
}
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.step h3 { margin-bottom: 10px; }
.step p { margin-bottom: 0; font-size: 0.95rem; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* CTA band */
.cta-band {
  background: var(--sage-dark);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #e7ebe1; max-width: 50ch; margin: 0 auto 28px; }
.cta-band .btn-primary { background: #fff; color: var(--sage-dark) !important; }
.cta-band .btn-primary:hover { background: #f1ede2; }

/* Footer */
footer.site-footer {
  background: var(--ink);
  color: #cfcdc6;
  padding: 48px 0 28px;
  font-size: 0.9rem;
}
footer.site-footer .foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
footer.site-footer h4 {
  color: #fff;
  font-family: var(--serif);
  font-weight: 500;
  margin: 0 0 12px;
  font-size: 1.05rem;
}
footer.site-footer p { color: #cfcdc6; }
footer.site-footer a { color: #cfcdc6; }
footer.site-footer a:hover { color: #fff; }
footer.site-footer .foot-bottom {
  border-top: 1px solid #47453f;
  padding-top: 20px;
  font-size: 0.8rem;
  color: #9c9a92;
}
footer.site-footer .foot-bottom p { color: #9c9a92; margin-bottom: 6px; }

/* Page header (non-home pages) */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.page-header p.lead { max-width: 60ch; }

/* About page */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.credentials-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.credentials-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.credentials-list li strong { color: var(--ink); }

blockquote {
  border-left: 3px solid var(--sage);
  margin: 0 0 20px;
  padding: 4px 0 4px 20px;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}
blockquote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* Services */
.service-block { margin-bottom: 40px; }
.service-block ul { padding-left: 20px; color: var(--ink-soft); }
.service-block li { margin-bottom: 6px; }

.fee-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}
.fee-card .price {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--sage-dark);
  margin-bottom: 4px;
}

/* Accordion (modalities, expandable info) */
.accordion { border-top: 1px solid var(--border); margin-top: 8px; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item summary {
  padding: 18px 2px;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary .accordion-icon {
  font-family: var(--sans);
  font-size: 1.3rem;
  color: var(--sage-dark);
  flex-shrink: 0;
  line-height: 1;
}
.accordion-item[open] summary .accordion-icon::before { content: "\2212"; }
.accordion-item:not([open]) summary .accordion-icon::before { content: "+"; }
.accordion-item .accordion-body { padding: 0 2px 20px; color: var(--ink-soft); font-size: 0.95rem; max-width: 68ch; }
.accordion-item .accordion-body p:last-child { margin-bottom: 0; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.faq-item h3 { margin-bottom: 10px; }
.faq-item p { margin-bottom: 0; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.contact-info-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-list strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sage-dark);
  margin-bottom: 4px;
}
.map-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 24px;
}
.map-frame iframe { display: block; width: 100%; height: 280px; border: 0; }

form.contact-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
form.contact-form input,
form.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  margin-bottom: 18px;
  background: #fff;
  color: var(--ink);
}
form.contact-form textarea { min-height: 130px; resize: vertical; }
form.contact-form button {
  border: none;
  cursor: pointer;
  font-family: var(--sans);
}

[data-fs-success] { display: none; }
[data-fs-success][data-fs-active] {
  display: block;
  background: var(--sage-light);
  color: var(--sage-dark);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
[data-fs-error][data-fs-active] {
  display: block;
  color: #a32d2d;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
[data-fs-error]:empty { display: none; }

.crisis-note {
  background: #fdf6ee;
  border: 1px solid #efdfc6;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 24px;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid, .about-grid, .contact-grid, footer.site-footer .foot-grid {
    grid-template-columns: 1fr;
  }
  .hero-grid { gap: 20px; }
  /* Phones: small round headshot above the headline, so the headline and
     booking button still fit on the first screen. */
  .hero-grid .portrait-frame {
    order: -1; width: 120px; max-width: 120px; margin: 0;
    aspect-ratio: 1 / 1; border-radius: 50%; border: 0;
  }
  .hero-grid .portrait-frame img { object-position: 50% 18%; }
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
    /* With nine service links the menu is taller than a small phone screen, and
       it lives inside a sticky header, so the page can't scroll to reach the
       bottom of it. Let the menu scroll itself instead. */
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  nav.main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
  }
  nav.main-nav li { padding: 10px 0; border-bottom: 1px solid var(--border); }
  /* On a phone the whole thing flattens into an indented list under Services,
     column headings and all. No nested toggle to get trapped in. */
  nav.main-nav .dropdown {
    display: block;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 2px 0 0 12px;
  }
  .dropdown-cols { display: block; }
  .dropdown-col { min-width: 0; }
  .dropdown-head { padding: 0; margin: 12px 0 2px; }
  nav.main-nav .dropdown li { padding: 6px 0; border-bottom: 0; }
  nav.main-nav .dropdown a { padding: 0; color: var(--ink-soft); }
  nav.main-nav a.dropdown-all { margin: 8px 0 0; padding: 10px 0 0; }
  nav.main-nav .caret,
  nav.main-nav li.has-dropdown::after { display: none; }
  nav.main-nav.open { display: block; }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: 0;
  }
  .hamburger span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    display: block;
  }
}
