/* M FR. Marchment: TSURIS
   Fonts: narkiss-tam (bold headlines) and henri (secondary headlines, script) from Typekit;
   Inter (body) from Google Fonts. */

:root {
  --bg: #0d0c0b;
  --text: #ece6da;
  --muted: #8f887c;
  --gold: #fdcc2f;
  --display: "narkiss-tam", "Arial Narrow", sans-serif;
  --script: "henri", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --fade: clamp(8rem, 24vw, 20rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

h1, h2, h3, p, ol { margin: 0; }
svg { display: block; }
a { color: inherit; }

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem; top: -5rem;
  z-index: 10;
  padding: .75rem 1.25rem;
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Shared type */
.eyebrow {
  margin-bottom: .75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

h2 {
  margin-bottom: 1.5rem;
  font-family: var(--script);
  font-weight: 700;
  font-size: clamp(2.5rem, 10.5vw, 3.25rem);
  line-height: 1.05;
  text-transform: uppercase;
}

/* Hebrew lookalikes: the real Latin letter stays in the DOM (search engines, screen readers,
   copy and paste); CSS paints the Hebrew glyph over it. */
.he { position: relative; display: inline; color: transparent; }
.he::after {
  content: attr(data-ch);
  content: attr(data-ch) / "";
  position: absolute;
  inset: 0;
  text-align: center;
  color: var(--ink, var(--text));
}
@media (forced-colors: active) { .he { color: inherit; } .he::after { display: none; } }


/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.btn {
  --scratch: var(--gold);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding: .6rem 2rem;
  color: var(--scratch);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .15s .1s;
}

/* Thick scribble that scratches in left to right on hover */
.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -6px;
  background: var(--scratch-img) center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .4s cubic-bezier(.6, 0, .2, 1);
}
.btn:hover, .btn:focus-visible { color: #0d0c0b; }
.btn:hover::before, .btn:focus-visible::before { clip-path: inset(0); }

.btn { --scratch-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M4 12 C60 4 140 10 196 6 M6 20 C70 14 130 24 194 16 M4 30 C50 38 150 26 197 33 M8 41 C80 34 120 46 195 38 M5 50 C70 56 130 46 196 52 M10 8 L190 54 M12 54 L188 6' fill='none' stroke='%23fdcc2f' stroke-width='15' stroke-linecap='round'/%3E%3C/svg%3E"); }
.btn-ghost { --scratch: var(--text); --scratch-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M4 12 C60 4 140 10 196 6 M6 20 C70 14 130 24 194 16 M4 30 C50 38 150 26 197 33 M8 41 C80 34 120 46 195 38 M5 50 C70 56 130 46 196 52 M10 8 L190 54 M12 54 L188 6' fill='none' stroke='%23ece6da' stroke-width='15' stroke-linecap='round'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) { .btn::before { transition: none; } }

/* Header, laid over the hero */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--pad);
  text-transform: uppercase;
}

/* Heavy blur and dark tint that dissolve into the page below the bar */
.site-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 -3.5rem;
  background: linear-gradient(rgba(13, 12, 11, .8), rgba(13, 12, 11, .35));
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  -webkit-mask-image: linear-gradient(#000 45%, transparent);
  mask-image: linear-gradient(#000 45%, transparent);
  pointer-events: none;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .18em;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav { display: flex; align-items: center; gap: .5rem 1.5rem; }

.site-header nav a {
  padding: .5rem 0;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-decoration: none;
}
.site-header nav a:hover { color: var(--gold); }

.site-header .nav-cta { padding: .5rem 1rem; border: 1px solid var(--gold); color: var(--gold); }

/* Page is short and single-scroll, so phones keep just the call to action */
@media (max-width: 40em) {
  .site-header nav a:not(.nav-cta) { display: none; }
}

/* Image bands. Each one fades out at its edges and overlaps the next,
   so the photos crossfade instead of cutting. */
.band {
  position: relative;
  isolation: isolate;
  display: grid;
  padding: calc(var(--fade) + 2rem) var(--pad);
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}

.band + .band { margin-top: calc(var(--fade) * -1); }

.band::before, .band::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -22% 0;
  background: var(--bg-img) var(--pos, center) / cover no-repeat;
}

.band::after { z-index: -1; inset: 0; background: var(--shade); }

/* Parallax: js/main.js sets --py (px) on each band while it is on screen */
.band::before { transform: translateY(var(--py, 0px)); will-change: transform; }

.copy { width: min(72rem, 100%); margin: 0 auto; }
.copy > * { max-width: 36rem; }

/* Hero: top edge stays solid under the header */
.hero {
  --bg-img: url(../img/tsuris-paper-wasps-keyart.jpg);
  --pos: 68% center;
  --shade: linear-gradient(to top, rgba(13, 12, 11, .9) 25%, rgba(13, 12, 11, .35));
  min-height: 100svh;
  align-content: end;
  padding-top: 7rem;
  mask-image: linear-gradient(#000 calc(100% - var(--fade)), transparent);
}

.title {
  font-family: var(--display);
  font-weight: 900;
  font-size: min(29vw, 8.5rem);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.subtitle {
  --ink: var(--gold);
  display: block;
  margin-top: .35rem;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(1.9rem, 8vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--gold);
}

.hook {
  margin-top: 1.5rem;
  font-family: var(--script);
  font-size: 1.25rem;
  line-height: 1.5;
}

@media (min-width: 48em) {
  body { font-size: 1rem; }
  .title { font-size: min(15vw, 9rem); }
  .hook { font-size: 1.05rem; }
  .hero {
    --pos: 64% center;
    --shade: linear-gradient(90deg, rgba(13, 12, 11, .92), rgba(13, 12, 11, .6) 45%, rgba(13, 12, 11, .05) 80%);
    align-content: center;
  }
}

/* The book: on phones the photo sits on top and fades into the text */
.book {
  --bg-img: url(../img/tsuris-snow-cover-lrc.jpg);
  --pos: 6% center;
  --shade: linear-gradient(transparent 30vw, var(--bg) 68vw);
  padding-top: 72vw;
}

/* Overscan of 20vw each way so the ±10% drift never exposes an edge */
.book::before { inset: -20vw 0 auto; height: 100vw; }
.book p:not(.eyebrow) + p { margin-top: 1rem; }

@media (min-width: 56em) {
  .book {
    --pos: left center;
    --shade: linear-gradient(90deg, rgba(13, 12, 11, .1) 25%, rgba(13, 12, 11, .85) 55%, rgba(13, 12, 11, .95));
    min-height: 52rem;
    align-content: center;
    padding-top: calc(var(--fade) + 2rem);
  }
  .book::before { inset: -22% 0 -22% -9vw; height: auto; }
  .book .copy > * { margin-left: auto; max-width: 30rem; }
}

/* The world: the rules flank the door, leaving the hamsa clear */
.world {
  --bg-img: url(../img/tsuris-hamsa-door.jpg);
  --shade: linear-gradient(rgba(13, 12, 11, .78), rgba(13, 12, 11, .78));
  gap: 3.5rem;
  text-align: center;
  text-shadow: 0 1px 1rem rgba(0, 0, 0, .8);
}

.rules {
  display: grid;
  gap: 2.5rem;
  width: min(72rem, 100%);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}

.rules li { position: relative; isolation: isolate; max-width: 24rem; }

/* Big Hebrew letter sits behind its text and moves faster than the page */
.rules .num {
  position: absolute;
  z-index: -1;
  top: -1.5rem;
  left: -1.5rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: 11rem;
  line-height: 1;
  color: var(--gold);
  opacity: .4;
  text-shadow: none;
  transform: translateY(calc(var(--py, 0px) * -1.8));
}

.rules h3 {
  margin-bottom: .35rem;
  font-family: var(--script);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

@media (min-width: 56em) {
  .world {
    --shade: radial-gradient(ellipse 30% 55% at 50% 50%, rgba(13, 12, 11, .2), rgba(13, 12, 11, .88));
    min-height: 60rem;
  }
  .rules { grid-template-columns: 1fr minmax(16rem, 24rem) 1fr; row-gap: 2rem; }
  .rules li:nth-child(odd) { grid-column: 1; justify-self: end; text-align: right; }
  .rules li:nth-child(odd) .num { left: auto; right: -1.5rem; }
  .rules li:nth-child(1) { grid-row: 1; }
  .rules li:nth-child(2) { grid-column: 3; grid-row: 2; }
  .rules li:nth-child(3) { grid-row: 3; }
}

/* Updates */
.updates {
  --bg-img: url(../img/tsuris-wasp-nest.jpg);
  --shade: radial-gradient(ellipse at center, rgba(13, 12, 11, .85) 30%, rgba(13, 12, 11, .45));
  justify-items: center;
  text-align: center;
}

.updates p:not(.eyebrow) { max-width: 34rem; }
.updates .actions { justify-content: center; }

/* Footer: quiet, small print */
.footer {
  width: min(72rem, calc(100% - 2 * var(--pad)));
  margin: 0 auto;
  padding: 1.75rem 0 2.25rem;
  border-top: 1px solid rgba(236, 230, 218, .12);
  font-size: .75rem;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}

.footer svg { width: 1.1rem; margin: 0 auto .75rem; fill: var(--gold); }
.footer p { max-width: 46rem; margin: 0 auto .4rem; }
.footer [lang="he"] { font-family: var(--display); font-size: .95rem; color: var(--gold); }
.footer .legal { font-size: .7rem; }
