/* =========================================================
   HOME — SECTION 1: Hero
   ========================================================= */
.hero{
  position:relative;
  overflow:hidden;
  background:var(--hero);
}

/* Background image wash */
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:url('/assets/images/hero_background (1).png');
  background-size:cover;
  background-position:center;
  opacity:1.0;
  z-index:0;
}

/* Hero content grid */
.hero .inner{
  position:relative;
  z-index:3;
  padding-top:clamp(32px, 6vw, 76px);
  min-height: clamp(520px, 70vh, 760px);
}

/* Left: identity */
.hero-identity{
  position:absolute;
  left: clamp(24px, 4vw, 64px);
  bottom: 30px;
}

.hero-identity .kicker{
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px 0;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}

.hero-identity h1{
  margin:0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight:500;
  text-transform:uppercase;
  margin-bottom: 18px;
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1.02;
  letter-spacing: .015em;
}

.hero-mission{
  margin: 0;
  max-width: 42rem;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--muted);
}

/* Right: figure panel (currently unused div, kept as-is) */
.figure-wrap{
  display:flex;
  justify-content:flex-end;
  align-items:flex-end;
}

/* Curved threshold */
.hero-curve{
  position:absolute;
  left:0;
  right:0;
  bottom:-2px;
  height: clamp(170px, 20vw, 300px);
  z-index:2;
  pointer-events:none;
}
.hero-curve svg{
  display:block;
  width:100%;
  height:100%;
}

.inline-action{
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(165,0,32,.35);
}
.inline-action:hover{
  border-bottom-color: var(--accent);
}

/* Responsive */
@media (max-width: 900px){
  .hero .inner{
    grid-template-columns:1fr;
    align-items:start;
    padding-bottom:160px;
  }
  .figure-wrap{ justify-content:flex-start; }
  .hero-identity{ max-width: 92vw; }
}
@media (max-width: 520px){
  .hero-identity h1{ font-size: clamp(30px, 9vw, 40px); }
}

@media (max-width: 900px){
  .hero-identity{
    position:static;
    padding: 0 var(--pad);
    margin-top: 24px;
  }
}/* =========================================================
   HOME — SECTION 2: The Order (Definition)
   Goal: image bottom flush to red band, heads can rise into white space
   ========================================================= */

.section--order-definition{
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.00),
    rgba(0,0,0,0.015),
    rgba(0,0,0,0.06)
  );
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,0.18);
  overflow: visible; /* allow heads to break out */
}

.order-definition-inner{
  width: min(90%, 100%);
  margin: 0 auto;
  padding-left: var(--pad, clamp(20px, 4vw, 64px));
  padding-right: var(--pad, clamp(20px, 4vw, 64px));
  backdrop-filter: blur(1px);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: visible; /* critical */
}

.order-definition-rule{
  height: 1px;
  background: rgba(0,0,0,.12);
}
.order-definition-rule.top{
  margin-bottom: clamp(28px, 4vw, 36px);
}

.order-definition-head{
  margin-bottom: clamp(20px, 3vw, 28px);
}

/* BODY: text left, reserve space right for the figure */

/* reserve enough space so the image NEVER overlaps text */
.order-definition-body{
  position: relative;
  display: block;
  padding-right: min(680px, 56%);
  padding-bottom: 40px; /* start here */
}

/* keep image pushed to the right and above any “mask” layers */
.section--order-definition{
  position: relative;
  z-index: 10;
  isolation: isolate; /* prevents outside overlays from clipping inside layers */
}

.order-definition-figure{
  position: absolute;
  right: -200px;  /* was 0px */   /* pushes it right so it stops covering text */
  bottom: 0;
  width: auto;    /* IMPORTANT: no width clamp when we’re controlling by height */
  z-index: 999;   /* force above header/arch overlays */
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  pointer-events: none;
}


/* COPY */
.order-definition-copy p{
  margin: 0 0 20px;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.7;
  opacity: .92;
}
.order-definition-copy p:last-child{ margin-bottom: 0; }


.order-definition-figure img{
  width: auto;
  height: 620px;      /* start here */
  max-height: none;
  display: block;
  transform: none; /* remove translateX */ /* pushes it right visually, without layout overflow */
}

/* CLOSURE BAND */
.order-definition-closure{
  position: relative;
  margin-top: 0;
  height: 150px;
  padding: 14px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(123, 30, 30, 1);
  z-index: 1;

  /* 🔥 THIS IS THE FIX */
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
}

.order-definition-closure .rule{
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0,0,0,0.12);
}

.order-definition-closure img{
  width: 150px;
  height: auto;
}

.section--order-definition{
  overflow-x: clip;   /* prevents horizontal scrollbar */
  overflow-y: visible; /* still allows heads to rise */
}

.order-definition-body{
  overflow-x: clip !important;
  overflow-y: visible !important;
}

/* Responsive: stack the figure under text on narrow view */
@media (max-width: 900px){
  .order-definition-figure{
    display: none !important;
  }
  .order-definition-body{
    padding-right: 0 !important;
  }
}/* =========================================================
   HOME — SECTION 3: History & Continuity
   ========================================================= */

.section--history{
  padding: 0 2rem;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.12);
}

/* Header */
.history-head{
  max-width: 150ch;
  margin: 0 auto 0px;
  text-align: center;
  padding: 24px 0 0;
}

.hc-lede{
  margin: 0;
  line-height: 1.55;
  opacity: 0.92;
}

/* Frame */
.history-frame{
  display: block;
  align-items: stretch;
}

/* LEFT */
.history-record{
  padding: 0 40px;
}

.record-list{
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}
.record-list li{ margin: 10px 0; }

.record-foot{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.16);
  opacity: 0.9;
  line-height: 1.55;
}

/* RIGHT */
.history-rail{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(360px, 1fr);
  overflow-x: auto;
}

.history-period{
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.period-label{
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  opacity: 0.65;
}

.history-period h3{
  margin: 6px 0 10px;
  font-size: 1.15rem;
}

.history-period p{
  margin: 0 0 16px;
  line-height: 1.55;
  max-width: 42ch;
}

.period-media{
  margin-top: auto;
  height: 250px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.03);
}

.history-period::before{
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 3px;
}

/* Mobile */
@media (max-width: 900px){
  .history-frame{ grid-template-columns: 1fr; }
  .history-record{
    border-right: 0;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    padding-bottom: 32px;
  }
}/* =========================================================
   HOME — SECTION 4: Recent Work
   Clean reset
   ========================================================= */

/* -----------------------------------------
   Recent Work — Header Structure Fix
----------------------------------------- */

.section--recent-work .priory-record-title{
  margin-bottom: 10px;
}

.section--recent-work .section-subline{
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 auto;
  max-width: 680px;
}


.section--recent-work{
  --rw-paper: #ffffff;
  --rw-ink: #18212b;
  --rw-body: #2f2f2f;
  --rw-band: #bf0d23;

  padding: clamp(60px, 7vw, 96px) 0;
  padding-top: 10px;
  position: relative;
  padding-top: clamp(36px, 4vw, 56px);
  padding-bottom: clamp(64px, 7vw, 96px);
  background: #e2e0dc;
}

.section--recent-work::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:90px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0),
    rgba(0,0,0,0.04)
  );
  pointer-events:none;
}

.recent-work-inner{
  margin: 0 auto;
  padding: 0 clamp(12px, 2vw, 28px);
}

.recent-work-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.4vw, 18px);
  align-items: stretch;
  padding: 0 2rem;
}

.recent-work-panel{
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: transparent;
  overflow: visible;
}

.recent-work-panel-top{
  min-height: 90px;
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.recent-work-panel-title{
  margin: 0;
  font-size: clamp(1.08rem, 1.05vw, 1.18rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--rw-ink);
  text-wrap: balance;
}

.recent-work-panel-band{
  position: relative;
  margin-bottom: 18px;
  z-index: 1;
}

/* top notch */
.recent-work-panel-band::before{
  content:"";
  position:absolute;
  top:0;
  left:50%;
  transform: translate(-50%, -100%);
  width:0;
  height:0;
  border-left:18px solid transparent;
  border-right:18px solid transparent;
  border-bottom:18px solid var(--rw-band);
  z-index: 3;
}

/* bottom notch */
.recent-work-panel-band::after{
  content:"";
  position:absolute;
  bottom:0;
  left:50%;
  transform: translate(-50%, 100%);
  width:0;
  height:0;
  border-left:18px solid transparent;
  border-right:18px solid transparent;
  border-top:18px solid var(--rw-band);
  z-index: 3;
}

.recent-work-panel-media{
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f3f1ec;
  border: 2px solid var(--rw-band);
  box-shadow:
    0 2px 5px rgba(0,0,0,.12),
    0 1px 0 rgba(255,255,255,.25) inset;
}

.recent-work-panel-media img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: none;
  transform: scale(0.96);
}

.recent-work-panel-media::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.recent-work-panel-body{
  flex: 1 1 auto;
  padding: 26px 22px 22px;
  background: var(--rw-paper);
  margin-top: 10px;
}

.recent-work-panel-divider{
  width: 42px;
  height: 2px;
  margin: 0 auto 12px;
  background: #c7c2b8;
}

.recent-work-panel-teaser{
  max-width: 28ch;
  margin: 0 auto;
  font-size: 125%;
  line-height: 1.68;
  color: var(--rw-body);
  text-align: center;
}

.recent-work-panel-foot{
  height: 16px;
  background: linear-gradient(to bottom, #f5f3ee, #ebe7df);
  border-top: 1px solid rgba(0,0,0,.08);
}

.recent-work-empty{
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  color: #444;
}

@media (max-width: 1180px){
  .recent-work-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .recent-work-panel-top{
    min-height: 82px;
  }
}

@media (max-width: 640px){
  .section--recent-work{
    padding: 50px 0 62px;
  }

  .recent-work-head{
    margin-bottom: 26px;
  }

  .recent-work-grid{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .recent-work-panel-top{
    min-height: auto;
    padding: 18px 16px 14px;
  }

  .recent-work-panel-band{
    margin-bottom: 16px;
  }

  .recent-work-panel-band::before,
  .recent-work-panel-band::after{
    border-left-width: 14px;
    border-right-width: 14px;
  }

  .recent-work-panel-band::before{
    border-bottom-width: 14px;
  }

  .recent-work-panel-band::after{
    border-top-width: 14px;
  }

  .recent-work-panel-media{
    border-width: 3px;
  }

  .recent-work-panel-body{
    padding: 22px 16px 16px;
  }

  .recent-work-panel-teaser{
    font-size: .95rem;
    line-height: 1.6;
  }
}/* =========================================================
   HOME — SECTION 5: Formation & Discipline
   ========================================================= */

.section--formation-evidence{
  background: var(--paper);
}

.formation-evidence-inner{
  max-width: none;
  margin: 0 auto;
  padding-left: clamp(48px, 6vw, 96px);
  padding-right: clamp(48px, 6vw, 96px);
  padding-bottom: clamp(25px, 5vw, 60px);
  padding-top: clamp(25px, 5vw, 60px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.formation-evidence-media{ margin: 0; }

.formation-evidence-img{
  width: 100%;
  height: clamp(240px, 30vw, 380px);
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.formation-evidence-body{
  border-top: 2px solid rgba(140,0,0,0.20);
  padding-top: 16px;
}
.formation-evidence-body p{
  margin: 0 0 14px 0;
  line-height: 1.65;
}
.formation-evidence-closing{
  margin-top: 18px;
  font-weight: 500;
}

@media (max-width: 900px){
  .formation-evidence-inner{ grid-template-columns: 1fr; }
  .formation-evidence-img{ height: clamp(260px, 56vw, 460px); }
}/* =========================================================
   HOME — SECTION 6: Paths of Participation
   Includes the hover effect you want to keep
   ========================================================= */

.paths-inner{ margin: 0 auto; }
.paths-head{ text-align: center; }

.paths-title{
  font-family: var(--serif, ui-serif, Georgia, "Times New Roman", serif);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: .02em;
  color: var(--ink);
  margin: 0;
}

.paths-lede{
  margin: 10px auto 0;
  color: var(--muted);
  line-height: 1.55;
}

.paths-rule{
  margin: 16px auto 0;
  border: 0;
  height: 2px;
  background: var(--accent);
  width: min(72ch, 100%);
}

.paths-acct{
  max-width: 90ch;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
  text-align: center;
}

/* --- Hover card system (your current effect) --- */

.cards{
  width: 100%;
  display: flex;
  justify-content: center;
}

.card--1 .card__img, .card--1 .card__img--hover{ background-image: url('/assets/images/card1.jpg'); }
.card--2 .card__img, .card--2 .card__img--hover{ background-image: url('/assets/images/card3a.png'); }
.card--3 .card__img, .card--3 .card__img--hover{ background-image: url('/assets/images/card3b.png'); }

.card__img{
  visibility: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 235px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.card__img--hover{
  transition: 0.2s all ease-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  position: absolute;
  height: 235px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  top: 0;
}

.card{
  margin-right: 25px;
  transition: all .4s cubic-bezier(0.175, 0.885, 0, 1);
  background-color: #fff;
  width: 33.3%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0px 13px 10px -7px rgba(0, 0, 0,0.1);
  border: 1px solid #CCC;
}

.card:hover{
  box-shadow: 0px 30px 18px -8px rgba(0, 0, 0,0.1);
}

.card__info{
  z-index: 2;
  background-color: #fff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 16px 24px 24px 24px;
}

.card__category{
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 500;
  color: #868686;
}

.card__title{
  margin-top: 5px;
  margin-bottom: 10px;
  font-family: 'Roboto Slab', serif;
}

.card__by{
  font-size: 12px;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
}

.card__author{
  font-weight: 600;
  text-decoration: none;
  color: #AD7D52;
}

.card:hover .card__img--hover{
  height: 100%;
  opacity: 0.15;
}

.card:hover .card__info{
  background-color: transparent;
  position: relative;
}
/* =========================================================
   HOME — TABLET FIX LAYER
   Adds the missing middle breakpoint between desktop and phone
   ========================================================= */

@media (max-width: 1100px){

  .order-definition-body{
    padding-right: 30%;
  }

  .history-rail{
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    gap: 24px;
  }

  .formation-evidence-inner{
    grid-template-columns: 1fr;
  }

  .cards{
    flex-wrap: wrap;
  }

  .card{
    width: 48%;
    margin-bottom: 20px;
  }
}

@media (max-width: 640px){
  .history-rail{
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
}

@media (max-width: 1500px) and (min-width: 901px){
  .section--order-definition .order-definition-figure{
    right: -260px !important;
  }

  .section--order-definition .order-definition-figure img{
    height: 520px !important;
  }
}

@media (max-width: 900px){
  .hero-identity{
    position: relative;
    z-index: 5;
    max-width: calc(100% - 48px);
    margin: 28px auto 0;
    padding: 22px 24px;
    background: rgba(255,255,255,.82);
    border-left: 3px solid var(--accent);
    box-shadow: 0 10px 28px rgba(0,0,0,.10);
  }

  .hero-identity h1{
    font-size: clamp(30px, 7vw, 46px);
    line-height: 1.08;
  }
}
