/*
 * four-pillars.css
 * Enqueued on template-four-pillars.php only.
 *
 * Depends on main.css for:
 *   - CSS custom properties (--black, --black-2, --serif, --sans, etc.)
 *   - .container, .eyebrow
 *   - .btn-primary, .btn-secondary, .btn-arrow
 *   - .seo-h1, .hero-headline
 *   - .breadcrumb, .breadcrumb-inner, and related breadcrumb components
 *
 * No JavaScript is required for this template.
 * The anchor strip and mobile nav are handled by navigation.js (global).
 *
 * Sections:
 *   1. Hero
 *   2. Anchor strip
 *   3. Pillar sections — layout, visual, content
 *   4. Pillar content — eyebrow, heading, motto, body, creed, stats
 *   5. Closing CTA
 *   6. Responsive — 1100px breakpoint
 *   7. Responsive — 900px breakpoint
 */


/* =============================================================================
   1. HERO
   ============================================================================= */

/* Bordered left-rule creed block */
.pillars-page-hero-creed {
  display: inline-block;
  padding: 24px 32px;
  border-left: 2px solid var(--silver);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  color: var(--silver-light);
  max-width: 680px;
}

/* Highlighted implement names inside the creed text */
.pillars-page-hero-creed em {
  font-style: normal;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}


/* =============================================================================
   2. ANCHOR STRIP
   ============================================================================= */

.pillars-anchors {
  background: var(--black);
  border-top: 1px solid rgba(184, 184, 184, 0.25);
  border-bottom: 1px solid rgba(184, 184, 184, 0.15);
  position: sticky;
  top: 96px; /* height of the sticky site header */
  z-index: 50;
}

.pillars-anchors .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 40px;
  max-width: 1280px;
  margin: 0 auto;
  border-left: 1px solid rgba(184, 184, 184, 0.08);
}

.pillars-anchors a {
  padding: 18px 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
  position: relative;
  text-align: center;
  border-right: 1px solid rgba(184, 184, 184, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pillars-anchors a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.02);
}

.pillars-anchors a svg {
  opacity: 0.6;
  transition: opacity 0.2s;
}

.pillars-anchors a:hover svg {
  opacity: 1;
}

/* Italic implement subtitle ("Education", "Brotherhood", etc.) */
.pillars-anchors a .anchor-implement {
  font-family: var(--serif);
  font-style: italic;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--silver-dark);
  text-transform: none;
  margin-left: 4px;
}


/* =============================================================================
   3. PILLAR SECTIONS — layout, visual column
   ============================================================================= */

.pillar-section {
  padding: 140px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(184, 184, 184, 0.08);
}

/*
 * Alternate background on even pillar sections.
 * :nth-child(even of .pillar-section) is the intended selector from the design;
 * it has broad modern browser support. If older browser support is required,
 * apply .pillar-section:nth-child(even) as a fallback and confirm that no other
 * sibling elements sit between the section tags in the template output.
 */
.pillar-section:nth-child(even of .pillar-section) {
  background: var(--black-4);
}

.pillar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
}

/* RTL flip reverses column order without reordering the DOM */
.pillar-section.reverse .pillar-grid {
  direction: rtl;
}

.pillar-section.reverse .pillar-grid > * {
  direction: ltr;
}

/* — Visual column — */

.pillar-visual {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inset border frame */
.pillar-visual::before {
  content: "";
  position: absolute;
  inset: 40px;
  border: 1px solid rgba(184, 184, 184, 0.1);
}

/* Vertical tick above the visual (bottom for reversed sections) */
.pillar-visual::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 32px;
  background: var(--silver);
  opacity: 0.3;
}

.pillar-section.reverse .pillar-visual::after {
  top: auto;
  bottom: 0;
}

/* SVG icon inside the visual */
.pillar-visual svg {
  position: relative;
  z-index: 2;
  max-width: 300px;
  max-height: 300px;
  color: var(--silver-light);
}

/* Uploaded image inside the visual — same sizing constraints as the SVG */
.pillar-visual img {
  position: relative;
  z-index: 2;
  max-width: 300px;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* "Our Sword" / "Our Shield" badge overlaid at the bottom of the visual */
.pillar-implement-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black-4);
  padding: 6px 16px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--silver-dark);
  font-weight: 600;
  border: 1px solid rgba(184, 184, 184, 0.15);
  white-space: nowrap;
}

/*
 * Reversed sections have --black-2 background, so the badge needs to match.
 * The even/odd selector here pairs with the section background rule above.
 */
.pillar-section:nth-child(even of .pillar-section) .pillar-implement-label {
  background: var(--silver-dark);
  color: var(--silver-light);
}


/* =============================================================================
   4. PILLAR CONTENT — eyebrow, heading, motto, body, creed, stats
   ============================================================================= */

.pillar-content {
  max-width: 520px;
}

/* Italic serif eyebrow with leading rule line */
.pillar-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--silver);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.pillar-eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--silver);
  flex-shrink: 0;
}

/* Large pillar name heading */
.pillar-content h2 {
  font-size: clamp(48px, 5.5vw, 72px);
  line-height: 1;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

/* "our sword." — italic fragment below the heading */
.pillar-content h2 .italic {
  font-style: italic;
  font-weight: 500;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  font-size: 0.6em;
  margin-top: 6px;
}

/* Italic serif sentence beneath the heading */
.pillar-motto {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  color: var(--silver-light);
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(184, 184, 184, 0.15);
}

/* Editorial body paragraphs */
.pillar-body p {
  font-size: 16px;
  color: var(--silver-light);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 18px;
}

.pillar-body p:last-child {
  margin-bottom: 0;
}

.pillar-body strong {
  color: var(--white);
  font-weight: 500;
}

/* — Creed pull quote (optional, currently Pillar 4 only) — */

.pillar-creed {
  margin: 32px 0;
  padding: 32px 0 28px;
  border-top: 1px solid rgba(184, 184, 184, 0.15);
  border-bottom: 1px solid rgba(184, 184, 184, 0.15);
  position: relative;
  text-align: center;
}

/* Opening quotation mark */
.pillar-creed::before {
  content: "\201C";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  padding: 0 12px;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  color: var(--silver);
  font-weight: 700;
}

/* Match quote mark background to the alternate section colour */
.pillar-section:nth-child(even of .pillar-section) .pillar-creed::before {
  background: var(--black-4);
}

.pillar-creed p {
  font-family: var(--serif) !important;
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 28px) !important;
  line-height: 1.35 !important;
  color: var(--white) !important;
  font-weight: 500 !important;
  margin-bottom: 16px !important;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.005em;
}

.pillar-creed cite {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver);
  font-weight: 600;
}

/* — Stats strip — */

.pillar-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(184, 184, 184, 0.15);
}

.pillar-stat-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver);
  font-weight: 600;
  margin-bottom: 6px;
}

.pillar-stat-value {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}


/* =============================================================================
   5. CLOSING CTA
   ============================================================================= */

.pillars-closing {
  padding: 140px 0;
  background: var(--black);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Watermark ΨΣΦ — decorative, non-interactive */
.pillars-closing::before {
  content: "ΨΣΦ";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 400px;
  font-weight: 900;
  color: rgba(184, 184, 184, 0.02);
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
}

.pillars-closing-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative; /* sits above the ::before watermark */
}

.pillars-closing h2 {
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 28px;
}

.pillars-closing h2 .italic {
  font-style: italic;
  font-weight: 500;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pillars-closing p {
  font-size: 18px;
  color: var(--silver-light);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 40px;
}

.pillars-closing-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}


/* =============================================================================
   6. RESPONSIVE — 1100px (tablet / narrow desktop)
   ============================================================================= */

@media (max-width: 1100px) {
  /* Stack pillar grid to single column */
  .pillar-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  /* Reset RTL flip — not needed in stacked layout */
  .pillar-section.reverse .pillar-grid {
    direction: ltr;
  }

  /* Cap visual width when stacked */
  .pillar-visual {
    max-width: 400px;
    margin: 0 auto;
  }

  /* 4-column anchor nav collapses to 2 columns */
  .pillars-anchors .container {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Remove the right border from the last column in each row */
  .pillars-anchors a:nth-child(2) {
    border-right: none;
  }
}


/* =============================================================================
   7. RESPONSIVE — 900px (mobile)
   ============================================================================= */

@media (max-width: 900px) {
  /* Hero */
  .pillars-page-hero {
    padding: 80px 0 72px;
  }

  .pillars-page-hero-creed {
    font-size: 17px;
    padding: 18px 24px;
  }

  /* Hide anchor strip on mobile — no room for 4 (or 2) tabs */
  .pillars-anchors {
    display: none;
  }

  /* Pillar sections */
  .pillar-section {
    padding: 72px 0;
  }

  .pillar-grid {
    gap: 40px;
  }

  .pillar-content h2 {
    font-size: clamp(36px, 9vw, 52px);
  }

  .pillar-motto {
    font-size: 18px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .pillar-body p {
    font-size: 15px;
  }

  /* Creed pull quote */
  .pillar-creed {
    margin: 24px 0;
    padding: 24px 0 20px;
  }

  .pillar-creed::before {
    font-size: 30px;
  }

  /* Stats — single column on mobile */
  .pillar-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Closing CTA */
  .pillars-closing {
    padding: 80px 0;
  }

  .pillars-closing::before {
    font-size: 200px;
  }
}
