/* ═══════════════════════════════════════════════════════════════
   Soulease · Shared Stylesheet  ·  style.css
   Loaded by every page. Page-specific overrides live in each
   HTML file's <style> block, which is loaded after this file.
   ═══════════════════════════════════════════════════════════════ */


/* ── 1. DESIGN TOKENS ─────────────────────────────────────────── */

:root {
  /* Colour */
  --c-bg:            #F7F3EE;
  --c-surface:       #EDE7DC;
  --c-border:        #D4C9B8;
  --c-border-subtle: #E5DDD0;
  --c-text:          #2C2825;
  --c-text-mid:      #6B6057;
  --c-text-muted:    #7A6E67;
  --c-accent:        #7A6650;
  --c-accent-light:  #C4AA8A;
  --c-white:         #FDFAF6;

  /* Typography */
  --f-display: 'DM Serif Display', Georgia, serif;
  --f-serif:   Georgia, 'Times New Roman', serif;
  --f-sans:    'Lato', system-ui, sans-serif;

  /* Motion */
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);
  --dur:       320ms;
  --dur-slow:  560ms;

  /* Layout */
  --max-w:  1080px;
  --pad-x:  clamp(24px, 5vw, 64px);
  --nav-h:  64px;
}


/* ── 2. RESET ─────────────────────────────────────────────────── */

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


/* ── 3. BASE ──────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}


/* ── 4. UTILITIES ─────────────────────────────────────────────── */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.eyebrow {
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  display: block;
  margin-bottom: 20px;
}

/* Generic section heading — all major h2s use this */
.section-title {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--c-text);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ── 5. BUTTONS ───────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--c-accent);
  color: var(--c-white);
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 40px;
  border: none;
  cursor: pointer;
  min-height: 52px;
  white-space: nowrap;
  transition: background var(--dur) var(--ease);
  text-decoration: none;
}
.btn-primary:hover { background: var(--c-text); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--c-accent);
  border-bottom: 1px solid var(--c-accent-light);
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.link-arrow:hover {
  color: var(--c-text);
  border-color: var(--c-text);
}


/* ── 6. NAVIGATION ────────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--c-white);
  box-shadow: 0 1px 0 var(--c-border-subtle);
  transition: background var(--dur) var(--ease),
              box-shadow  var(--dur) var(--ease);
}

/* Home page: nav starts transparent, fills in on scroll */
nav.nav-transparent {
  background: transparent;
  box-shadow: none;
}
nav.nav-transparent.scrolled {
  background: var(--c-white);
  box-shadow: 0 1px 0 var(--c-border-subtle);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--c-text-mid);
  letter-spacing: 0.04em;
  transition: color var(--dur) var(--ease);
}
.nav-links a:hover,
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--c-text);
}

.nav-links .nav-cta {
  color: var(--c-accent);
  border-bottom: 1px solid var(--c-accent-light);
  padding-bottom: 1px;
}
.nav-links .nav-cta:hover {
  color: var(--c-text);
  border-color: var(--c-text);
}

/* Hamburger — min 44×44px touch target */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 11px 10px;
  background: none;
  border: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--c-text);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

/* Animated mobile menu — slide + fade, no display:none jump */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--c-white);
  border-top: 1px solid var(--c-border-subtle);
  z-index: 99;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 380ms var(--ease),
              opacity    280ms var(--ease);
}
.mobile-menu.open {
  max-height: 400px;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  display: block;
  font-size: 20px;
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--c-text);
  padding: 16px var(--pad-x);
  border-bottom: 1px solid var(--c-border-subtle);
  transition: color var(--dur) var(--ease);
}
.mobile-menu a:hover { color: var(--c-accent); }
.mobile-menu a:last-child {
  border-bottom: none;
  color: var(--c-accent);
}

/* Backdrop overlay — dismisses menu on outside click */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(44, 40, 37, 0.15);
  opacity: 0;
  transition: opacity 280ms var(--ease);
  cursor: default;
}
.mobile-overlay.open {
  display: block;
  opacity: 1;
}

@media (max-width: 640px) {
  .nav-links  { display: none; }
  .nav-toggle { display: flex; }
}


/* ── 7. SKIP LINK ─────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 24px;
  background: var(--c-accent);
  color: var(--c-white);
  padding: 10px 20px;
  font-family: var(--f-sans);
  font-size: 13px;
  z-index: 200;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }


/* ── 8. PAGE HERO (interior pages: about, therapy, writing) ───── */

.page-hero {
  padding: clamp(96px, 14vw, 148px) var(--pad-x) clamp(56px, 8vw, 88px);
  max-width: var(--max-w);
  margin: 0 auto;
  border-bottom: 1px solid var(--c-border-subtle);
}

.page-title {
  font-family: var(--f-display);
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--c-text);
  max-width: 700px;
  margin-bottom: 28px;
}

.page-sub {
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 300;
  color: var(--c-text-mid);
  line-height: 1.8;
  max-width: 500px;
}


/* ── 9. SECTION BASE (interior pages) ────────────────────────── */

.sect {
  padding: clamp(64px, 10vw, 96px) 0;
  border-bottom: 1px solid var(--c-border-subtle);
}
.sect:last-of-type { border-bottom: none; }

.sect-alt { background: var(--c-surface); }

.sect-title {
  font-family: var(--f-display);
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-text);
  line-height: 1.15;
  margin-bottom: 12px;
}


/* ── 10. SHARED CTA STRIP (about, therapy bottom sections) ────── */

.cta-strip {
  text-align: center;
  padding: clamp(64px, 10vw, 96px) var(--pad-x);
}
.cta-divider {
  width: 48px;
  height: 1px;
  background: var(--c-accent-light);
  margin: 0 auto 40px;
}
.cta-strip h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin-bottom: 16px;
}
.cta-strip p {
  font-size: 16px;
  color: var(--c-text-mid);
  margin-bottom: 36px;
}


/* ── 11. FOOTER ───────────────────────────────────────────────── */

footer {
  background: var(--c-text);
  color: var(--c-bg);
  padding: 64px 0 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-brand {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 12px;
}
.footer-tagline {
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.7;
}

.footer-nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-text-muted);
  font-weight: 500;
  margin-bottom: 20px;
  display: block;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
  font-size: 14px;
  color: rgba(247, 243, 238, 0.6);
  transition: color var(--dur) var(--ease);
}
.footer-links a:hover { color: var(--c-bg); }

.footer-contact {
  font-size: 14px;
  color: rgba(247, 243, 238, 0.6);
  line-height: 1.8;
}
.footer-contact a { color: var(--c-accent-light); }

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

/* Connect page uses a simplified footer without full nav columns */
.footer-bottom-only {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy { font-size: 12px; color: var(--c-text-muted); }
.footer-note {
  font-size: 12px;
  color: var(--c-text-muted);
  max-width: 400px;
  text-align: right;
  line-height: 1.65;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-note  { text-align: left; max-width: 100%; }
}


/* ── 12. SCROLL REVEAL ANIMATION ──────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity  var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optional stagger helpers — add data-delay="1|2|3|4" to elements */
.fade-in[data-delay="1"] { transition-delay: 80ms;  }
.fade-in[data-delay="2"] { transition-delay: 160ms; }
.fade-in[data-delay="3"] { transition-delay: 240ms; }
.fade-in[data-delay="4"] { transition-delay: 320ms; }


/* ── 13. REDUCED MOTION ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .mobile-menu,
  .mobile-overlay {
    transition: none;
  }

  .btn-primary,
  .link-arrow,
  .nav-links a,
  nav,
  .nav-toggle span {
    transition: none;
  }
}
