@import url("/assets/base.css");
:root {
  color-scheme: light;
  --ink: #292d29;
  --muted: #737569;
  --paper: #fffcf3;
  --yellow: #f5dd79;
  --blue: #dce7ed;
  --line: #e8e5da;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a {
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #3972a1;
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}
.site-header,
main,
footer {
  max-width: 1180px;
  margin: auto;
  padding: 0 38px;
}
.site-header {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.logo {
  font-size: 38px;
  letter-spacing: -2px;
  font-weight: 800;
  line-height: 1;
}
.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-fallback {
  font: inherit;
  letter-spacing: inherit;
}
.brand-image {
  display: block;
  width: 150px;
  height: 68px;
  object-fit: contain;
  object-position: left center;
}

nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 14px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 24px;
  background: var(--yellow);
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 650;
  color: var(--ink);
  text-align: center;
}
.button:hover {
  filter: brightness(0.96);
}
.button.small {
  min-height: 42px;
  padding: 8px 18px;
}
.button.secondary {
  background: transparent;
  border-color: var(--line);
}
.text-link {
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 3px 0;
  font-size: 14px;
}
.hero {
  padding: 60px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 70px;
  align-items: center;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(38px, 4.5vw, 60px);
  font-weight: 550;
  letter-spacing: -2.4px;
  line-height: 1.07;
  margin: 0 0 25px;
}
h1 em {
  font-style: normal;
  background: linear-gradient(transparent 64%, var(--yellow) 64%);
  padding-right: 12px;
}
h2 {
  font-weight: 550;
  font-size: clamp(28px, 3.5vw, 42px);
  letter-spacing: -1.3px;
  line-height: 1.18;
  margin: 0 0 18px;
}
h3 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 10px;
}
.lead {
  font-size: 17px;
  max-width: 440px;
  color: var(--muted);
}
.actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 26px 0;
}
.hero-note {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 48px;
  font-size: 12px;
  color: var(--muted);
}
.sun {
  font-size: 45px;
  color: #b7ae75;
  line-height: 1;
}
.hero-art {
  position: relative;
  min-height: 455px;
  padding: 10px 30px 35px;
}
.arch {
  background: #e8eacb;
  border-radius: 220px 220px 14px 14px;
  height: 430px;
  position: relative;
  overflow: hidden;
  border: 6px solid #f1edda;
  box-shadow: 0 12px 32px #292d290c;
}
.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.art-star {
  position: absolute;
  font-size: 125px;
  line-height: 1;
  color: var(--yellow);
  top: 0;
  right: -10px;
  transform: rotate(12deg);
}
.art-caption {
  position: absolute;
  bottom: 0;
  left: -15px;
  transform: rotate(-5deg);
  background: var(--blue);
  border-radius: 12px;
  padding: 20px 28px;
  box-shadow: 0 8px 20px #292d2908;
}
.art-caption .hebrew {
  display: block;
  font-size: 25px;
  margin-bottom: 8px;
  color: #586d77;
}
.art-caption strong {
  display: block;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.6px;
}
.social-links {
  margin-left: auto;
  flex-wrap: wrap;
  gap: 12px;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--ink);
  background: #f8efcd;
  border: 1px solid #e9dba5;
  border-radius: 50%;
}
.social-links a svg {
  display: block;
  width: 24px;
  height: 24px;
}
.social-links a:hover {
  background: var(--yellow);
  border-color: var(--yellow);
}
.decorative-star {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}
.decorative-star svg {
  display: block;
  width: 100%;
  height: 100%;
}

.section {
  padding: 65px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}
.about-copy p:first-child {
  margin-top: 0;
}
.about-copy {
  color: var(--muted);
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 28px;
}
.section-head > p {
  font-size: 14px;
  color: var(--muted);
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.course-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  background: #fffef9;
  min-width: 0;
}
.course-card summary {
  cursor: pointer;
  font-size: 19px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.course-card p {
  font-size: 14px;
  color: var(--muted);
}
.calendar-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 38px;
  align-items: start;
}
.calendar-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.month-nav h3 {
  font-size: 15px;
  margin: 0;
  text-transform: capitalize;
}
.month-nav button {
  background: none;
  border: 0;
  width: 32px;
  height: 36px;
}
.week,
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  gap: 3px;
}
.week {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 10px;
}
.days button,
.days > span {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: none;
  position: relative;
  font-size: 12px;
}
.days button.has-event:after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9f8949;
  bottom: 3px;
  left: calc(50% - 2px);
}
.days button.selected {
  background: var(--yellow);
}
.calendar-card .text-link {
  margin-top: 15px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.event-card {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  align-items: start;
}
.event-card:first-child {
  padding-top: 0;
}
.date-tile {
  background: #f3efdf;
  border-radius: 10px;
  text-align: center;
  min-width: 63px;
  padding: 10px;
  font-size: 11px;
  text-transform: uppercase;
}
.date-tile strong {
  display: block;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 550;
}
.event-copy {
  flex: 1;
  min-width: 0;
}
.event-copy h3 a:hover {
  text-decoration: underline;
}
.event-copy p {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0;
}
.tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tag {
  font-size: 10px;
  background: #f5e6a9;
  padding: 3px 9px;
  border-radius: 99px;
}
.tag.yahad {
  background: #dbe9f8;
  color: #376790;
}
.event-copy h3 {
  overflow-wrap: anywhere;
}
.event-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 15px;
}
.join-banner {
  margin: 20px 0 80px;
  background: #ebeccf;
  padding: 38px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.join-banner > span {
  font-size: 60px;
  color: #939a71;
}
.join-banner div {
  flex: 1;
}
.join-banner h2 {
  font-size: 30px;
  margin-bottom: 6px;
}
.join-banner p {
  font-size: 14px;
  margin: 0;
}
.join-banner .button {
  background: #fffdf1;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  padding-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 30px;
}
footer p {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
}
.detail {
  max-width: 820px;
  margin: auto;
  min-height: 65vh;
}
.detail img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  max-height: min(900px, 85svh);
  object-fit: contain;
  border-radius: 12px;
  margin: 22px auto;
}
.detail h1 {
  font-size: 48px;
  letter-spacing: -2px;
  overflow-wrap: anywhere;
}
.detail .description {
  text-align: justify;
  hyphens: auto;
}
.detail > .button {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 3.3em auto 12px;
}
.detail .back {
  display: block;
  margin-bottom: 35px;
}
.empty {
  padding: 25px;
  color: var(--muted);
}
dialog {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  max-width: 530px;
  width: calc(100% - 32px);
  padding: 42px;
}
dialog::backdrop {
  background: #20251e88;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 31px;
}
dialog > p {
  font-size: 15px;
}
.close {
  position: absolute;
  right: 15px;
  top: 8px;
  border: 0;
  background: none;
  font-size: 28px;
}
.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  background: white;
  padding: 12px;
  z-index: 5;
}
.skip:focus {
  top: 10px;
}
@media (max-width: 800px) {
  .site-header,
  main,
  footer {
    padding-left: 22px;
    padding-right: 22px;
  }
  .site-header {
    min-height: 95px;
  }
  .site-header nav {
    gap: 14px;
  }
  .site-header nav > a {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }
  .hero-art {
    min-height: 340px;
    max-width: 390px;
    width: 100%;
    margin: auto;
  }
  .arch {
    min-height: 305px;
    padding: 45px 35px;
  }
  .art-star {
    font-size: 105px;
  }
  .hero-note {
    margin-top: 26px;
  }
  h1 {
    letter-spacing: -2.5px;
    font-size: 57px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .section {
    padding: 42px 0;
  }
  .section-head {
    display: block;
  }
  .calendar-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .calendar-card {
    max-width: 370px;
    width: 100%;
    margin: auto;
  }
  .course-grid {
    grid-template-columns: 1fr;
  }
  .join-banner {
    padding: 25px;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 44px;
  }
  .join-banner > span {
    display: none;
  }
  .join-banner div {
    flex-basis: 100%;
  }
  footer {
    flex-wrap: wrap;
    gap: 15px;
  }
  footer p {
    min-width: 150px;
  }
  .detail h1 {
    font-size: 36px;
  }
  .event-card {
    gap: 15px;
  }
  dialog {
    padding: 34px 25px;
  }
}

/* Keep inherited shared card rules from pushing content against the border. */
.event-list .event-card {
  padding: 22px;
  margin-bottom: 14px;
}

/* A quiet contact sheet; photographs open without cropping in the viewer. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}
.photo-card {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  background: #f0e8cf;
  box-shadow: 0 5px 18px #493b1710;
}
.photo-card:only-child {
  width: 100%;
  max-width: 720px;
  justify-self: center;
}
.photo-card:nth-child(6n + 2),
.photo-card:nth-child(6n + 5) {
  border-radius: 48px 18px 18px 18px;
}
.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 250ms ease;
}
.photo-card:hover img {
  transform: scale(1.04);
}
.photo-card::after {
  content: "↗";
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  line-height: 34px;
  border-radius: 50%;
  background: #fffcf3e8;
  color: var(--ink);
}
.photo-card.photo-unavailable::before {
  content: "Фотография временно недоступна";
  position: absolute;
  inset: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.gallery-footer p {
  font-size: 13px;
}
.photo-dialog {
  max-width: 1080px;
  padding: 16px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.photo-dialog::backdrop {
  background: #20251ee6;
}
.photo-toolbar,
.photo-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.photo-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.photo-dialog button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  font-size: 24px;
}
.photo-stage {
  position: relative;
  margin: 14px 0;
  background: #f1eee3;
  border-radius: 12px;
  overflow: hidden;
}
.photo-stage img {
  display: block;
  width: 100%;
  height: min(68dvh, 740px);
  object-fit: contain;
}
.photo-stage p {
  padding: 45px 20px;
  text-align: center;
}
.photo-navigation span {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
body.photo-viewing {
  overflow: hidden;
}
@media (max-width: 800px) {
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .photo-card:nth-child(n) {
    border-radius: 14px;
  }
  .photo-card:first-child {
    grid-column: 1 / -1;
    border-radius: 32px 14px 14px 14px;
  }
  .photo-dialog {
    padding: 12px;
  }
  .photo-stage img {
    height: 60dvh;
  }
  .gallery-footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo-card img {
    transition: none;
  }
}

@media (max-width: 800px) {
  .hero h1 {
    font-size: clamp(34px, 8vw, 52px);
    letter-spacing: -1.6px;
  }
  .hero-art {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    min-height: 405px;
    padding: 10px 20px 45px;
  }
  .arch {
    height: 350px;
    min-height: 0;
    padding: 0;
  }
  .art-caption {
    left: 0;
    padding: 16px 24px;
  }
  .art-caption strong {
    font-size: 26px;
  }
  .brand-image {
    width: 120px;
    height: 56px;
  }
  footer {
    align-items: flex-start;
  }
  .social-links {
    margin-left: 0;
    width: 100%;
  }
}
