/* ============================================================
   Passionist Archives — St Joseph's Province
   passionistarchives.co.uk
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --white:        #ffffff;
  --black:        #070707;
  --yellow:       #fee86d;
  --yellow-dark:  #e8cc3a;
  --grey-light:   #f8f9fa;
  --grey-border:  #e1e1e3;
  --grey-mid:     #888888;
  --grey-dark:    #333333;

  --font-body:    'Inter', sans-serif;
  --font-display: 'Old Standard TT', serif;

  --max-w:    1200px;
  --max-w-sm: 820px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  --transition: 0.2s ease;
  --shadow-sm: 0 1px 4px rgba(7,7,7,0.07);
  --shadow-md: 0 4px 20px rgba(7,7,7,0.13);
}

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.75rem;
  line-height: 1.7;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

p { margin-bottom: 1.5em; }
p:last-child { margin-bottom: 0; }

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--black);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0.5rem; }

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: clamp(3.4rem, 6vw, 6.4rem); }
h2 { font-size: clamp(2.6rem, 4vw, 4rem); }
h3 { font-size: clamp(2rem, 3vw, 2.8rem); }
h4 { font-size: 2rem; }

.section-label {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-mid);
  display: block;
  margin-bottom: 0.8rem;
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.container--narrow {
  max-width: var(--max-w-sm);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 1.3rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo__mark {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--black);
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-logo__name {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--black);
}

.site-logo__sub {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--grey-mid);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Navigation */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav li {
  position: relative;
}

.site-nav > ul > li > a {
  display: block;
  padding: 0.55rem 0.9rem;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--black);
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.site-nav > ul > li > a:hover,
.site-nav > ul > li > a:focus {
  border-bottom-color: var(--yellow);
  outline: none;
}

/* Dropdown */
.has-dropdown { position: relative; }

.dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-top: 3px solid var(--yellow);
  min-width: 26rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.8rem;
  gap: 0;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li { display: block; }

.dropdown a {
  display: block;
  font-size: 1.35rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-left: 2px solid transparent;
  color: var(--grey-dark);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
  border-bottom: none;
}

.dropdown a:hover {
  border-left-color: var(--yellow);
  background: var(--grey-light);
  color: var(--black);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--grey-border);
  cursor: pointer;
  padding: 0.7rem;
  flex-direction: column;
  gap: 5px;
  border-radius: 2px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--black);
  color: var(--white);
  padding-block: var(--space-xl);
  position: relative;
  overflow: hidden;
}

/* Decorative watermark */
.hero::before {
  content: 'C·P';
  position: absolute;
  right: -3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(14rem, 28vw, 30rem);
  font-style: italic;
  color: rgba(255,255,255,0.035);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

.hero__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.hero__label {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.0;
  color: var(--white);
  margin-bottom: var(--space-md);
  max-width: 14ch;
}

.hero__title em {
  font-style: normal;
  color: var(--yellow);
}

.hero__rule {
  width: 5.5rem;
  height: 3px;
  background: var(--yellow);
  border: none;
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  max-width: 52ch;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 700;
  padding: 1.1rem 2.2rem;
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
}

.btn--yellow {
  background: var(--yellow);
  color: var(--black);
}

.btn--yellow:hover {
  background: var(--yellow-dark);
  transform: translateX(3px);
}

/* ============================================================
   SECTION WRAPPERS
   ============================================================ */
.section {
  padding-block: var(--space-lg);
}

.section--grey { background: var(--grey-light); }

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--grey-border);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 3.5vw, 3.4rem);
}

.section__more {
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  color: var(--grey-dark);
  transition: color var(--transition);
  flex-shrink: 0;
}
.section__more:hover { color: var(--black); }

/* ============================================================
   FEATURED FIGURES
   ============================================================ */
.figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--grey-border);
}

.figure-card {
  display: grid;
  grid-template-rows: 30rem 1fr;
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  transition: opacity var(--transition);
}

.figure-card:hover { opacity: 0.95; }

.figure-card__image {
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.figure-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.75;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.figure-card:hover .figure-card__image img {
  opacity: 0.85;
  transform: scale(1.04);
}

.figure-card__placeholder {
  font-family: var(--font-display);
  font-size: 9rem;
  font-style: italic;
  color: rgba(255,255,255,0.06);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.figure-card__body {
  padding: 2.5rem var(--space-md) var(--space-lg);
  border-top: 3px solid var(--yellow);
}

.figure-card__label {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  display: block;
  margin-bottom: 0.9rem;
}

.figure-card__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 3.5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.figure-card__dates {
  font-size: 1.45rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  margin-bottom: var(--space-sm);
  font-style: italic;
  font-family: var(--font-display);
}

.figure-card__excerpt {
  font-size: 1.55rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  max-width: 58ch;
  margin-bottom: var(--space-md);
}

.figure-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--yellow);
  border-bottom: 1px solid rgba(254,232,109,0.35);
  padding-bottom: 2px;
  transition: border-color var(--transition);
}

.figure-card__link:hover { border-bottom-color: var(--yellow); }
.figure-card__link::after { content: ' →'; }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-section__text h2 { margin-bottom: var(--space-md); }

.about-section__text p {
  color: var(--grey-dark);
  font-size: 1.7rem;
}

.about-section__text .text-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color var(--transition);
}
.about-section__text .text-link:hover { color: var(--grey-mid); }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--grey-border);
  border: 1px solid var(--grey-border);
}

.stat-box {
  background: var(--white);
  padding: var(--space-md);
}

.stat-box--yellow {
  background: var(--yellow);
}

.stat-box__number {
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-box__label {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--grey-dark);
  line-height: 1.35;
}

/* ============================================================
   HOUSES GRID
   ============================================================ */
.houses-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--grey-border);
  border: 1px solid var(--grey-border);
}

.house-card {
  background: var(--white);
  padding: 2rem 1.6rem 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: background var(--transition);
  border-left: 2px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.house-card:hover {
  background: var(--grey-light);
  border-left-color: var(--yellow);
}

.house-card__cross {
  font-size: 1.6rem;
  margin-bottom: 0.7rem;
  color: var(--grey-border);
  line-height: 1;
  transition: color var(--transition);
}

.house-card:hover .house-card__cross { color: var(--yellow); }

.house-card__name {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.3rem;
  color: var(--black);
}

.house-card__place {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--grey-mid);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ============================================================
   ARCHIVE PANEL
   ============================================================ */
.archive-panel {
  background: var(--black);
  color: var(--white);
  padding-block: var(--space-lg);
}

.archive-panel__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-xl);
  align-items: start;
}

.archive-panel__heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 4.5vw, 5rem);
  font-style: italic;
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

.archive-panel__heading em {
  font-style: normal;
  color: var(--yellow);
}

.archive-panel__desc {
  font-size: 1.55rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.collections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.collection-item {
  padding: 1.6rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
}

.collection-item__icon {
  font-size: 1.9rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.15rem;
}

.collection-item__name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  color: var(--white);
}

.collection-item__desc {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.45;
}

.collection-item__desc a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.65);
  border-top: 3px solid var(--yellow);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-md);
}

.site-footer__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.footer-brand__sub {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--space-md);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.footer-brand__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: rgba(254,232,109,0.7);
}

.footer-col__heading {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1.2rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  font-size: 1.4rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.28);
  gap: var(--space-sm);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .houses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .about-section {
    gap: var(--space-lg);
  }
  .archive-panel__inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: span 2; }
}

/* Mobile */
@media (max-width: 768px) {

  /* Mobile Nav overlay */
  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 200;
    padding: 8rem var(--space-md) var(--space-md);
    overflow-y: auto;
  }
  .site-nav.is-open { display: block; }

  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }

  .site-nav > ul > li > a {
    color: var(--white);
    font-size: 1.9rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-bottom-width: 1px;
    width: 100%;
  }
  .site-nav > ul > li > a:hover,
  .site-nav > ul > li > a:focus {
    color: var(--yellow);
    border-bottom-color: rgba(255,255,255,0.08);
  }

  .dropdown {
    position: static;
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0.4rem 0 0.4rem var(--space-sm);
    grid-template-columns: 1fr;
  }

  .dropdown a {
    color: rgba(255,255,255,0.55);
    font-size: 1.55rem;
    padding: 0.45rem 0;
    border-left: none;
    background: none;
  }
  .dropdown a:hover { color: var(--yellow); background: none; }

  .nav-toggle { display: flex; position: relative; z-index: 300; }

  .nav-toggle.is-open {
    position: fixed;
    top: 1.2rem;
    right: var(--space-md);
  }
  .nav-toggle.is-open span { background: var(--white); }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Layout stacking */
  .figures { grid-template-columns: 1fr; }
  .figure-card { grid-template-rows: 22rem 1fr; }
  .about-section { grid-template-columns: 1fr; gap: var(--space-lg); }
  .houses-grid { grid-template-columns: repeat(2, 1fr); }
  .collections-grid { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4.5rem;
  }
  .houses-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-block: 5rem; }
}
