/* ═══════════════════════════════════════════════════════════
   PSYCHOLOGYXPLAINED — GLOBAL STYLES
   Shared across all pages: variables, reset, typography,
   layout helpers, buttons, navigation, footer.
════════════════════════════════════════════════════════════ */

:root {
  --ink:    #0e0e0d;
  --slate:  #181816;
  --card:   #1c1b18;
  --line:   #2c2b27;
  --cream:  #f2ead8;
  --mute:   #a09a8b;
  --gold:   #e6b83a;
  --gold-d: #c9a02e;

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

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;

  --nav-h: 68px;

  color-scheme: dark;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--ink);
  color: var(--cream);
  font: 400 17px/1.65 var(--sans);
  overflow-x: hidden;
}
img  { max-width: 100%; display: block; }
img, svg, video, canvas, picture { max-width: 100%; }
video, canvas { height: auto; }
iframe, embed, object { max-width: 100%; border: 0; }
a    { color: inherit; }
ul   { list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ─── Layout helpers ─── */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 96px 0; }

/* ─── Type ─── */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
}
h2 { font-size: clamp(30px, 4vw, 50px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.lede {
  color: var(--mute);
  max-width: 54ch;
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.7;
}
.note {
  font-size: 13px;
  color: var(--mute);
  margin-top: 28px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font: 700 15px/1 var(--sans);
  text-decoration: none;
  border: 1.5px solid var(--gold);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn.solid {
  background: var(--gold);
  color: #1a1405;
}
.btn.solid:hover {
  background: var(--cream);
  border-color: var(--cream);
}
.btn.ghost {
  background: transparent;
  color: var(--cream);
}
.btn.ghost:hover {
  background: var(--gold);
  color: #1a1405;
  border-color: var(--gold);
}
.btn[aria-disabled="true"] {
  opacity: .45;
  pointer-events: none;
}
.cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
  align-items: center;
}

/* ─── Alternate section bg ─── */
.alt {
  background: var(--slate);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}


/* ════════════════════════════════════════
   HEADER / NAV
════════════════════════════════════════ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 14, 13, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 24px;
}
.logo-link img {
  width: 120px;
  height: auto;
}
nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
nav ul {
  display: flex;
  gap: 8px;
}
nav a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--mute);
  padding: 7px 14px;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
nav a:hover,
nav a.active {
  color: var(--cream);
  background: rgba(255,255,255,.06);
}
.nav-cta {
  padding: 9px 20px;
  font-size: 14px;
  flex-shrink: 0;
}

/* Burger */
.burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
@media (max-width: 860px) {
  .burger    { display: flex; }
  .nav-cta   { display: none; }
  nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--nav-h);
    background: var(--ink);
    border-bottom: 1px solid var(--line);
    display: none;
    justify-content: flex-start;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  nav.open { display: flex; }
  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 20px 20px;
    width: 100%;
  }
  nav li a {
    display: block;
    padding: 13px 4px;
    font-size: 17px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  nav li:last-child a { border-bottom: none; }
}


/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 36px;
  color: var(--mute);
  font-size: 14.5px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}
.footer-brand img {
  width: 118px;
  margin-bottom: 14px;
}
.footer-brand p { max-width: 32ch; line-height: 1.6; }
footer h4 {
  margin-bottom: 14px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}
footer li { padding: 4px 0; }
footer a { text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--cream); }
.footer-legal { cursor: default; }
.copy {
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  footer { padding: 44px 0 28px; }
}


/* ════════════════════════════════════════
   SMALL SCREENS — readability, tap targets, overflow
   (desktop layout above 860px is unaffected)
════════════════════════════════════════ */
@media (max-width: 860px) {
  html, body { overflow-x: clip; }
  body { font-size: 17px; overflow-wrap: break-word; }

  .wrap { padding: 0 20px; }

  /* Long URLs / emails must wrap instead of pushing the page sideways */
  a, dd { overflow-wrap: anywhere; }

  /* Buttons: at least 44px tall, allowed to wrap on narrow screens */
  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
    font-size: 16px;
  }

  /* Responsive 16:9 wrapper for any future video embeds */
  .embed { position: relative; width: 100%; aspect-ratio: 16 / 9; }
  .embed iframe, .embed video { position: absolute; inset: 0; width: 100%; height: 100%; }

  nav li a { min-height: 48px; display: flex; align-items: center; }

  /* Footer */
  footer { font-size: 16px; }
  footer li { padding: 0; }
  footer li a,
  footer li .footer-legal {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .copy { font-size: 16px; }
}

/* ════════════════════════════════════════
   MOTION & ACCESSIBILITY
════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
