@font-face { font-family: 'Frank'; src: url(assets/frank-he-400.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Frank'; src: url(assets/frank-he-300.woff2) format('woff2'); font-weight: 300; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Frank'; src: url(assets/frank-he-900.woff2) format('woff2'); font-weight: 900; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Quicksand'; src: url(assets/quicksand-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Quicksand'; src: url(assets/quicksand-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

/* Editorial black and gold: one serif family, hairlines, generous space, gold used sparingly. */
:root {
  --black: #000;
  --gold: #d4af37;        /* 10.3:1 on black */
  --gold-hi: #f5d76e;     /* 14.6:1 */
  --ink: #ece7dc;         /* 16.5:1 */
  --ink-2: #aaa392;       /* 8.0:1 */
  --rule: rgba(212, 175, 55, .22);
  --serif: 'Frank', 'David', 'Times New Roman', serif;
  --latin: 'Quicksand', 'Segoe UI', sans-serif;   /* every English word on the site */
  --name: 'Quicksand', 'Segoe UI', sans-serif;   /* the name SONIL STUDIO, everywhere */
  --focus: #f5d76e; --focus-halo: #000;
  --gutter: clamp(18px, 6vw, 104px);
  --out: cubic-bezier(.16, 1, .3, 1);
  --io: cubic-bezier(.45, 0, .55, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--black); }
body { margin: 0; background: var(--black); color: var(--ink); font-family: var(--serif); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
::selection { background: var(--gold); color: #000; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ===== loader ===== */
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 16px; background: var(--black);
  transition: opacity .7s var(--io), visibility 0s linear .7s; }
.loaded .loader { opacity: 0; visibility: hidden; }
.ld-name { margin: 0; font-family: var(--name); font-weight: 700; font-size: 1.4rem; letter-spacing: .08em; color: var(--gold); }
.ld-line { display: block; width: 140px; height: 1px; background: rgba(212,175,55,.2); overflow: hidden; }
.ld-fill { display: block; height: 100%; background: var(--gold-hi); transform-origin: right; transform: scaleX(var(--p, 0)); transition: transform .35s var(--out); }

/* ===== the 3D world ===== */
.world { position: fixed; inset: 0; z-index: 0; background: var(--black); }
.world canvas, .world .poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.world .poster { object-fit: cover; display: none; }
[data-motion="static"] .world .poster { display: block; }
[data-motion="static"] .world canvas { display: none; }
.grabbing, .grabbing * { cursor: pointer !important; }

/* ===== nav ===== */
.nav { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter) 34px; background: linear-gradient(180deg, #000 35%, rgba(0,0,0,0)); }
/* the logo is the opening cube itself; hovering or focusing it says where it goes */
.logo { position: relative; display: inline-flex; padding: 2px; text-decoration: none; }
.mark { display: block; width: 40px; height: 40px; transition: transform .45s var(--out), filter .45s var(--out); }
.logo:hover .mark, .logo:focus-visible .mark { transform: rotate(-10deg) scale(1.08); filter: drop-shadow(0 0 10px rgba(212,175,55,.5)); }
.logo-tip { position: absolute; top: calc(100% + 10px); right: 50%; padding: 6px 14px; background: #000; border: 1px solid var(--gold); color: var(--gold-hi);
  font-size: .92rem; font-weight: 900; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(50%, -4px); transition: opacity .18s, transform .25s var(--out); }
.logo-tip::before { content: ''; position: absolute; top: -5px; right: 50%; width: 8px; height: 8px; background: #000; border: solid var(--gold); border-width: 1px 0 0 1px; transform: translateX(50%) rotate(45deg); }
.logo:hover .logo-tip, .logo:focus-visible .logo-tip { opacity: 1; transform: translate(50%, 0); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(18px, 2.6vw, 38px); }
.nav ul a { position: relative; display: inline-block; padding: 8px 0; font-size: .98rem; color: var(--ink-2); text-decoration: none; transition: color .25s; }
.nav ul a::after { content: ''; position: absolute; right: 0; left: 0; bottom: 2px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--out); }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--ink); }
.nav ul a:hover::after, .nav ul a[aria-current]::after { transform: scaleX(1); }

/* ===== slides ===== */
.slide { position: relative; z-index: 2; min-height: 130vh; display: flex; align-items: center; padding: 0 var(--gutter); }
/* a soft black field behind the text column, so passing pieces never sit under the words */
.slide:not(.hero)::before { content: ''; position: absolute; inset: 0 0 0 45%; background: linear-gradient(270deg, rgba(0,0,0,.85) 30%, rgba(0,0,0,0)); pointer-events: none; }
.hero { min-height: 100vh; min-height: 100svh; display: block; padding: 0; }

.brand { position: absolute; left: 0; right: 0; top: 54%; margin: 0; text-align: center; pointer-events: none; }
.brand .word { font-family: var(--name); font-weight: 700; font-size: clamp(2rem, 11vw, 7rem); line-height: 1; letter-spacing: .02em; white-space: nowrap; color: var(--gold); }
.has-3d .brand .word { opacity: 0; }
.hero-foot { position: absolute; left: 0; right: 0; bottom: clamp(70px, 12vh, 120px); display: grid; justify-items: center; gap: 22px; padding: 0 16px; text-align: center; }
.kicker { margin: 0; font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 300; color: var(--ink); }
.kicker strong { font-weight: 900; color: var(--gold-hi); }
.scroll-hint { position: absolute; bottom: 34px; left: 0; right: 0; margin: 0; display: grid; justify-items: center; gap: 6px; font-size: .78rem; color: var(--ink-2); letter-spacing: .1em; }
.scroll-hint span { display: block; width: 1px; height: 26px; background: linear-gradient(var(--gold), transparent); }

.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 32px; font-size: 1.02rem; color: #000; background: var(--gold);
  text-decoration: none; border: 1px solid var(--gold); transition: background-color .25s, color .25s; }
.btn:hover { background: transparent; color: var(--gold-hi); }

/* text column on the right (RTL start); the object stands on the left */
.panel { position: relative; width: min(460px, 100%); }
.label { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; font-size: .95rem; color: var(--ink-2); }
.label b { font-weight: 900; font-size: 1.6rem; line-height: 1; color: var(--gold); }
.label::after { content: ''; flex: 1; max-width: 120px; height: 1px; background: var(--rule); }
.panel h2 { margin: 0 0 22px; font-weight: 900; font-size: clamp(2.1rem, 4.2vw, 3.2rem); line-height: 1.1; color: var(--ink); }
.panel p { margin: 0 0 16px; font-weight: 300; font-size: 1.12rem; color: var(--ink); max-width: 38ch; }
.panel p.note { font-size: .95rem; color: var(--ink-2); margin: 0; }

/* portfolio: four empty frames waiting for work */
.frames { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frames li { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--rule); background: rgba(0,0,0,.6); transition: border-color .3s; }
.frames li:hover, .frames li:focus-within { border-color: var(--gold); }
.frames li::before, .frames li::after { content: ''; position: absolute; width: 12px; height: 12px; border-color: var(--gold); border-style: solid; }
.frames li::before { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.frames li::after { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
/* each tile is one button: the newest work as a cover, the category name and its count */
.cat { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 2px; padding: 12px 14px;
  font: inherit; color: inherit; text-align: start; background: transparent; border: 0; cursor: pointer; overflow: hidden; }
.cat-cover { position: absolute; inset: 0; }
.cat-img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .5; transform: scale(1.02); transition: opacity .4s, transform .6s var(--out); }
.cat:hover .cat-img, .cat:focus-visible .cat-img { opacity: .9; transform: scale(1.08); }
.has-work .cat-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0) 65%); }
.cat-name, .cat-count { position: relative; }
.cat-name { font-family: var(--latin); font-weight: 700; font-size: 1rem; color: var(--gold-hi); }
.cat-count { font-size: .8rem; color: var(--ink); }
.cat-name::after { content: ' ←'; font-family: var(--serif); display: inline-block; opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .35s var(--out); }
.cat:hover .cat-name::after, .cat:focus-visible .cat-name::after { opacity: 1; transform: none; }

/* ===== the works window ===== */
.works { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: auto;
  color: var(--ink); background: #050403; border: 1px solid var(--gold); overscroll-behavior: contain; }
.works::backdrop { background: rgba(0,0,0,.82); }
.works[open] { animation: works-in .35s var(--out); }
@keyframes works-in { from { opacity: 0; transform: translateY(14px); } }
.works-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px;
  background: #050403; border-bottom: 1px solid var(--rule); }
.works-head h2 { margin: 0; font-family: var(--latin); font-weight: 700; font-size: 1.6rem; color: var(--gold); }
.works-close { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); background: transparent; border: 1px solid var(--rule); cursor: pointer; }
.works-close:hover { color: #000; background: var(--gold-hi); border-color: var(--gold-hi); }
.works-grid { list-style: none; margin: 0; padding: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.works-grid figure { margin: 0; }
.work-img { display: block; width: 100%; height: auto; aspect-ratio: auto; background: #000; border: 1px solid var(--rule); }
.works-grid figcaption { padding: 8px 2px 0; font-size: .95rem; color: var(--ink-2); }
.works-empty { margin: 0; padding: 40px 22px 48px; text-align: center; font-size: 1.1rem; color: var(--ink-2); }
html.modal-open { overflow: hidden; }

/* services: a numbered list in two columns */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; counter-reset: s; border-top: 1px solid var(--rule); }
.services li { counter-increment: s; display: grid; gap: 2px; padding: 14px 0 14px 12px; border-bottom: 1px solid var(--rule); }
.services li:nth-child(odd) { padding-left: 16px; }
.services li::before { content: counter(s, decimal-leading-zero); font-family: var(--latin); font-size: .8rem; color: var(--gold); }
.services span { font-family: var(--latin); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.services small { font-size: .95rem; font-weight: 300; color: var(--ink-2); }

/* ===== the journey: sections become flight time, their text floats at its station (placed by main.js) ===== */
.journey .slide:not(.hero) { min-height: 170vh; }
.journey .slide:not(.hero)::before { display: none; }
.journey .panel { position: fixed; z-index: 3; top: 0; left: 0; width: min(460px, calc(100vw - 32px)); margin: 0; opacity: 0; will-change: transform, opacity; transform-origin: 50% 50%; }
/* a soft pool of black behind the words, so shards passing behind never cut through them */
.journey .panel::before { content: ''; position: absolute; inset: -60px -80px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(0,0,0,.82), rgba(0,0,0,.5) 60%, rgba(0,0,0,0)); }
/* depth inside the block: lines further down drift a little more as you fly past */
.journey .panel > * { transform: translateY(calc(var(--l, 0) * var(--d, 0) * -1px)); }
.journey .panel > :nth-child(1) { --d: 20; } .journey .panel > :nth-child(2) { --d: 45; } .journey .panel > :nth-child(3) { --d: 75; } .journey .panel > :nth-child(4) { --d: 110; }

/* ===== footer ===== */
.foot { position: relative; z-index: 4; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px 40px;
  padding: 56px var(--gutter) 110px; border-top: 1px solid var(--rule); background: #000; color: var(--ink-2); font-size: .98rem; }
.foot p { margin: 0; }
.foot-logo { font-family: var(--name); font-weight: 700; font-size: 1.7rem; letter-spacing: .04em; color: var(--gold); margin-bottom: 4px !important; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; }
.foot a { display: inline-block; padding: 6px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.foot a:hover { border-bottom-color: var(--gold); }
.foot-copy { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid rgba(212,175,55,.1); font-size: .88rem; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.credit { font-family: var(--latin); font-weight: 500; font-size: .82rem; letter-spacing: .06em; color: var(--gold); }


/* ===== entrance: the text waits for the cube ===== */
.intro-run .hero-foot > *, .intro-run .scroll-hint { opacity: 0; transform: translateY(8px); }
.write .hero-foot > * { opacity: 1; transform: none; transition: opacity .6s var(--out), transform .6s var(--out); }
.write .hero-foot > :nth-child(2) { transition-delay: .1s; }
.write .scroll-hint { opacity: 1; transform: none; transition: opacity .8s .5s; }

@media (max-width: 760px) {
  /* the object floats in the top of the screen; the words start just under it */
  .slide:not(.hero) { align-items: flex-start; min-height: 100vh; min-height: 100svh; padding-top: 44vh; padding-top: 44svh; padding-bottom: 96px; }
  .slide:not(.hero)::before { inset: 38% 0 0 0; background: linear-gradient(0deg, #000 70%, rgba(0,0,0,0)); }
  .panel h2 { font-size: 1.9rem; margin-bottom: 16px; }
  .label { margin-bottom: 12px; }
  .frames { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .frames li { aspect-ratio: 1; }
  .cat { padding: 6px; }
  .cat-name { font-size: clamp(.68rem, 3.4vw, .85rem); }
  .cat-count { font-size: .68rem; }
  .works-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .works-head { padding: 10px 12px; }
  .services li { padding: 10px 0 10px 8px; }
  .journey .slide:not(.hero) { min-height: 150vh; padding: 0; }
  .journey .panel { width: calc(100vw - 32px); }
  .journey .panel::before { inset: -40px -16px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.85) 60px, rgba(0,0,0,.85)); }
  .journey .services li { padding: 7px 0 7px 8px; }
  .journey .services small { font-size: .85rem; }
  .nav ul { gap: 14px; }
  .nav ul a { font-size: .9rem; }
  .brand { top: 50%; }
  .foot { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}
@media (max-width: 480px) { .nav { flex-direction: column; gap: 4px; padding-top: 14px; background: linear-gradient(180deg, #000 72%, rgba(0,0,0,0)); }
  .nav ul { flex-wrap: wrap; justify-content: center; column-gap: 12px; } }
@media (max-width: 340px) { .nav ul a { font-size: .84rem; } }
@media (prefers-reduced-motion: reduce) {
  .intro-run .hero-foot > *, .intro-run .scroll-hint { opacity: 1; transform: none; }
  .loader { transition: none; }
}

/* ===== about ===== */
.q { font-family: var(--name); font-weight: 700; letter-spacing: .03em; color: var(--gold); }
.spark { color: var(--gold); font-size: .6em; vertical-align: .35em; }
.about-what { margin: 4px 0 18px; }
.about-what h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 900; color: var(--gold-hi); }
.dots-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.dots-list li { position: relative; padding-right: 16px; font-weight: 300; font-size: 1.05rem; }
.dots-list li::before { content: ''; position: absolute; right: 0; top: .72em; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.panel p.motto { margin: 6px 0 4px; font-weight: 900; font-size: 1.15rem; color: var(--gold-hi); }
.panel p.sign { margin: 0 0 12px; font-size: 1.1rem; color: var(--ink-2); }
.panel p.credit-inline { margin: 0; font-family: var(--latin); font-size: .8rem; letter-spacing: .06em; color: var(--gold); }

/* the credit: tiny, gold, always at the bottom centre of the screen, between the two controls */
.credit-fixed { position: fixed; z-index: 31; bottom: 12px; left: 74px; right: auto; transform: none; margin: 0 !important; font-family: 'Quicksand', 'Segoe UI', sans-serif; font-weight: 500; font-size: .62rem; letter-spacing: .1em; white-space: nowrap; color: #d4af37; opacity: .7; pointer-events: none; }

/* English words inside Hebrew text use the same Quicksand (the a11y "readable font" option still overrides it) */
[lang="en"] { font-family: var(--latin); }
