/* Kahal Kadosh She'erit Yisrael — putti.sephardic.com
   Palette drawn from crochet kippot and the eastern Ugandan landscape. */
:root {
  --techelet: #1F4E8C;   /* primary blue */
  --techelet-deep: #163A69;
  --millet: #D9A21B;     /* harvest gold */
  --earth: #8A3B23;      /* laterite red */
  --leaf: #3E6B48;       /* banana-leaf green */
  --ink: #1A2233;
  --muted: #4A5568;
  --paper: #FFFFFF;
  --stone: #EEF1F5;
  --line: #CBD3DE;

  --serif: "Frank Ruhl Libre", "Times New Roman", Georgia, serif;
  --sans: "Assistant", "Segoe UI", system-ui, -apple-system, sans-serif;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }

h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

a { color: var(--techelet); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--millet); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
/* Header content lines up with the content column, not the window edges */
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 78rem; margin: 0 auto;
  padding: 0.9rem var(--gutter);
}
.brand { font: 700 1.2rem/1.2 var(--serif); color: var(--ink); text-decoration: none; }
.brand span { display: block; font: 400 0.85rem/1.2 var(--sans); color: var(--muted); }
.site-header nav { display: flex; gap: clamp(0.75rem, 2.5vw, 1.75rem); flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.site-header nav a:hover { color: var(--techelet); text-decoration: underline; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 8vw, 7rem) var(--gutter) clamp(3rem, 7vw, 6rem);
  max-width: 78rem; margin: 0 auto;
}
.hero-text { max-width: 40rem; }
.he { font: 500 clamp(1.5rem, 3vw, 2.1rem)/1.3 var(--serif); color: var(--techelet); margin: 0.75rem 0 1.5rem; text-align: left; }
.lede { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* The kippah: concentric crochet rows */
.hero-art { display: flex; justify-content: center; }
.kippah { width: min(100%, 26rem); height: auto; }
.kippah circle { fill: none; stroke-width: 19.5; stroke-dasharray: 4 1.6; }
.kippah .center { fill: var(--techelet); stroke: none; stroke-dasharray: none; }
.kippah .star { fill: var(--millet); }
.c-t { stroke: var(--techelet); }
.c-m { stroke: var(--millet); }
.c-e { stroke: var(--earth); }
.c-l { stroke: var(--leaf); }

@media (prefers-reduced-motion: no-preference) {
  .ring { opacity: 0; animation: stitch 520ms cubic-bezier(.2,.7,.3,1) forwards; }
  .ring:nth-of-type(2){animation-delay:0ms}
  .ring:nth-of-type(3){animation-delay:90ms}
  .ring:nth-of-type(4){animation-delay:180ms}
  .ring:nth-of-type(5){animation-delay:270ms}
  .ring:nth-of-type(6){animation-delay:360ms}
  .ring:nth-of-type(7){animation-delay:450ms}
  .ring:nth-of-type(8){animation-delay:540ms}
}
@keyframes stitch {
  from { opacity: 0; stroke-dasharray: 0 5.6; }
  to   { opacity: 1; stroke-dasharray: 4 1.6; }
}

/* Content sections: heading left, prose right */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  max-width: 78rem; margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
  border-top: 1px solid var(--line);
}
.prose { max-width: none; } /* the grid column already holds the line length */
.prose p { line-height: 1.65; }
.prose .btn { margin-top: 0.75rem; }
.photo { margin: 0 0 1.5rem; }
.photo img { display: block; width: 100%; height: auto; border-radius: 6px; }
figcaption { margin-top: 0.6rem; font-size: 0.95rem; color: var(--muted); }
.band figcaption { color: #D6E2F2; }

/* Full-width photo between hero and community */
.feature { margin: 0 auto; max-width: 78rem; padding: 0 var(--gutter) clamp(2.5rem, 6vw, 4.5rem); }
.feature img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 38%;
  border-radius: 8px;
}
.feature + .split { border-top: 0; padding-top: 0; }

/* School band */
.band { background: var(--techelet); color: var(--paper); }
.band + .split { border-top: 0; }
.band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  max-width: 78rem; margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter);
}
.band :focus-visible { outline-color: var(--millet); }

/* Draft notes — visible on purpose; delete each once real copy is in */
.draft-note {
  border: 2px dashed var(--millet);
  background: #FFF8E6;
  color: #5C4300;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}
.band .draft-note { background: rgba(255,255,255,0.08); color: #FCE9B8; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}
.btn-solid { background: var(--techelet); color: var(--paper); }
.btn-solid:hover { background: var(--techelet-deep); }
.btn-line { border-color: var(--techelet); color: var(--techelet); background: transparent; }
.btn-line:hover { background: var(--stone); }
.btn-light { background: var(--paper); color: var(--techelet); }
.btn-light:hover { background: #FCE9B8; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Contact form */
.contact { background: var(--stone); }
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  max-width: 78rem; margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
}
.form { display: grid; gap: 0.35rem; max-width: 34rem; }
.form label { font-weight: 600; margin-top: 0.85rem; }
.form input, .form select, .form textarea {
  font: inherit; color: var(--ink);
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  width: 100%;
}
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 3px solid var(--techelet); outline-offset: 1px; }
.form .cf-turnstile { margin-top: 1.25rem; }
.form button { justify-self: start; margin-top: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.6em; margin-top: 0.5rem; font-weight: 600; }
.status.ok { color: var(--leaf); }
.status.err { color: var(--earth); }

.site-footer { color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--line); }
.footer-inner { max-width: 78rem; margin: 0 auto; padding: 2rem var(--gutter); }

.notfound { max-width: 40rem; margin: 0 auto; padding: 6rem var(--gutter); }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }

/* Mobile */
@media (max-width: 760px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-header nav { justify-content: flex-start; }
  .hero, .split, .band-inner, .contact-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .kippah { width: min(70%, 16rem); }
}
