/* =========================================================
   Essex Therapy — site styles
   Palette is set in :root below. Change these to rebrand.
   Clean, professional, calm.
   ========================================================= */
:root {
  --primary:      #4d7c78;   /* clean muted teal-sage — main accent */
  --primary-dark: #3a5d5a;
  --accent:       #7fa3b8;   /* soft muted blue — gentle highlight */
  --ink:          #43494a;   /* soft charcoal text */
  --muted:        #6f7674;   /* secondary text */
  --bg:           #ffffff;
  --bg-soft:      #f7f5f2;   /* warm off-white */
  --bg-tint:      #eeeeee;   /* light grey tint for standout blocks */
  --bg-deep:      #c4c8cc;   /* silver — feature sections / footer */
  --on-deep:      #2b3033;   /* dark text used on silver */
  --silver-text:  #6e757b;   /* silver-grey for text on light backgrounds */
  --border:       #e8e4dd;
  --max:          1140px;
  --radius:       16px;
  --shadow:       0 12px 34px rgba(52,80,77,.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 17px;
}
h1, h2, h3, .brand {
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
  font-weight: 600; letter-spacing: .005em;
}

img { max-width: 100%; display: block; }
a { color: var(--silver-text); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .76rem;
  color: var(--silver-text); font-weight: 700; margin: 0 0 12px;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(255,255,255,.97);
  backdrop-filter: blur(6px); z-index: 40;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: var(--max); margin: 0 auto;
}
.brand { font-size: 1.4rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand span { color: var(--silver-text); }
.nav-links { display: flex; gap: 2px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 9px 15px; border-radius: 9px;
  color: var(--muted); font-weight: 500; font-size: .97rem;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--silver-text); background: var(--bg-soft); }
.nav-links .btn { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); line-height: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--primary); color: #fff !important;
  padding: 14px 30px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 0; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--silver-text) !important; border: 2px solid var(--silver-text); }
.btn-ghost:hover { background: var(--silver-text); color: #fff !important; }
.btn-light { background: #fff; color: var(--on-deep) !important; }
.btn-light:hover { background: var(--bg-soft); }
.btn-on-dark { background: #fff; color: var(--on-deep) !important; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(196,200,204,.90), rgba(184,189,194,.84)),
    url('images/hero.jpg') center/cover no-repeat, var(--bg-deep);
  color: var(--on-deep); padding: 128px 0 116px;
}
.hero .eyebrow { color: #4a5156; }
.hero h1 { font-size: 3.15rem; line-height: 1.14; margin: 0 0 20px; max-width: 18ch; }
.hero p { font-size: 1.24rem; max-width: 660px; margin: 0 0 16px; opacity: .96; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Sections ---------- */
section { padding: 104px 0; }
section.soft { background: var(--bg-soft); }
section.tint { background: var(--bg-tint); }
section.deep { background: var(--bg-deep); color: var(--on-deep); }
section.deep h2, section.deep h3 { color: var(--on-deep); }
section.deep p, section.deep li { color: rgba(43,48,51,.9); }
.section-head { max-width: 740px; margin: 0 auto 56px; }
h1 { font-size: 2.7rem; }
h2 { font-size: 2.25rem; margin: 0 0 16px; line-height: 1.22; }
h3 { font-size: 1.32rem; margin: 0 0 10px; }
.lead { color: var(--muted); font-size: 1.15rem; }
section.deep .lead { color: rgba(43,48,51,.85); }
p { margin: 0 0 18px; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow);
}
.card .icon {
  width: 54px; height: 54px; border-radius: 13px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-tint); color: var(--silver-text); font-size: 1.45rem;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }
.card .more { display: inline-block; margin-top: 16px; font-weight: 600; }

.figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.figure img { width: 100%; height: 100%; object-fit: cover; }

/* checklist */
.check { list-style: none; padding: 0; margin: 22px 0 0; }
.check li { position: relative; padding: 0 0 14px 34px; }
.check li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: .8rem; display: flex; align-items: center; justify-content: center;
}
section.deep .check li::before { background: var(--accent); }

/* steps (What to expect) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; margin-top: 44px; }
.step { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.step .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff;
  font-family: "Playfair Display", serif; font-size: 1.25rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}

/* ---------- Memberships strip ---------- */
.memberships { display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap; }
.mbadge {
  display: flex; align-items: center; justify-content: center; min-width: 120px; height: 74px;
  padding: 12px 26px; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.2rem;
  letter-spacing: .06em; color: var(--silver-text); box-shadow: var(--shadow);
}
.mbadge img { max-height: 50px; width: auto; }

/* ---------- Testimonials ---------- */
.quote {
  background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow);
}
.quote p { margin: 0 0 14px; font-style: italic; color: var(--ink); }
.quote .who { font-weight: 600; color: var(--silver-text); font-style: normal; font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 24ch; margin: 0 auto 14px; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ---------- Fees ---------- */
.fee-card { text-align: center; }
.fee-card .price { font-family: "Playfair Display", serif; font-size: 2.6rem; color: var(--silver-text); margin: 6px 0; }
.fee-card .per { color: var(--muted); font-size: .95rem; }

/* ---------- Contact ---------- */
.form { display: grid; gap: 4px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { font-weight: 600; margin: 14px 0 6px; display: block; font-size: .95rem; }
.form input, .form textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 11px; font: inherit; background: #fff; color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.form textarea { min-height: 150px; resize: vertical; }
.form .btn { margin-top: 22px; justify-self: start; }
.form .note { font-size: .85rem; color: var(--muted); margin-top: 12px; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: 18px; display: flex; gap: 12px; align-items: flex-start; }
.contact-list .k { font-weight: 600; color: var(--silver-text); min-width: 92px; }

.notice { padding: 14px 18px; border-radius: 11px; margin-bottom: 20px; font-size: .96rem; }
.notice.ok  { background: #e9f2ef; border: 1px solid #cfe3dc; color: #2c5a4f; }
.notice.err { background: #fbeeee; border: 1px solid #eecfcf; color: #8a3b3b; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); color: rgba(43,48,51,.85); padding: 62px 0 30px; }
.site-footer a { color: rgba(43,48,51,.85); }
.site-footer a:hover { color: #000; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px; }
.site-footer h4 { color: var(--on-deep); font-size: 1rem; margin: 0 0 14px; letter-spacing: .04em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer .brand { color: var(--on-deep); }
.site-footer .brand span { color: #4a5156; }
.foot-bottom {
  border-top: 1px solid rgba(43,48,51,.18); margin-top: 42px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .88rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 34px; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  section { padding: 72px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; background: #fff;
    border-bottom: 1px solid var(--border); padding: 10px 16px 18px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { margin: 8px 0 0; text-align: center; }
  .hero { padding: 88px 0 72px; }
  .hero h1 { font-size: 2.3rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Half-width faded section images ---------- */
section.half { position: relative; overflow: hidden; }
section.half .figure {
  position: absolute; top: 0; bottom: 0; width: 50%;
  border-radius: 0; box-shadow: none; min-height: 0;
}
section.half .figure img { opacity: .4; }
section.half.img-right .figure { right: 0; -webkit-mask-image: linear-gradient(to left, #000 60%, transparent); mask-image: linear-gradient(to left, #000 60%, transparent); }
section.half.img-left .figure { left: 0; -webkit-mask-image: linear-gradient(to right, #000 60%, transparent); mask-image: linear-gradient(to right, #000 60%, transparent); }
section.half.img-left .split > div:not(.figure) { grid-column: 2; }
@media (max-width: 860px) {
  section.half .figure { position: relative; width: 100%; height: 260px; -webkit-mask-image: none; mask-image: none; margin-bottom: 28px; }
  section.half.img-left .split > div:not(.figure) { grid-column: auto; }
}

/* Outline buttons on silver sections */
.hero .btn-ghost, .cta-band .btn-ghost { color: var(--on-deep) !important; border-color: var(--on-deep); }
.hero .btn-ghost:hover, .cta-band .btn-ghost:hover { background: var(--on-deep); color: #fff !important; }

/* ---------- Services dropdown ---------- */
.nav-links .has-sub { position: relative; }
.nav-links .sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 270px; z-index: 60;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  padding: 8px; list-style: none; margin: 0;
}
.nav-links .has-sub:hover .sub, .nav-links .has-sub:focus-within .sub { display: block; }
.nav-links .sub a { padding: 9px 12px; }
@media (max-width: 720px) {
  .nav-links .sub { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; min-width: 0; }
}
/* ---------- FAQ ---------- */
details.faq { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 22px; margin-bottom: 12px; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details.faq p { margin: 12px 0 0; color: var(--muted); }

/* Home page hero photo */
.hero.hero-home {
  background:
    linear-gradient(135deg, rgba(196,200,204,.80), rgba(184,189,194,.72)),
    url('images/hero-essex.jpg') center/cover no-repeat, var(--bg-deep);
}

/* Nav "Arrange a session" button in silver */
.nav-links .btn { background: var(--silver-text); }
.nav-links .btn:hover { background: #596066; }

/* More space between the banner buttons */
.hero .actions { gap: 28px; margin-top: 28px; }

/* Membership logos */
.mbadge.logo { padding: 8px 14px; display: inline-flex; align-items: center; }
.mbadge.logo img { max-height: none; width: auto; height: 90px; }

/* Centre banner text on phones */
@media (max-width: 720px) {
  .hero { text-align: center; }
  .hero h1, .hero p { margin-left: auto; margin-right: auto; }
  .hero .actions { justify-content: center; }
}

/* Logos sit directly on the page, no white box */
.mbadge.logo { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }

/* Services page banner photo: save a bookshelf photo as assets/images/hero-bookshelf.jpg */
.hero.hero-services {
  background:
    linear-gradient(135deg, rgba(196,200,204,.80), rgba(184,189,194,.72)),
    url('images/hero-bookshelf.jpg') center/cover no-repeat, var(--bg-deep);
}

/* Article pages */
.article p { font-size: 1.08rem; line-height: 1.8; }
.article h2 { margin-top: 40px; }
.article .lead-line { font-size: 1.2rem; }
.article .callout { background: var(--bg-tint); border-left: 4px solid var(--silver-text); border-radius: var(--radius); padding: 26px 30px; margin: 34px 0; font-size: 1.15rem; }
.article .closing { font-weight: 600; margin-top: 34px; }

/* Hero photos: About, Contact, Fees, Prison story */
.hero.hero-about, .hero.hero-contact, .hero.hero-fees, .hero.hero-story {
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero.hero-about {
  background-image: linear-gradient(135deg, rgba(196,200,204,.80), rgba(184,189,194,.72)), url('images/reading-nook.jpg');
}
.hero.hero-contact {
  background-image: linear-gradient(135deg, rgba(196,200,204,.80), rgba(184,189,194,.72)), url('images/cosy-desk.jpg');
}
.hero.hero-fees {
  background-image: linear-gradient(135deg, rgba(196,200,204,.80), rgba(184,189,194,.72)), url('images/light-plant.jpg');
}
.hero.hero-story {
  background-image: linear-gradient(135deg, rgba(196,200,204,.80), rgba(184,189,194,.72)), url('images/prison.jpg');
}
.hero.hero-about h1, .hero.hero-contact h1, .hero.hero-fees h1, .hero.hero-story h1 { max-width: none; font-size: 2.6rem; }
.hero.hero-about .lead, .hero.hero-contact .lead, .hero.hero-fees .lead { color: var(--on-deep); }
@media (max-width: 720px) { .hero.hero-about h1, .hero.hero-contact h1, .hero.hero-fees h1, .hero.hero-story h1 { font-size: 2rem; } }

/* Article photo (prison story) */
.article-photo { float: right; width: 290px; margin: 6px 0 22px 34px; }
.article-photo img { width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 720px) { .article-photo { float: none; width: 100%; max-width: 340px; margin: 0 auto 26px; } }
