:root {
  --navy: #0D3866;
  --navy-deep: #082846;
  --navy-soft: #174A78;
  --gold: #C9A961;
  --gold-light: #E5D3A3;
  --cream: #F7F2E6;
  --cream-deep: #EEE5D2;
  --white: #FFFFFF;
  --charcoal: #1E1E1E;
  --text: #343434;
  --muted: #6A675F;
  --line: rgba(13, 56, 102, 0.14);
  --shadow: 0 24px 60px rgba(8, 40, 70, 0.12);
  --radius: 4px;
  --shell: 1180px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Open Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.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;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: -100px;
  padding: .75rem 1rem;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 242, 230, 0.96);
  border-bottom: 1px solid rgba(13, 56, 102, .10);
  backdrop-filter: blur(12px);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 28px rgba(8, 40, 70, .10); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.wordmark { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; color: var(--navy); }
.wordmark-main { font-family: var(--serif); font-size: 1.28rem; font-weight: 700; letter-spacing: .015em; }
.wordmark-sub { margin-top: 6px; color: var(--gold); font-size: .69rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { position: relative; color: var(--navy-deep); font-size: .84rem; font-weight: 700; letter-spacing: .045em; text-decoration: none; }
.site-nav a:not(.nav-contact)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px; background: var(--gold); transition: right .2s ease; }
.site-nav a:not(.nav-contact):hover::after { right: 0; }
.nav-contact { padding: 10px 16px; border: 1px solid var(--gold); }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 8px; border: 0; background: transparent; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px auto; background: var(--navy); transition: transform .2s ease, opacity .2s ease; }

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy-deep), var(--navy) 58%, #164D79);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .10;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(to right, transparent, black 35%, black 70%, transparent);
}
.hero-inner { position: relative; z-index: 2; min-height: 660px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 95px 0 88px; text-align: center; }
.eyebrow, .section-kicker { margin: 0 0 18px; color: var(--gold); font-size: .74rem; font-weight: 800; letter-spacing: .23em; text-transform: uppercase; }
.section-kicker.light { color: var(--gold-light); }
.hero h1 { max-width: 900px; margin: 0; font-family: var(--serif); font-size: clamp(3rem, 6.2vw, 5.7rem); font-weight: 600; line-height: 1.02; letter-spacing: -.03em; }
.hero-lead { max-width: 790px; margin: 28px auto 0; color: rgba(255,255,255,.86); font-size: clamp(1rem, 1.6vw, 1.16rem); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 22px; border: 1px solid transparent; border-radius: 2px; font-size: .82rem; font-weight: 800; letter-spacing: .05em; text-decoration: none; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-gold { background: var(--gold); color: var(--navy-deep); }
.button-gold:hover { background: #D4B873; }
.button-ghost { border-color: rgba(255,255,255,.38); color: var(--white); background: rgba(255,255,255,.04); }
.button-ghost:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.58); }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 13px; margin-top: 54px; color: rgba(255,255,255,.65); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.hero-meta i { width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }

.intro-band { background: var(--white); border-bottom: 1px solid var(--line); }
.intro-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 80px; padding-top: 66px; padding-bottom: 66px; align-items: start; }
.intro-grid h2, .section h2, .namesake h2, .contact-section h2 { margin: 0; color: var(--navy-deep); font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 3.35rem); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }
.intro-grid > p { margin: 4px 0 0; font-size: 1.04rem; color: #4D4B46; }

.section { padding: 105px 0; }
.section-yeshivah { background: var(--cream); }
.split-feature { display: grid; grid-template-columns: .94fr 1.06fr; gap: clamp(50px, 7vw, 95px); align-items: center; }
.visual-panel { min-height: 505px; padding: 28px; background: var(--navy); box-shadow: var(--shadow); }
.visual-frame { position: relative; min-height: 449px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 34px; border: 1px solid rgba(201,169,97,.55); text-align: center; }
.visual-frame::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,.08); }
.corner { position: absolute; width: 42px; height: 42px; border-color: var(--gold); border-style: solid; }
.corner-tl { left: 8px; top: 8px; border-width: 2px 0 0 2px; }
.corner-br { right: 8px; bottom: 8px; border-width: 0 2px 2px 0; }
.visual-overline { margin: 0 0 25px; color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .25em; }
.visual-mark { color: var(--white); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 5vw, 4.7rem); line-height: 1; direction: rtl; }
.visual-caption { margin: 24px 0 0; color: rgba(255,255,255,.70); font-family: var(--serif); font-size: 1.12rem; font-style: italic; }
.feature-copy h2 { margin-bottom: 12px; }
.feature-deck { margin: 0 0 24px; color: var(--gold); font-family: var(--serif); font-size: 1.28rem; font-weight: 600; }
.feature-copy p:not(.section-kicker):not(.feature-deck) { margin: 0 0 17px; }
.check-list { display: grid; gap: 9px; margin: 24px 0 28px; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 28px; color: var(--navy-deep); font-weight: 700; font-size: .91rem; }
.check-list li::before { content: "✦"; position: absolute; left: 0; top: -1px; color: var(--gold); }
.text-link { display: inline-flex; gap: 11px; align-items: center; color: var(--navy); font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(13,56,102,.28); padding-bottom: 4px; }
.text-link span { color: var(--gold); transition: transform .2s ease; }
.text-link:hover span { transform: translateX(4px); }

.section-fellowships { background: var(--white); }
.section-heading { margin-bottom: 50px; }
.section-heading.centered { text-align: center; margin-inline: auto; }
.narrow { max-width: 790px; }
.section-heading p:last-child { color: var(--muted); }
.fellowship-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 24px; }
.fellowship-card { position: relative; min-height: 345px; display: flex; flex-direction: column; padding: 36px; background: var(--cream); border: 1px solid rgba(13,56,102,.12); overflow: hidden; }
.fellowship-card::after { content: ""; position: absolute; width: 120px; height: 120px; right: -64px; top: -64px; border: 1px solid rgba(201,169,97,.65); transform: rotate(45deg); }
.fellowship-index { margin-bottom: 44px; color: var(--gold); font-family: var(--serif); font-size: 2rem; }
.fellowship-card h3 { margin: 0; color: var(--navy-deep); font-family: var(--serif); font-size: 1.65rem; line-height: 1.2; }
.fellowship-motto { margin: 12px 0 14px; color: var(--gold); font-size: .77rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.fellowship-card p { margin: 0 0 26px; color: var(--muted); }
.fellowship-card .text-link { margin-top: auto; align-self: flex-start; }

.section-about { background: var(--cream-deep); }
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(50px, 8vw, 100px); align-items: start; }
.about-copy p:not(.section-kicker) { max-width: 730px; }
.legal-card { padding: 42px; background: var(--navy); color: rgba(255,255,255,.80); box-shadow: var(--shadow); }
.legal-label { margin: 0 0 13px; color: var(--gold); font-size: .7rem; font-weight: 800; letter-spacing: .22em; }
.legal-card h3 { margin: 0 0 18px; color: var(--white); font-family: var(--serif); font-size: 1.85rem; line-height: 1.2; }
.legal-card p { margin: 0; }
.legal-rule { height: 1px; margin: 28px 0; background: rgba(201,169,97,.45); }
.legal-small { font-size: .9rem; color: rgba(255,255,255,.63); }

.namesake { position: relative; overflow: hidden; padding: 104px 0; color: rgba(255,255,255,.78); background: var(--navy-deep); }
/* Decorative background initial intentionally removed in 1.0.2. */
.namesake-inner { position: relative; z-index: 1; max-width: 880px; text-align: center; }
.namesake h2 { color: var(--white); }
.namesake p:last-child { margin: 28px auto 0; max-width: 840px; font-size: 1.05rem; }

.section-leadership { background: var(--white); }
.leadership-note { font-size: .88rem; font-style: italic; }
.leadership-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.leader-card { padding: 34px; border-top: 3px solid var(--gold); background: var(--cream); }
.leader-card h3 { margin: 0 0 9px; color: var(--navy-deep); font-family: var(--serif); font-size: 1.55rem; }
.leader-roles { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.leader-roles li { color: var(--muted); font-size: .92rem; }
.leader-roles strong { color: var(--navy); }

.contact-section { color: var(--text); background: var(--cream); }
.rgi-contact-masthead { color: var(--white); background: var(--navy); border-top: 1px solid rgba(201,169,97,.28); }
.rgi-contact-masthead-inner { padding-top: 50px; padding-bottom: 54px; text-align: center; }
.rgi-contact-masthead .section-kicker { margin-bottom: 10px; }
.rgi-contact-masthead h2 { margin: 0; color: var(--white); font-family: var(--serif); font-size: clamp(2rem, 3.7vw, 3rem); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }
.rgi-contact-masthead p:last-child { max-width: 720px; margin: 16px auto 0; color: rgba(255,255,255,.84); }
.rgi-contact-body { background: var(--cream); }
.contact-inner { display: grid; grid-template-columns: .9fr 1fr; align-items: start; gap: clamp(42px, 6vw, 72px); padding-top: 50px; padding-bottom: 78px; }
.contact-copy { padding-top: 4px; }
.contact-copy h3 { margin: 0; color: var(--navy-deep); font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }
.contact-copy > p:not(.section-kicker) { margin: 20px 0 0; max-width: 520px; color: var(--text); }
.rgi-contact-details { display: grid; margin-top: 28px; border-top: 1px solid rgba(13,56,102,.14); }
.rgi-contact-detail { padding: 20px 0; border-bottom: 1px solid rgba(13,56,102,.14); }
.rgi-contact-detail-label { display: block; margin-bottom: 7px; color: var(--gold); font-size: .67rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.rgi-contact-detail-value { color: var(--navy); font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.rgi-contact-detail a { color: var(--navy); text-decoration: none; border-bottom: 1px solid rgba(13,56,102,.22); }
.rgi-contact-detail a:hover { color: var(--navy-deep); border-bottom-color: var(--gold); }

.site-footer { color: rgba(255,255,255,.62); background: #061E34; }
.footer-grid { display: grid; grid-template-columns: 1.45fr .65fr .9fr 1fr; gap: 54px; padding-top: 70px; padding-bottom: 55px; }
.wordmark-footer { color: var(--white); }
.footer-brand p { max-width: 310px; margin: 20px 0 0; font-size: .86rem; }
.footer-title { margin: 0 0 18px; color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-grid a { color: rgba(255,255,255,.70); text-decoration: none; font-size: .88rem; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-grid span { font-size: .88rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding-top: 22px; padding-bottom: 26px; border-top: 1px solid rgba(255,255,255,.08); font-size: .76rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--gold-light); text-decoration: none; }

@media (max-width: 920px) {
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 22px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px rgba(8,40,70,.10);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; }
  .site-nav a::after { display: none; }
  .nav-contact { margin-top: 8px; padding: 11px 13px !important; text-align: center; }
  .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-of-type(3) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
  .intro-grid, .split-feature, .about-grid { grid-template-columns: 1fr; gap: 46px; }
  .intro-grid { padding-top: 55px; padding-bottom: 55px; }
  .visual-panel { min-height: 420px; }
  .visual-frame { min-height: 364px; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 74px; }
  body { font-size: 15px; }
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .header-inner { min-height: 72px; }
  .wordmark-main { font-size: 1.12rem; }
  .wordmark-sub { font-size: .6rem; }
  .hero-inner { min-height: 600px; padding: 78px 0 72px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 4.1rem); }
  .hero-lead { line-height: 1.7; }
  .hero-actions { width: 100%; }
  .hero-actions .button { width: 100%; }
  .hero-meta { gap: 10px; font-size: .63rem; }
  .hero-meta i { display: none; }
  .hero-meta span { width: 100%; }
  .section { padding: 78px 0; }
  .intro-grid { gap: 26px; }
  .visual-panel { padding: 16px; min-height: 340px; }
  .visual-frame { min-height: 306px; padding: 34px 16px; }
  .fellowship-card, .legal-card, .leader-card { padding: 28px; }
  .namesake { padding: 82px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; padding-top: 56px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; gap: 10px; }
}

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

/* WordPress / Elementor integration */
body.admin-bar .site-header { top: 32px; }
.rgi-default-content { padding-top: 70px; padding-bottom: 90px; }
.rgi-default-content > *:first-child { margin-top: 0; }
.elementor-page .rgi-elementor-fullwidth,
.elementor-page #main-content { overflow: clip; }
.elementor-widget-rgi_hero,
.elementor-widget-rgi_intro,
.elementor-widget-rgi_yeshivah,
.elementor-widget-rgi_fellowships,
.elementor-widget-rgi_about,
.elementor-widget-rgi_namesake,
.elementor-widget-rgi_leadership,
.elementor-widget-rgi_contact { width: 100%; }

/* Contact Form 7 — Yeshivah-aligned contact card */
.rgi-form-wrap { width: 100%; padding: clamp(28px, 4vw, 42px); border: 1px solid rgba(13,56,102,.07); border-radius: 14px; background: var(--white); box-shadow: 0 18px 45px rgba(8,40,70,.08); }
.rgi-contact-form { display: grid; grid-template-columns: 1fr; gap: 22px; }
.rgi-contact-form .rgi-field-full { grid-column: auto; }
.rgi-contact-form label { display: grid; gap: 9px; margin: 0; color: var(--navy-deep); font-size: .76rem; font-weight: 700; }
.rgi-contact-form input:not([type="submit"]),
.rgi-contact-form select,
.rgi-contact-form textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(201,169,97,.46);
    border-radius: 6px;
    padding: 12px 13px;
    color: var(--charcoal);
    background: #FBF7EE;
    font: inherit;
}
.rgi-contact-form input::placeholder,
.rgi-contact-form textarea::placeholder { color: #8A867D; }
.rgi-contact-form input:focus,
.rgi-contact-form select:focus,
.rgi-contact-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }
.rgi-contact-form select option { color: var(--charcoal); }
.rgi-contact-form textarea { min-height: 155px; resize: vertical; }
.rgi-contact-form .wpcf7-submit {
    min-height: 50px;
    margin-top: 2px;
    padding: 12px 24px;
    border: 1px solid var(--gold);
    border-radius: 4px;
    color: var(--navy-deep);
    background: var(--gold);
    font: inherit;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .05em;
    cursor: pointer;
}
.rgi-contact-form .wpcf7-submit:hover { background: #D4B873; }
/* Hide a stray raw HTML default Submit control if it was left in an older CF7 form. */
.rgi-form-wrap .wpcf7-form input[type="submit"][value="Submit"]:not(.wpcf7-submit) { display: none !important; }
.wpcf7-not-valid-tip { color: #A52B2B; font-size: .78rem; }
.wpcf7 form .wpcf7-response-output { margin: 20px 0 0; border-color: var(--gold); color: var(--navy-deep); background: #FBF7EE; }
.contact-section.rgi-contact-with-form .contact-inner { align-items: start; }
.contact-section.rgi-contact-with-form .contact-copy { max-width: none; }

@media (max-width: 920px) {
    .contact-inner { grid-template-columns: 1fr; gap: 36px; }
    .contact-copy { max-width: 680px; }
}
@media (max-width: 782px) {
    body.admin-bar .site-header { top: 46px; }
}
@media (max-width: 640px) {
    .rgi-contact-masthead-inner { padding-top: 42px; padding-bottom: 44px; }
    .contact-inner { padding-top: 42px; padding-bottom: 58px; }
    .rgi-form-wrap { padding: 24px 20px; border-radius: 10px; }
}
.rgi-light-link { color: var(--gold-light); border-bottom-color: rgba(229,211,163,.45); }
.rgi-empty-state { padding: 28px; border: 1px dashed rgba(13,56,102,.25); color: var(--muted); background: rgba(255,255,255,.4); }
