:root {
  --paper: #faf6ee;
  --ink: #14213d;
  --ink-soft: #4a5368;
  --gold: #a9853c;
  --stone: #efe5cf;
  --line: rgba(20, 33, 61, 0.14);
  --serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --sans: "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--serif); font-weight: 300; margin: 0; }
p { margin: 0; }
a { color: inherit; }
svg { display: block; }

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

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled { background: rgba(250, 246, 238, 0.94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.brand { font-family: var(--serif); font-size: 1.3rem; letter-spacing: 0.2em; text-decoration: none; }
.nav-cta { font-size: 0.95rem; font-weight: 400; text-decoration: none; border: 1px solid transparent; padding: 0.45rem 1.15rem; border-radius: 999px; transition: border-color 0.25s; }
.nav-cta:hover, .nav-cta:focus-visible { border-color: var(--ink); }

/* Opening screen */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 45%, #f6ecd6 100%);
  overflow: hidden;
}
.intro { width: 100%; max-width: 74rem; margin: 0 auto; padding: clamp(5.5rem, 12vh, 8rem) var(--pad) 2rem; position: relative; z-index: 1; animation: rise 1.1s ease-out both; }
h1 { font-size: clamp(1.6rem, 3.1vw, 2.7rem); line-height: 1.28; letter-spacing: -0.005em; max-width: 54rem; }
.more { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); max-width: 54rem; margin: 1.75rem 0 2rem; color: var(--ink-soft); font-size: clamp(1rem, 1.25vw, 1.15rem); }
.btn {
  display: inline-block; text-decoration: none; font: inherit; font-weight: 400; font-size: 0.98rem;
  background: var(--ink); color: var(--paper);
  padding: 0.9rem 1.9rem; border-radius: 999px; border: 1px solid var(--ink); cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.btn:hover { background: var(--gold); border-color: var(--gold); }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* Jerusalem scene */
.scene { flex: 1 1 auto; min-height: clamp(200px, 34svh, 420px); position: relative; }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sun { animation: sunrise 3.6s cubic-bezier(.2, .7, .2, 1) both; }
.sun .disc { fill: #e3b85a; }
.sun .halo { animation: breathe 7s ease-in-out 3.6s infinite; transform-origin: 1010px 232px; }
.hill { animation: lift 1.6s ease-out both; }
.hill.h1 { fill: #f0e7d2; }
.hill.h2 { fill: #e9dec3; animation-delay: 0.25s; }
.hill.h3 { fill: #dfd1ae; animation-delay: 0.5s; }
.city { animation: lift 1.6s ease-out 0.45s both; }
.house { fill: #f4ecd9; stroke: rgba(20, 33, 61, 0.38); stroke-width: 1; }
.house.back { fill: #f7f1e2; stroke: rgba(20, 33, 61, 0.24); }
.pane { fill: #c99b3f; animation: glow 5s ease-in-out 3s infinite; }
.trees { fill: #3b4a3d; animation: lift 1.6s ease-out 0.7s both; }
.shul .lines { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shul .lines > * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s ease-out forwards; animation-delay: var(--d, 0s); }
.shul .lines.gold { stroke: var(--gold); stroke-width: 1.9; }
.shul .fills > * { opacity: 0; animation: fade 1.4s ease-out 0.9s forwards; }
.shul .fl { fill: var(--stone); }
.shul .tx { fill: url(#stone); }
.shul .fills .glow { fill: #d9a94a; animation: fade 1.4s ease-out 3.2s forwards, glow 6s ease-in-out 4.6s infinite; }
pattern path { fill: none; stroke: rgba(20, 33, 61, 0.13); stroke-width: 1; }
.birds path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; opacity: 0.55; animation: fly 26s linear infinite; }
.birds .b2 { animation-duration: 31s; animation-delay: -6s; }
.birds .b3 { animation-duration: 29s; animation-delay: -14s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sunrise { from { transform: translateY(150px); } to { transform: none; } }
@keyframes breathe { 50% { transform: scale(1.12); } }
@keyframes lift { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes fly { from { transform: translate(-360px, 20px); } to { transform: translate(1200px, -70px); } }

/* Contact */
.contact { padding: clamp(4.5rem, 9vw, 7.5rem) 0; scroll-margin-top: 3rem; }
.contact h2 { font-size: clamp(1.6rem, 3.1vw, 2.7rem); line-height: 1.2; }
.two { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.4rem; }
.field .req { color: var(--gold); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink-soft);
  padding: 0.55rem 0; border-radius: 0; outline: none;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-bottom: 2px solid var(--gold); padding-bottom: calc(0.55rem - 1px); }
.field input[type="checkbox"] { width: auto; margin-right: 0.5rem; }
.field [aria-invalid="true"] { border-bottom-color: #a23b2a; }
.field .help { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.35rem; }
.field .err, .form-error { font-size: 0.88rem; color: #a23b2a; margin-top: 0.35rem; }
.form-error:empty, .field .err:empty { display: none; }
.form-status { color: var(--ink-soft); }
.thanks { font-family: var(--serif); font-size: 1.5rem; line-height: 1.4; }

.footer { border-top: 1px solid var(--line); padding: 2.25rem 0; color: var(--ink-soft); font-size: 0.95rem; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer .brand { color: var(--ink); font-size: 1.1rem; }

a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 820px) {
  .more, .two { grid-template-columns: 1fr; }
  .more { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro, .sun, .sun .halo, .hill, .city, .trees, .pane, .birds path { animation: none; }
  .shul .lines > * { animation: none; stroke-dashoffset: 0; }
  .shul .fills > *, .shul .fills .glow { animation: none; opacity: 1; }
}