/* Formal visual refinements for Congregation Nachlas Yisroel Sadovna. */
:root {
  --formal-navy: #0b1d33;
  --formal-navy-soft: #18324f;
  --formal-gold: #b89455;
  --formal-ivory: #f7f3ea;
}

body {
  background:
    radial-gradient(circle at 12% 4%, rgba(184,148,85,.06), transparent 24rem),
    linear-gradient(180deg, #f8f6f1 0%, #f3f5f7 48%, #edf1f4 100%);
}

header {
  padding-top: 42px;
  padding-bottom: 38px;
}

.header-mark {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 15px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.13);
}

h1.hebrew-name {
  font-family: 'Frank Ruhl Libre','Assistant',serif;
  font-size: clamp(2.55rem, 4.8vw, 4rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}

header h2 {
  margin-top: 14px;
  font-size: clamp(1.02rem, 1.8vw, 1.34rem);
  font-weight: 500;
  color: #e1e8ef;
}

.founder-line,
.rabbinic-line {
  font-family: 'Frank Ruhl Libre','Assistant',serif;
  font-size: 1.06rem;
}

.today-strip {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  min-height: 42px;
  padding: 9px 18px;
  border-bottom: 1px solid rgba(11,29,51,.08);
  background: rgba(251,250,247,.94);
  color: #3c4c61;
  box-shadow: 0 8px 22px rgba(16,36,62,.045);
  font-size: .9rem;
}
.today-strip #todayHebrewDate,
.today-strip #todayParsha { direction: rtl; }
.today-separator { color: var(--formal-gold); font-size: .72rem; }

.section-heading,
.floating-box h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.candle-icon path:first-child { fill: none; }

.schedule,
.floating-box {
  border-color: rgba(11,29,51,.09);
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(251,250,247,.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 14px 38px rgba(16,36,62,.095);
}

.schedule::before {
  height: 2px;
  background: linear-gradient(90deg, rgba(184,148,85,.88), rgba(184,148,85,.28), rgba(11,29,51,.38));
}

.schedule h3 {
  color: var(--formal-navy);
}
.schedule h3 .hebrew-title {
  font-family: 'Frank Ruhl Libre','Assistant',serif;
  font-size: 1.08em;
  font-weight: 700;
}

.schedule-item {
  transition: opacity .24s ease, background .24s ease, box-shadow .24s ease, transform .24s ease;
}
.schedule-item.is-past { opacity: .48; }
.schedule-item.is-next {
  opacity: 1;
  background: rgba(11,29,51,.045);
  box-shadow: inset 3px 0 0 rgba(184,148,85,.72);
}

.info-system { display: contents; }

.floating-box {
  overflow: hidden;
}
.floating-box::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: rgba(11,29,51,.16);
}
.info-card-primary {
  border-color: rgba(184,148,85,.25);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.94),
    0 18px 48px rgba(16,36,62,.13);
}
.info-card-primary::before {
  height: 3px;
  background: var(--formal-gold);
}
.info-card-secondary { min-height: 172px; }

.floating-box h4 {
  justify-content: center;
  width: 100%;
  color: var(--formal-navy);
  font-weight: 700;
}
.floating-box h4 .section-icon { width: 17px; height: 17px; }

.zmanim-next { font-weight: 700; }
.zmanim-countdown { margin-bottom: 15px; }

.wheel-container {
  isolation: isolate;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.wheel {
  transition: transform .55s cubic-bezier(.22,.72,.2,1);
  will-change: transform;
}
.wheel-item {
  transition: opacity .3s ease, color .3s ease, background .3s ease, font-weight .3s ease;
}
.wheel-item.active {
  background: rgba(11,29,51,.055);
  color: var(--formal-navy);
  font-weight: 700;
  opacity: 1;
}

.shabbos-status {
  margin: 10px 0 8px;
  padding: 7px 9px;
  border: 1px solid rgba(184,148,85,.26);
  border-radius: 9px;
  background: rgba(184,148,85,.07);
  color: var(--formal-navy);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

body.shabbos-mode .shabbat-schedule {
  border-color: rgba(184,148,85,.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.94),
    0 17px 46px rgba(16,36,62,.12);
}
body.shabbos-mode .shabbat-schedule::before {
  height: 3px;
  background: var(--formal-gold);
}
body.shabbos-mode .parsha-row { color: var(--formal-navy); }
body.shabbos-mode .info-card-primary { border-color: rgba(184,148,85,.36); }

.footer-inner {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
  text-align: left;
}
.footer-mark { width: 38px; height: 38px; border-radius: 8px; }
.footer-main,
.footer-meta { display: flex; flex-direction: column; gap: 4px; }
.footer-main strong { color: var(--formal-navy); font-size: .9rem; }
.footer-main span,
.footer-meta span { color: #6b7686; font-size: .78rem; }
.footer-meta { text-align: right; }
footer a { color: inherit; text-underline-offset: 2px; }

/* Restrained entrance motion. */
@media (prefers-reduced-motion: no-preference) {
  header { animation: header-in .42s ease-out both; }
  .today-strip { animation: fade-in .34s .08s ease-out both; }
  .entrance-card { animation: card-in .42s ease-out both; }
  .entrance-card:nth-child(1) { animation-delay: .07s; }
  .entrance-card:nth-child(2) { animation-delay: .13s; }
  .entrance-card:nth-child(3) { animation-delay: .19s; }
  .floating-box { animation: fade-in .34s .18s ease-out both; }
  @keyframes header-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}

@media (min-width: 1481px) {
  .floating-left { min-height: 318px; }
  .floating-right-top,
  .floating-right-bottom { min-height: 172px; }
}

@media (max-width: 1480px) {
  .info-system {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: min(900px, calc(100% - 32px));
    margin: 8px auto 24px;
  }

  .info-system .floating-box {
    position: relative;
    inset: auto;
    width: 100%;
    margin: 0;
    transform: none !important;
  }
  .info-system .floating-box:hover { transform: translateY(-1px) !important; }

  .floating-left {
    grid-column: 1 / -1;
    width: min(720px, 100%) !important;
    justify-self: center;
    padding: 22px 20px;
  }
  .floating-left .wheel-container { height: 160px; }

  .floating-right-top,
  .floating-right-bottom { min-height: 172px; }
}

@media (max-width: 680px) {
  header { padding-top: 36px; }
  .header-mark { width: 42px; height: 42px; margin-bottom: 12px; }
  h1.hebrew-name { font-size: 2.55rem; }
  .today-strip { gap: 7px; font-size: .82rem; padding-inline: 12px; }

  .info-system {
    width: min(100% - 22px, 760px);
    gap: 11px;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  }

  .floating-left {
    grid-column: 1 / -1;
    width: min(620px, 100%) !important;
    padding: 18px 16px;
  }
  .floating-left .wheel-container { height: 145px; }

  .floating-right-top,
  .floating-right-bottom {
    min-height: 168px;
    padding: 14px 12px;
  }
  .floating-right-top .date-clock-row { gap: 6px; font-size: 10px; }
  .floating-right-top .parsha-row { font-size: 14px; }
  .floating-right-top .clock-display-row { font-size: 14px; }
  .floating-right-bottom .line { gap: 5px; font-size: 11px; }

  .footer-inner {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
  .footer-meta {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid rgba(11,29,51,.08);
    text-align: left;
  }
}

@media (max-width: 470px) {
  .info-system { grid-template-columns: 1fr; width: calc(100% - 18px); }
  .floating-left,
  .floating-right-top,
  .floating-right-bottom {
    grid-column: 1;
    width: 100% !important;
  }
  .floating-left { padding: 16px 14px; }
  .floating-left .wheel-container { height: 135px; }
  .footer-inner { width: calc(100% - 24px); }
}
