/* Tiferet Israel Congregation

   One typeface for everything, Hebrew and English: Frank Ruhl Libre.
   Colours from the building: ivory marble, the green marble around the
   heichal, its brass doors, the red brick outside.
   The arch is a Moroccan horseshoe arch (the head is wider than the opening),
   defined once as #horseshoe in layout.html and reused for photos and tiles. */

:root {
  --paper: #f6f1e7;
  --paper-deep: #ece4d3;
  --card: #fffdf8;
  --ink: #1d1b18;
  --ink-soft: #5b554d;
  --verde: #1e3b33;
  --verde-deep: #142922;
  --brass: #c19a4b;
  --brass-dark: #8a6a2b;
  --brick: #96462f;
  --rule: #cfc6b2;
  --face: "Frank Ruhl Libre", "Times New Roman", serif;
  --wrap: 72rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --strip: clamp(3.5rem, 8vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--face); font-size: 1.15rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--brass-dark); }
a:hover { color: var(--brick); }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.12; }
h1 em, h2 em { font-style: normal; }
address { font-style: normal; }
figure { margin: 0; }
figcaption { font-size: .95rem; line-height: 1.4; color: var(--ink-soft); margin-top: .7rem; }
small { font-size: .95rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 0; }
.defs { position: absolute; width: 0; height: 0; }

/* ---------- buttons ---------- */

.button { display: inline-block; background: var(--verde); color: var(--paper); text-decoration: none; font-weight: 500; font-size: 1.05rem; line-height: 1.2; padding: .8rem 1.7rem .75rem; border-radius: 99px; border: 1.5px solid var(--verde); transition: background .2s, color .2s; }
.button:hover { background: var(--paper); color: var(--verde); }
.button--brass { background: var(--brass); border-color: var(--brass); color: var(--verde-deep); }
.button--brass:hover { background: transparent; color: var(--brass); }
.button--line { background: transparent; color: var(--paper); border-color: rgba(246, 241, 231, .6); }
.button--line:hover { background: var(--paper); color: var(--verde); }
.button--small { padding: .5rem 1.2rem .45rem; font-size: 1rem; }

/* ---------- header ---------- */

.site-header { background: var(--paper); position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 var(--rule); }
.site-header__in { display: flex; align-items: center; gap: .6rem 2rem; flex-wrap: wrap; padding-block: .7rem; }
.logo { display: flex; align-items: center; gap: .8rem; text-decoration: none; margin-right: auto; }
.logo:hover { color: inherit; }
.logo svg { width: 2.1rem; height: 2.8rem; flex: none; }
.logo__he { display: block; font-size: 1.45rem; font-weight: 700; line-height: 1; color: var(--verde); }
.logo__en { display: block; font-size: .98rem; line-height: 1.2; margin-top: .2rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem 1.6rem; }
.nav a { text-decoration: none; display: block; padding: .3rem 0; font-size: 1.05rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--verde); border-bottom-color: var(--rule); }
.nav a[aria-current] { border-bottom-color: var(--brass); color: var(--verde); }

/* ---------- home: hero ---------- */

.hero {
  background-color: var(--verde); color: #efe9da;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M80 40 68.28 51.72V68.28H51.72L40 80 28.28 68.28H11.72V51.72L0 40 11.72 28.28V11.72H28.28L40 0 51.72 11.72H68.28V28.28Z' fill='none' stroke='%23c19a4b' stroke-opacity='.13'/%3E%3C/svg%3E");
}
.hero__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem) calc(clamp(3rem, 7vw, 5.5rem) + 4rem); }
.hero__tag { color: var(--brass); margin-bottom: 1rem; font-size: 1.1rem; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; color: #fff; margin-bottom: 1.4rem; }
.hero__lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; max-width: 33rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 0; }

.archphoto { position: relative; width: 100%; max-width: 21rem; justify-self: end; aspect-ratio: 3 / 4; }
.archphoto img { width: 100%; height: 100%; object-fit: cover; clip-path: url(#horseshoe); }
.archphoto svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.archphoto--plain { justify-self: start; }

/* the three standing times, overlapping the hero */
.timesbar { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr)); background: var(--card); box-shadow: 0 18px 40px -22px rgba(20, 41, 34, .55); margin-top: -4rem; position: relative; }
.timesbar > div { padding: 1.5rem 1.6rem 1.35rem; }
.timesbar > div + div { border-left: 1px solid var(--rule); }
.timesbar__now { background: var(--brass); color: var(--verde-deep); }
.timesbar__now strong { display: block; font-weight: 500; font-size: 1.35rem; line-height: 1.2; }
.timesbar__now > span { display: block; font-size: .98rem; line-height: 1.35; margin-bottom: .5rem; }
.timesbar b { display: block; font-weight: 500; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; color: var(--verde); }
.timesbar b small { font-size: .42em; margin-left: .15em; }
.timesbar div > span:last-child { display: block; margin-top: .45rem; color: var(--ink-soft); line-height: 1.3; }
.timesbar__now > span:last-child { color: inherit !important; margin: 0 !important; }

/* ---------- strips ---------- */

.strip { padding-block: var(--strip); }
.strip--deep { background: var(--paper-deep); }
.strip--green { background: var(--verde); color: #efe9da; }

.title { text-align: center; max-width: 44rem; margin: 0 auto 2.6rem; }
.title svg { width: 2rem; height: 2rem; margin: 0 auto .9rem; display: block; }
.title h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
.title p { margin: .9rem 0 0; color: var(--ink-soft); font-size: 1.2rem; }
.title .greet { color: var(--brass-dark); margin: 0 0 .5rem; font-size: 1.15rem; }

.twocol { columns: 2; column-gap: 3rem; max-width: 58rem; margin-inline: auto; }
.twocol p { break-inside: avoid; }

.duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.duo--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.duo h2 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 1.1rem; }
.duo .button { margin-top: .6rem; }

/* the Shabbat plaque: horseshoe head, straight sides */
.plaque { max-width: 22rem; margin-inline: auto; color: #efe9da; width: 100%; }
.plaque__head { position: relative; aspect-ratio: 100 / 80; }
.plaque__head svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plaque__head div { position: absolute; inset: 24% 14% 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.plaque__small { font-size: 1.05rem; color: var(--brass); }
.plaque__he { font-size: clamp(1.9rem, 5vw, 2.4rem); font-weight: 700; line-height: 1.1; color: #fff; margin: .2rem 0; }
.plaque__en { font-size: 1.1rem; }
.plaque__body { background: var(--verde); margin: -1px 10% 0; padding: .4rem 1.3rem 1.4rem; }
.plaque__body dl { margin: 0; border-top: 1px solid var(--brass); }
.plaque__body dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0 .45rem; border-bottom: 1px solid rgba(239, 233, 218, .22); }
.plaque__body dd { margin: 0; font-weight: 700; white-space: nowrap; }
.plaque__body p { font-size: .95rem; line-height: 1.4; margin: .9rem 0 0; opacity: .85; }

/* history */
.framed { position: relative; max-width: 26rem; margin: .75rem; }
.framed__img { position: relative; }
.framed__img::before { content: ""; position: absolute; inset: -.75rem; border: 1.5px solid var(--brass-dark); }
.framed img { position: relative; width: 100%; }
.framed figcaption { margin-top: 1.7rem; }

.years { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.years li { display: grid; grid-template-columns: 5rem 1fr; column-gap: 1.2rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.years li:first-child { border-top: 1px solid var(--rule); }
.years time { font-size: 1.6rem; font-weight: 500; color: var(--brass-dark); line-height: 1; }
.years p { margin: 0; }

/* four doors */
.doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); list-style: none; margin: 0; padding: 0; }
.doors a { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; aspect-ratio: 3 / 4; clip-path: url(#horseshoe); background: var(--verde); color: #efe9da; text-decoration: none; padding: 0 17% 15%; transition: background .25s; }
.doors li:nth-child(2) a { background: var(--brass-dark); }
.doors li:nth-child(3) a { background: var(--brick); }
.doors li:nth-child(4) a { background: var(--verde-deep); }
.doors a:hover { background: var(--ink) !important; color: #fff; }
.doors svg { width: 2.4rem; height: 2.4rem; margin-bottom: auto; margin-top: 62%; opacity: .9; }
.doors strong { font-weight: 500; font-size: clamp(1.25rem, 2.2vw, 1.7rem); line-height: 1.1; color: #fff; }
.doors span { font-size: .98rem; line-height: 1.35; margin-top: .5rem; }
.doors i { font-style: normal; margin-top: .6rem; }

/* visit */
.visit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.visit h2 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 1rem; color: #fff; }
.visit address { font-size: 1.35rem; line-height: 1.35; margin-bottom: 1rem; color: #fff; }
.visit a { text-decoration-color: var(--brass); }
.visit a:hover { color: #fff; }
.visit iframe { width: 100%; height: 100%; min-height: 22rem; border: 0; display: block; background: var(--verde-deep); }

/* ---------- inner pages ---------- */

.pagehead { background: var(--verde); color: #efe9da; box-shadow: 0 0 0 100vmax var(--verde); clip-path: inset(0 -100vmax); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.pagehead h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.04; color: #fff; max-width: 18ch; }
.pagehead p { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; max-width: 36rem; margin: 1.1rem 0 0; }

.band { padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--rule); }
.pagehead + .band { border-top: 0; }
.band.band--deep { background: var(--paper-deep); border-top: 0; }
.band--deep + .band { border-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.5rem clamp(1.5rem, 5vw, 4rem); align-items: start; }
.split--flip { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.thirds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem clamp(1.5rem, 4vw, 3rem); }
.h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: .8rem; }
.h3 { font-size: 1.3rem; margin: 1.6rem 0 .5rem; }
.thirds .h3 { margin-top: .4rem; padding-top: .9rem; border-top: 2px solid var(--brass-dark); }
.prose { max-width: 38rem; }
.prose > :last-child { margin-bottom: 0; }
.aside { font-size: 1rem; line-height: 1.5; color: var(--ink-soft); }
.arrow::after { content: " \2192"; }

.sched { width: 100%; border-collapse: collapse; background: var(--card); box-shadow: 0 14px 30px -24px rgba(20, 41, 34, .5); }
.sched th, .sched td { text-align: left; vertical-align: baseline; padding: .85rem 1.3rem .8rem; border-bottom: 1px solid var(--rule); font-weight: 400; }
.sched tr:last-child > * { border-bottom: 0; }
.sched td:last-child { text-align: right; white-space: nowrap; font-weight: 700; color: var(--verde); }
.sched small { display: block; color: var(--ink-soft); line-height: 1.4; }
.sched thead th { background: var(--verde); color: #efe9da; border-bottom: 0; font-weight: 500; padding-block: .6rem .55rem; }
.sched thead th:last-child { text-align: right; }

.board { background: var(--verde); color: #efe9da; padding: 1.6rem 1.6rem 1.3rem; }
.board h2 { font-size: 1.6rem; color: #fff; }
.board__date { font-size: .95rem; color: var(--brass); margin: .2rem 0 .6rem; }
.board table { width: 100%; border-collapse: collapse; }
.board th, .board td { text-align: left; font-weight: 400; padding: .45rem 0 .4rem; vertical-align: baseline; border-bottom: 1px solid rgba(239, 233, 218, .22); }
.board td { text-align: right; white-space: nowrap; padding-left: 1rem; font-weight: 700; }
.board .board__group th { border-bottom: 1px solid var(--brass); color: var(--brass); padding-top: 1rem; }
.board .board__group span[lang="he"] { float: right; font-weight: 700; }
.board__foot { font-size: .95rem; line-height: 1.4; margin: .9rem 0 0; opacity: .85; }

.times { margin: 0; border-top: 1px solid var(--rule); }
.times > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0 .55rem; border-bottom: 1px solid var(--rule); }
.times dd { margin: 0; text-align: right; }

.plain { padding-left: 1.2rem; margin: 0 0 1.1em; }
.plain li { margin-bottom: .6em; }
.plain li::marker { color: var(--brass-dark); }
.plain strong, .note strong { font-weight: 700; }
.note { background: var(--card); border-left: 3px solid var(--brass); padding: .9rem 1.2rem; max-width: 38rem; }

.names { columns: 2; column-gap: 2.5rem; list-style: none; padding: 0; margin: 0; max-width: 34rem; }
.names li { padding: .55rem 0 .5rem; border-bottom: 1px solid var(--rule); break-inside: avoid; }

.snapshot { max-width: 300px; }
.snapshot + .snapshot { margin-top: 1.8rem !important; }
.snapshot img { width: 100%; transform: none !important; border: 6px solid var(--card); box-shadow: 0 14px 30px -22px rgba(20, 41, 34, .6); }

.map { width: 100%; height: auto; display: block; background: var(--card); box-shadow: 0 14px 30px -24px rgba(20, 41, 34, .5); }
.map text { font-family: var(--face); }

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

.zellige {
  height: 40px; background-color: var(--verde-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M40 20 34.14 25.86V34.14H25.86L20 40 14.14 34.14H5.86V25.86L0 20 5.86 14.14V5.86H14.14L20 0 25.86 5.86H34.14V14.14Z' fill='none' stroke='%23c19a4b' stroke-opacity='.6'/%3E%3Cpath d='M20 12.5 27.5 20 20 27.5 12.5 20Z' fill='none' stroke='%23c19a4b' stroke-opacity='.3'/%3E%3C/svg%3E");
  background-position: center;
}
.footer { background: var(--verde-deep); color: #ddd6c4; font-size: 1.05rem; }
.footer a { text-decoration-color: rgba(193, 154, 75, .7); }
.footer a:hover { color: #fff; }
.footer h2 { font-size: 1.2rem; color: var(--brass); margin-bottom: .7rem; }
.footer__grid { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 2.5rem; padding-block: 3rem 2.2rem; }
.footer__he { font-size: 2rem; font-weight: 700; line-height: 1; margin: 0 0 .5rem; color: #fff; text-align: left; }
.footer__name { margin: 0 0 .5rem; color: #fff; font-size: 1.2rem; }
.footer__times { margin: 0 0 .9rem; }
.footer__times div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid rgba(221, 214, 196, .18); }
.footer__times dd { margin: 0; white-space: nowrap; }
.footer__links { list-style: none; padding: 0; margin: 0; }
.footer__links li { padding: .2rem 0; }
.footer__base { padding-block: 1rem 1.3rem; border-top: 1px solid rgba(221, 214, 196, .18); font-size: .95rem; opacity: .8; }

/* ---------- review mode (add ?review to any address) ---------- */

.review [data-confirm] { outline: 2px dashed #e06a3c; outline-offset: 3px; }
.review [data-confirm]::after {
  content: "Confirm: " attr(data-confirm);
  display: block; margin-top: .4rem; padding: .35rem .6rem; background: var(--brick); color: #fff;
  font: 500 .78rem/1.35 system-ui, sans-serif; white-space: normal; text-align: left;
}
.review img[data-confirm] { outline-offset: -4px; }
.reviewbar { display: none; }
.review .reviewbar { display: block; background: var(--brick); color: #fff; font: 500 .82rem/1.4 system-ui, sans-serif; padding: .5rem var(--gutter); text-align: center; }
.review .reviewbar a { color: #fff; }

/* ---------- small screens ---------- */

@media (max-width: 60rem) {
  .hero__in, .duo, .duo--flip, .visit, .split, .split--flip, .thirds { grid-template-columns: minmax(0, 1fr); }
  .archphoto { justify-self: center; max-width: 17rem; }
  .timesbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timesbar__now { grid-column: 1 / -1; }
  .timesbar > div:nth-child(2) { border-left: 0; }
  .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 34rem; margin-inline: auto; }
  .twocol { columns: 1; max-width: 38rem; }
  .duo--flip > :first-child { order: 2; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 36rem) {
  body { font-size: 1.08rem; }
  .site-header { position: static; }
  .nav ul { gap: 0 1.1rem; }
  .nav a { font-size: 1rem; }
  .site-header .button { display: none; }
  .timesbar > div { padding: 1.1rem .9rem 1rem; }
  .doors span { display: none; }
  .doors svg { width: 1.8rem; height: 1.8rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .names { columns: 1; }
  .sched th, .sched td { padding-inline: .9rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .footer, .reviewbar { display: none; } body { background: #fff; } }
