/* ==========================================================================
   Anna Meech, therapeutic counsellor
   Design B, "Warm Panels". Mobile-first, enhanced upward with min-width queries.
   ========================================================================== */

/* --- Self-hosted fonts (Alegreya, Alegreya Sans), latin subset ---------- */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/alegreya-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/alegreya-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/alegreya-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/alegreya-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/alegreya-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/alegreya-sans-500.woff2') format('woff2');
}

:root {
  --olive:    #353413;
  --teal:     #36696B;
  --lemon:    #F1E0A0;
  --sand:     #E1DAC4;
  --mint:     #F1F8F2;
  --offwhite: #FCFBF8;

  /* Support tones, derived from the palette above. */
  --olive-soft: #4a5a3f;   /* quieter body text on light grounds, passes AA */
  --teal-dark:  #2b5456;   /* button hover */
  --error:      #8A2B12;   /* validation text, passes AA on offwhite */

  --font-serif: Alegreya, Georgia, "Times New Roman", serif;
  --font-sans:  "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 34em;         /* roughly 60 to 70 characters */
  --wrap: 1180px;
  --gutter: 1.375rem;
}

/* --- Reset and base ------------------------------------------------------ */

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

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

body {
  margin: 0;
  background: var(--mint);
  color: var(--olive);
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal); }
a:hover { color: var(--olive); }

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.15;
  margin: 0 0 1.125rem;
  text-wrap: balance;
}

h1 { font-weight: 800; letter-spacing: -0.01em; }
h2, h3 { font-weight: 700; }

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* --- Shared utilities ---------------------------------------------------- */

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

.measure { max-width: var(--measure); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1rem;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 60;
  background: var(--lemon);
  color: var(--olive);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 1.125rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.75rem; }

/* Visible keyboard focus everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.skip-link:focus {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;              /* 48px, comfortably over the 44px target */
  padding: 1rem 1.625rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  background: var(--teal);
  color: var(--offwhite);
  transition: background-color 0.15s ease;
}
.btn:hover,
.btn:focus { background: var(--olive); color: var(--offwhite); }

.btn--onlemon { background: var(--olive); }
.btn--onlemon:hover,
.btn--onlemon:focus { background: var(--teal); }

.btn--sm { min-height: 2.75rem; padding: 0.75rem 1.125rem; font-size: 0.875rem; }

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

.site-header {
  background: var(--olive);
  color: var(--offwhite);
}

.site-header__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
}

.wordmark {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--lemon);
  text-decoration: none;
  margin-right: auto;
}
.wordmark:hover { color: var(--offwhite); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.375rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav a {
  color: var(--offwhite);
  text-decoration: none;
  padding: 0.375rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--lemon); border-bottom-color: var(--lemon); }

.site-header .btn:hover,
.site-header .btn:focus { background: var(--lemon); color: var(--olive); }
.site-header a:focus-visible { outline-color: var(--lemon); }

/* --- Hero ---------------------------------------------------------------- */

.hero { background: var(--sand); }

.hero__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}
.hero__inner > picture { order: 2; }   /* photo below text on mobile */
.hero__text { order: 1; }

.hero__photo {
  width: 100%;
  max-height: 26rem;
  object-fit: cover;
  object-position: 50% 20%;
}

.hero__text {
  padding: 1.75rem var(--gutter) 2.5rem;
  max-width: 36em;
}

.hero h1 {
  font-size: clamp(1.875rem, 7vw, 3.625rem);
  line-height: 1.08;
  margin-bottom: 1.125rem;
}

.hero__intro {
  font-size: clamp(1.1875rem, 4.4vw, 1.375rem);
  margin-bottom: 1.625rem;
}

/* --- Panels -------------------------------------------------------------- */

.panel--offwhite { background: var(--offwhite); }
.panel--mint     { background: var(--mint); }
.panel--sand     { background: var(--sand); }

.panel--teal {
  background: var(--teal);
  color: var(--offwhite);
}
.panel--teal h2 { color: var(--lemon); }

.panel--teal .lede {
  font-size: clamp(1.25rem, 4.6vw, 1.5rem);
  max-width: 38em;
}

.section-title { font-size: clamp(1.75rem, 6.4vw, 2.375rem); }
.section-title--sm { font-size: clamp(1.625rem, 5.6vw, 2.125rem); }

/* Two-column editorial pairs. Single column on phones. */
.duo { display: grid; gap: 1.875rem; }

/* --- Credentials card ---------------------------------------------------- */

.credentials {
  background: var(--mint);
  border-top: 4px solid var(--lemon);
  padding: 1.625rem;
}
.panel--mint .credentials { background: var(--offwhite); }

.credentials h3 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.credentials p { font-size: 1.125rem; }

.bacp-mark-wrap {
  background: #fff;
  border: 1px solid var(--sand);
  padding: 0.9rem 1.1rem;
  margin-top: 1.25rem;
  display: inline-block;
  max-width: 280px;
}
.bacp-mark { width: 100%; height: auto; display: block; }

/* --- Patterns list ------------------------------------------------------- */

.patterns {
  list-style: none;
  margin: 0 0 2.125rem;
  padding: 0;
  display: grid;
  gap: 0.875rem;
}

.patterns li {
  background: var(--mint);
  padding: 1.125rem 1.25rem;
  font-size: 1.125rem;
}

.reassure {
  background: transparent;
  padding: 1.875rem 1.625rem;   /* keep the indent Bob's mock shows, drop only the yellow fill */
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.reassure p {
  font-size: clamp(1.375rem, 5.2vw, 1.75rem);
  line-height: 1.35;
  max-width: 30em;
  margin: 0;
}

/* --- Fees list ----------------------------------------------------------- */

.fees { margin: 0; max-width: 48.75rem; }

.fees > div {
  display: grid;
  gap: 0.25rem;
  padding: 1.125rem 0;
  border-top: 1px solid var(--sand);
}
.fees > div:last-child { border-bottom: 1px solid var(--sand); }

.fees dt {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.fees dd { margin: 0; }

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

.contact { border-top: 1px solid var(--sand); }

.form-card {
  background: var(--offwhite);
  border: 1px solid var(--sand);
  padding: 1.625rem;
}

.form-reassure {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--olive-soft);
  margin: 0 0 1.25rem;
}

.form { display: grid; gap: 1.125rem; }

.field { display: grid; gap: 0.375rem; }

.field label {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--olive);
  background: var(--offwhite);
  color: var(--olive);
  width: 100%;
}
.field input { min-height: 3rem; }
.field textarea { resize: vertical; min-height: 8.5rem; }

.field [aria-invalid="true"] { border-width: 2px; border-color: var(--error); }

.field--consent { display: grid; gap: 0.375rem; }

.consent-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.consent-row input {
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.1875rem 0 0;
  accent-color: var(--teal);
  flex: none;
}
.consent-row label {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.45;
  font-weight: 400;
}

.error {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--error);
  margin: 0;
  min-height: 0;
}
.error:empty { display: none; }

.form .btn { justify-self: start; }

.email-fallback {
  font-family: var(--font-sans);
  font-size: 1rem;
  margin: 0;
}

.confirmation h3 {
  font-size: 1.875rem;
  margin-bottom: 0.875rem;
}
.confirmation .eyebrow { margin-bottom: 0.75rem; }
.confirmation p:last-child { font-size: 1.125rem; }

[hidden] { display: none !important; }

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

.site-footer {
  background: var(--olive);
  color: var(--offwhite);
}

.site-footer__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 2.5rem var(--gutter) 6rem;   /* room for the sticky mobile bar */
  display: grid;
  gap: 1.25rem;
}

.site-footer .eyebrow { color: var(--lemon); margin: 0; }
.site-footer a { color: var(--lemon); }
.site-footer a:hover { color: var(--offwhite); }
.site-footer a:focus-visible { outline-color: var(--lemon); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.625rem;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.safety-note {
  max-width: 40em;
  font-size: 1.0625rem;
  color: var(--sand);
  margin: 0;
}

.copyright {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--sand);
  margin: 0;
}

/* --- Sticky mobile CTA --------------------------------------------------- */

.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(241, 248, 242, 0.97);
  border-top: 1px solid var(--sand);
  padding: 0.625rem 1rem;
  display: flex;
  justify-content: center;
}
.mobile-cta .btn { width: 100%; max-width: 26.25rem; min-height: 2.875rem; padding: 0.8125rem 1.5rem; }

/* Header CTA is redundant on mobile; the sticky bar below covers it. */
.site-header .btn--sm { display: none; }

/* Back-to-top, mobile only. */
.to-top {
  position: fixed;
  right: 1rem;
  bottom: 4.75rem;
  z-index: 45;
  width: 2.875rem;
  height: 2.875rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--olive);
  color: var(--offwhite);
  box-shadow: 0 2px 8px rgba(53, 52, 19, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover,
.to-top:focus { background: var(--teal); color: var(--offwhite); }

/* ==========================================================================
   Wider screens
   ========================================================================== */

@media (min-width: 40em) {          /* 640px, larger phones and small tablets */
  .patterns { grid-template-columns: repeat(2, 1fr); }
  .fees > div { grid-template-columns: 12rem 1fr; gap: 0.25rem 1.625rem; }
}

@media (min-width: 50em) {          /* 800px, two-column editorial layout */
  body { font-size: 1.1875rem; }

  .wrap { padding-block: 3.5rem; }

  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .hero__inner > picture { order: 0; }   /* restore photo-left on desktop */
  .hero__text { order: 0; }
  .hero__photo {
    height: 100%;
    max-height: 38.75rem;
    min-height: 22rem;
  }
  .hero__text {
    padding: 3rem 2.5rem 3.25rem var(--gutter);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 2.875rem;
  }

  .mobile-cta { display: none; }     /* nav button is always visible here */
  .site-header .btn--sm { display: inline-flex; }
  .to-top { display: none !important; }

  .site-footer__inner { padding-bottom: 2.5rem; }
}

@media (min-width: 64em) {           /* 1024px */
  .patterns { grid-template-columns: repeat(3, 1fr); }
  .hero__text { padding-right: 4rem; }
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

/* --- Print -------------------------------------------------------------- */

@media print {
  .mobile-cta,
  .skip-link,
  .site-header .btn { display: none; }
  body { background: #fff; font-size: 11pt; }
  a { text-decoration: underline; }
}
