/* ==========================================================================
   JTpsychotherapy.ca - stylesheet
   Palette follows the practice's own design prototype: warm sage/cream
   surfaces, deep forest green + warm gold as the editorial accent pair,
   with the fixed brand colors (blue/yellow/green/red/grey) reserved for
   the specific UI elements called out in the brand brief.
   ========================================================================== */

:root {
  --bg: #EFF1E8;
  --surface: #F9FAF4;
  --surface-2: #E7EADC;
  --ink: #17251F;
  --ink-soft: #435049;
  --primary: #204B44;
  --primary-strong: #163530;
  --accent: #B9862E;
  --accent-soft: #E7D2A1;
  --line: #D3D8C4;
  --shadow: rgba(23, 37, 31, 0.14);

  /* Fixed practice brand palette - from the JT logos, kept constant */
  --brand-blue: #0D6FB8;
  --brand-blue-deep: #0A5690;
  --brand-yellow: #FFC20E;
  --brand-green: #0E8A41;
  --brand-green-strong: #0B6E34;
  --brand-green-deep: #095A2A;
  --brand-red: #EE144E;
  --brand-grey: #6D6E70;

  /* Pride flag stripe - a quiet nod to the 2SLGBTQ+ group work */
  --gradient-accent: linear-gradient(
    90deg,
    #E40303 0%,
    #FF8C00 20%,
    #FFED00 40%,
    #008026 60%,
    #004DFF 80%,
    #732982 100%
  );

  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-pill: 999px;
  --radius-card: 18px;
  --shadow-soft: 0 10px 30px var(--shadow);
  --shadow-lift: 0 16px 40px rgba(23, 37, 31, 0.18);
  --shadow-modal: 0 24px 70px rgba(23, 37, 31, 0.3);

  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g1'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch' result='n'/><feColorMatrix in='n' type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23g1)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='170' height='170'><filter id='g2'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' stitchTiles='stitch' result='n'/><feColorMatrix in='n' type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23g2)'/></svg>");
  background-blend-mode: multiply, screen;
  background-size: 240px 240px, 170px 170px;
  line-height: 1.65;
}

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

a {
  color: var(--primary);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.65em 1.4em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-blue-deep);
}

.btn-outline {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.btn-outline:hover {
  background: var(--brand-red);
  filter: brightness(0.9);
}

.btn-small {
  font-size: 0.85rem;
  padding: 0.5em 1.1em;
}

/* ---- Accent rule (echoes the practice's rainbow card stripe) ---- */

.accent-rule {
  height: 4px;
  background: var(--gradient-accent);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #8B8C8E;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: #fff;
}

/* ---- Primary nav ---- */

.top-nav {
  flex: 1;
  min-width: 0;
  margin: 0 4px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  justify-content: flex-start;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  border-radius: 10px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: var(--brand-green-strong);
  color: #fff;
}

.nav-link.is-active {
  background: var(--brand-green-strong);
  color: #fff;
}

/* ---- Services dropdown ---- */

.has-dropdown {
  position: relative;
}

.nav-link-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font: inherit;
}

.nav-link-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.6;
  transition: transform 0.15s ease;
}

.has-dropdown.is-open .nav-link-trigger::after,
.has-dropdown:hover .nav-link-trigger::after {
  transform: rotate(225deg) translateY(2px);
}

.nav-dropdown {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 60;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown,
.has-dropdown.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.nav-dropdown a:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.nav-dropdown a.is-active {
  color: var(--primary);
  background: var(--accent-soft);
}

/* ---- Page header (subpages: fees, individual, couple, groups) ---- */

.page-header {
  background: #A6A7A4;
  padding: 56px 0 48px;
  margin-bottom: 48px;
}

.page-header .eyebrow {
  color: var(--brand-yellow);
}

.page-header h1 {
  color: var(--ink);
  font-size: 2.2rem;
  max-width: 20ch;
}

.page-header p.lede {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.page-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand-blue);
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--brand-yellow);
  font-weight: 700;
  margin-bottom: 0.6em;
}

/* ---- Homepage hero ---- */

.hero-banner {
  padding: 56px 0 8px;
}

.hero-banner-inner {
  display: flex;
  gap: 44px;
  align-items: center;
  flex-wrap: wrap;
}

.portrait-photo {
  width: 240px;
  height: 280px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.hero-intro {
  flex: 1;
  min-width: 260px;
}

.credential-line {
  font-size: 2.4rem;
  margin-bottom: 0.35em;
}

.credential-line .name {
  color: var(--brand-red);
}

.credential-line .suffix {
  color: var(--brand-grey);
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--brand-blue);
  max-width: 46ch;
  font-family: var(--font-serif);
  font-style: italic;
}

/* ---- Bio / page body content ---- */

.hero {
  padding: 40px 0;
}

.bio-content {
  max-width: 720px;
}

.bio-content h1 {
  font-size: 2.2rem;
  color: var(--ink);
  margin-top: 0;
}

.bio-content h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 2.4em;
}

.bio-content h2:first-of-type {
  margin-top: 0;
}

.photo-break {
  margin: 36px 0;
}

.photo-break img:not(.watermark-logo) {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.photo-break.align-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.watermark-logo {
  margin-top: 14px;
  width: 110px;
  max-width: 110px;
  opacity: 0.5;
}

.bio-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 36px 0;
}

/* ---- Simple content pages (Individual / Couple) ---- */

.simple-page {
  padding-bottom: 40px;
}

.simple-page-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 40px;
  max-width: 720px;
}

.simple-page-card p {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

/* ---- Small group directory page ---- */

.groups-page {
  padding-bottom: 60px;
}

.groups-intro {
  max-width: 720px;
  margin-bottom: 40px;
}

.groups-intro p {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.group-category {
  margin-bottom: 40px;
}

.group-category-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--cat-color, var(--brand-blue));
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.group-category-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--cat-color, var(--brand-blue));
  margin: 0;
}

.group-category-sub {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.group-category.cat-first-responders {
  --cat-color: var(--brand-blue);
}

.group-category.cat-lgbtq {
  --cat-color: var(--brand-green-strong);
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.group-card {
  background: transparent;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cat-color, var(--brand-blue));
  border-radius: var(--radius-card);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.group-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.group-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.group-card-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.group-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(14, 138, 65, 0.14);
  color: var(--brand-green-strong);
  white-space: nowrap;
}

.group-status.waitlisted {
  color: var(--brand-grey);
  background: rgba(109, 110, 112, 0.18);
}

.group-card-desc {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
}

.groups-cta {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

/* ---- Individual group pages (Women in Law Enforcement, Crisis Nurses) ---- */

.group-page {
  padding-bottom: 60px;
}

.group-page-inner {
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.group-page h2 {
  font-size: 1.45rem;
  margin-bottom: 0.6em;
}

.group-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.group-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.group-fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
  min-width: 0;
}

.group-fact b {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--brand-blue);
  line-height: 1.2;
  margin-bottom: 4px;
}

.group-fact span {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.group-themes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.group-theme {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--c, var(--brand-blue));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 20px 22px;
  min-width: 0;
}

.group-theme h3 {
  font-size: 1.05rem;
}

.group-theme > p:not(.group-label) {
  margin: 0;
  color: var(--ink-soft);
}

.group-theme > .group-label {
  margin-bottom: 6px;
}

.group-intro {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

.group-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
}

.group-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--brand-blue));
}

.group-list.is-green {
  --c: var(--brand-green-strong);
}

.group-notes {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.group-note-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.group-note {
  background: var(--surface-2);
  border-radius: var(--radius-card);
  padding: 20px 24px;
}

.group-note h3 {
  font-size: 1.05rem;
}

.group-note p {
  color: var(--ink-soft);
  margin: 0;
}

.group-register {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-blue);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 28px 30px;
}

.group-register p {
  color: var(--ink-soft);
}

.group-register p:last-of-type {
  margin-bottom: 0;
}

.group-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.group-card-link:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 3px;
  border-radius: var(--radius-card);
}

@media (max-width: 767px) {
  .group-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-themes,
  .group-note-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .group-register {
    padding: 22px;
  }
}

/* ---- Fees / Informed Consent page ---- */

.fees-page {
  padding-bottom: 60px;
}

.fees-content {
  max-width: 760px;
}

.fees-content h2 {
  font-size: 1.25rem;
  margin-top: 2em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fees-content h2:first-of-type {
  margin-top: 0;
}

.fees-content h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: var(--section-color, var(--brand-blue));
}

.fees-content h2:nth-of-type(1) { --section-color: var(--brand-blue); }
.fees-content h2:nth-of-type(2) { --section-color: var(--brand-green-strong); }
.fees-content h2:nth-of-type(3) { --section-color: var(--brand-red); }
.fees-content h2:nth-of-type(4) { --section-color: var(--brand-grey); }
.fees-content h2:nth-of-type(5) { --section-color: var(--brand-yellow); }
.fees-content h2:nth-of-type(6) { --section-color: var(--brand-blue); }

.fees-content p,
.fees-content li {
  color: var(--ink-soft);
  max-width: 64ch;
}

.fee-table {
  width: 100%;
  max-width: 480px;
  border-collapse: collapse;
  margin: 1em 0 1.5em;
}

.fee-table th,
.fee-table td {
  text-align: left;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--line);
}

.fee-table td.amount,
.fee-table th.amount {
  text-align: right;
  padding-right: 0;
  color: var(--brand-green-strong);
  font-weight: 700;
}

.fees-footer-note {
  margin-top: 2.5em;
  padding-top: 1.75em;
  border-top: 1px solid var(--line);
}

.fees-footer-note p {
  color: var(--ink-soft);
}

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

.site-footer {
  background: var(--brand-grey);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.footer-logo {
  display: block;
  width: auto;
  height: 22px;
}

.footer-copyright {
  font-size: 0.85rem;
  color: #fff;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--brand-yellow);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1023px) {
  .hamburger {
    display: flex;
  }

  .logo {
    order: 1;
  }

  .header-actions {
    order: 2;
  }

  .header-inner:has(.top-nav.is-open) {
    flex-wrap: wrap;
  }

  .top-nav {
    display: none;
    order: 3;
    flex: none;
    width: 100%;
    margin: 0;
    padding: 8px 0 16px;
  }

  .top-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
  }

  .nav-link {
    text-align: center;
    border-radius: 10px;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    box-shadow: none;
    border: none;
    background: var(--surface-2);
    margin-top: 2px;
  }

  .has-dropdown.is-open .nav-dropdown {
    display: block;
  }

  .nav-link-trigger::after {
    margin-left: auto;
  }

  .nav-link-trigger {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo {
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 1023px) {
  .hero-banner-inner {
    flex-direction: column;
    text-align: center;
  }

  .credential-line {
    font-size: 1.8rem;
  }

  .photo-break.align-right {
    align-items: center;
    text-align: center;
  }

  .page-header {
    padding: 40px 0 32px;
    text-align: center;
  }

  .page-header p.lede {
    margin-inline: auto;
  }

  .simple-page-card {
    padding: 28px 22px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .credential-line {
    font-size: 1.5rem;
  }

  .portrait-photo {
    width: 180px;
    height: 210px;
  }

  .group-grid {
    grid-template-columns: 1fr;
  }
}
