/* PsychPhiDims — site styles */

:root {
  --ground: #F5EFE4;
  --paper: #FBF8F2;
  --sand: #EADFCC;
  --line: #E3D8C6;
  --line-strong: #D4C6AE;
  --field-line: #C9B99E;
  --ink: #231C17;
  --muted: #5C5047;
  --accent: #A4452A;
  --accent-dark: #7E3218;
  --green: #26382E;
  --green-line: #5E7266;
  --green-text: #D5DCD2;
  --green-soft: #C9D1C6;
  --sage: #A9B8A3;
  --gold: #E6B75C;

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

  --gutter: clamp(20px, 6.6vw, 96px);
  --section: clamp(56px, 8vw, 112px);
  --radius: 20px;
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(38px, 5.2vw, 72px); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.1; }
h3 { font-weight: 600; }
p { margin: 0; }
em.hl { font-style: italic; color: var(--accent); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.stack { display: flex; flex-direction: column; }
.muted { color: var(--muted); }
.lead { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow.on-dark { color: var(--gold); }
.eyebrow.plain { color: var(--muted); }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--ground); }
.btn-light { background: var(--ground); color: var(--green); }
.btn-light:hover { background: #fff; color: var(--green); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.text-link { font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--ground); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; gap: 24px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.2; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: clamp(22px, 2vw, 26px); font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 32px; font-weight: 500; font-size: 16px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav .btn { min-height: 44px; padding: 0 22px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer;
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ground); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .nav .btn { margin-top: 18px; min-height: 52px; }
}

/* Photo frames */
.photo {
  position: relative; width: 100%; background: var(--line); border: 1px solid var(--line-strong);
  border-radius: 24px; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { font-family: var(--serif); font-size: 64px; color: var(--muted); opacity: .45; }
.photo.arch { border-radius: 280px 280px 24px 24px; }
.photo-offset { position: relative; padding: 0 40px 32px 0; }
.photo-offset::before {
  content: ""; position: absolute; top: 32px; left: 40px; right: 0; bottom: 0;
  background: var(--sage); border-radius: 24px;
}
.photo-offset.arch::before { border-radius: 280px 280px 24px 24px; }
.photo-offset .photo { position: relative; }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5.5vw, 80px); align-items: center; }
.hero .copy { display: flex; flex-direction: column; gap: 26px; }
.hero .roles { font-weight: 500; letter-spacing: 0.02em; font-size: clamp(15px, 1.3vw, 18px); }
.hero .photo { height: clamp(380px, 44vw, 608px); }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .photo-offset { order: 2; padding: 0 14px 14px 0; }
  .hero .photo-offset::before { top: 14px; left: 14px; }
  .hero .photo { height: 400px; }
  .hero .copy .btn-row { flex-direction: column; }
  .hero .copy .btn-row .btn { width: 100%; }
}

/* Dark band */
.band-dark { background: var(--green); color: var(--ground); }
.band-dark p { color: var(--green-text); }

/* Affirmation */
.affirmation .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px 80px; flex-wrap: wrap; padding-block: clamp(48px, 6vw, 88px); }
.affirmation .text { display: flex; flex-direction: column; gap: 22px; max-width: 880px; flex: 1 1 520px; }
.affirmation .meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.affirmation .date { font-size: 14px; color: var(--green-soft); }
.affirmation blockquote { margin: 0; font-family: var(--serif); font-size: clamp(26px, 3vw, 44px); line-height: 1.25; color: var(--ground); }
.affirmation .actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.affirmation .actions small { font-size: 14px; color: var(--green-soft); }
@media (max-width: 600px) { .affirmation .actions, .affirmation .actions .btn { width: 100%; } }

/* Section heads */
.head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 3.5vw, 48px); }
.head-row .head { margin-bottom: 0; }

/* Grids */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .grid-4 { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; }
.card p { color: var(--muted); font-size: 16px; }
.card .grow { flex-grow: 1; }
.card .num { font-size: 14px; font-weight: 700; color: var(--accent); }
.card svg { color: var(--accent); }

.rule-item { display: flex; flex-direction: column; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.band-dark .rule-item { border-top-color: var(--green-line); }
.rule-item h3 { font-size: clamp(21px, 1.9vw, 26px); }

/* Posts (Substack) */
.post { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.post:hover { color: var(--ink); }
.post:hover h3 { color: var(--accent); }
.post .thumb { aspect-ratio: 16 / 10; border-radius: 16px; background: var(--line); overflow: hidden; }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post .date { font-size: 14px; color: var(--muted); }
.post h3 { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.25; transition: color .15s; }
.post p { font-size: 16px; color: var(--muted); }
.post.is-loading .thumb, .post.is-loading h3, .post.is-loading .date { background: var(--line); color: transparent; border-radius: 8px; }
.feed-note { color: var(--muted); font-size: 16px; }

.featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: center; }
.featured .thumb { aspect-ratio: 4 / 3; border-radius: 24px; }
.featured h2 { font-size: clamp(28px, 3vw, 44px); }
.featured .body { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
@media (max-width: 860px) { .featured { grid-template-columns: minmax(0, 1fr); } }

/* Affiliations */
.affiliations { padding-block: 44px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 26px; }
.affiliations .grid-3 { gap: 32px; }
.affiliation { display: flex; flex-direction: column; gap: 4px; }
.affiliation strong { font-family: var(--serif); font-size: clamp(19px, 1.6vw, 22px); font-weight: 600; }
.affiliation span { font-size: 15px; color: var(--muted); }

/* Split */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5.5vw, 80px); align-items: center; }
.split .copy { display: flex; flex-direction: column; gap: 22px; }
.split .photo { height: clamp(260px, 36vw, 520px); }
.prose { display: flex; flex-direction: column; gap: 20px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.7; color: var(--muted); }
.prose p { margin: 0; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Panels (sand / ink / green) */
.panel { border-radius: 28px; padding: clamp(28px, 5.5vw, 80px); }
.panel-sand { background: var(--sand); }
.panel-green { background: var(--green); color: var(--ground); }
.panel-green p { color: var(--green-text); }

/* Newsletter */
.newsletter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4.5vw, 64px); align-items: center; }
.newsletter .copy { display: flex; flex-direction: column; gap: 16px; }
.newsletter p { color: var(--muted); }
@media (max-width: 860px) { .newsletter { grid-template-columns: minmax(0, 1fr); } }

/* Forms */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; }
.field label .opt { color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--field-line); background: #fff; color: var(--ink);
  font: inherit; font-size: 16px;
}
.textarea { padding: 14px 16px; min-height: 160px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid rgba(164, 69, 42, .35); border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 600px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.inline-form { display: flex; gap: 12px; }
.inline-form .input { border-radius: 999px; padding: 0 20px; min-height: 56px; }
.inline-form .btn { min-height: 56px; flex-shrink: 0; }
@media (max-width: 600px) { .inline-form { flex-direction: column; } }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 14px; color: var(--muted); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--ground); font-weight: 700; }

/* Lists */
.line-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.line-list li { padding: 20px 0; border-top: 1px solid var(--line-strong); }
.line-list li:last-child { border-bottom: 1px solid var(--line-strong); }
.line-list.serif li { font-family: var(--serif); font-size: clamp(20px, 1.9vw, 26px); }
.engagement { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 18px; }
.engagement span { color: var(--muted); }

.role-card { padding: 26px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.role-card strong { font-family: var(--serif); font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; }
.role-card span { color: var(--muted); font-size: 16px; }

.quote { margin: 0; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; }
.quote figcaption { color: var(--muted); font-size: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.step { display: flex; flex-direction: column; gap: 8px; }
.step .n { font-family: var(--serif); font-size: 40px; color: var(--accent); line-height: 1; }
.step h3 { font-family: var(--sans); font-size: 19px; font-weight: 700; letter-spacing: 0; }
.step p { color: var(--muted); font-size: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 22px; } }

/* Video cards */
.video { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.video .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--ink); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.video .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video .thumb svg { position: relative; color: #fff; }
.video h3 { font-size: clamp(19px, 1.7vw, 22px); }
.video:hover h3 { color: var(--accent); }

/* Page intro */
.page-intro { padding-block: clamp(48px, 7vw, 96px) clamp(32px, 5vw, 64px); }
.page-intro .inner { display: flex; flex-direction: column; gap: 24px; max-width: 980px; }
.intro-split { display: grid; grid-template-columns: 7fr 1fr 4fr; align-items: end; gap: 24px; }
.intro-split > :last-child { grid-column: 3; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
@media (max-width: 960px) { .intro-split { grid-template-columns: minmax(0, 1fr); } .intro-split > :last-child { grid-column: auto; } }

.story { display: grid; grid-template-columns: 4fr 1fr 7fr; gap: 24px; }
.story > :last-child { grid-column: 3; }
@media (max-width: 860px) { .story { grid-template-columns: minmax(0, 1fr); } .story > :last-child { grid-column: auto; } }

.cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; }
.cta-panel h2 { font-size: clamp(26px, 2.8vw, 40px); max-width: 640px; line-height: 1.15; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 5fr 1fr 6fr; gap: 24px; align-items: start; }
.contact-grid > :last-child { grid-column: 3; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } .contact-grid > :last-child { grid-column: auto; } }
.details { display: flex; flex-direction: column; gap: 18px; padding-block: 26px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.details .label { font-size: 14px; color: var(--muted); display: block; }
.details .value { font-size: 19px; font-weight: 500; }
.details a.value { text-decoration: none; }
.socials { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.socials a { font-weight: 500; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* Footer */
.site-footer { padding-block: clamp(56px, 7vw, 96px) 48px; margin-top: clamp(56px, 7vw, 96px); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .brand-name { font-size: 30px; }
.footer-cols { display: flex; gap: 72px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col strong { font-weight: 700; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 40px; flex-wrap: wrap; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line-strong); font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .footer-cols { gap: 40px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
