/* ==========================================================================
   Psychic Wisdom — foundation stylesheet
   Palette recovered from the GroovePages export, October 2021.
   Typeface chosen (the original set none — see notes).
   Target: WCAG 2.1 Level AA.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Recovered palette --------------------------------------------------- */
  --c-navy:        #202D3C;  /* headings, footer            13.98:1 on white */
  --c-slate:       #394B56;  /* body copy                    9.07:1 on white */
  --c-blue:        #2970B3;  /* links, primary buttons       5.17:1 on white */
  --c-periwinkle:  #546CC4;  /* section accents              4.86:1 on white */
  --c-purple:      #8B53FC;  /* logo background — brand, exempt from contrast */

  /* Adjusted for contrast — see notes ----------------------------------- */
  --c-accent:      #C62828;  /* was #FE4848 (3.37:1, failed) 5.62:1 on white */
  --c-muted:       #5C6773;  /* was #ADB7C2 (2.03:1, failed) 5.76:1 on white */

  /* Neutrals ------------------------------------------------------------ */
  --c-white:       #FFFFFF;
  --c-paper:       #F7F9FB;
  --c-rule:        #C8D2DC;  /* DECORATIVE dividers only — 1.53:1, below the 3:1
                                bar. Never use as the boundary of a control. */
  --c-rule-strong: #6E7C89;  /* 3.63:1 — use when a rule must identify a control */

  /* Starburst background, replacing the deleted JPEG -------------------- */
  --c-burst-core:  #7FE3F0;
  --c-burst-mid:   #1D93C9;
  --c-burst-edge:  #123A6B;

  /* Type ---------------------------------------------------------------- */
  --font-heading: "Poppins", "Trebuchet MS", sans-serif;
  --font-body:    "Source Sans 3", "Segoe UI", "Helvetica Neue", sans-serif;

  --size-step--1: 0.9444rem;   /* 17px — captions only, never body copy */
  --size-step-0:  1rem;        /* 18px — body */
  --size-step-1:  1.25rem;     /* 22.5px */
  --size-step-2:  1.5625rem;   /* 28px */
  --size-step-3:  1.953rem;    /* 35px */
  --size-step-4:  2.441rem;    /* 44px */

  /* Spacing and layout -------------------------------------------------- */
  --space-xs:  0.5rem;
  --space-s:   1rem;
  --space-m:   1.75rem;
  --space-l:   3rem;
  --space-xl:  5rem;

  --measure:   65ch;
  --container: 68rem;
  --radius:    0.375rem;

  font-size: 112.5%;   /* 18px base — required */
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--size-step-0);
  line-height: 1.65;
  color: var(--c-slate);
  background: var(--c-white);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  overflow-wrap: break-word;
  color: var(--c-navy);
  line-height: 1.2;
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}

/* Fluid at the top two levels: a long single word such as "Appointment" is
   wider than a 320px viewport at the fixed size, which breaks WCAG 1.4.10
   Reflow. clamp() keeps the desktop size and shrinks only where it must. */
h1 {
  font-size: clamp(1.85rem, 1.2rem + 3.2vw, var(--size-step-4));
  font-weight: 700;
}
h2 {
  font-size: clamp(1.55rem, 1.1rem + 2.2vw, var(--size-step-3));
  font-weight: 700;
}
h3 { font-size: var(--size-step-2); font-weight: 600; }
h4 { font-size: var(--size-step-1); font-weight: 600; }

p, li { max-width: var(--measure); }
p { margin: 0 0 var(--space-s); }

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

/* Links carry an underline as well as colour — never colour alone. */
a {
  color: var(--c-blue);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.08em;
}
a:hover { text-decoration-thickness: 0.16em; }

/* --------------------------------------------------------------------------
   3. Focus — 3px solid dark ring, 4px offset, on everything focusable
   -------------------------------------------------------------------------- */

*:focus-visible {
  outline: 3px solid var(--c-navy);
  outline-offset: 4px;
}

/* On dark backgrounds the navy ring would vanish, so invert it there. */
.site-footer *:focus-visible,
.burst *:focus-visible {
  outline-color: var(--c-white);
}

/* --------------------------------------------------------------------------
   4. Skip link — first focusable element on every page
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 0;
  top: 0;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--c-white);
  color: var(--c-navy);
  border: 3px solid var(--c-navy);
  font-weight: 700;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

main { display: block; }

/* --------------------------------------------------------------------------
   6. Header and navigation
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--c-white);
  border-bottom: 2px solid var(--c-rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding-block: var(--space-s);
}

.site-header__logo {
  display: inline-flex;
  text-decoration: none;
  /* 44px minimum target */
  min-height: 44px;
  align-items: center;
}
.site-header__logo img { width: 200px; }

/* Mobile toggle — a real button, ≥44×44, dark on light, with a border so it
   survives Windows High Contrast Mode. */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-weight: 600;
  color: var(--c-navy);
  background: var(--c-white);
  border: 2px solid var(--c-navy);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle__bars {
  display: inline-block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}
/* Open state signalled by text AND icon shape, not colour. */
.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  box-shadow: none;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  content: "";
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  transform: rotate(-90deg);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-xs);
}

.site-nav a {
  display: block;
  padding: 0.6rem 0.9rem;
  min-height: 44px;
  color: var(--c-navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--c-blue); }

/* Current page marked by weight, underline AND a text label for screen
   readers — never by colour alone. */
.site-nav a[aria-current="page"] {
  color: var(--c-blue);
  border-bottom-color: var(--c-blue);
}

@media (max-width: 47.9rem) {
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--c-rule); }
  .site-header__inner { flex-wrap: wrap; }
}

@media (min-width: 48rem) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; }
}

/* --------------------------------------------------------------------------
   7. Starburst — replaces the deleted background JPEG
   -------------------------------------------------------------------------- */

.burst {
  position: relative;
  isolation: isolate;
  color: var(--c-white);
  background-color: var(--c-burst-edge);
  background-image:
    radial-gradient(circle at 62% 46%,
      var(--c-burst-core) 0%,
      rgba(29, 147, 201, 0.85) 22%,
      rgba(18, 58, 107, 0.95) 58%,
      var(--c-burst-edge) 100%);
}

/* A scrim guarantees the text contrast the original starburst could not,
   because a photographic background varies pixel by pixel. */
.burst::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(12, 33, 60, 0.55);
}

.burst h1, .burst h2, .burst h3 { color: var(--c-white); }

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-heading);
  font-size: var(--size-step-0);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
}

.button--primary {
  color: var(--c-white);
  background: var(--c-blue);
  border-color: var(--c-blue);
}
.button--primary:hover { background: #1F5A92; border-color: #1F5A92; }

.button--secondary {
  color: var(--c-navy);
  background: var(--c-white);
  border-color: var(--c-navy);
}
.button--secondary:hover { background: var(--c-paper); }

.button--accent {
  color: var(--c-white);
  background: var(--c-accent);
  border-color: var(--c-accent);
}
.button--accent:hover { background: #A32020; border-color: #A32020; }

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--c-navy);
  color: var(--c-white);
  padding-block: var(--space-l) var(--space-m);
}
.site-footer a { color: var(--c-white); }
.site-footer h2 { color: var(--c-white); font-size: var(--size-step-1); }

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--space-m);
}

.site-footer address {
  font-style: normal;
  line-height: 1.7;
}

.site-footer__legal {
  margin-top: var(--space-m);
  padding-top: var(--space-s);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: var(--size-step-0);
}

/* --------------------------------------------------------------------------
   10. Utilities
   -------------------------------------------------------------------------- */

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

.section { padding-block: var(--space-xl); }

/* --------------------------------------------------------------------------
   11. Scrollbars — 12px, dark thumb, distinct track
   -------------------------------------------------------------------------- */

* {
  scrollbar-color: #202D3C #DDE4EA;
  scrollbar-width: auto;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #DDE4EA; }
::-webkit-scrollbar-thumb {
  background: #202D3C;
  border-radius: 6px;
  border: 2px solid #DDE4EA;
}

/* --------------------------------------------------------------------------
   12. Reduced motion
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   13. Windows High Contrast Mode
   Borders (not backgrounds) keep controls visible; the gradient section
   falls back to a plain system background so text stays legible.
   -------------------------------------------------------------------------- */

@media (forced-colors: active) {
  a, button, .button, .nav-toggle {
    border: 2px solid currentColor;
  }
  .site-nav a[aria-current="page"] { border-bottom: 3px solid currentColor; }
  .burst {
    background-image: none;
    background-color: Canvas;
    color: CanvasText;
    forced-color-adjust: none;
  }
  .burst::before { display: none; }
  .burst h1, .burst h2, .burst h3 { color: CanvasText; }
}

/* ==========================================================================
   14. Components
   ========================================================================== */

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

.hero { padding-block: var(--space-xl); }
.hero__tagline {
  font-family: var(--font-heading);
  font-size: var(--size-step-1);
  max-width: 30ch;
  margin-bottom: var(--space-m);
}

/* Responsive video wrapper — 16:9, no layout shift. */
.video {
  position: relative;
  width: 100%;
  max-width: 44rem;
  aspect-ratio: 16 / 9;
  margin-block: var(--space-m);
  background: #000;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  overflow: hidden;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Two-column prose + figure ------------------------------------------- */

.split {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 1.4fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}
.split img { border-radius: var(--radius); }

/* Practice list — the fourteen modalities ------------------------------ */

.practice-list {
  columns: 2;
  column-gap: var(--space-m);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-m);
}
.practice-list li {
  break-inside: avoid;
  padding: 0.35rem 0 0.35rem 1.6rem;
  position: relative;
  max-width: none;
}
.practice-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 0.6rem;
  height: 0.6rem;
  border: 2px solid var(--c-periwinkle);
  border-radius: 50%;
}
@media (max-width: 34rem) { .practice-list { columns: 1; } }

/* Service cards -------------------------------------------------------- */

.cards {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.card {
  display: flex;
  flex-direction: column;
  max-width: none;
  background: var(--c-white);
  border: 2px solid var(--c-rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.card img { width: 100%; aspect-ratio: 940 / 788; object-fit: cover; }
.card__body {
  padding: var(--space-s) var(--space-s) var(--space-m);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__body p { max-width: none; flex: 1; }
.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-s);
}

/* Testimonials --------------------------------------------------------- */

.testimonials {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.testimonials > li { display: flex; }

.testimonial {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: none;
  background: var(--c-paper);
  border: 2px solid var(--c-rule);
  border-radius: var(--radius);
  padding: var(--space-m) var(--space-s) var(--space-s);
  text-align: center;
}
/* No portrait — the quotes are real but the stock photographs were not the
   people named, so they have been dropped. A quote mark stands in. */
.testimonial::before {
  content: "\201C";
  display: block;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 0.8;
  color: var(--c-periwinkle);
  margin-bottom: var(--space-xs);
}
.testimonial blockquote {
  margin: 0 0 var(--space-s);
  font-style: italic;
  text-align: left;
}
.testimonial blockquote p { max-width: none; }
.testimonial blockquote { flex: 1; }

.testimonial figcaption {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--c-navy);
}
.testimonial figcaption span {
  display: block;
  font-weight: 400;
  font-size: var(--size-step--1);
  color: var(--c-muted);
}

/* Section headings ----------------------------------------------------- */

.section-head { margin-bottom: var(--space-m); }
.section-head p { color: var(--c-slate); }

.section--tint { background: var(--c-paper); }

/* Page banner for interior pages --------------------------------------- */

.page-banner { padding-block: var(--space-l); }
.page-banner h1 { margin: 0; }

/* Breadcrumb ----------------------------------------------------------- */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-s);
  font-size: var(--size-step--1);
}
.breadcrumb li + li::before { content: "/"; margin-right: var(--space-xs); }

/* Hero ornament — static mandala replacing the lost background video ------ */

.hero { position: relative; overflow: hidden; }

.hero__ornament {
  position: absolute;
  top: 50%;
  right: -6rem;
  transform: translateY(-50%);
  width: 32rem;
  max-width: 60%;
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
}
@media (max-width: 47.9rem) {
  .hero__ornament { right: -30%; width: 26rem; max-width: 90%; opacity: 0.14; }
}
@media (forced-colors: active) {
  .hero__ornament { display: none; }
}

/* ==========================================================================
   15. Forms
   ========================================================================== */

.form { max-width: 34rem; }

.field { margin-bottom: var(--space-m); }

.field label,
.fieldset legend {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--c-navy);
  margin-bottom: 0.35rem;
}

.field .hint {
  display: block;
  font-size: var(--size-step--1);
  color: var(--c-muted);
  margin-bottom: 0.35rem;
  max-width: none;
}

/* Required marked in words as well as a symbol — never a red star alone. */
.req { color: var(--c-accent); font-weight: 700; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.field select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: var(--size-step-0);
  color: var(--c-navy);
  background: var(--c-white);
  border: 2px solid var(--c-rule-strong);
  border-radius: var(--radius);
}
.field textarea { min-height: 9rem; resize: vertical; }

.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--c-navy); }

/* Checkbox rows — the whole label is the target, so it clears 44px. */
.fieldset {
  border: 2px solid var(--c-rule);
  border-radius: var(--radius);
  padding: var(--space-s);
  margin: 0 0 var(--space-m);
}
.fieldset legend { padding-inline: 0.4rem; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.4rem 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--c-slate);
  margin-bottom: 0;
}
.check input[type="checkbox"] {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.15rem;
  accent-color: var(--c-blue);
}

/* Honeypot — hidden from everyone, including screen readers. */
.botcheck { position: absolute; left: -9999px; opacity: 0; height: 0; }

.form__note {
  font-size: var(--size-step--1);
  color: var(--c-muted);
  max-width: 34rem;
}

/* Contact methods -------------------------------------------------------- */

.contact-methods {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-l);
}
.contact-methods li { max-width: none; }
.contact-methods h3 { margin-bottom: 0.25rem; }

/* Map embed -------------------------------------------------------------- */

.map {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 44rem;
  border: 2px solid var(--c-rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Definition-style lists for service types ------------------------------- */

.service-list { padding: 0; margin: 0 0 var(--space-m); list-style: none; }
.service-list > li {
  max-width: none;
  padding: 0 0 var(--space-s) 1.6rem;
  position: relative;
}
.service-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.65rem;
  height: 0.65rem;
  background: var(--c-periwinkle);
  border-radius: 50%;
}
.service-list strong { color: var(--c-navy); font-family: var(--font-heading); }

/* Level columns on the Courses page --------------------------------------- */

.levels {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}
@media (min-width: 46rem) { .levels { grid-template-columns: 1fr 1fr; } }
.level {
  background: var(--c-white);
  border: 2px solid var(--c-rule);
  border-left: 6px solid var(--c-periwinkle);
  border-radius: var(--radius);
  padding: var(--space-s) var(--space-m) var(--space-m);
}
.level p { max-width: none; }

/* --------------------------------------------------------------------------
   16. Unfilled placeholders
   Deliberately loud. These must not reach the live site — `npm run check`
   lists any that remain. Marked by wording as well as colour, and given a
   border so it survives Windows High Contrast Mode.
   -------------------------------------------------------------------------- */

.todo {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9em;
  color: #8A1C1C;                 /* 8.03:1 on the tint below */
  background: #FDECEC;
  border: 2px dashed #8A1C1C;
  border-radius: var(--radius);
}
.todo::before { content: "\26A0\FE0E  "; }

@media (forced-colors: active) {
  .todo { border: 2px dashed currentColor; forced-color-adjust: none; }
}
