/* ============================================================
   THE INSTITUTE FOR SPIRITUAL RESEARCH
   Design System — calibrationmap.org
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Brand Colors — derived from ISR logo */
  --violet:        #3D1D9B;
  --violet-mid:    #5234C4;
  --violet-light:  #8B6FE8;
  --blue:          #1B8ED4;
  --gold:          #F5A623;
  --gold-dark:     #C4840E;

  /* Neutrals */
  --dark:          #1A1829;
  --body-text:     #3A3848;
  --muted:         #7A7890;
  --border:        #E8E4F0;
  --surface:       #FAFAF8;
  --surface-alt:   #F4F2FB;
  --white:         #FFFFFF;

  /* Typography */
  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;

  /* Layout */
  --container:     1080px;
  --ease:          0.3s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--body-text);
  background: var(--surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--violet); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--gold-dark); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--dark);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1.25rem; font-size: 1rem; line-height: 1.85; }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: block;
}

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 2rem; }
section { padding: 5.5rem 0; }

.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .eyebrow { margin-bottom: 0.75rem; }

.gold-divider {
  width: 36px;
  height: 1.5px;
  background: var(--gold);
  margin: 1.25rem auto 0;
}

.gold-divider-left { margin: 1.25rem 0 0; }

/* ---------- Fade In Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: background var(--ease), box-shadow var(--ease), padding var(--ease);
}

.nav.scrolled {
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
  padding: 1rem 0;
}

.nav.solid {
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
  padding: 1rem 0;
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 58px; width: auto; }
.nav-logo:hover img { opacity: 0.8; }
.nav-logo { transition: opacity var(--ease); }

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

.nav-links a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  position: relative;
  transition: color var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}

.nav-links a:hover,
.nav-links a.active { color: var(--violet); }

.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-donate a {
  background: var(--violet) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.4rem;
  border-radius: 2px;
  letter-spacing: 0.1em;
}

.nav-donate a::after { display: none !important; }

.nav-donate a:hover {
  background: var(--violet-mid) !important;
  color: var(--white) !important;
  transform: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--dark);
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2.25rem;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--violet);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--violet-mid);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 29, 155, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--violet);
  color: var(--violet);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold);
  color: var(--dark);
}
.btn-gold:hover {
  background: var(--gold-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.3);
}

.btn-outline-light {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-outline-light:hover {
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
  transform: translateY(-2px);
}

/* ---------- Home: Hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9rem 2rem 6rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(61, 29, 155, 0.07) 0%, transparent 70%),
    var(--surface);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 560px; height: 560px;
  background: url('../images/ISR_icon.png') center/contain no-repeat;
  opacity: 0.038;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  color: var(--dark);
  line-height: 1.08;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: italic;
  color: var(--violet-mid);
}

.hero-divider {
  width: 36px;
  height: 1.5px;
  background: var(--gold);
  margin: 1.5rem auto;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--body-text);
  max-width: 560px;
  margin: 0 auto 2.75rem;
  font-weight: 300;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Home: Mission ---------- */
.mission {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mission-inner {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}

.mission blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 400;
  font-style: italic;
  color: var(--dark);
  line-height: 1.75;
  border: none;
  padding: 0;
  quotes: none;
}

.mission-full {
  margin-top: 2.75rem;
  text-align: left;
  font-size: 0.97rem;
  color: var(--body-text);
  line-height: 1.9;
}

/* ---------- Home: About Teaser ---------- */
.about-teaser { background: var(--surface-alt); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.portrait-placeholder {
  aspect-ratio: 3/4;
  background: linear-gradient(150deg, var(--border), #d4d0e8);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-family: var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  max-width: 300px;
}

.text-col .eyebrow { margin-bottom: 0.6rem; }
.text-col h2 { margin-bottom: 0.5rem; }
.text-col p { font-size: 0.97rem; }

/* ---------- Home: Teachings Teaser ---------- */
.teachings-teaser {
  background: var(--dark);
  text-align: center;
}
.teachings-teaser h2 { color: var(--white); margin-bottom: 1rem; }
.teachings-teaser p {
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto 2.75rem;
}
.teachings-teaser .gold-divider { background: var(--gold); }
.teachings-teaser .eyebrow { color: var(--gold); }

/* ---------- Home: Donate Teaser ---------- */
.donate-teaser {
  background: var(--white);
  border-top: 1px solid var(--border);
  text-align: center;
}
.donate-teaser h2 { margin-bottom: 1rem; }
.donate-teaser p { max-width: 500px; margin: 0 auto 2.75rem; color: var(--muted); }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: 10rem 2rem 4.5rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(61, 29, 155, 0.055) 0%, transparent 70%),
    var(--surface);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero .eyebrow { margin-bottom: 0.7rem; }
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero-subtitle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- About: Founder ---------- */
.founder-section { background: var(--white); }

.founder-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4.5rem;
  align-items: start;
}

.founder-image { position: sticky; top: 6rem; }

.founder-image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(150deg, var(--surface-alt), #d4d0e8);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.founder-text .eyebrow { margin-bottom: 0.5rem; }
.founder-text h2 { margin-bottom: 0.35rem; }

.founder-dates {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2.25rem;
  display: block;
}

.founder-text p { font-size: 0.97rem; line-height: 1.9; }

/* ---------- About: History ---------- */
.history-section { background: var(--surface-alt); border-top: 1px solid var(--border); }
.history-inner { max-width: 740px; }
.history-inner .eyebrow { margin-bottom: 0.6rem; }
.history-inner h2 { margin-bottom: 0.5rem; }
.history-inner p { font-size: 0.97rem; line-height: 1.9; }

/* ---------- About: Board ---------- */
.board-section { background: var(--white); border-top: 1px solid var(--border); }

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.board-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow var(--ease);
}
.board-card:hover { box-shadow: 0 6px 20px rgba(61, 29, 155, 0.08); }

.board-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--dark);
  margin-bottom: 0.4rem;
}
.board-title {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

/* ---------- Teachings: Books ---------- */
.books-section { background: var(--white); }

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.book-card {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem 1.75rem;
  background: var(--surface);
  transition: box-shadow var(--ease), transform var(--ease);
}
.book-card:hover {
  box-shadow: 0 10px 32px rgba(61, 29, 155, 0.1);
  transform: translateY(-3px);
}

.book-year {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}
.book-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.book-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ---------- Teachings: Videos ---------- */
.videos-section { background: var(--surface-alt); border-top: 1px solid var(--border); }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.video-embed { border-radius: 2px; overflow: hidden; }
.video-embed iframe { width: 100%; aspect-ratio: 16/9; display: block; border: none; }

.video-placeholder {
  background: var(--dark);
  border-radius: 2px;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: rgba(255,255,255,0.3);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.video-placeholder-icon {
  width: 48px; height: 48px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder-icon svg {
  width: 16px; height: 16px;
  fill: rgba(255,255,255,0.28);
  margin-left: 3px;
}

.video-caption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.75rem;
  font-style: italic;
  font-family: var(--font-display);
}

/* ---------- Donate Page ---------- */
.donate-hero-section { background: var(--white); }
.donate-intro { max-width: 640px; margin: 0 auto; text-align: center; }
.donate-intro p { font-size: 0.97rem; color: var(--body-text); margin-bottom: 1.25rem; }

.donate-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3.5rem 2.5rem;
  max-width: 480px;
  margin: 3.5rem auto 0;
  text-align: center;
}
.donate-box h3 { margin-bottom: 0.6rem; }
.donate-box p { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

.donate-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1.5rem;
  line-height: 1.65;
}

.donate-note a { color: var(--muted); text-decoration: underline; }

.tax-info {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
.tax-info-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.tax-info p { font-size: 0.97rem; color: var(--body-text); }

.recipients-section {
  background: var(--white);
  border-top: 1px solid var(--border);
}
.recipients-placeholder {
  text-align: center;
  padding: 3.5rem 2rem;
  border: 1px dashed var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ---------- Contact Page ---------- */
.contact-section { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contact-info h2 { margin-bottom: 2rem; }

.contact-detail { margin-bottom: 2.25rem; }

.contact-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.4rem;
  display: block;
}

.contact-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--dark);
  line-height: 1.5;
}

.legal-block {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2rem;
  margin-top: 3rem;
}

.legal-block h4 {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
  font-weight: 500;
}

.legal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.legal-row:last-child { border-bottom: none; }
.legal-label { color: var(--muted); }
.legal-value { color: var(--dark); font-weight: 400; }

.contact-message h3 { margin-bottom: 0.75rem; }
.contact-message p { font-size: 0.97rem; color: var(--body-text); }
.contact-message a { color: var(--violet); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  padding: 4rem 0 2.5rem;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3.5rem;
  align-items: start;
}

.footer-logo img {
  height: 50px;
  opacity: 0.8;
  filter: brightness(0) invert(1);
}

.footer-legal p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.42);
  margin-bottom: 0.4rem;
  line-height: 1.65;
}

.footer-legal p:last-child {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0;
}

.footer-legal a {
  color: rgba(255,255,255,0.42);
  text-decoration: underline;
}
.footer-legal a:hover { color: rgba(255,255,255,0.7); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(250, 250, 248, 0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 1.75rem 2rem;
    gap: 1.4rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav { background: rgba(250, 250, 248, 0.97); backdrop-filter: blur(14px); }
  .nav-donate a { display: inline-block; }

  section { padding: 3.75rem 0; }

  .two-col,
  .founder-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .portrait-placeholder { max-width: 220px; }
  .founder-image { position: static; max-width: 220px; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }

  .hero::before { width: 280px; height: 280px; }

  .books-grid { grid-template-columns: 1fr 1fr; }
  .videos-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .books-grid { grid-template-columns: 1fr; }
  .board-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.4rem; }
}

/* ---------- Social Icons (Footer) ---------- */
.footer-social {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.social-link {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.38);
  transition: all var(--ease);
  text-decoration: none;
}

.social-link:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.social-link svg {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-link svg.filled {
  stroke: none;
  fill: currentColor;
}
