/* Centre for Intensives — shared stylesheet */

:root {
  --deep-slate: #1C1F26;
  --off-white: #F2F0EB;
  --warm-stone: #C8C0B4;
  --pale-sage: #8A9B8E;
  --mid-slate: #2E333D;

  /* Requested test value. Contrast vs off-white is ~2.7:1 (below WCAG AA's
     4.5:1 for normal text) — flagged, applying as requested. */
  --sage-on-light: #7A9B7E;
  --sage-on-dark: #9DAEA1;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --measure: 1200px;
}

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

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

body {
  margin: 0;
  background: var(--off-white);
  color: var(--deep-slate);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 1px solid var(--pale-sage);
  outline-offset: 4px;
}

/* ---------- Nav ---------- */

.site-header--on-dark {
  background: var(--deep-slate);
}

.site-nav {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 3.5rem 6vw 2.5rem;
  gap: 2rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--deep-slate);
  white-space: nowrap;
  outline: none;
  transition: color 0.2s ease;
}

.wordmark:hover,
.wordmark:focus-visible {
  text-decoration: none;
  color: var(--sage-on-light);
}

/* Wordmark + "Enquiries" combined exceed the available width below ~480px,
   pushing the nav-link past the viewport edge. Scale the wordmark down and
   tighten the gap so both sit comfortably on mobile. */
@media (max-width: 480px) {
  .site-nav {
    gap: 1rem;
  }

  .wordmark {
    font-size: 1.4rem;
  }
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--deep-slate);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.2rem;
  transition: border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  outline: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--sage-on-light);
}

/* Nav sits on off-white for interior pages / contact; hero page overrides colour below */
.site-nav--on-dark .wordmark,
.site-nav--on-dark .nav-link {
  color: var(--off-white);
}

.site-nav--on-dark .wordmark:hover,
.site-nav--on-dark .wordmark:focus-visible {
  color: var(--sage-on-dark);
}

.site-nav--on-dark .nav-link:hover,
.site-nav--on-dark .nav-link:focus-visible {
  color: var(--sage-on-dark);
}

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

.hero {
  background: var(--deep-slate);
  color: var(--off-white);
}

.hero-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5vw 6vw 3.5vw;
}

.hero h1 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: normal;
  font-size: clamp(2.6rem, 2rem + 3.4vw, 5rem);
  line-height: 1.1;
  letter-spacing: 0.005em;
  max-width: 16ch;
}

.hero p {
  margin: 0;
  max-width: 60ch;
  font-size: 1rem;
  font-weight: 300;
  color: var(--warm-stone);
}

/* ---------- Triptych ---------- */

.triptych-section {
  background: var(--off-white);
  border-top: 1px solid var(--warm-stone);
  border-bottom: 1px solid var(--warm-stone);
}

.triptych {
  max-width: var(--measure);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
}

.panel {
  padding: 6rem 6vw 4.5rem;
  border-top: 1px solid var(--warm-stone);
}

.panel:first-child {
  border-top: none;
}

.eyebrow {
  display: block;
  margin: 0 0 1.25rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-on-light);
}

.panel h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  line-height: 1.35;
  color: var(--deep-slate);
}

.panel h2 a {
  text-decoration: none;
}

.panel p {
  margin: 0 0 2rem;
  max-width: 42ch;
  font-size: 1rem;
  font-weight: 300;
  color: var(--deep-slate);
}

.panel-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--sage-on-light);
  border-bottom: 1px solid transparent;
  outline: none;
  transition: border-color 0.2s ease, gap 0.2s ease;
}

.panel-cta:hover,
.panel-cta:focus-visible {
  border-color: var(--sage-on-light);
  gap: 0.6em;
}

.panel-cta .arrow {
  transition: transform 0.2s ease;
}

/* On a dark section (e.g. the founder panel) the same link swaps to the dark-background sage */
.founder-section .panel-cta {
  color: var(--sage-on-dark);
}

.founder-section .panel-cta:hover,
.founder-section .panel-cta:focus-visible {
  border-color: var(--sage-on-dark);
}

/* Fade-in for the triptych as a group; class added only via JS so no-JS/reduced-motion fallback is fully visible */
.triptych.fade-init {
  opacity: 0;
  transform: translateY(14px);
}

.triptych.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

@media (min-width: 768px) {
  .triptych {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel {
    border-top: none;
    border-left: 1px solid var(--warm-stone);
  }

  .panel:first-child {
    border-left: none;
  }
}

/* ---------- Therapists (subordinate section, out of the triptych) ---------- */

.therapists-section {
  background: var(--off-white);
  border-bottom: 1px solid var(--warm-stone);
}

.therapists-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.75rem 6vw;
}

.therapists-inner .eyebrow {
  margin-bottom: 0.85rem;
}

.therapists-inner h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.1rem + 0.4vw, 1.5rem);
  color: var(--mid-slate);
}

.therapists-inner p {
  margin: 0 0 1.25rem;
  max-width: 50ch;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--mid-slate);
}

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

.site-footer {
  background: var(--deep-slate);
  color: var(--warm-stone);
}

.site-footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 6vw;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.site-footer a {
  text-decoration: none;
  color: var(--off-white);
  border-bottom: 1px solid transparent;
  outline: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--sage-on-dark);
  border-color: var(--sage-on-dark);
}

/* ---------- Founder ---------- */

.founder-section {
  background: var(--mid-slate);
}

.founder-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5.5rem 6vw;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.founder-photo {
  width: 100%;
  max-width: 160px;
}

.founder-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 15%;
  filter: grayscale(0.3);
}

@media (min-width: 768px) {
  .founder-inner {
    grid-template-columns: 1.7fr 1fr;
    gap: 4rem;
  }

  .founder-photo {
    max-width: 190px;
    justify-self: end;
  }
}

.founder-inner .eyebrow {
  color: var(--sage-on-light);
}

.founder-inner h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.7rem + 1.5vw, 2.75rem);
  color: var(--off-white);
}

.founder-inner p {
  margin: 0 0 2rem;
  max-width: 56ch;
  font-size: 1rem;
  font-weight: 300;
  color: var(--warm-stone);
}

/* ---------- Contact page ---------- */

.contact-section {
  background: var(--off-white);
}

.contact-page .site-nav {
  padding: 1.5rem 6vw 1rem;
}

.contact-page .site-footer-inner {
  padding: 1.25rem 6vw;
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 0.5vw 6vw 1vw;
}

.contact-inner h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.7rem + 1.5vw, 2.75rem);
  line-height: 1.25;
  color: var(--deep-slate);
}

.contact-inner .sub-heading {
  margin: 0 0 1rem;
  max-width: 46ch;
  font-size: 1rem;
  font-weight: 300;
  color: var(--mid-slate);
}

.field {
  margin-bottom: 0.75rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid-slate);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.55rem 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  color: var(--deep-slate);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--warm-stone);
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 3.25rem;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--warm-stone);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sage-on-light);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--mid-slate) 50%), linear-gradient(135deg, var(--mid-slate) 50%, transparent 50%);
  background-position: right 0.4rem bottom 0.75rem, right 0.65rem bottom 0.75rem;
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

.submit-button {
  margin-top: 0.5rem;
  padding: 0.9rem 2.25rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--off-white);
  background: var(--deep-slate);
  border: 1px solid var(--deep-slate);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: var(--off-white);
  color: var(--deep-slate);
  border-color: var(--deep-slate);
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-status {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.form-status[data-state="error"] {
  color: #8a4a3f;
}

.confirmation {
  padding: 3rem 0;
}

.confirmation p {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  color: var(--deep-slate);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
