/* Chabad of Flushing — shared tokens and components (v2: dark, cinematic). Sites add page CSS only. */
@font-face {
  font-family: "Frank Ruhl Libre"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/shared/fonts/frl-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Frank Ruhl Libre"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/shared/fonts/frl-hebrew.woff2) format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

:root {
  --ink: #070f0c;
  --ink-2: #0d1a16;
  --ink-3: #142620;
  --text: #f3efe4;
  --muted: #a9b4ad;
  --line: rgba(255, 255, 255, .14);
  --gold: #cdae68;
  --gold-hi: #e7cf93;
  --danger: #ff9c88;
  --serif: "Frank Ruhl Libre", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 7.4vw, 6.4rem); }
h2 { font-size: clamp(2.1rem, 5.2vw, 4.2rem); }
h3 { font: 600 1.05rem/1.3 var(--sans); }
p { text-wrap: pretty; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[dir="rtl"] h1, [dir="rtl"] h2 { letter-spacing: 0; line-height: 1.12; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.45; max-width: 30em; color: #dcd8cc; }
.eyebrow { font: 600 .78rem/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
[dir="rtl"] .eyebrow { letter-spacing: .04em; font-size: .9rem; }
.stack > * + * { margin-top: var(--gap, 20px); }
.gold { color: var(--gold-hi); }

.skip { position: absolute; left: 12px; top: -80px; z-index: 200; background: var(--text); color: var(--ink); padding: 12px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }

/* Film grain over everything: one tiny inline SVG, no request */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.top { position: fixed; inset: 0 0 auto 0; z-index: 60; background: linear-gradient(180deg, rgba(7,15,12,.85), rgba(7,15,12,0)); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 14px; }
.brand { font: 700 .86rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
[dir="rtl"] .brand { letter-spacing: .02em; font-size: 1.05rem; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { background: rgba(7,15,12,.4); border: 1px solid var(--line); border-radius: 999px; min-height: 44px; min-width: 44px; padding: 0 14px; cursor: pointer; font-weight: 600; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.lang:hover { border-color: var(--gold); }
.textlink { text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 30px; border: 0; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #17130a; font-weight: 700; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 10px 40px -8px rgba(205,174,104,.55);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset, 0 16px 50px -8px rgba(205,174,104,.75); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.btn-small { min-height: 44px; padding: 0 20px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-quiet { background: rgba(7,15,12,.35); color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; backdrop-filter: blur(8px); }
.btn-quiet:hover { box-shadow: 0 0 0 1px var(--gold) inset; filter: none; }

/* Glass card + form */
.card {
  background: rgba(10, 20, 17, .72); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(20px, 3vw, 34px); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
}
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: .92rem; color: #dcd8cc; }
.input {
  width: 100%; min-height: 56px; padding: 0 16px; background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.input::placeholder { color: #7f8b84; }
.input:focus { outline: none; border-color: var(--gold-hi); background: rgba(255,255,255,.1); box-shadow: 0 0 0 3px rgba(205,174,104,.25); }
.error { color: var(--danger); font-size: .92rem; font-weight: 600; }
.note { font-size: .86rem; color: var(--muted); }

/* Reveal on entering the screen (JS adds .in). Without JS or with reduced motion everything is simply visible. */
.js [data-reveal] { opacity: 0; transform: translateY(28px); filter: blur(8px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; filter: none; }

/* Footer */
.foot { position: relative; z-index: 5; background: var(--ink); color: var(--muted); font-size: .88rem; padding-block: 28px; border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 4px 28px; justify-content: space-between; align-items: center; }
.foot a { color: var(--text); text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 420px) {
  .brand { font-size: .74rem; letter-spacing: .12em; }
  .top .btn-small { padding: 0 16px; }
}
@media (max-width: 350px) { .top .btn-small { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
}

/* ================= cinematic layer (shared/js/fx.js) ================= */
/* Loader: a counter on black, then the curtain lifts */
.loader { position: fixed; inset: 0; z-index: 300; display: grid; place-items: end start; padding: var(--gutter); background: #040908; color: var(--text); transition: clip-path 1.1s cubic-bezier(.77,0,.18,1); clip-path: inset(0 0 0 0); }
.loader.out { clip-path: inset(0 0 100% 0); }
.loader-brand { position: absolute; top: var(--gutter); inset-inline-start: var(--gutter); font: 700 .8rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .loader-brand { letter-spacing: .02em; font-size: 1rem; }
.loader-count { font: 300 clamp(5rem, 18vw, 15rem)/.8 var(--serif); letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--gold-hi); }
.loader-line { position: absolute; inset: auto 0 0 0; height: 1px; background: rgba(255,255,255,.1); }

/* Words that rise out of a mask. [data-split] is set up by fx.js; .on / .in / html.loaded start it. */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .06em .1em; margin-block: -.06em -.1em; }
.w > span { display: inline-block; transform: translate3d(0, 108%, 0); transition: transform 1.05s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--wi, 0) * 55ms + var(--d, 0ms)); }
.on .w > span, .in .w > span, .in.w > span, html.loaded .hero-copy .w > span, .w-in .w > span { transform: none; }
.beat:not(.on) .w > span { transition-duration: .5s; transition-delay: 0ms; }

/* Gold cursor (fine pointers only) */
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor label, html.has-cursor summary { cursor: none; }
html.has-cursor input[type="text"], html.has-cursor input[type="email"] { cursor: text; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 400; pointer-events: none; border-radius: 50%; transition: opacity .3s; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold-hi); }
.cursor-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(231,207,147,.6); display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease); }
.cursor-ring.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(231,207,147,.12); border-color: var(--gold-hi); }
.cursor-ring.word { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: rgba(7,15,12,.55); backdrop-filter: blur(6px); }
.cursor-ring span { font: 700 .62rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); }

@media (prefers-reduced-motion: reduce) {
  .w > span { transform: none !important; }
  .loader { display: none; }
}
