/* =====================================================================
   ג'ורדן 𖣂 — the central site. Deliberately plain: near-black, a few
   faint stars, cream ink. Amatic SC carries the handmade voice (titles,
   buttons, nav); a plain sans keeps longer text readable; small labels
   are monospace. Square buttons in a deep alien violet.
   ===================================================================== */

/* Amatic SC (SIL Open Font License 1.1), self-hosted. */
@font-face { font-family: 'Amatic SC'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/amatic-sc-400-hebrew.woff2") format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Amatic SC'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/amatic-sc-400-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Amatic SC'; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/amatic-sc-700-hebrew.woff2") format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Amatic SC'; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/amatic-sc-700-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0b0a0d;
  --ink: #eee7df;
  --ink-dim: #a39b9f;
  --ink-faint: #6b6469;
  --line: #2b2530;
  --violet: #4a33a6;
  --violet-edge: #7560dc;
  --violet-text: #a597ff;
  --hand: 'Amatic SC', 'Arial Narrow', sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Hebrew", Arial, sans-serif;
  --mono: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Hebrew", Arial, sans-serif; /* small labels; a true monospace spreads Hebrew letters apart */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { max-width: 100%; overflow-x: hidden; }
body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.gate-open { overflow: hidden; }
a { color: inherit; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--violet-text); outline-offset: 3px; }

.stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.4rem; padding: 0 2rem; border-radius: 0;
  font-family: var(--hand); font-weight: 700; font-size: 1.75rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-main {
  background: var(--violet); color: var(--ink); border: 1px solid var(--violet-edge);
  box-shadow: 0 10px 40px rgba(74,51,166,0.45);
}
.btn-main:hover, .btn-main:focus-visible { background: #5a41c4; box-shadow: 0 10px 46px rgba(117,96,220,0.6); }
.btn-line { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover, .btn-line:focus-visible { border-color: var(--violet-edge); }
.btn-sm { min-height: 2.8rem; padding: 0 1.2rem; font-size: 1.4rem; }
.btn-ufo { width: 2.3rem; margin-top: -0.2rem; }
.btn-quiet {
  margin-top: 1.4rem; padding: 0.4rem 0.6rem; border: 0; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-dim);
}
.btn-quiet:hover, .btn-quiet:focus-visible { color: var(--ink); }

.ufo { color: var(--ink); overflow: visible; }
@keyframes hover { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }

/* ---------- gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 2rem 1.5rem; text-align: center; background: var(--bg);
  transition: opacity .8s var(--ease), visibility .8s;
}
.gate[hidden] { display: none; }
.gate.leaving { opacity: 0; visibility: hidden; }
.gate-inner { display: flex; flex-direction: column; align-items: center; }
.gate-ufo { width: 6.5rem; margin-bottom: 1.4rem; animation: hover 4s ease-in-out infinite; }
.gate-q { margin: 0 0 2.2rem; font-family: var(--hand); font-weight: 700; font-size: clamp(3.6rem, 16vw, 6rem); line-height: 1; }
.gate-q span { color: var(--violet-text); }

/* ---------- header: logo + land, and the menu that's always there ---------- */
.top { position: relative; z-index: 30; border-bottom: 1px solid var(--line); padding: calc(1rem + var(--safe-t)) 1.1rem 1rem; }
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-family: var(--hand); font-weight: 700; font-size: 2.6rem; line-height: 1; text-decoration: none; }
.btn-xs { min-height: 2.9rem; padding: 0 1.2rem; font-size: 1.5rem; }
.nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-top: 0.9rem; }
.nav a {
  display: flex; align-items: center; justify-content: center; min-height: 2.9rem;
  border: 1px solid var(--line); border-bottom-width: 2px; background: rgba(16,14,19,0.9);
  font-family: var(--hand); font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--ink-dim); text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(74,51,166,0.28); border-bottom-color: var(--violet-edge); }
@media (min-width: 860px) {
  .top { display: flex; align-items: center; gap: 1.5rem; padding: calc(0.8rem + var(--safe-t)) 1.6rem 0.8rem; }
  .top-bar { display: contents; }
  .logo { order: 1; }
  .nav { order: 2; flex: 1; display: flex; justify-content: center; gap: 0.3rem; margin: 0; }
  .nav a { min-height: 2.6rem; padding: 0 1rem; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 1.55rem; }
  .nav a[aria-current="page"] { background: none; border-bottom-color: var(--violet-edge); }
  .nav a[data-to-list] { display: none; }
  .top-cta { order: 3; }
}

/* ---------- views (each page is its own screen) ---------- */
main { min-height: 60vh; }
.view[hidden] { display: none; }
.view { animation: viewIn .45s var(--ease); }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
.page { max-width: 46rem; margin: 0 auto; padding: clamp(3rem, 9vw, 5rem) 1.3rem 2rem; }
.page-center { text-align: center; }
.label { margin: 0 0 0.3rem; font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: var(--violet-text); }
.title { margin: 0 0 1rem; font-family: var(--hand); font-weight: 700; font-size: clamp(3.4rem, 12vw, 5rem); line-height: 1; }
.title-sm { font-size: clamp(2.8rem, 10vw, 3.8rem); }
.lead { margin: 0 0 2rem; color: var(--ink-dim); font-size: 1.05rem; }
.lead a { color: var(--ink); text-decoration-color: var(--violet-edge); text-underline-offset: 0.2em; }

/* home: two photos, the name in the middle */
.hero { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: clamp(25rem, 108vw, 38rem); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-photo { position: relative; margin: 0; overflow: hidden; }
.hero-photo + .hero-photo { border-inline-start: 1px solid var(--line); }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(1.05) brightness(0.55); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,25,90,0.35), rgba(11,10,13,0.55) 70%, rgba(11,10,13,0.85)); }
.hero-photo figcaption { position: absolute; bottom: 1rem; inset-inline-start: 1.1rem; z-index: 1; font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--ink-dim); }
.hero-center { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; }
.hero-kicker { margin: 0; font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--ink-dim); }
.hero-name { margin: 0.2rem 0 0.4rem; font-family: var(--hand); font-weight: 700; font-size: clamp(6rem, 26vw, 11rem); line-height: 0.95; text-shadow: 0 4px 40px rgba(0,0,0,0.6); }
.hero-line { margin: 0 0 1.8rem; font-family: var(--hand); font-weight: 700; font-size: clamp(1.9rem, 6vw, 2.4rem); color: var(--ink); }
.hero-btn small { font-family: var(--sans); font-size: 0.75rem; font-weight: 400; opacity: 0.8; }

/* the list (signup) */
.list { max-width: 46rem; margin: 0 auto; padding: clamp(3rem, 9vw, 4.5rem) 1.3rem; }
.view-home .list, .view[data-view="music"] .list, .view[data-view="shop"] .list { border-top: 1px solid var(--line); }
.list-form { max-width: 34rem; }
.list-row { display: flex; gap: 0.6rem; }
.list-row input {
  flex: 1; min-height: 3.4rem; padding: 0.6rem 1rem; border-radius: 0;
  border: 1px solid var(--line); background: #100e13; color: var(--ink);
  font-family: var(--sans); font-size: 16px; /* 16px = no zoom on iPhone */
}
.list-row input::placeholder { color: var(--ink-faint); }
.list-row input:focus { outline: none; border-color: var(--violet-edge); }
.list-row .btn { flex: none; }
.list-consent { display: flex; gap: 0.55rem; align-items: flex-start; margin-top: 0.8rem; font-size: 0.85rem; color: var(--ink-dim); cursor: pointer; }
.list-consent input { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; accent-color: var(--violet-edge); }
.list-msg { min-height: 1.3em; margin: 0.5rem 0 0; font-size: 0.88rem; color: #e7a6a6; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; } /* no left:-9999px: in RTL that widens the page */
.landed[hidden] { display: none; }
.landed-num { margin: 0; font-family: var(--hand); font-weight: 700; font-size: clamp(3.2rem, 12vw, 4.4rem); line-height: 1; color: var(--violet-text); }
.landed-text { margin: 0.5rem 0 0; color: var(--ink-dim); font-size: 1.1rem; }

/* alien */
.entry { border: 1px solid var(--line); padding: 1.8rem 1.4rem; background: rgba(11,10,13,0.85); }
@media (min-width: 640px) { .entry { padding: 2.4rem; } }
.entry-word { margin: 0 0 1rem; font-family: var(--hand); font-weight: 700; font-size: 3.2rem; line-height: 1; }
.entry-word span { font-family: var(--sans); font-weight: 400; font-size: 0.8rem; color: var(--ink-faint); }
.entry-defs { margin: 0 0 1.4rem; padding-inline-start: 1.6rem; font-family: var(--hand); font-weight: 700; font-size: clamp(1.7rem, 6.4vw, 2.1rem); line-height: 1.3; }
.entry-defs li { margin-bottom: 0.45rem; }
.entry-defs li::marker { color: var(--violet-text); }
.entry-body { margin: 0; padding-top: 1.3rem; border-top: 1px dashed var(--line); color: var(--ink-dim); line-height: 1.85; }
.frozen { margin-top: 4.5rem; text-align: center; }
.frozen-year { margin: 0; font-family: var(--hand); font-weight: 700; font-size: clamp(7rem, 34vw, 12rem); line-height: 0.9; }
.frozen-quote { margin: 1.4rem auto 0; padding: 0; max-width: 30rem; font-family: var(--hand); font-weight: 700; font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: 1.25; }
.frozen-quote p { margin: 0 0 1rem; }
.frozen-quote footer { margin-top: 1.2rem; font-family: var(--sans); font-weight: 400; font-size: 0.8rem; color: var(--ink-faint); }
.frozen-quote footer::before { content: "— "; }

/* music: a grid of square cells */
.grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.cell {
  display: flex; flex-direction: column; gap: 0.25rem; padding: 1.4rem 1.2rem;
  border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line);
  text-decoration: none; transition: background .2s var(--ease);
}
.cell b { font-family: var(--sans); font-size: 1.1rem; font-weight: 600; }
.cell span { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-dim); direction: ltr; text-align: end; unicode-bidi: plaintext; }
.cell:hover, .cell:focus-visible { background: rgba(74,51,166,0.14); }
.egg { margin: 0; padding: 3rem 1.3rem 1rem; text-align: center; font-size: 0.8rem; color: var(--ink-faint); opacity: 0.7; }
.egg a { color: var(--ink-faint); text-decoration: none; border-bottom: 1px dashed var(--ink-faint); }
.egg a:hover, .egg a:focus-visible { color: var(--violet-text); border-color: var(--violet-text); }

/* chat */
.live-dot { display: inline-block; width: 0.5rem; height: 0.5rem; margin-inline-end: 0.4rem; border-radius: 50%; background: #e0445e; vertical-align: middle; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.chat { height: min(55vh, 30rem); overflow-y: auto; border: 1px solid var(--line); background: #0e0c11; padding: 0.4rem 0; overscroll-behavior: contain; }
.chat-item { padding: 0.55rem 1rem; border-bottom: 1px solid rgba(43,37,48,0.6); }
.chat-head { display: flex; align-items: baseline; gap: 0.6rem; }
.chat-who { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; color: var(--violet-text); }
.chat-who.is-artist { color: var(--ink); }
.chat-who.is-artist::after { content: " ♫"; color: var(--violet-text); }
.chat-when { margin-inline-start: auto; font-size: 0.7rem; color: var(--ink-faint); }
.chat-text { margin: 0.1rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-hide { border: 0; background: none; color: var(--ink-faint); font-size: 0.7rem; cursor: pointer; text-decoration: underline; }
.chat-item.is-hidden { opacity: 0.4; }
.chat-empty { padding: 2rem 1rem; text-align: center; color: var(--ink-faint); }
.chat-form { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.chat-row { display: flex; gap: 0.5rem; }
.chat-name, .chat-body {
  min-height: 3rem; padding: 0.5rem 0.9rem; border-radius: 0; border: 1px solid var(--line);
  background: #100e13; color: var(--ink); font-family: var(--sans); font-size: 16px;
}
.chat-name { max-width: 14rem; }
.chat-body { flex: 1; }
.chat-name:focus, .chat-body:focus { outline: none; border-color: var(--violet-edge); }
.chat-msg { min-height: 1.2em; margin: 0; font-size: 0.85rem; color: #e7a6a6; }
.chat-rules { margin: 0.6rem 0 0; font-size: 0.85rem; color: var(--ink-faint); }

.foot { padding: 2rem 1.4rem calc(6.5rem + var(--safe-b)); text-align: center; border-top: 1px solid var(--line); }
.foot-legal { margin: 0; font-size: 0.72rem; color: var(--ink-faint); }
.foot-legal a { color: var(--ink-faint); }

/* bottom bar: player (right) and the counter (left), side by side;
   the accessibility button moves up above them on this page. */
.counter {
  position: fixed; left: 12px; bottom: calc(12px + var(--safe-b)); z-index: 40; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  min-height: 3.3rem; max-width: calc(50% - 18px); padding: 0.3rem 1rem;
  border: 1px solid var(--line); background: rgba(11,10,13,0.94);
  font-size: 0.72rem; color: var(--ink-dim); text-align: center; line-height: 1.2;
}
.counter[hidden] { display: none; }
.counter .ufos { display: flex; gap: 0.2rem; color: var(--violet-text); }
.counter .ufos svg { width: 1.35rem; }
.counter b { color: var(--ink); font-weight: 700; }
.hub .a11y-toggle { bottom: calc(76px + var(--safe-b)); }
.hub .a11y-panel { bottom: calc(124px + var(--safe-b)); max-height: calc(100vh - 150px); }

/* player: bottom-right (the accessibility button is bottom-left) */
.player {
  position: fixed; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 40; max-width: calc(50% - 18px); min-height: 3.3rem;
  display: flex; align-items: center; gap: 0.7rem; padding: 0.35rem 0.9rem 0.35rem 0.35rem;
  border: 1px solid var(--line); background: rgba(11,10,13,0.94);
}
.player[hidden] { display: none; }
.player-btn {
  width: 2.4rem; height: 2.4rem; flex: none; border: 1px solid var(--violet-edge); border-radius: 0; cursor: pointer;
  background: var(--violet) center / 0.85rem no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z' fill='%23eee7df'/%3E%3C/svg%3E");
}
.player.playing .player-btn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='5' width='4' height='14' fill='%23eee7df'/%3E%3Crect x='14' y='5' width='4' height='14' fill='%23eee7df'/%3E%3C/svg%3E");
}
.player-text { display: flex; flex-direction: column; line-height: 1.1; }
.player-text small { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.02em; color: var(--ink-faint); }
.player-text span { font-family: var(--hand); font-weight: 700; font-size: 1.35rem; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ufo, .gate-ufo { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 559px) {
  .chat { height: 42vh; }
  .chat-name { max-width: none; }
}

/* find me: the bottom of every page */
.find { max-width: 46rem; margin: 0 auto; padding: 3rem 0 2.4rem; text-align: start; }
.foot { padding: 0 1.3rem calc(6.5rem + var(--safe-b)); }
.foot-legal { text-align: center; }
