/* Community Havurah — plain CSS, no framework. Palette comes from the logo. */
@font-face { font-family: "Fraunces"; src: url(/assets/fonts/fraunces-latin-wght-normal.a3a15433.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-latin-wght-normal.f11d729b.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --navy: #1d1d5e;
  --blue: #0b5fae;
  --sky: #2aa3df;
  --cream: #fbf7ef;
  --paper: #fff;
  --sand: #f1e9da;
  --gold: #e8a824;
  --ink: #1f2033;
  --muted: #55566b;
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.7 var(--sans); color: var(--ink); background: var(--cream); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--navy); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.35rem; margin: .8em 0 .3em; }
p { margin: 0 0 1.1em; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.center { text-align: center; }
.small { font-size: .9rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Buttons */
.btn { display: inline-block; background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; padding: .85em 1.6em; border-radius: 999px; border: 2px solid var(--navy); transition: background .2s, color .2s, transform .2s; }
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-sm { padding: .5em 1.1em; font-size: .95rem; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid #e6dfd0; position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy); font: 600 1.15rem/1.1 var(--serif); }
.brand small { display: block; font: 500 .8rem var(--sans); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: .2em; }
#nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
#nav a { display: block; padding: .5em .85em; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; }
#nav a:hover { background: var(--sand); }
#nav a[aria-current="page"] { background: var(--navy); color: #fff; }
.menu-btn { display: none; font: inherit; font-weight: 600; background: none; border: 2px solid var(--navy); color: var(--navy); border-radius: 999px; padding: .4em 1em; cursor: pointer; }
@media (max-width: 820px) {
  .js .menu-btn { display: block; }
  .js #nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid #e6dfd0; padding: .5rem 1rem 1rem; }
  .js #nav.open { display: block; }
  #nav ul { flex-direction: column; }
  .brand { font-size: 1rem; min-width: 0; }
  .brand small { font-size: .66rem; letter-spacing: .02em; }
  .brand img { width: 40px; height: 40px; }
  .menu-btn { flex: none; }
  .site-header .bar { position: relative; }
}

/* Announcement banner */
.banner { background: var(--gold); color: var(--ink); text-align: center; padding: .7rem 1rem; font-weight: 600; }
.banner p { margin: 0; }
.banner a { color: var(--navy); }
.banner[hidden] { display: none; }

/* Hero */
.hero { position: relative; min-height: clamp(460px, 76vh, 760px); display: grid; align-items: end; color: #fff; background: var(--navy); overflow: hidden; }
.hero-slides, .hero-slides .slide { position: absolute; inset: 0; }
.hero-slides .slide { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-slides .slide.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,18,60,.88) 0%, rgba(18,18,60,.5) 45%, rgba(18,18,60,.1) 100%); }
.hero-copy { position: relative; z-index: 2; padding-block: 4rem 3.5rem; max-width: var(--wrap); }
.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero p { font-size: clamp(1.1rem, 2vw, 1.4rem); max-width: 36ch; margin-bottom: 1.6rem; }
.hero .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.hero .btn:hover { background: #fff; border-color: #fff; }

/* Home intro */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding-block: 4.5rem; }
.intro h2 { margin-top: 0; }
.intro-copy p { font-size: 1.15rem; }
.intro-photos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .8rem; aspect-ratio: 1 / 1; }
.intro-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--sand); }
.intro-photos .p0 { grid-row: span 2; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; gap: 2rem; padding-block: 3rem; } }

/* Tiles */
.tiles-section { background: var(--paper); padding-block: 4rem 4.5rem; border-block: 1px solid #ece4d3; }
.tiles-section h2 { margin-top: 0; }
.tiles { list-style: none; margin: 2rem 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; }
.tile h3 { margin-top: .9rem; }
.tile p { color: var(--muted); font-size: .98rem; margin: 0; }
.tile-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--sand); }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .5s ease; }
.tile-photo:hover img { transform: scale(1.05); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* Fade-in for swapped photos (set by site.js) */
img[data-pool] { transition: opacity .5s ease; background: var(--sand); }
img.swapping { opacity: 0; }

/* Interior pages */
.page-head { background: var(--navy); color: #fff; }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); height: clamp(110px, 18vw, 220px); gap: 3px; }
.strip-item { overflow: hidden; background: var(--sand); }
.strip-item img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .strip { grid-template-columns: repeat(2, 1fr); } .strip-item:nth-child(3) { display: none; } }
.page-title { padding-block: 2.2rem 2.4rem; }
.page-title h1 { color: #fff; margin: 0; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.lede { font-size: 1.25rem; margin: .5rem 0 0; opacity: .92; max-width: 48ch; }
.prose { max-width: 46rem; padding-block: 2.5rem 4.5rem; margin-inline: auto; }
.prose > h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .6em; }
.notice { background: var(--sand); padding: 1rem 1.25rem; border-radius: var(--radius); }
.qr { width: 220px; height: auto; border-radius: 8px; border: 1px solid #ddd; margin: 0 0 1.5rem; }
address { font-style: normal; background: var(--sand); padding: 1rem 1.25rem; border-radius: var(--radius); display: inline-block; }

/* Embeds */
.embed iframe { width: 100%; border: 1px solid #e0d8c6; border-radius: var(--radius); background: #fff; }
.embed.cal iframe { height: 620px; }
.embed.form iframe { height: 1100px; }
.embed { margin: 1.2rem 0 2rem; }

/* Event cards */
.event-cards { list-style: none; padding: 0 !important; display: grid; gap: 1rem; }
.event-card { background: var(--paper); border: 1px solid #e6dfd0; border-left: 5px solid var(--gold); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 0 !important; }
.event-card h3 { margin: .1em 0 .2em; }
.event-card p { margin: 0 0 .6em; }
.event-date { font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.event-loc { color: var(--muted); }

/* Gallery */
.prose.wide { max-width: var(--wrap); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chips button { font: inherit; font-size: .95rem; padding: .35em 1em; border-radius: 999px; border: 2px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; text-transform: capitalize; }
.chips button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.gallery { list-style: none; margin: 0 !important; padding: 0 !important; columns: 3 240px; column-gap: .8rem; }
.gallery li { break-inside: avoid; margin: 0 0 .8rem !important; }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: var(--sand); cursor: zoom-in; border-radius: 10px; overflow: hidden; }
.gallery img { width: 100%; height: auto; transition: transform .4s ease; }
.gallery button:hover img { transform: scale(1.03); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10,10,40,.92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lb-close, .lb-nav { position: fixed; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 999px; font-size: 2rem; line-height: 1; width: 3rem; height: 3rem; cursor: pointer; }
.lb-close { top: 1rem; right: 1rem; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 1rem; } .lb-nav.next { right: 1rem; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.3); }

/* Footer */
.site-footer { background: var(--navy); color: #dfe0f5; padding-block: 3rem; margin-top: 0; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer a { color: #fff; text-underline-offset: .2em; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4em; }
.foot-brand { display: flex; gap: 1rem; }
.foot-brand img { background: #fff; border-radius: 50%; padding: 3px; align-self: flex-start; }
.foot-brand p { margin: 0; font-size: .95rem; }
.site-footer .small { grid-column: 1 / -1; color: #a9aad0; margin: 1rem 0 0; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
