/**
 * page-history.css
 *
 * Template-specific styles for template-our-history.php
 * Enqueued via inc/enqueue.php on the Our History page template only.
 *
 * Global patterns (.page-hero, .eyebrow, .breadcrumb, .container,
 * .seo-h1, .hero-headline, .page-nav) live in main.css.
 *
 * @package psi-sigma-phi
 */

/* ─────────────────────────────────────────────────────────────────────────────
   PAGE ANCHORS NAV
   Sticky horizontal anchor-link bar; hidden on mobile (too many items).
───────────────────────────────────────────────────────────────────────────── */
.page-anchors {
  position: sticky;
  top: 0;           /* sits just below the main nav when scrolling */
  z-index: 90;
  background: var(--black-2);
  border-bottom: 1px solid rgba(184, 184, 184, 0.1);
}

.page-anchors-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.page-anchor-link {
  display: inline-flex;
  align-items: center;
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-dark);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.page-anchor-link:hover,
.page-anchor-link.is-active {
  color: var(--white);
  border-bottom-color: var(--white);
}

/* ─────────────────────────────────────────────────────────────────────────────
   EDITORIAL / FOUNDING STORY
   Two-column grid (body + sticky sidebar). Sidebar is optional — if no meta
   rows are populated the PHP emits .editorial-single (full-width, no grid).
───────────────────────────────────────────────────────────────────────────── */
.editorial {
  padding: 120px 0;
}

/* Two-column layout when sidebar is present */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 80px;
  align-items: start;
}

/* Full-width layout when sidebar is absent */
.editorial-single .editorial-body {
  max-width: 760px;
}

/* Editorial body typography */
.editorial-body {
  font-size: 17px;
  color: var(--silver-light);
  line-height: 1.85;
  font-weight: 300;
}

.editorial-body h2 {
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--white);
  margin: 56px 0 20px;
  line-height: 1.1;
}

.editorial-body h2:first-child {
  margin-top: 0;
}

.editorial-body h2 .italic {
  font-style: italic;
  font-weight: 500;
  color: var(--silver);
}

.editorial-body p {
  margin-bottom: 22px;
}

.editorial-body p:last-child {
  margin-bottom: 0;
}

.editorial-body .lead {
  font-size: 20px;
  color: var(--white);
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 28px;
}

.editorial-body strong {
  font-weight: 600;
  color: var(--white);
}

/* Pull quote (can appear inside wysiwyg body) */
.pull-quote {
  margin: 48px 0;
  padding: 36px 40px;
  border-left: 3px solid var(--silver);
  background: var(--black-2);
}

.pull-quote p {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-style: italic;
  color: var(--silver-light);
  line-height: 1.45;
  margin: 0;
  font-weight: 500;
}

/* Sidebar */
.editorial-sidebar {
  position: sticky;
  top: 180px; /* clears breadcrumb + page-anchors bar */
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-card {
  background: var(--black-2);
  border: 1px solid rgba(184, 184, 184, 0.1);
  padding: 32px 28px;
}

.sidebar-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver-dark);
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--silver-dark);
  display: inline-block;
  flex-shrink: 0;
}

.sidebar-year {
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 800;
  line-height: 0.9;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.sidebar-meta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(184, 184, 184, 0.1);
}

.sidebar-meta-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-meta-key {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-dark);
  font-weight: 600;
}

.sidebar-meta-val {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--white);
  font-weight: 500;
  line-height: 1.3;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TIMELINE
───────────────────────────────────────────────────────────────────────────── */
.timeline-section {
  padding: 120px 0;
  background: var(--black-2);
  border-top: 1px solid rgba(184, 184, 184, 0.08);
  border-bottom: 1px solid rgba(184, 184, 184, 0.08);
}

.timeline-header {
  text-align: center;
  margin-bottom: 80px;
}

.timeline-header h2 {
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 800;
}

.timeline-header h2 .italic {
  font-style: italic;
  font-weight: 500;
  color: var(--silver);
}

.timeline-header p {
  font-size: 17px;
  color: var(--silver);
  max-width: 520px;
  margin: 20px auto 0;
  font-weight: 300;
  line-height: 1.65;
}

/* Timeline track */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(184, 184, 184, 0.15);
  transform: translateX(-50%);
}

/* Each item is a 2-col grid; odd = content left, even = content right */
.timeline-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  grid-column: 1;
  padding-right: 56px;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  grid-column: 2;
  padding-left: 56px;
  grid-row: 1;
}

.timeline-item:nth-child(even) .timeline-spacer {
  grid-column: 1;
  grid-row: 1;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 32px;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  background: var(--white);
  border: 2px solid var(--black);
  box-shadow: 0 0 0 3px rgba(184, 184, 184, 0.25);
  border-radius: 50%;
  z-index: 2;
}

.timeline-item.featured .timeline-dot {
  width: 15px;
  height: 15px;
  top: 30px;
  box-shadow: 0 0 0 4px rgba(184, 184, 184, 0.35);
}

.timeline-content {
  padding-bottom: 64px;
}

.timeline-year {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--silver);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.timeline-content h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.2;
}

.timeline-item.featured .timeline-content h3 {
  font-size: 24px;
}

.timeline-content p {
  font-size: 14px;
  color: var(--silver);
  line-height: 1.65;
  font-weight: 300;
}

.timeline-tag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 9px;
  border: 1px solid rgba(184, 184, 184, 0.25);
  color: var(--silver);
  margin-bottom: 10px;
}

.timeline-item.featured .timeline-tag {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

/* ─────────────────────────────────────────────────────────────────────────────
   FOUNDING KNIGHTS
───────────────────────────────────────────────────────────────────────────── */
.founders-section {
  padding: 120px 0;
  background: var(--black-2);
  border-top: 1px solid rgba(184, 184, 184, 0.08);
  position: relative;
  overflow: hidden;
}

/* Decorative watermark */
.founders-section::before {
  content: '\03A8\03A3\03A6';
  position: absolute;
  left: -60px;
  top: 20px;
  font-family: var(--serif);
  font-size: 320px;
  font-weight: 900;
  color: rgba(184, 184, 184, 0.02);
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
}

/* Intro block */
.founders-intro {
  text-align: center;
  margin-bottom: 72px;
  position: relative;
}

.founders-intro .eyebrow {
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--silver);
}

.founders-intro .eyebrow::before,
.founders-intro .eyebrow::after {
  content: '';
  width: 48px;
  height: 1px;
  background: var(--silver);
}

.founders-intro h2 {
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 800;
  margin-bottom: 20px;
}

.founders-intro h2 .italic {
  font-style: italic;
  font-weight: 500;
  color: var(--silver);
}

.founders-lead {
  font-size: 17px;
  color: var(--silver-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
  font-weight: 300;
}

/* Founders photo with heraldic corner borders */
.founders-photo {
  margin: 0 auto 72px;
  max-width: 900px;
  position: relative;
}

.founders-photo-wrap {
  position: relative;
  padding: 14px;
}

.founders-photo-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  border-top: 2px solid var(--silver);
  border-left: 2px solid var(--silver);
}

.founders-photo-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 72px;
  height: 72px;
  border-bottom: 2px solid var(--silver);
  border-right: 2px solid var(--silver);
}

.founders-photo img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(184, 184, 184, 0.2);
}

.founders-photo figcaption {
  margin-top: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.founders-photo figcaption::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--silver);
  margin: 0 auto 12px;
}

.founders-photo-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--white);
  font-weight: 500;
}

.founders-photo-date {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--silver);
  font-weight: 600;
}

/* Roll call grid */
.founders-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--black);
  border: 1px solid var(--black);
}

.founder {
  background: rgba(184, 184, 184, 0.12);
  border: 1px solid rgba(184, 184, 184, 0.12);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.3s;
}

.founder:hover {
  background: var(--black-2);
}

.founder-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--silver);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.founder-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ─────────────────────────────────────────────────────────────────────────────
   INSIGNIA & SYMBOLISM
───────────────────────────────────────────────────────────────────────────── */
.insignia-section {
  padding: 120px 0;
  background: var(--black);
}

.insignia-header {
  margin-bottom: 72px;
}

.insignia-header h2 {
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 800;
  margin-bottom: 16px;
}

.insignia-header h2 .italic {
  font-style: italic;
  font-weight: 500;
  color: var(--silver);
}

.insignia-header p {
  font-size: 17px;
  color: var(--silver);
  max-width: 580px;
  line-height: 1.65;
  font-weight: 300;
}

/* Grid: 3 columns; colors row spans full width */
.insignia-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--black);
  border: 1px solid var(--black);
}

.insignia-card {
  background: var(--black-3);
  padding: 48px 36px;
  transition: background 0.25s;
}

.insignia-card:hover {
  background: var(--black-2);
}

/* Insignia icon — editor provides the image; sized to feel like an icon */
.insignia-icon {
    width: 200px;
    height: 200px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(184, 184, 184, 0.15);
    background: var(--white);
}

.insignia-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.insignia-icon svg {
  color: var(--silver);
  width: auto;
  height: 100px;
}

/* Colors icon variant — slightly looser margin */
.insignia-icon--colors {
  margin-bottom: 20px;
}

.insignia-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.2;
}

.insignia-card p {
  font-size: 14px;
  color: var(--silver);
  line-height: 1.7;
  font-weight: 300;
}

/* Colors row — spans all 3 columns */
.insignia-colors {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(184, 184, 184, 0.1);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0;
  background: var(--black-3);
}

.insignia-colors-text {
  padding: 48px 36px;
  border-right: 1px solid rgba(184, 184, 184, 0.1);
}

.colors-description {
  font-size: 14px;
  color: var(--silver);
  line-height: 1.7;
  font-weight: 300;
  margin-top: 12px;
}

.insignia-colors-swatches {
  padding: 48px 36px;
  display: flex;
  align-items: flex-end;
  gap: 32px;
}

.color-chip-large {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.color-swatch-large {
  width: 100px;
  height: 120px;
  position: relative;
}

.color-swatch--black  { background: #0a0a0a; border: 2px solid rgba(255, 255, 255, 0.35); }
.color-swatch--silver { background: linear-gradient(135deg, #ededed 0%, #9a9a9a 50%, #ededed 100%); border: 1px solid rgba(184, 184, 184, 0.2); }
.color-swatch--white  { background: #ffffff; border: 1px solid rgba(255, 255, 255, 0.25); }

.color-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.color-note {
  font-size: 12px;
  color: var(--silver-dark);
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET (≤ 1100px)
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .editorial-grid           { grid-template-columns: 1fr 280px; gap: 56px; }
  .insignia-colors          { grid-template-columns: 1fr; }
  .insignia-colors-text     { border-right: none; border-bottom: 1px solid rgba(184, 184, 184, 0.1); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE (≤ 900px)
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Page anchors: hidden on mobile — too many links for the screen width */
  .page-anchors { display: none; }

  /* Hero */
  .page-hero         { padding: 72px 0 60px; }

  /* Editorial: stack to single column */
  .editorial              { padding: 56px 0; }
  .editorial-grid         { grid-template-columns: 1fr; gap: 40px; }
  .editorial-sidebar      { position: static; }
  .editorial-body         { font-size: 16px; }
  .editorial-body .lead   { font-size: 18px; }
  .pull-quote             { margin: 32px 0; padding: 24px; }
  .pull-quote p           { font-size: 18px; }

  /* Timeline: single-column, left-spine */
  .timeline-section          { padding: 64px 0; }
  .timeline::before          { left: 16px; transform: none; }
  .timeline-item             { grid-template-columns: 1fr; }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    grid-column: 1;
    grid-row: 1;
    padding-left: 44px;
    padding-right: 0;
    text-align: left;
  }
  .timeline-spacer  { display: none; }
  .timeline-dot     { left: 9px; top: 28px; transform: none; }
  .timeline-content { padding-bottom: 44px; }
  .timeline-content h3 { font-size: 18px; }

  /* Founders */
  .founders-section          { padding: 64px 0; }
  .founders-intro            { margin-bottom: 48px; }
  .founders-photo-wrap       { padding: 8px; }
  .founders-photo-wrap::before,
  .founders-photo-wrap::after { width: 42px; height: 42px; }
  .founders-photo            { margin-bottom: 48px; }
  .founders-list             { grid-template-columns: repeat(2, 1fr); }
  .founder                   { padding: 20px 18px; }
  .founder-name              { font-size: 16px; }

  /* Insignia */
  .insignia-section  { padding: 64px 0; }
  .insignia-grid     { grid-template-columns: 1fr; }
  .insignia-colors   { grid-template-columns: 1fr; }
  .insignia-colors-text { border-right: none; border-bottom: 1px solid rgba(184, 184, 184, 0.1); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — SMALL PHONE (≤ 600px)
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .founders-list { grid-template-columns: 1fr; }

  .insignia-colors-swatches {
    flex-direction: row;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
  }

  .color-chip-large { align-items: center; }
}