/* ===========================================================
   DMI THEOLOGICAL SEMINARY (DTS)
   styles.css
   =========================================================== */

:root{
  --ink:        #0E1A34;   /* midnight chapel blue */
  --ink-deep:   #081029;
  --ink-soft:   #1C2C50;
  --brass:      #C79A3C;
  --brass-lite: #E3C889;
  --oxblood:    #6E1D2A;
  --paper:      #F1ECE1;
  --paper-warm: #E7E0D0;
  --slate:      #5C6B85;
  --line:       rgba(14,26,52,.16);
  --line-lite:  rgba(241,236,225,.18);

  --wrap: 1120px;
  --serif: "Spectral", Georgia, serif;
  --sans:  "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }

/* The hidden attribute must beat any display value set by a class below
   (.modal uses display:grid, .bot__panel uses display:flex). Without this,
   the popup and the chat panel stay on screen permanently. */
[hidden]{ display:none !important; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--serif);
  font-size:18px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}

a{ color:inherit; }

.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;
}

:focus-visible{
  outline:2px solid var(--brass);
  outline-offset:3px;
}

/* =========================================================
   1. VERIFICATION GATE
   ========================================================= */
.gate{
  position:fixed; inset:0; z-index:2000;
  display:grid; place-items:center;
  padding:24px;
  background:
    radial-gradient(1000px 600px at 50% -10%, #17264a 0%, transparent 60%),
    var(--ink-deep);
}
.gate.is-leaving{ opacity:0; transition:opacity .45s ease; pointer-events:none; }

.gate__card{
  width:min(440px,100%);
  text-align:center;
  color:var(--paper);
  padding:44px 32px 30px;
  border:1px solid rgba(199,154,60,.35);
  background:rgba(255,255,255,.03);
}

.gate__seal{
  width:66px; height:66px; margin:0 auto 22px;
  display:grid; place-items:center;
  border:1px solid var(--brass);
  color:var(--brass);
  font-family:var(--sans); font-weight:700; letter-spacing:.06em; font-size:17px;
  border-radius:50% 50% 4px 4px / 62% 62% 4px 4px;
}

.gate__title{
  font-size:26px; font-weight:400; line-height:1.25;
  margin:0 0 8px;
}
.gate__sub{ margin:0 0 26px; font-size:15.5px; color:rgba(241,236,225,.66); }

.gate__check{
  width:100%;
  display:flex; align-items:center; gap:14px;
  padding:16px 18px;
  font-family:var(--sans); font-size:15px;
  color:var(--paper);
  background:rgba(241,236,225,.05);
  border:1px solid rgba(241,236,225,.22);
  cursor:pointer;
  transition:border-color .2s ease, background .2s ease;
}
.gate__check:hover{ border-color:var(--brass); background:rgba(199,154,60,.08); }
.gate__check[disabled]{ cursor:default; opacity:.85; }

.gate__box{
  width:22px; height:22px; flex:0 0 22px;
  border:1px solid rgba(241,236,225,.5);
  position:relative;
}
.gate__check.is-checked .gate__box{ border-color:var(--brass); background:var(--brass); }
.gate__check.is-checked .gate__box::after{
  content:""; position:absolute; left:7px; top:3px;
  width:6px; height:11px;
  border:solid var(--ink-deep); border-width:0 2px 2px 0;
  transform:rotate(45deg);
}

.gate__challenge{ margin-top:22px; }
.gate__question{ font-size:16px; margin:0 0 14px; color:rgba(241,236,225,.8); }
.gate__question strong{ color:var(--brass-lite); font-weight:400; }

.gate__options{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.gate__options button{
  min-width:62px; padding:11px 16px;
  font-family:var(--sans); font-size:16px;
  color:var(--paper);
  background:transparent;
  border:1px solid rgba(241,236,225,.28);
  cursor:pointer;
  transition:background .18s ease, border-color .18s ease;
}
.gate__options button:hover{ background:var(--brass); border-color:var(--brass); color:var(--ink-deep); }

.gate__error{ color:#E39A9A; font-size:14px; margin:14px 0 0; }
.gate__foot{
  margin:28px 0 0; font-size:13px; line-height:1.6;
  color:rgba(241,236,225,.42);
  font-family:var(--sans);
}

/* =========================================================
   2. MASTHEAD
   ========================================================= */
.masthead{
  position:sticky; top:0; z-index:900;
  display:flex; align-items:center; justify-content:space-between;
  gap:20px;
  padding:14px 28px;
  background:var(--ink-deep);
  color:var(--paper);
  border-bottom:1px solid rgba(199,154,60,.3);
}

.brand{ display:flex; align-items:center; gap:14px; text-decoration:none; }

.brand__logo{
  width:46px; height:46px; flex:0 0 46px;
  display:grid; place-items:center;
  border:1px solid var(--brass); color:var(--brass);
  font-family:var(--sans); font-weight:700; font-size:14px; letter-spacing:.05em;
  border-radius:50% 50% 3px 3px / 60% 60% 3px 3px;
  overflow:hidden;
  object-fit:cover;   /* takes effect when this class sits directly on an <img> */
}
.brand__logo img{ width:100%; height:100%; object-fit:cover; }

.brand__text{ display:flex; flex-direction:column; line-height:1.25; }
.brand__name{ font-size:18px; }
.brand__place{ font-family:var(--sans); font-size:12px; color:rgba(241,236,225,.55); }

.nav{ display:flex; align-items:center; gap:26px; font-family:var(--sans); font-size:14.5px; }
.nav a{ text-decoration:none; color:rgba(241,236,225,.82); padding:6px 0; border-bottom:1px solid transparent; }
.nav a:hover{ color:var(--paper); border-bottom-color:var(--brass); }
.nav .nav__cta{
  color:var(--ink-deep); background:var(--brass);
  padding:9px 18px; border-bottom:0;
}
.nav .nav__cta:hover{ background:var(--brass-lite); }

.navtoggle{ display:none; }

/* =========================================================
   3. HERO / VERSE
   ========================================================= */
.hero{
  position:relative;
  overflow:hidden;        /* keeps the full-bleed logo from spilling outside the section */
  background:
    radial-gradient(900px 520px at 22% 0%, #1A2B52 0%, transparent 62%),
    var(--ink);
  color:var(--paper);
  padding:96px 28px 88px;
}
.hero__inner{
  position:relative;      /* lifts the text above the logo */
  z-index:1;
  max-width:820px;
  margin:0 auto;
}

/* Logo spans the full hero section as a soft, transparent backdrop behind
   the verse text. Drop your logo at images/logo.png. If that file doesn't
   exist yet, the image removes itself, so no broken-image icon and no gap. */
.hero__logo{
  position:absolute;
  inset:0;                /* top:0; right:0; bottom:0; left:0 */
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.18;             /* tune this — lower = more transparent */
  z-index:-1;              /* negative so it paints below the static text, not just "z-index:0 above" */
  margin:0;
  pointer-events:none;     /* belt-and-braces: never intercepts clicks or text selection */
}

.hero__eyebrow{
  font-family:var(--sans); font-size:13px; letter-spacing:.02em;
  color:var(--brass); margin:0 0 26px;
}

.verse{ margin:0; }
.verse__text{
  font-size:clamp(28px, 4.4vw, 46px);
  font-style:italic; font-weight:300;
  line-height:1.38;
  margin:0;
  min-height:1.38em;
}
.verse__ref{
  font-family:var(--sans); font-size:15px; letter-spacing:.02em;
  color:var(--brass-lite);
  margin-top:24px;
  opacity:0; transition:opacity .5s ease;
}
.verse__ref.is-shown{ opacity:1; }

.caret{
  display:inline-block; width:2px; height:.92em;
  background:var(--brass); margin-left:3px;
  vertical-align:-.08em;
  animation:blink 1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity:0; } }
.caret.is-done{ display:none; }

.hero__note{
  font-family:var(--sans); font-size:25px;
  color:greenyellow;
  margin:38px 0 0;
}

.hero__actions{ display:flex; flex-wrap:wrap; gap:14px; margin-top:34px; }

.hero__rule{
  position:absolute; left:0; right:0; bottom:0; height:4px;
  background:linear-gradient(90deg, var(--brass) 0%, var(--oxblood) 55%, transparent 100%);
  z-index:1;
}

/* =========================================================
   4. BUTTONS
   ========================================================= */
.btn{
  display:inline-block;
  font-family:var(--sans); font-size:14.5px; font-weight:500;
  padding:13px 26px;
  text-decoration:none;
  border:1px solid transparent;
  cursor:pointer;
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.btn--brass{ background:var(--brass); color:var(--ink-deep); }
.btn--brass:hover{ background:var(--brass-lite); }
.btn--ghost{ border-color:currentColor; background:transparent; color:inherit; }
.btn--ghost:hover{ background:rgba(199,154,60,.14); }
.btn--sm{ padding:9px 16px; font-size:13.5px; margin-top:14px; }

/* =========================================================
   5. SECTIONS
   ========================================================= */
.section{ padding:84px 28px; }
.section > *{ max-width:var(--wrap); margin-left:auto; margin-right:auto; }

.section--ink{ background:var(--ink); color:var(--paper); }
.section--paper{ background:var(--paper-warm); }

.section__head{ margin-bottom:46px; max-width:640px; }
.section__head h2{
  font-size:clamp(26px,3vw,34px); font-weight:400;
  margin:0 0 12px; line-height:1.25;
}
.section__head p{ margin:0; color:var(--slate); font-size:17px; }
.section--ink .section__head p{ color:rgba(241,236,225,.6); }

/* ---- Registry list (programmes) ---- */
.registry{ list-style:none; margin:0; padding:0; border-top:1px solid var(--line); }
.registry li{
  display:flex; align-items:baseline; justify-content:space-between; gap:24px;
  padding:19px 4px;
  border-bottom:1px solid var(--line);
}
.registry__name{ font-size:20px; }
.registry__meta{
  font-family:var(--sans); font-size:14px; color:var(--slate);
  white-space:nowrap;
}
.registry .tag{
  font-family:var(--sans); font-style:normal; font-size:11.5px;
  color:var(--paper); background:var(--oxblood);
  padding:3px 8px; margin-left:10px; vertical-align:2px;
}
.registry .sub{
  display:block; font-style:normal;
  font-family:var(--sans); font-size:13px; color:var(--slate);
}

/* ---- Ministry panels ---- */
.panels{
  display:grid; gap:1px;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  background:rgba(241,236,225,.14);
  border:1px solid rgba(241,236,225,.14);
}
.panel{ background:var(--ink); padding:30px 26px; }
.panel h3{
  font-size:19px; font-weight:400; margin:0 0 12px;
  color:var(--brass-lite);
}
.panel p{ margin:0; font-size:16px; color:rgba(241,236,225,.72); }
.plain{ list-style:none; margin:0; padding:0; columns:2; font-size:16px; color:rgba(241,236,225,.72); }
.plain li{ padding:2px 0; }

/* ---- Honours ---- */
.honours{
  list-style:none; margin:0; padding:0;
  display:grid; gap:14px;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
}
.honours li{
  font-size:18px;
  padding:20px 22px;
  border-left:3px solid var(--brass);
  background:rgba(14,26,52,.04);
}

/* ---- Leadership ---- */
.people{
  display:grid; gap:40px 30px;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
}
.person{ margin:0; text-align:center; }
.person__frame{
  aspect-ratio:3/4;
  overflow:hidden;
  border:1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(14,26,52,.045) 0 10px, transparent 10px 20px),
    var(--paper);
  border-radius:50% 50% 4px 4px / 34% 34% 4px 4px;
}
.person__frame img{ width:100%; height:100%; object-fit:cover; }
.person__frame img.is-missing{ opacity:0; }

.person figcaption{ margin-top:16px; display:flex; flex-direction:column; gap:3px; }
.person__name{ font-size:18px; }
.person__rank{ font-family:var(--sans); font-size:13px; color:var(--oxblood); }

/* ---- About ---- */
.about{ max-width:720px; }
.about h2{ font-size:clamp(26px,3vw,34px); font-weight:400; margin:0 0 20px; }
.about__body{ color:rgba(241,236,225,.78); font-size:17.5px; }
.about__body p{ margin:0 0 16px; }
.about__body p:last-child{ margin-bottom:28px; }

/* ---- Contact ---- */
.contact{
  display:grid; gap:34px;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}
.contact__block h3{
  font-family:var(--sans); font-size:13px; font-weight:600;
  color:var(--oxblood); margin:0 0 10px;
}
.contact__block p{ margin:0; font-size:17px; line-height:1.85; }
.contact__block a{ text-decoration:none; border-bottom:1px solid var(--line); }
.contact__block a:hover{ border-bottom-color:var(--brass); }
.contact__block .sub{ font-family:var(--sans); font-size:12px; color:var(--slate); }

/* ---- Footer ---- */
.footer{
  background:var(--ink-deep); color:rgba(241,236,225,.6);
  padding:46px 28px;
  text-align:center;
  font-family:var(--sans); font-size:13.5px;
  line-height:1.9;
}
.footer__name{ color:var(--brass); font-family:var(--serif); font-size:18px; margin:0 0 6px; }
.footer__meta, .footer__copy{ margin:0; }
.footer__copy{ color:rgba(241,236,225,.34); margin-top:14px; }

/* =========================================================
   6. INFO MODAL
   ========================================================= */
.modal{ position:fixed; inset:0; z-index:1500; display:grid; place-items:center; padding:20px; }
.modal__backdrop{ position:absolute; inset:0; background:rgba(8,16,41,.75); }

.modal__panel{
  position:relative;
  width:min(720px,100%);
  max-height:86vh;
  display:flex; flex-direction:column;
  background:var(--paper);
  border-top:4px solid var(--brass);
  box-shadow:0 30px 70px rgba(8,16,41,.45);
  animation:rise .28s ease;
}
@keyframes rise{ from{ transform:translateY(14px); opacity:0; } }

.modal__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 26px 16px;
  border-bottom:1px solid var(--line);
}
.modal__head h2{ margin:0; font-size:24px; font-weight:400; }
.modal__close{
  background:none; border:0; cursor:pointer;
  font-size:30px; line-height:1; color:var(--slate);
  padding:0 4px;
}
.modal__close:hover{ color:var(--oxblood); }

.modal__body{
  overflow-y:auto;
  padding:24px 26px 32px;
  font-size:17px;
}
.modal__body h3{
  font-family:var(--sans); font-size:13.5px; font-weight:600;
  color:var(--oxblood); margin:26px 0 8px;
}
.modal__body h3:first-child{ margin-top:0; }
.modal__body p{ margin:0 0 15px; }
.modal__body ul{ margin:0 0 15px; padding-left:20px; }
.modal__body li{ margin-bottom:6px; }
.modal__body a{ color:var(--ink); }

body.is-locked{ overflow:hidden; }

/* =========================================================
   7. FLOATING BOT
   ========================================================= */
.bot{
  position:fixed;
  right:max(22px, env(safe-area-inset-right));
  bottom:max(22px, env(safe-area-inset-bottom));
  z-index:1200;
}

.bot__launcher{
  display:flex; align-items:center; gap:12px;
  padding:10px 20px 10px 12px;
  background:var(--ink);
  color:var(--paper);
  border:1px solid var(--brass);
  border-radius:40px;
  font-family:var(--sans); font-size:14px;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(8,16,41,.34);
  transition:background .2s ease;
}
.bot__launcher:hover{ background:var(--ink-soft); }

.bot__icon{
  width:42px; height:42px; flex:0 0 42px;
  display:grid; place-items:center;
  background:var(--brass); color:var(--ink-deep);
  border-radius:50%;
}
.bot__label{ white-space:nowrap; }

.bot__launcher.is-nudging .bot__icon{ animation:nudge 2.6s ease-in-out 3; }
@keyframes nudge{
  0%,88%,100%{ transform:translateY(0); }
  92%{ transform:translateY(-5px); }
  96%{ transform:translateY(-2px); }
}

.bot__panel{
  position:absolute; right:0; bottom:0;
  width:min(360px,calc(100vw - 32px));
  height:min(520px,calc(100vh - 48px));
  display:flex; flex-direction:column;
  background:var(--paper);
  border:1px solid var(--line);
  box-shadow:0 26px 60px rgba(8,16,41,.4);
  animation:rise .24s ease;
}

.bot__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px;
  background:var(--ink); color:var(--paper);
}
.bot__title{ margin:0; font-size:17px; }
.bot__status{ margin:2px 0 0; font-family:var(--sans); font-size:12px; color:var(--brass-lite); }
.bot__close{
  background:none; border:0; color:var(--paper);
  font-size:26px; line-height:1; cursor:pointer; padding:0 2px;
}

.bot__log{
  flex:1; overflow-y:auto;
  padding:18px;
  display:flex; flex-direction:column; gap:12px;
  font-size:15.5px; line-height:1.6;
}

.msg{ max-width:88%; padding:11px 14px; }
.msg--bot{ background:#fff; border:1px solid var(--line); align-self:flex-start; }
.msg--user{ background:var(--ink); color:var(--paper); align-self:flex-end; font-family:var(--sans); font-size:14.5px; }
.msg a{ color:var(--oxblood); }

.bot__chips{
  display:flex; gap:8px; flex-wrap:wrap;
  padding:0 18px 12px;
}
.bot__chips button{
  font-family:var(--sans); font-size:12.5px;
  padding:7px 12px;
  background:transparent;
  border:1px solid var(--line);
  color:var(--ink);
  cursor:pointer;
}
.bot__chips button:hover{ background:var(--brass); border-color:var(--brass); }

.bot__form{ display:flex; border-top:1px solid var(--line); }
.bot__form input{
  flex:1; border:0; padding:15px 16px;
  font-family:var(--sans); font-size:14.5px;
  background:transparent; color:var(--ink);
}
.bot__form input:focus{ outline:none; background:rgba(199,154,60,.07); }
.bot__form button{
  border:0; padding:0 20px;
  background:var(--brass); color:var(--ink-deep);
  font-family:var(--sans); font-size:14px; font-weight:600;
  cursor:pointer;
}
.bot__form button:hover{ background:var(--brass-lite); }

/* =========================================================
   8. RESPONSIVE
   ========================================================= */

/* ---- Tablet — nav collapses, grids ease into fewer columns ---- */
@media (max-width:860px){
  body{ font-size:17px; }

  .navtoggle{
    display:block;
    width:44px; height:40px;
    background:transparent; border:1px solid rgba(241,236,225,.3);
    cursor:pointer; position:relative;
  }
  .navtoggle span{
    position:absolute; left:11px; right:11px; top:19px; height:1.5px;
    background:var(--paper);
  }
  .navtoggle span::before,.navtoggle span::after{
    content:""; position:absolute; left:0; right:0; height:1.5px; background:var(--paper);
  }
  .navtoggle span::before{ top:-6px; }
  .navtoggle span::after{ top:6px; }

  .masthead{ padding:12px 18px; }

  .nav{
    position:absolute; top:100%; left:0; right:0;
    flex-direction:column; align-items:stretch; gap:0;
    background:var(--ink-deep);
    border-bottom:1px solid rgba(199,154,60,.3);
    max-height:0; overflow:hidden;
    transition:max-height .3s ease;
  }
  .nav.is-open{ max-height:460px; overflow-y:auto; }
  .nav a{ padding:16px 22px; border-bottom:1px solid rgba(241,236,225,.09); font-size:15.5px; }
  .nav .nav__cta{ text-align:center; margin:12px 22px 18px; padding:14px; }

  .hero{ padding:56px 20px 54px; }
  .hero__note{ margin-top:30px; }
  .hero__actions{ flex-direction:column; align-items:stretch; }

  .section{ padding:52px 20px; }
  .section__head{ margin-bottom:34px; }

  .registry li{ flex-direction:column; align-items:flex-start; gap:4px; padding:17px 2px; }
  .registry__name{ font-size:18.5px; }

  .panels{ grid-template-columns:1fr; }
  .plain{ columns:1; }

  .people{ grid-template-columns:repeat(2,1fr); gap:28px 18px; }
  .honours{ grid-template-columns:1fr; }
  .contact{ grid-template-columns:1fr; gap:28px; }

  .footer{ padding:38px 20px; }

  .bot__label{ display:none; }
  .bot__launcher{ padding:9px; border-radius:50%; }
}

/* ---- Phones ---- */
@media (max-width:520px){
  body{ font-size:16px; }

  .brand__logo{ flex:0 0 40px; width:40px; height:40px; font-size:12.5px; }
  .brand__name{ font-size:16px; }
  .brand__place{ font-size:11px; }

  .gate__card{ padding:34px 22px 26px; }
  .gate__title{ font-size:23px; }
  .gate__question{ font-size:15px; }

  .hero{ padding:48px 16px 44px; }
  .hero__eyebrow{ margin-bottom:18px; }
  .verse__text{ line-height:1.42; }
  .hero__note{ font-size:13px; }
  .hero__actions .btn{ width:100%; text-align:center; }

  .section{ padding:44px 16px; }
  .section__head h2{ font-size:24px; }
  .section__head p{ font-size:15.5px; }

  .registry__name{ font-size:17px; }
  .registry .tag{ display:block; width:fit-content; margin:6px 0 0; }

  .panel{ padding:24px 20px; }

  .people{ grid-template-columns:repeat(2,1fr); gap:22px 14px; }
  .person__name{ font-size:16px; }

  .honours li{ padding:16px 18px; font-size:16px; }

  .about .btn{ width:100%; text-align:center; }
  .about__body{ font-size:16px; }

  .contact__block p{ font-size:15.5px; }

  .footer{ font-size:13px; }

  /* The popup rises from the bottom edge and fills the screen, rather than
     floating as a small card that would leave cramped margins. */
  .modal{ padding:0; align-items:flex-end; }
  .modal__panel{ width:100%; max-height:92vh; border-top-width:3px; }
  .modal__head{ padding:18px 18px 14px; }
  .modal__head h2{ font-size:20px; }
  .modal__body{ padding:18px 18px 28px; font-size:16px; }

  /* The chat window fills the screen too, so typing doesn't fight a tiny box. */
  .bot{ right:14px; bottom:14px; }
  .bot__panel{ width:calc(100vw - 20px); height:calc(100vh - 96px); right:-6px; }
  .bot__log{ font-size:15px; }
}

/* ---- Small phones ---- */
@media (max-width:380px){
  .people{ gap:18px 12px; }
  .gate__card{ padding:30px 18px 22px; }
  .gate__title{ font-size:21px; }
  .gate__options button{ min-width:52px; padding:10px 12px; font-size:15px; }
  .verse__text{ font-size:26px; }
}

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}