/*
 * Home 1 — Cardinal Edition
 * Palette inspired by Stanford's official identity colours, applied to CEMB's
 * own brand, photography and content. This file only loads on /home1.
 */

.theme-home1 {
  --cemb-deep: #651c32;
  --cemb-deep-2: #42081b;
  --cemb-green: #b1040e;
  --cemb-green-bright: #d2383e;
  --cemb-gold: #f6c453;
  --cemb-gold-bright: #fff0df;
  --cemb-white: #fff;
  --cemb-ink: #2e2d29;
  --cemb-ink-soft: #5d5b56;
  --cemb-border: #dad7cb;
  --cemb-shadow: 0 22px 55px rgba(66, 8, 27, .13);
  --cemb-booklet-tint: #fbf1f3;
  --cemb-booklet-stage-glow: #8f314d;
  --cemb-booklet-stage-mid: #651c32;
  --cemb-booklet-stage-edge: #300512;
  background: #fff;
}

.theme-home1 .cemb-ref-hero {
  background: #651c32;
}

.theme-home1 .cemb-ref-hero__veil {
  background: linear-gradient(90deg, #651c32 0%, rgba(101, 28, 50, .97) 35%, rgba(101, 28, 50, .72) 57%, rgba(101, 28, 50, .08) 84%), linear-gradient(0deg, rgba(66, 8, 27, .58), transparent 52%);
}

/* Header and navigation */
.theme-home1 .site-header {
  background: linear-gradient(180deg, rgba(66, 8, 27, .84), rgba(66, 8, 27, .34));
  border-bottom-color: rgba(255, 255, 255, .14);
}

.theme-home1 .site-header.is-scrolled,
.theme-home1 .site-header.is-mega-open {
  background: #651c32;
}

.theme-home1 .primary-nav {
  background: transparent;
}

.theme-home1 .brand__copy small b,
.theme-home1 .cemb-mega__eyebrow,
.theme-home1 .cemb-mega__intro > a {
  color: #f6c453;
}

.theme-home1 .primary-nav > a:not(.nav-search):not(.cemb-apply-btn)::after,
.theme-home1 .nav-dropdown__label::after {
  background: #f6c453;
}

.theme-home1 .cemb-mega__panel {
  background: linear-gradient(135deg, rgba(101, 28, 50, .98), rgba(66, 8, 27, .99));
  box-shadow: 0 32px 80px rgba(46, 45, 41, .42), inset 0 1px rgba(255, 255, 255, .08);
}

.theme-home1 .cemb-mega__panel::before {
  background: radial-gradient(circle at 18% 0, rgba(184, 58, 75, .28), transparent 36%), linear-gradient(115deg, rgba(255, 255, 255, .06), transparent 40%);
}

.theme-home1 .cemb-mega__feature::after {
  background: linear-gradient(180deg, transparent 30%, rgba(66, 8, 27, .9));
}

.theme-home1 .cemb-mega__links a svg {
  color: #f6c453;
}

.theme-home1 .cemb-btn--primary {
  background: #b1040e;
}

.theme-home1 .cemb-btn--primary:hover {
  background: #820000;
}

.theme-home1 .cemb-btn--outline {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, .72);
}

.theme-home1 .cemb-btn--outline:hover,
.theme-home1 .cemb-btn--outline:focus-visible {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

/* Hero */
.theme-home1 .cemb-hero {
  background: #42081b;
}

.theme-home1 .cemb-hero__veil {
  background: linear-gradient(90deg, rgba(66, 8, 27, .97) 0%, rgba(66, 8, 27, .79) 31%, rgba(66, 8, 27, .43) 55%, rgba(66, 8, 27, .14) 77%), linear-gradient(0deg, rgba(46, 45, 41, .56), transparent 48%);
}

.theme-home1 .cemb-highlight {
  color: #f6c453;
}

/* Interior page heroes (About, Research sub-pages, Board pages, Guest House, Search, Showcase).
   These now copy /research's (.cemb-ref-hero) exact base colour and veil gradient rather than
   a bespoke one, so they take the same cardinal-theme override .cemb-ref-hero gets below. */
.theme-home1 .cemb-about-hero {
  background: #651c32;
}

.theme-home1 .cemb-about-hero__veil {
  background: linear-gradient(90deg, #651c32 0%, rgba(101, 28, 50, .97) 35%, rgba(101, 28, 50, .72) 57%, rgba(101, 28, 50, .08) 84%), linear-gradient(0deg, rgba(66, 8, 27, .58), transparent 52%);
}

/* Leadership-letter heroes (Founder's Message, Chairman/BOG Message, Director's Message to
   Students, Founder Director legacy) use their own bespoke veils rather than the shared
   .cemb-about-hero__veil, so each needs its own cardinal-theme override. */
.theme-home1 .cemb-founder-message__hero-veil {
  background: linear-gradient(100deg, rgba(66, 8, 27, .99) 0%, rgba(66, 8, 27, .92) 53%, rgba(66, 8, 27, .65) 100%), linear-gradient(0deg, rgba(66, 8, 27, .75), transparent 55%);
}

.theme-home1 .cemb-founder-message__hero-veil::after {
  border-color: rgba(246, 196, 83, .16);
}

.theme-home1 .cemb-chairman-message__hero-veil {
  background: linear-gradient(100deg, rgba(66, 8, 27, .99) 0%, rgba(66, 8, 27, .93) 43%, rgba(66, 8, 27, .7) 72%, rgba(66, 8, 27, .6) 100%), linear-gradient(0deg, rgba(66, 8, 27, .72), transparent 62%);
}

.theme-home1 .cemb-chairman-message__hero-veil::after {
  background: linear-gradient(135deg, transparent 48%, rgba(246, 196, 83, .055) 48%, rgba(246, 196, 83, .055) 48.25%, transparent 48.25%), linear-gradient(45deg, transparent 68%, rgba(255, 255, 255, .04) 68%, rgba(255, 255, 255, .04) 68.25%, transparent 68.25%);
}

.theme-home1 .cemb-student-message__hero-photo::after {
  background: linear-gradient(90deg, var(--cemb-deep-2), transparent 42%), linear-gradient(0deg, rgba(66, 8, 27, .46), transparent 55%);
}

.theme-home1 .cemb-student-message__hero-veil {
  background: linear-gradient(90deg, rgba(66, 8, 27, 1) 0%, rgba(66, 8, 27, .98) 36%, rgba(66, 8, 27, .67) 55%, rgba(66, 8, 27, .08) 100%);
}

.theme-home1 .cemb-student-message__hero-veil::after {
  background: linear-gradient(transparent, rgba(246, 196, 83, .58));
}

.theme-home1 .cemb-legacy-hero__veil {
  background: radial-gradient(circle at 76% 42%, rgba(184, 58, 75, .17), transparent 28%), linear-gradient(105deg, rgba(66, 8, 27, .99) 0%, rgba(66, 8, 27, .94) 46%, rgba(66, 8, 27, .76) 100%);
}

.theme-home1 .cemb-search-hero__veil {
  background: linear-gradient(90deg, rgba(66, 8, 27, .94), rgba(66, 8, 27, .73) 48%, rgba(66, 8, 27, .45)), linear-gradient(0deg, rgba(46, 45, 41, .7), transparent 58%);
}

.theme-home1 .cemb-showcase-hero {
  background: radial-gradient(circle at 18% 22%, rgba(184, 58, 75, .3), transparent 42%),
              radial-gradient(circle at 82% 78%, rgba(246, 196, 83, .16), transparent 38%),
              linear-gradient(135deg, #42081b 0%, #651c32 50%, #2e0912 100%);
}

.theme-home1 .cemb-hero__badges {
  background: linear-gradient(135deg, rgba(140, 21, 21, .74), rgba(66, 8, 27, .92));
}

.theme-home1 .cemb-hero__badge-arrow {
  color: #f6c453;
  background: transparent;
}

.theme-home1 .cemb-hero__slider-dots button[aria-current="true"] span,
.theme-home1 .cemb-hero__rail-thumb {
  background: #f6c453;
}

.theme-home1 .cemb-hero__slider-nav button,
.theme-home1 .cemb-hero__slider-dots,
.theme-home1 .cemb-hero__rail {
  background-color: rgba(66, 8, 27, .64);
}

.theme-home1 .cemb-hero__slider-arrow {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, .68);
}

.theme-home1 .cemb-hero__slider-arrow:hover,
.theme-home1 .cemb-hero__slider-arrow:focus-visible {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

/* Statistics and feature bands */
.theme-home1 .cemb-stats {
  background: radial-gradient(circle at 50% 0, rgba(184, 58, 75, .34), transparent 58%), #820000;
  border-top-color: rgba(255, 217, 178, .3);
}

.theme-home1 .cemb-stat__icon {
  filter: sepia(1) saturate(.9) hue-rotate(325deg) brightness(1.25);
}

.theme-home1 .cemb-stat span {
  color: #fff;
}

.theme-home1 .cemb-campus-film__veil {
  background: linear-gradient(90deg, rgba(66, 8, 27, .9) 0%, rgba(66, 8, 27, .66) 39%, rgba(66, 8, 27, .22) 73%, rgba(46, 45, 41, .36) 100%), linear-gradient(0deg, rgba(46, 45, 41, .5), transparent 48%);
}

.theme-home1 .cemb-research {
  background: linear-gradient(180deg, #fff 0%, #f8f7f4 100%);
}

.theme-home1 .cemb-research-card {
  border-color: #dedbd2;
  background: rgba(255, 255, 255, .9);
}

.theme-home1 .cemb-research-card__icon {
  color: #b1040e;
  background: #f9eeee;
  border-color: #e7c0c2;
}

.theme-home1 .cemb-labs {
  background: radial-gradient(circle at 50% 0, rgba(184, 58, 75, .34), transparent 48%), #651c32;
}

.theme-home1 .cemb-lab-card {
  background: #42081b;
}

.theme-home1 .cemb-why__play,
.theme-home1 .cemb-filter-tab.is-active {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

.theme-home1 .cemb-lightbox__explore-btn {
  color: #fff;
  background: transparent;
  border-color: #fff;
  box-shadow: none;
}

.theme-home1 .cemb-lightbox__explore-btn:hover,
.theme-home1 .cemb-lightbox__explore-btn:focus-visible {
  color: #651c32;
  background: #fff;
  border-color: #fff;
  box-shadow: none;
}

.theme-home1 .cemb-carousel-btns button {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, .62);
}

.theme-home1 .cemb-carousel-btns button:hover,
.theme-home1 .cemb-carousel-btns button:focus-visible {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

.theme-home1 .cemb-why__media::after {
  background: linear-gradient(0deg, rgba(66, 8, 27, .74) 0%, rgba(66, 8, 27, .1) 42%, transparent 62%);
}

/* Outcomes */
.theme-home1 .cemb-brochures {
  background: radial-gradient(circle at 88% 13%, rgba(184, 58, 75, .3), transparent 30%), radial-gradient(circle at 9% 88%, rgba(246, 196, 83, .1), transparent 24%), #42081b;
}

.theme-home1 .cemb-outcome-row:hover {
  background: linear-gradient(135deg, rgba(140, 21, 21, .96), rgba(66, 8, 27, .99));
  border-left-color: #fff;
  border-bottom-color: rgba(255, 255, 255, .72);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.theme-home1 .cemb-outcome-row:hover .cemb-outcome-row__thumb {
  border-color: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .5), 0 0 20px rgba(255, 255, 255, .16);
}

.theme-home1 .cemb-outcome-row:hover .cemb-outcome-row__index,
.theme-home1 .cemb-outcome-row:hover strong,
.theme-home1 .cemb-thumb-zoom-btn {
  color: #fff;
}

.theme-home1 .cemb-outcome-row:hover .cemb-outcome-row__badge {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

.theme-home1 .cemb-outcome-row:hover .cemb-outcome-row__arrow {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

.theme-home1 .cemb-outcome-row__arrow {
  color: #fff;
  border-color: #fff;
}

.theme-home1 .cemb-outcome-row__thumb,
.theme-home1 .cemb-outcome-row:hover .cemb-outcome-row__img,
.theme-home1 .cemb-lightbox__media {
  background: #2e2d29;
}

.theme-home1 .cemb-outcome-row__thumb:hover .cemb-thumb-zoom-btn,
.theme-home1 .cemb-outcome-lightbox {
  background-color: rgba(46, 45, 41, .94);
}

.theme-home1 .cemb-lightbox__cta {
  background: linear-gradient(135deg, #651c32, #42081b);
}

.theme-home1 .cemb-lightbox__close {
  padding: 0;
  color: #fff;
  background: transparent;
  border-color: #fff;
}

.theme-home1 .cemb-lightbox__close span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.theme-home1 .cemb-lightbox__close:hover,
.theme-home1 .cemb-lightbox__close:focus-visible {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

/* Lower homepage sections */
.theme-home1 .cemb-gallery,
.theme-home1 .cemb-news {
  background-color: #f8f7f4;
}

.theme-home1 .cemb-gallery__item button::after,
.theme-home1 .cemb-news-card__image::after {
  background-color: rgba(140, 21, 21, .12);
}

.theme-home1 .cemb-footer {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #8c1515 0%, #651c32 56%, #42081b 100%);
  border-top: 5px solid #b1040e;
}

.theme-home1 .cemb-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .08), transparent 30%);
}

.theme-home1 .cemb-footer__grid,
.theme-home1 .cemb-footer__bottom {
  position: relative;
  z-index: 1;
}

.theme-home1 .cemb-footer__col h2 {
  color: #fff;
}

.theme-home1 .cemb-footer__brand p,
.theme-home1 .cemb-footer__col ul a,
.theme-home1 .cemb-footer__contact a,
.theme-home1 .cemb-footer__newsletter p,
.theme-home1 .cemb-footer__bottom,
.theme-home1 .cemb-footer__bottom a {
  color: #fff;
}

.theme-home1 .cemb-footer__social a {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
}

.theme-home1 .cemb-newsletter-form input {
  color: #fff;
  background: rgba(66, 8, 27, .34);
  border-color: rgba(255, 255, 255, .24);
}

.theme-home1 .cemb-newsletter-form input::placeholder {
  color: rgba(255, 255, 255, .82);
}

.theme-home1 .cemb-newsletter-form input:focus {
  border-color: #f6c453;
}

.theme-home1 .cemb-footer__bottom {
  border-top-color: rgba(255, 255, 255, .18);
}

.theme-home1 .cemb-newsletter-form button {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .72);
}

.theme-home1 .cemb-newsletter-form button:hover,
.theme-home1 .cemb-newsletter-form button:focus-visible {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

.theme-home1 .cemb-footer__social a:hover {
  color: #651c32;
  background: #fff;
  border-color: #fff;
}

.theme-home1 .cemb-footer__col a:hover,
.theme-home1 .cemb-footer__bottom a:hover {
  color: #f6c453;
}

/* Keep keyboard focus unmistakable against both light and dark regions. */
.theme-home1 :focus-visible {
  outline-color: #e50808;
}

@media (max-width: 1099px) {
  .theme-home1 .primary-nav {
    background: #651c32;
  }
}

@media (max-width: 760px) {
  .theme-home1 .cemb-student-message__hero-photo::after {
    background: linear-gradient(0deg, var(--cemb-deep-2) 5%, rgba(66, 8, 27, .93) 44%, rgba(66, 8, 27, .2) 78%);
  }

  .theme-home1 .cemb-student-message__hero-veil {
    background: linear-gradient(0deg, rgba(66, 8, 27, .98) 6%, rgba(66, 8, 27, .75) 62%, rgba(66, 8, 27, .15));
  }
}
