/* LOTAN STUDIO · site-v2. A dim gallery at golden hour: warm paper type on near black, very little else.
   RTL (S1): logical properties only, so every "left" of the spec is the inline start here. */

/* ---------- type (S2): Frank Ruhl Libre 300/400, Hebrew + Latin subset, no bold ---------- */
@font-face { font-family: 'Frank Ruhl Libre'; src: url(assets/fonts/frank-ruhl-libre-300.woff2) format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Frank Ruhl Libre'; src: url(assets/fonts/frank-ruhl-libre-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'FRL fallback'; src: local('Times New Roman'), local('David'); size-adjust: 104%; ascent-override: 92%; descent-override: 30%; }

:root {
  --paper: #F2EFE8; --muted: #8C877E; --ink: #0E0E10; --line: #F2EFE82C; --gallery: #070708; --titles: #D9D3C7;
  --hover: #FFFDF8; --amber: #E8A33D;
  --cta-w: 0px; --cta-h: 0px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--paper); overflow-x: clip;
  font: 400 16px/1.5 'Frank Ruhl Libre', 'FRL fallback', Georgia, serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 300; }
h2, h3, .lead, .obj-sub, .note-lead, .footer-line { text-wrap: balance; }
p { text-wrap: pretty; }
bdi { unicode-bidi: isolate; }
img { display: block; max-width: 100%; }

/* ---------- links and buttons ---------- */
a, button { color: inherit; text-decoration: none; font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  transition: color .2s, opacity .2s; }
a:hover, button:hover:not(:disabled) { color: var(--hover); }
a:active, button:active:not(:disabled) { transform: translateY(1px); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 1px solid var(--paper); outline-offset: 6px; }
button:disabled { opacity: .35; cursor: default; }
.text-link { font-size: 15px; border-block-end: 1px solid #F2EFE855; padding-block-end: 6px; }
.text-link span { margin-inline-start: 14px; font-family: Georgia, serif; }
.skip { position: fixed; top: -100px; inset-inline-start: 16px; z-index: 80; padding: 8px 12px; background: var(--ink); }
.skip:focus { top: 12px; }
.eyebrow { font-size: 15px; color: var(--muted); }

/* ---------- grain over the whole page ---------- */
.grain { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- S4: the one CTA. Fixed, visible from the first paint, never animated ---------- */
.cta-wrap { position: fixed; top: 18px; inset-inline-end: 24px; z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cta { box-shadow: 0 0 0 1px #0E0E1080, 0 2px 14px #0007; display: block; background: var(--amber); color: #1A1206; font-size: 15px; font-weight: 400; padding: 10px 20px; border-radius: 2px; transition: none; }
.cta:hover { color: #1A1206; filter: brightness(1.06); }
.cta[aria-disabled='true'] { cursor: default; }
.cta-price { font-size: 12px; color: var(--paper); text-shadow: 0 1px 6px #0008; white-space: nowrap; }
@media (min-width: 541px) { :root { --cta-w: 236px; } }

/* "הדמיה" on every generated image (S5) */
.sim { font-size: 10px; color: var(--paper); opacity: .78; }

/* =================== THE FILM =================== */
#journey { position: relative; height: 650svh; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
#film { position: absolute; top: 0; inset-inline: 0; width: 100%; height: 77%; display: block;
  background: var(--ink) url(assets/poster.jpg) center / cover no-repeat; }
.shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #08080A66 0, transparent 22%, transparent 43%, #0E0E1030 56%, var(--ink) 77%); }
.sim-film { position: absolute; top: 58px; inset-inline-start: 30px; }

.top { position: absolute; top: 25px; inset-inline: 30px; display: flex; justify-content: space-between; align-items: baseline; z-index: 3; }
.wordmark { font-size: 21px; letter-spacing: .03em; }
.top nav { display: flex; gap: 27px; font-size: 13px; margin-inline-end: var(--cta-w); }
.side { position: absolute; top: 50%; inset-inline: 30px; display: flex; justify-content: space-between; font-size: 13px; color: var(--paper); opacity: .9; }

.title { position: absolute; top: 59%; inset-inline: 0; text-align: center; will-change: transform, opacity; }
h1 { font-size: clamp(30px, 7.1vw, 98px); line-height: 1.1; white-space: nowrap; }
.intro { font-size: 16px; color: var(--muted); margin-block-start: 25px; }

.chapter, .ending { position: absolute; top: 58%; inset-inline: 6%; opacity: 0; }
.chapter, .ending, .side, .controls, .top, .title, .passage-overlay { text-shadow: 0 1px 14px #0E0E10B3, 0 0 2px #0E0E1080; }
.chapter .eyebrow, .ending .eyebrow, .passage-head .eyebrow { color: var(--paper); opacity: .82; }
.chapter h2, .ending h2 { font-size: clamp(35px, 5.4vw, 76px); line-height: 1.1; margin-block-start: 10px; }
.ending-links { display: flex; gap: 34px; margin-block-start: 28px; }

.controls { position: absolute; bottom: calc(28px + var(--cta-h)); inset-inline: 30px; }
.controls-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.hint { font-size: 12px; }
.time { font-variant-numeric: tabular-nums; }
.film-buttons { display: flex; justify-content: space-between; margin-block-start: 20px; }
.film-buttons button { font-size: 14px; color: var(--muted); }
.film-buttons button[aria-current] { color: var(--paper); }
.film-status { position: absolute; bottom: calc(92px + var(--cta-h)); inset-inline-end: 30px; font-size: 13px; color: var(--muted); }

/* =================== THE WORKS =================== */
#antiquities { position: relative; height: 1900svh; background: var(--gallery); }
#antiquities .stage { min-height: 640px; background: radial-gradient(ellipse at 50% 50%, #22222055, transparent 58%); }
#sculpture-canvas { position: absolute; top: 0; inset-inline: 0; width: 100%; height: 100%; display: block; }
.sim-gallery { position: absolute; top: 58px; inset-inline-start: 4%; }
.gallery-bar { position: absolute; top: 28px; inset-inline: 4%; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); z-index: 2; }
.gallery-bar a { margin-inline-end: var(--cta-w); }

.obj-heading { position: absolute; inset-inline-start: 8%; top: 29%; width: 28%; }
.obj-kicker { font-size: 11px; color: var(--muted); }
.obj-title { font-size: clamp(30px, 4vw, 57px); line-height: 1.08; color: var(--titles); margin-block: 14px 12px; }
.obj-name { font-size: 25px; color: var(--paper); }
.obj-story { position: absolute; inset-inline-end: 6%; top: 36%; width: 22%; }
.obj-chapter { font-size: 11px; color: var(--muted); }
.obj-sub { font-size: 19px; color: var(--paper); margin-block: 10px; font-weight: 400; }
.obj-text { font-size: 14px; line-height: 1.65; color: var(--muted); }
.obj-closer { margin-block-start: 22px; font-size: 13px; padding: 12px 16px; border: 1px solid #F2EFE84D; }
.obj-arrow { position: absolute; top: 53%; width: 35px; height: 35px; border-radius: 50%; border: 1px solid #F2EFE844;
  font-family: Georgia, serif; font-size: 15px; line-height: 33px; text-align: center; }
.obj-prev { inset-inline-start: 24px; }
.obj-next { inset-inline-end: 24px; }
.obj-bottom { position: absolute; bottom: calc(33px + var(--cta-h)); inset-inline: 4%; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.obj-nums { display: flex; gap: 22px; }
.obj-num { position: relative; font-size: 12px; color: var(--muted); }
.obj-num[aria-current] { color: var(--paper); }
.obj-num[aria-current]::after { content: ''; position: absolute; inset-inline-start: 50%; translate: 50% 0; top: 22px; width: 3px; height: 3px; border-radius: 50%; background: var(--paper); }
.obj-caption, .obj-phase { min-width: 26%; }
.obj-caption { text-align: end; }
.gallery-status { position: absolute; bottom: calc(84px + var(--cta-h)); inset-inline-end: 4%; font-size: 12px; color: var(--muted); }

.passage-overlay { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.passage-overlay > * { pointer-events: auto; }
.passage-head { position: absolute; inset-inline-start: 7%; top: 65%; }
.passage-head h2 { font-size: clamp(32px, 5vw, 68px); line-height: 1.1; margin-block-start: 8px; }
.passage-bottom { position: absolute; bottom: calc(33px + var(--cta-h)); inset-inline: 4%; display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--paper); }

.credits { padding: 22px 5%; font-size: 13px; color: var(--muted); border-block-end: 1px solid var(--line); }
.credits summary { cursor: pointer; }
.credits ul { margin: 14px 0 8px; padding-inline-start: 18px; }

/* =================== JOURNAL · VIEWS · CHAPTERS · FOOTER =================== */
.section-head { display: flex; justify-content: space-between; font-size: 17px; font-weight: 400; margin-block-end: 45px; }
.section-head .idx { font-size: 13px; color: #8C877E; font-family: Georgia, serif; }
.journal { position: relative; padding: 110px 5%; }
.sunburst { position: absolute; top: 40px; inset-inline-end: 10%; width: 320px; height: 320px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(#E8E4DC14 0 1.5deg, transparent 1.5deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 30%, #000 32%, #000 66%, transparent 70%); mask: radial-gradient(circle, transparent 30%, #000 32%, #000 66%, transparent 70%); }
.journal-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 70px 7%; align-items: start; }
.lead { font-size: 28px; line-height: 1.3; font-weight: 300; }
.journal-copy p { font-size: 17px; line-height: 1.6; color: var(--muted); }
.journal-copy p + p { margin-block-start: 1em; }
.still { position: relative; }
.still img { width: 100%; object-fit: cover; filter: saturate(.75); background: #141416; }
.still .sim { position: absolute; top: 10px; inset-inline-start: 10px; background: #0E0E1066; padding: 2px 6px; }
.still figcaption { display: flex; justify-content: space-between; gap: 12px; margin-block-start: 12px; font-size: 12px; color: var(--muted); }
.still-water img { aspect-ratio: 1.5; }
.still-stone { display: grid; grid-template-columns: 70% 1fr; gap: 20px; grid-column: 1 / -1; width: 100%; }
.still-stone img { aspect-ratio: 1.2; }
.still-stone .sim { inset-inline-start: 10px; }
.still-stone figcaption { flex-direction: column; justify-content: flex-end; margin: 0; }
.note { align-self: end; }
.note-lead { font-size: 23px; line-height: 1.35; font-weight: 300; margin-block-end: 14px; }
.note > p:not(.note-lead) { color: var(--muted); font-size: 15px; line-height: 1.6; }
.stats { display: flex; gap: 48px; margin-block-start: 40px; }
.stats dt { font-size: 48px; font-weight: 300; line-height: 1; }
.stats dd { font-size: 11px; color: var(--muted); margin-block-start: 8px; }

.views { padding: 145px 5% 0; }
.views-head { display: flex; justify-content: space-between; align-items: end; margin-block-end: 40px; }
.views .lead { font-size: 42px; line-height: 1.15; }
.views .label { font-size: 13px; color: var(--muted); }
.still-pano img { aspect-ratio: 2.25; }

.chapters { padding: 145px 5% 40px; }
.chapters-grid { display: grid; grid-template-columns: 38% 1fr; gap: 8%; align-items: start; }
.still-tall img { aspect-ratio: .66; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.still-tall figcaption { margin-block-start: -40px; position: relative; font-size: 12px; color: var(--paper); }
.chapter-list article { border-block-start: 1px solid var(--line); padding-block: 30px; }
.chapter-list article:last-child { border-block-end: 1px solid var(--line); }
.range { font-size: 13px; color: var(--muted); }
.chapter-list h3 { font-size: 30px; margin-block: 8px 10px; }
.chapter-list p:not(.range) { font-size: 15px; line-height: 1.6; color: var(--muted); margin-block-end: 20px; max-width: 46ch; }

.footer { padding: 130px 5% calc(56px + var(--cta-h)); }
.footer-line { font-size: 33px; line-height: 1.2; font-weight: 300; }
.footer-row { display: flex; justify-content: space-between; align-items: baseline; margin-block-start: 70px; font-size: 13px; color: var(--muted); }
.footer-brand { font-size: 21px; letter-spacing: .03em; color: var(--paper); }

/* =================== RESPONSIVE =================== */
@media (max-width: 800px) {
  .top { top: 18px; inset-inline: 20px; }
  .side { inset-inline: 20px; font-size: 11px; }
  .sim-film { inset-inline-start: 20px; top: 50px; }
  .hint { display: none; }
  h1 { font-size: 7vw; }
  .controls { inset-inline: 20px; }
  .journal-copy p { font-size: 15px; }
  .still-stone { grid-template-columns: 1fr; }
  .obj-title { font-size: clamp(26px, 5vw, 40px); }
  .obj-name { font-size: 19px; }
  .obj-story { width: 30%; }
  .obj-heading { width: 34%; }
}
@media (max-width: 540px) {
  :root { --cta-h: 66px; }
  .cta-wrap { top: auto; bottom: 0; inset-inline: 0; flex-direction: row; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #0E0E10F2; border-block-start: 1px solid var(--line); }
  .cta { font-size: 15px; padding: 11px 16px; }
  .cta-price { white-space: normal; text-align: end; text-shadow: none; color: var(--muted); }
  #film { height: 72%; }
  .shade { background: linear-gradient(180deg, #08080A66 0, transparent 18%, transparent 38%, #0E0E1030 50%, var(--ink) 72%); }
  .top nav { gap: 18px; }
  .top nav a:nth-child(3) { display: none; }
  .title { top: 54%; inset-inline: 6%; text-align: start; }
  h1 { white-space: normal; font-size: 10vw; }
  .intro { font-size: 15px; margin-block-start: 16px; }
  .chapter h2, .ending h2 { font-size: 9vw; }
  .film-buttons button { font-size: 12px; }
  #sculpture-canvas { top: 23%; height: 46%; -webkit-mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent); }
  .obj-heading { top: 9%; width: 88%; inset-inline-start: 6%; }
  .obj-title { font-size: 30px; margin-block: 8px 6px; }
  .obj-title br { display: none; }
  .obj-name { font-size: 16px; }
  .obj-story { top: auto; bottom: calc(80px + var(--cta-h)); inset-inline: 6%; width: auto; }
  .obj-sub { font-size: 16px; margin-block: 4px; }
  .obj-text { font-size: 13px; line-height: 1.55; }
  .obj-closer { margin-block-start: 12px; padding: 9px 13px; }
  .obj-arrow { top: 44%; }
  .obj-prev { inset-inline-start: 10px; } .obj-next { inset-inline-end: 10px; }
  .obj-bottom { bottom: calc(26px + var(--cta-h)); }
  .obj-phase { display: none; }
  .passage-head { top: 58%; inset-inline: 7%; }
  .passage-head h2 { font-size: 30px; }
  .journal { padding: 80px 6%; }
  .journal-grid { grid-template-columns: 1fr; gap: 44px; }
  .still-water { margin-inline-end: -6%; }
  .still-stone { width: 88%; margin-inline-start: 12%; }
  .sunburst { width: 220px; height: 220px; }
  .views { padding: 100px 6% 0; }
  .views-head { flex-direction: column; align-items: start; gap: 12px; }
  .views .lead { font-size: 32px; }
  .chapters { padding: 100px 6% 30px; }
  .chapters-grid { grid-template-columns: 1fr; gap: 30px; }
  .still-tall { width: 70%; }
  .footer { padding: 90px 6% calc(40px + var(--cta-h)); }
  .footer-line { font-size: 27px; }
  .footer-row { flex-direction: column; gap: 14px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, a, button { transition: none !important; }
  .title, .chapter { transform: none !important; }
}
.obj-heading, .obj-story, .obj-bottom { text-shadow: 0 1px 12px #070708CC, 0 0 2px #07070899; }
