/* ============================================================
   The Abrahamic Youth Initiative at Rose Castle
   Visual language matched to rosecastlefoundation.org:
   light, photo-led, editorial. Deep rose, castle green,
   warm cream, institutional serif headings.
   ============================================================ */

:root {
  --paper: #ffffff;
  --cream: #f8f5ee;
  --cream-2: #f1ece1;
  --rose: #7d2f3c;
  --rose-dark: #5e2430;
  --green: #2e4636;
  --green-deep: #1f3226;
  --ink: #23282b;
  --ink-soft: #5a615e;
  --gold: #b0904f;
  --line: rgba(35, 40, 43, 0.13);
  --line-light: rgba(255, 255, 255, 0.22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-cue { animation: none !important; }
}

body {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--rose); color: #fff; }

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

/* ---------- type ---------- */

h1, h2, h3, .display {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
}

.on-dark .eyebrow { color: var(--gold); }

/* ---------- layout ---------- */

.wrap {
  width: min(1140px, calc(100% - 3rem));
  margin: 0 auto;
}

section { padding: 6rem 0; }

.section-head { max-width: 52ch; margin-bottom: 3rem; }

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-top: 0.9rem;
  color: var(--green-deep);
}

.on-dark .section-head h2 { color: #fff; }

.section-head p.lede {
  margin-top: 1.1rem;
  font-size: 1.14rem;
  color: var(--ink-soft);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  transition: color 0.3s;
}

.nav.scrolled .brand { color: var(--green-deep); }

.brand svg { flex: none; }

.brand-name {
  font-family: "Lora", serif;
  font-size: 1rem;
  line-height: 1.25;
}

.brand-name span {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.15rem;
}

.nav.scrolled .brand-name span { color: var(--rose); }

.nav-links { display: flex; gap: 1.8rem; list-style: none; }

.nav-links a {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav.scrolled .nav-links a { color: var(--ink-soft); }

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active { border-color: var(--gold); }

.nav.scrolled .nav-links a:hover,
.nav.scrolled .nav-links a.active { color: var(--rose); border-color: var(--rose); }

.nav-toggle { display: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: var(--green-deep);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(31, 50, 38, 0.45) 0%, rgba(31, 50, 38, 0.15) 35%, rgba(23, 37, 28, 0.82) 100%);
}

.hero-inner {
  position: relative;
  padding: 9rem 0 6.5rem;
  width: 100%;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.2rem);
  max-width: 17ch;
  margin-top: 1.1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero h1 .accent { font-style: italic; color: #e6d5ab; }

.hero .sub {
  margin-top: 1.5rem;
  max-width: 56ch;
  font-size: 1.16rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero .meta-line {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero .meta-line b {
  color: var(--gold);
  font-weight: 700;
  margin-right: 0.35rem;
}

.scroll-cue {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  animation: cue 2.6s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- photos ---------- */

.photo-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream-2);
  box-shadow: 0 26px 60px -32px rgba(31, 50, 38, 0.45);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.photo-frame .fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.figure-cap {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- movements ---------- */

.movements {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.movement {
  padding: 2.3rem 1.7rem 2.5rem;
  border-left: 1px solid var(--line);
}
.movement:first-child { border-left: none; }

.movement .m-word {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 1.45rem;
  color: var(--rose);
}

.movement p { margin-top: 0.75rem; font-size: 0.97rem; color: var(--ink-soft); }

/* ---------- rose way pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.pillar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px -28px rgba(31, 50, 38, 0.4);
}

.pillar .p-img { aspect-ratio: 3/2; overflow: hidden; background: var(--cream-2); }
.pillar .p-img img { width: 100%; height: 100%; object-fit: cover; }

.pillar .p-body { padding: 1.6rem 1.7rem 1.9rem; flex: 1; }

.pillar h3 { font-size: 1.25rem; color: var(--green-deep); margin-bottom: 0.5rem; }

.pillar p { font-size: 0.97rem; color: var(--ink-soft); }

/* ---------- programme ---------- */

.programme-note {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2.2rem;
}

.days {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.day {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.day-head {
  background: var(--green);
  color: #fff;
  padding: 1.1rem 1.3rem 0.95rem;
}

.day-head .d-name { font-family: "Lora", serif; font-size: 1.18rem; }

.day-head .d-date {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.25rem;
}

.slot { padding: 1rem 1.3rem; border-top: 1px solid var(--line); }
.day .slot:first-of-type { border-top: none; }

.slot .s-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
}

.slot p { margin-top: 0.3rem; font-size: 0.96rem; line-height: 1.45; }

/* ---------- split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.residence-list { list-style: none; margin-top: 1.9rem; }

.residence-list li {
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  align-items: baseline;
}

.residence-list li:last-child { border-bottom: 1px solid var(--line); }

.residence-list .tick {
  color: var(--rose);
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 1rem;
}

.residence-list b { font-weight: 700; color: var(--green-deep); }

/* ---------- criteria / schools cards ---------- */

.criteria {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.criterion {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rose);
  border-radius: 12px;
  padding: 1.8rem 1.9rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.criterion:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px -26px rgba(31, 50, 38, 0.35);
}

.criterion h3 { font-size: 1.2rem; color: var(--green-deep); margin-bottom: 0.55rem; }

.criterion p { color: var(--ink-soft); font-size: 0.98rem; }

.cohort-line {
  margin-top: 2.5rem;
  padding: 1.6rem 2rem;
  border-left: 3px solid var(--rose);
  background: var(--cream-2);
  border-radius: 0 12px 12px 0;
  font-size: 1.04rem;
}

/* ---------- castle band ---------- */

.castle-band {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
}

.castle-band p { color: rgba(255, 255, 255, 0.86); }

.castle-band h2 { color: #fff; }

.castle-quote {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.5;
  color: #e6d5ab;
  border-left: 3px solid var(--gold);
  padding-left: 1.6rem;
  margin: 1.9rem 0;
}

.text-link {
  color: var(--rose);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 47, 60, 0.35);
  transition: border-color 0.2s;
}
.text-link:hover { border-color: var(--rose); }

.on-dark .text-link { color: var(--gold); border-color: rgba(176, 144, 79, 0.5); }
.on-dark .text-link:hover { border-color: var(--gold); }

/* ---------- contact ---------- */

.contact { text-align: center; }

.contact .section-head { margin-left: auto; margin-right: auto; }

.mail-card {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 1.3rem 3rem;
  background: var(--rose);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Lora", serif;
  font-size: clamp(1.05rem, 2.3vw, 1.45rem);
  transition: background 0.25s ease, transform 0.25s ease;
}

.mail-card:hover { background: var(--rose-dark); transform: translateY(-2px); }

.contact .note { margin-top: 1.5rem; color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- footer ---------- */

footer {
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 3.2rem 0;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  font-family: "Lora", serif;
}

footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---------- about page ---------- */

.about-hero {
  position: relative;
  background: var(--green-deep);
  color: #fff;
  padding: 10rem 0 5rem;
  text-align: center;
  overflow: hidden;
}

.about-hero .hero-photo { opacity: 0.35; }

.about-hero .wrap { position: relative; }

.about-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin-top: 1rem; }

.about-body { padding: 5.5rem 0 6.5rem; }

.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 4.5rem;
  align-items: start;
}

.portrait-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -34px rgba(31, 50, 38, 0.5);
  position: sticky;
  top: 6.5rem;
}

.about-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: var(--green-deep);
  margin: 0.9rem 0 1.4rem;
}

.about-copy p + p { margin-top: 1.15rem; }

.founder-note {
  margin-top: 2.5rem;
  padding: 2rem 2.2rem;
  background: var(--cream-2);
  border-left: 3px solid var(--rose);
  border-radius: 0 12px 12px 0;
}

.founder-note .fn-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
}

.founder-note blockquote {
  margin-top: 0.9rem;
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 1.16rem;
  line-height: 1.6;
}

.sig {
  margin-top: 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .movements { grid-template-columns: repeat(2, 1fr); }
  .movement:nth-child(3) { border-left: none; }
  .movement:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pillars { grid-template-columns: 1fr; }
  .days { grid-template-columns: repeat(2, 1fr); }
  .split, .about-grid { grid-template-columns: 1fr; gap: 2.6rem; }
  .portrait-frame { position: static; max-width: 380px; }
  .criteria { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  section { padding: 4.2rem 0; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--green-deep);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    transform: translateY(-100%);
    transition: transform 0.35s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links a, .nav.scrolled .nav-links a { font-size: 1rem; color: #fff; }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    color: #fff;
    z-index: 50;
    cursor: pointer;
    padding: 0.4rem;
  }
  .nav.scrolled .nav-toggle { color: var(--green-deep); }
  .nav-links.open ~ .nav-toggle { color: #fff; }
  .movements { grid-template-columns: 1fr; }
  .movement { border-left: none; border-top: 1px solid var(--line); }
  .movement:first-child { border-top: none; }
  .days { grid-template-columns: 1fr; }
}
