/*
Theme Name: Doubleday Counseling
Theme URI: https://doubledaycounseling.com/
Author: Doubleday Counseling
Description: The Doubleday Counseling website. Pages and posts are edited in the usual WordPress editor; phone, email, mailing address and home page wording are under Appearance > Customize > Practice details.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: doubleday-counseling
*/

/* Layout: a wide band of dusk water up top, then a left-aligned reading column on a sea-mist ground; long lists run in columns. */
:root {
  --bg: #F3F6F8;
  --surface: #FFFFFF;
  --tint: #E7EEF3;
  --ink: #18263A;
  --muted: #526378;
  --line: #D2DAE3;
  --accent: #285A7A;
  --accent-ink: #FFFFFF;
  --mark: #9A5263;

  /* The water band and the footer keep their dusk colors in both themes. */
  --dusk-deep: #1B2440;
  --dusk-mid: #5A4A73;
  --dusk-rose: #C58A88;
  --dusk-glow: #F2C39B;
  --hero-ink: #FFF7EE;
  --hero-muted: #E6D8D4;

  --font-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --font-heading: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --font-text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.55rem;
  --step-3: clamp(1.85rem, 1.4rem + 1.9vw, 2.55rem);
  --step-4: clamp(2.25rem, 1.45rem + 3.6vw, 3.85rem);

  --measure: 66ch;
  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1722;
    --surface: #162130;
    --tint: #142030;
    --ink: #E6ECF2;
    --muted: #A0B1C3;
    --line: #2A3A4E;
    --accent: #93C4E4;
    --accent-ink: #0E1620;
    --mark: #E3A9A6;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0F1722;
  --surface: #162130;
  --tint: #142030;
  --ink: #E6ECF2;
  --muted: #A0B1C3;
  --line: #2A3A4E;
  --accent: #93C4E4;
  --accent-ink: #0E1620;
  --mark: #E3A9A6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

img { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.18em; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
}

p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999rem;
  top: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-block: 0.95rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.98rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--mark);
}
.nav-toggle {
  display: none;
  align-items: center;
  padding: 0.5rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

@media (max-width: 52rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; flex-basis: 100%; }
  .js .site-nav[data-open="true"] { display: block; }
  .site-nav { flex-basis: 100%; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a {
    display: block;
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); font-weight: 600; }
}

/* Water band */
.water {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--hero-ink);
  background: linear-gradient(180deg, var(--dusk-glow) 0%, var(--dusk-rose) 16%, var(--dusk-mid) 50%, var(--dusk-deep) 100%);
}
.water canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
.water::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    transparent 0%,
    color-mix(in srgb, var(--dusk-deep) 50%, transparent) 50%,
    color-mix(in srgb, var(--dusk-deep) 82%, transparent) 100%);
}
.water__inner { padding-block: clamp(6.5rem, 17vw, 12rem) clamp(2.5rem, 6vw, 4.5rem); }
.water--short .water__inner { padding-block: clamp(4rem, 10vw, 6.5rem) clamp(1.75rem, 4vw, 2.75rem); }
.water h1 { font-size: var(--step-4); max-width: 21ch; }
.water--short h1 { font-size: var(--step-3); max-width: 30ch; }
.eyebrow {
  margin-bottom: 1rem;
  color: var(--hero-muted);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow a { color: inherit; }
.lede {
  max-width: 44ch;
  margin-top: 1.25rem;
  font-size: var(--step-1);
  line-height: 1.5;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.3rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.btn--light { background: var(--hero-ink); color: var(--dusk-deep); }
.btn--ghost { border-color: color-mix(in srgb, var(--hero-ink) 70%, transparent); color: var(--hero-ink); }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.water .btn:focus-visible { outline-color: var(--hero-ink); }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--tint); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
}
@media (max-width: 52rem) { .split { grid-template-columns: minmax(0, 1fr); } }
.split > * { min-width: 0; }
.split h2 { font-size: var(--step-3); }
.side-note { margin-top: 0.75rem; color: var(--muted); font-size: 0.98rem; }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.1em; font-size: var(--step-2); }
.prose ul { margin: 1.15em 0 0; padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
.more { font-weight: 600; }
.signature { font-family: var(--font-heading); font-style: italic; }

.step {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  margin-top: 2em;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  line-height: 1.3;
}
.step .n { flex: none; color: var(--mark); font-variant-numeric: tabular-nums; }
.step + p { margin-top: 0.5em; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
}

.cols {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 3 14rem;
  column-gap: 2.5rem;
}
.cols li {
  break-inside: avoid;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.cols--two { columns: 2 14rem; }
.after-list { margin-top: 1.75rem; }

.posts { margin: 0; padding: 0; list-style: none; }
.posts li { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.posts li:last-child { border-bottom: 1px solid var(--line); }
.posts h3 { font-family: var(--font-heading); font-size: var(--step-2); line-height: 1.25; }
.posts h3 a { color: var(--ink); text-decoration: none; }
.posts h3 a:hover { text-decoration: underline; }
.posts p { max-width: var(--measure); margin-top: 0.5rem; color: var(--muted); }

.back { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); max-width: var(--measure); }

/* Video on the About page */
.video {
  position: relative;
  max-width: var(--measure);
  aspect-ratio: 16 / 9;
  margin-bottom: 2.25rem;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--dusk-mid), var(--dusk-deep));
}
.video__link {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1rem;
  color: var(--hero-ink);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}
.video__link small { color: var(--hero-muted); font-weight: 400; font-size: 0.92rem; }
.play {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border: 2px solid var(--hero-ink);
  border-radius: 50%;
}
.play::before {
  content: "";
  margin-left: 0.3rem;
  border-style: solid;
  border-width: 0.7rem 0 0.7rem 1.15rem;
  border-color: transparent transparent transparent var(--hero-ink);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.25rem 3rem;
}
.contact-grid > * { min-width: 0; }
.contact-grid h2 { font-family: var(--font-heading); font-size: var(--step-1); margin-bottom: 0.6rem; }
.contact-grid address { font-style: normal; }
.big-line { font-size: var(--step-2); font-family: var(--font-heading); line-height: 1.3; }
.big-line a { color: var(--ink); text-decoration-color: var(--mark); overflow-wrap: anywhere; }
.note {
  max-width: var(--measure);
  margin-top: 2.75rem;
  padding: 1.1rem 1.3rem;
  border-left: 3px solid var(--mark);
  background: var(--surface);
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: var(--dusk-deep);
  color: var(--hero-ink);
  padding-block: clamp(2.75rem, 6vw, 4.25rem) 2rem;
  font-size: 0.98rem;
}
.site-footer a { color: var(--hero-ink); }
.site-footer a:focus-visible { outline-color: var(--hero-ink); }
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem 2.5rem;
}
.foot-grid > * { min-width: 0; }
.foot-grid h2 {
  margin-bottom: 0.7rem;
  color: var(--hero-muted);
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.foot-grid address { font-style: normal; }
.foot-grid p + p { margin-top: 0.3rem; }
.foot-grid a { overflow-wrap: anywhere; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--hero-ink) 22%, transparent);
  color: var(--hero-muted);
  font-size: 0.92rem;
}
.foot-base p { max-width: 60ch; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a { transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
}

/* ---------------------------------------------------------------- WordPress content */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Menu items added under Appearance > Menus */
.site-nav .current-menu-item > a,
.site-nav .current_page_parent > a,
.site-nav .current-page-ancestor > a {
  color: var(--ink);
  border-bottom-color: var(--mark);
}

/* Text written in the editor */
.entry-content > * { max-width: var(--measure); }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 { margin-top: 2.1em; font-size: var(--step-2); }
.entry-content h3 {
  margin-top: 2em;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  line-height: 1.3;
}
.entry-content h3 + p { margin-top: 0.5em; }
.entry-content ul,
.entry-content ol { padding-left: 1.2em; }
.entry-content li + li { margin-top: 0.4em; }
.entry-content blockquote {
  margin-inline: 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--mark);
  font-family: var(--font-heading);
  font-style: italic;
}
.entry-content img { height: auto; border-radius: 6px; }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.92rem; }
.entry-content .alignwide,
.entry-content .alignfull { max-width: 100%; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content .wp-block-button__link {
  display: inline-flex;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.entry-content .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 2.2em;
}

/* On pages, a plain list runs in columns (areas of treatment, accepted insurance). */
.entry-content--lists > ul {
  max-width: none;
  margin-top: 0;
  padding: 0;
  list-style: none;
  columns: 3 14rem;
  column-gap: 2.5rem;
}
.entry-content--lists > * + ul { margin-top: 1.5em; }
.entry-content--lists > ul > li {
  break-inside: avoid;
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.single .entry-content--lists > ul { columns: auto; }

.note > * + * { margin-top: 0.8em; }

/* Older and newer posts */
.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.pagination .page-numbers { padding: 0.3rem 0.6rem; font-weight: 600; }
.pagination .current { color: var(--muted); }

/* ---------------------------------------------------------------- Contact form */

.section--form { padding-top: 0; }
.js-only { display: none; }
.js .js-only { display: grid; }
.contact-form {
  gap: 1.15rem;
  max-width: 38rem;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.15rem;
}
.field-row > * { min-width: 0; }
.field { display: grid; gap: 0.35rem; }
.field label,
.check label { font-weight: 600; font-size: 0.98rem; }
.hint { color: var(--muted); font-size: 0.92rem; font-weight: 400; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid color-mix(in srgb, var(--muted) 60%, var(--line));
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.check { display: flex; align-items: flex-start; gap: 0.65rem; }
.check input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.25rem 0 0;
  accent-color: var(--accent);
}
.check label { font-weight: 400; }
.contact-form .btn { cursor: pointer; font-family: inherit; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: default; }
.hp {
  position: absolute;
  left: -999rem;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status { max-width: 38rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status[data-state="sent"] {
  padding: 1.1rem 1.3rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}
.form-status[data-state="error"] { margin-bottom: 1rem; color: var(--mark); }
.js .contact-form[hidden] { display: none; }
