/* Sol Therapy, PLLC — global styles */

/* Responsive tiers (literal values — CSS vars can't be used inside @media):
     Mobile   ≤ 767px   — single column, hamburger nav, no carousel arrows
     Tablet   768–959px — multi-column content (incl. contact grid) + larger
                          type + carousel arrows; nav still collapsed, 30px wordmark
     Desktop  ≥ 960px   — horizontal nav, 40px wordmark, 14px nav links
   Two boundaries: tablet min-width:768px (max-width:767px) and desktop
   min-width:960px (max-width:959px). The horizontal nav + 40px wordmark need
   ~860px+ side-by-side, so the desktop header engages at 960px for breathing room. */

/* Self-hosted fonts (no third-party requests). Caveat Brush = display/headings,
   Droid Sans = body/nav — matching the live site's font pairing. */
@font-face {
  font-family: "Caveat Brush";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/caveat-brush-400.woff2") format("woff2");
}
@font-face {
  font-family: "Droid Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/droid-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Droid Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/droid-sans-700.woff2") format("woff2");
}

:root {
  --brand-blue: #38b6c4;
  --brand-blue-dark: #2a8a95;
  --brand-orange: #f08930;
  --brand-yellow: #f2c724;            /* logo background — primary button fill */
  --brand-yellow-dark: #d8b11c;
  --ink: rgb(27, 27, 27);            /* headings, brand wordmark */
  --ink-strong: #111;                /* crisis band / dark quote-hero backgrounds */
  --text: rgb(94, 94, 94);           /* body copy */
  --text-muted: #6c757d;
  --accent-cyan: rgb(131, 231, 242); /* button fill, link underline */
  --accent-cyan-dark: rgb(108, 214, 226);
  --bg: #ffffff;
  --bg-gray: #f6f6f6;                /* feature-card band */
  --bg-soft-warm: #fef8ef;
  --bg-soft-cool: #eaf6f8;
  --border: #e3e8ec;
  --divider: #dcdcdc;                /* feature-card separators */
  --success: #136f4a;                /* form response — success */
  --error: #a8201a;                  /* form response — error */
  --shadow: 0 2px 8px rgba(20, 40, 60, 0.06);
  --radius: 8px;
  --max-width: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Droid Sans', arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

p { font-size: 16px; line-height: 1.5; margin: 0; }
p:empty { height: 1em; }

/* Display font for the logo wordmark and all headings */
.brand,
h1, h2, h3 {
  font-family: 'Caveat Brush', 'Droid Sans', arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
}

/* Content links: keep the surrounding text color, mark with a cyan underline */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent-cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--accent-cyan-dark); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--brand-orange);
  outline-offset: 2px;
}

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

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

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

.site-header-animate {
  box-shadow: 0 2px 6px 0px rgba(0,0,0,0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: normal;
  line-height: 1.1;
  white-space: nowrap;
}
.brand-mark {
  height: 40px;
  width: auto;
  flex: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-toggle:hover { color: var(--brand-blue); border-color: var(--brand-blue); }
.nav-toggle svg { display: block; }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color 0.15s ease;
}

.site-nav > ul > li > a {
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.site-nav a:hover {
  color: var(--brand-blue);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.site-nav .dropdown { position: relative; }
.site-nav .dropdown > a::after {
  content: "▾";
  display: inline-block;
  font-size: 1.2em;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.site-nav .dropdown.open > a::after { transform: rotate(180deg); }
.site-nav .dropdown > ul {
  position: absolute;
  top: 100%;
  right: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 200px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.site-nav .dropdown.open > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 959px) {
  .nav-toggle { display: inline-flex; order: -1; }
  .site-header-inner { position: relative; }
  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .brand-mark { display: none; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
  }
  .site-nav a { padding: 12px 14px; }
  .site-nav .dropdown > ul {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    padding: 0 0 8px 20px;
    min-width: 0;
    transition: none;
  }
  .site-nav .dropdown.open > ul { display: flex; }
}

/* ---------- Home page ---------- */
.home-hero {
  text-align: center;
  padding: 0px 24px;
}
.home-hero-logo {
  max-width: min(90vw, 760px);
  margin: 0 auto;
}
.home-tagline {
  text-align: center;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
  padding: 40px 20px;
}

.feature-cards {
  background: var(--bg-soft-cool);
  padding: 40px 20px;
}
.feature-cards-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.feature-card {
  text-align: center;
  padding: 8px 28px;
}
.feature-card h2 {
  margin-bottom: 14px;
  font-size: 24px;
}
.feature-card p {
  color: var(--text);
  margin-bottom: 20px;
  font-size: 20px;
}
/* Stacked (mobile) layout: horizontal divider between cards */
.feature-card + .feature-card {
  border-top: 1px solid var(--divider);
  padding-top: 32px;
}
@media (min-width: 768px) {
  .feature-cards-inner { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .feature-card + .feature-card {
    border-top: none;
    padding-top: 8px;
    border-left: 1px solid var(--divider);
  }
}

.card-button {
  display: inline-block;
  background: var(--accent-cyan);
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 12px;
  padding: 10px 16px;
  border-radius: 2px;
  transition: background-color 0.15s ease;
}
.card-button:hover { background: var(--accent-cyan-dark); color: var(--ink); }

/* ---------- Buttons ---------- */
.cta-button {
  display: inline-block;
  padding: 12px 28px;
  background-color: var(--brand-yellow);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.15s ease, transform 0.05s ease;
}
.cta-button:hover { background-color: var(--brand-yellow-dark); color: var(--ink); }
.cta-button:active { transform: translateY(1px); }
.cta-button.secondary { background-color: var(--brand-blue); color: #fff; }
.cta-button.secondary:hover { background-color: var(--brand-blue-dark); color: #fff; }

/* ---------- Sections ---------- */
.section {
  padding: 56px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.section.alt { background: var(--bg-soft-cool); max-width: none; }
.section.alt > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; }

.section h2 {
  font-size: 24px;
  color: var(--ink);
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  width: fit-content;
}

.section ul { padding-left: 1.4em; }
.section li { font-size: 16px; }

.insurance-note { margin-top: 14px; color: var(--text-muted); }

.two-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 768px) {
  .two-column { grid-template-columns: 1fr 1fr; }
}
.two-column img { border-radius: var(--radius); box-shadow: var(--shadow); }

.callout {
  background: var(--bg-soft-warm);
  border-left: 4px solid var(--brand-yellow);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* ---------- Carousel (Our Office) ---------- */
.carousel { position: relative; margin-top: 16px; }
.carousel-track {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0 0 10px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.carousel-track > li {
  flex: 0 0 auto;
  width: min(82%, 360px);
  scroll-snap-align: start;
}
.carousel-track figure { margin: 0; }
.carousel-track img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.carousel-track:focus-visible {
  outline: 3px solid var(--brand-orange);
  outline-offset: 4px;
}
.carousel-btn {
  position: absolute;
  top: calc(50% - 5px);
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.carousel-btn:hover { background: #fff; color: var(--brand-blue); }
.carousel-prev { left: 6px; }
.carousel-next { right: 6px; }
@media (max-width: 767px) {
  .carousel-btn { display: none; }
  .carousel-track > li { width: 86%; }
}

/* ---------- Quote hero ---------- */
.quote-hero {
  background-image:
    linear-gradient(rgba(18, 28, 18, 0.4), rgba(18, 28, 18, 0.7)),
    var(--quote-hero-bg);
  background-size: cover;
  /* --quote-hero-pos-y nudges the focal point up/down per page (default center) */
  background-position: center var(--quote-hero-pos-y, center);
  padding: 50px 20px;
  text-align: center;
}
.quote-hero h1 {
  font-size: 24px;
  color: #fff;
  line-height: 1.25;
  margin: 0 auto;
  max-width: 820px;
}
.quote-rule {
  width: 60px;
  border: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.55);
  margin: 20px auto;
}
.quote-attribution { color: rgba(255, 255, 255, 0.85); margin: 0; }

/* Per-page quote-hero backgrounds.
   --quote-hero-pos-y shifts the visible slice vertically: a smaller % (e.g. 25%)
   shows more of the top of the image, a larger % (e.g. 75%) more of the bottom. */
.page-about    .quote-hero { --quote-hero-bg: url('/img/bg-flowers-2.webp');      --quote-hero-pos-y: center; }
.page-services .quote-hero { --quote-hero-bg: url('/img/bg-tree-water-1.webp'); --quote-hero-pos-y: 56%; }
.page-contact  .quote-hero { --quote-hero-bg: url('/img/bg-flowers.webp');      --quote-hero-pos-y: top; }
.page-crisis   .quote-hero { background-image: none; background-color: var(--ink-strong); }

/* ---------- About: image + text rows ---------- */
.about-row { align-items: start; }
.about-row img { width: 100%; }
/* Rachel's headshot: smaller, circular, softly shadowed */
.about-row img.portrait {
  width: 300px;
  height: 350px;
  object-fit: cover;
  object-position: center 13%;
  border-radius: 10%;
  box-shadow: 0 10px 28px rgba(20, 40, 60, 0.18);
  justify-self: center;
}
/* Areas of focus image: portrait frame, zoomed in to crop the top
   (same wrapper technique as .contact-photo-side-wrap) */
.about-row .focus-frame {
  position: relative;
  overflow: hidden;
  width: 360px;
  height: 460px;
  justify-self: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about-row img.focus-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  transform: scale(1.18);
  transform-origin: right bottom;
  border-radius: 0;   /* .focus-frame owns the rounding + shadow */
  box-shadow: none;
}
.about-row .sub-label { margin: 16px 0 6px; }
@media (min-width: 768px) {
  .about-row.reverse img { order: 2; }
  /* Top "About Me" and bottom "Areas of focus" rows: narrower image, wider text */
  .about-row.two-column:not(.reverse) { grid-template-columns: 2fr 3fr; }
}

/* ---------- Contact specifics ---------- */
.contact-grid {
  --contact-row-h: 350px;   /* photo + map share this height so they align side by side */
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-info p { margin: 6px 0; }
.contact-info strong { color: var(--brand-blue-dark); }
.contact-photo-top {
  width: 100%;
  object-fit: cover;
  height: 500px;
  object-position: center 15%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-photo-side-wrap {
  position: relative;
  overflow: hidden;
  height: var(--contact-row-h);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-photo-side {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right top;
  transform: scale(1.18);
  transform-origin: right top;
  display: block;
}
.contact-map {
  height: var(--contact-row-h);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

form.contact-form .field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
form.contact-form label {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
form.contact-form input,
form.contact-form textarea,
form.contact-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
form.contact-form input:focus,
form.contact-form textarea:focus,
form.contact-form select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(56, 182, 196, 0.18); /* --brand-blue @ 18% (literal: rgba can't derive from a hex var) */
}
form.contact-form textarea { min-height: 140px; resize: vertical; }

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Shared form-status styling (contact form + crisis "Suggest a Resource" form) */
#formResponse, #suggestResponse { margin-top: 16px; }
#formResponse.success, #suggestResponse.success { color: var(--success); }
#formResponse.error,   #suggestResponse.error   { color: var(--error); }

/* ---------- Crisis page ---------- */
/* Full-width black emergency band (matches prod) */
.crisis-banner {
  background: var(--ink-strong);
  color: #fff;
  padding: 20px;
  text-align: center;
  font-weight: 600;
}
.crisis-banner strong { color: #fff; }

/* Responsive multi-column grid of resources (matches prod's layout).
   auto-fill keeps empty trailing tracks so the last row's items stay the
   same width as the rows above (rather than stretching). */
.crisis-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 40px 32px;
}
.crisis-list li { padding: 0; margin: 0; }
.crisis-list .name {
  display: block;
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.crisis-list .resource-btn { margin-top: 18px; }

/* Suggest a Resource form */
.suggest-resource { margin-top: 28px; text-align: center; }
.suggest-resource > form { margin: 16px auto 0; max-width: 640px; text-align: left; }
.suggest-resource > form h2 { margin-bottom: 16px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 28px 20px 40px;
  font-size: 0.75rem;
  color: var(--text);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.footer-logo {
  width: 160px;
  margin: 0 auto 14px;
}
.footer-copy {
  margin-bottom: 14px;
  font-size: 14px;
}
.footer-crisis { margin: 0; }

/* ---------- Cookie banner ---------- */
#cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(20, 40, 60, 0.12);
  padding: 14px 16px;
  display: none;
  z-index: 100;
  font-size: 0.95rem;
}
#cookie-banner.show { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#cookie-banner p { margin: 0; flex: 1 1 240px; color: var(--text); }
#cookie-banner button {
  padding: 8px 18px;
  background: var(--brand-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}
#cookie-banner button:hover { background: var(--brand-blue-dark); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -10000px;
  top: 0;
  background: var(--brand-blue-dark);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Larger-display type scale (match the live site) ----------
   Placed last so it overrides the base (mobile) sizes above without needing
   extra specificity. Mobile keeps the base sizes; from the tablet breakpoint
   (768px) up, headings and feature copy grow to prod's scale. */
@media (min-width: 768px) {
  .home-tagline { font-size: 32px; }
  .quote-hero h1 { font-size: 32px; }
  .section h2 { font-size: 32px; }
  .feature-card h2 { font-size: 32px; }
  .feature-card p { font-size: 22px; }
}
@media (min-width: 960px) {
  .brand { font-size: 40px; }
  .site-nav > ul > li > a { font-size: 14px; }
}
