/* ES Studio · תיק עבודות
   Dark navy and black with a strong pure-red light and a saturated blue one.
   Soft blurred orbs drift slowly behind everything (transform only, no filters, cheap on phones).
   Six vertical videos, no titles, no categories. */

:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg-2: #090f26;
  --line: rgba(200, 190, 220, 0.12);
  --ink: #eceaf0;
  --soft: #9095a5;
  --red: #b72714;
  --red-hi: #b72714;
  --red-glow: rgba(183, 39, 20, 0.7);
  --font: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --vh: 100vh;
  --radius: 14px;
  --gutter: max(18px, env(safe-area-inset-left, 0px), 4vw);
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: radial-gradient(120% 60% at 50% 0%, var(--bg-2), var(--bg) 70%) fixed, var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--font);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
html.locked, html.locked body { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.es { color: var(--red); font-weight: 800; text-shadow: 0 0 18px rgba(183, 39, 20, 0.45); }

/* ambient orbs: two red (#B72714), one blue (#0054CF) */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; will-change: transform; }
.o1 { width: 65vmax; height: 65vmax; top: -32vmax; right: -28vmax;
  background: radial-gradient(circle, rgba(0, 84, 207, 0.50), transparent 62%);
  animation: drift1 38s ease-in-out infinite alternate; }
.o2 { width: 82vmax; height: 82vmax; bottom: -38vmax; left: -30vmax;
  background: radial-gradient(circle, rgba(183, 39, 20, 0.58), transparent 62%);
  animation: drift2 44s ease-in-out infinite alternate; }
.o3 { width: 52vmax; height: 52vmax; top: 30%; left: 35%;
  background: radial-gradient(circle, rgba(183, 39, 20, 0.32), transparent 62%);
  animation: drift3 52s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(-22vw, 30vh, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(25vw, -35vh, 0) scale(1.15); } }
@keyframes drift3 { 50% { transform: translate3d(-22vw, -18vh, 0) scale(0.85); } to { transform: translate3d(12vw, 22vh, 0) scale(1.08); } }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(7, 8, 13, 0.7);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.site-header::after { content: ""; position: absolute; inset: auto 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183, 39, 20, 0.7) 50%, transparent); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { text-decoration: none; font-weight: 500; font-size: 19px; letter-spacing: 0.02em; direction: ltr; white-space: nowrap;
  padding: 6px 10px; margin-inline-start: -10px; border-radius: 10px; }
.nav { display: flex; gap: 2px; }
.nav a { text-decoration: none; color: var(--soft); font-size: 15px; padding: 10px 10px; border-radius: 8px; transition: color .2s; white-space: nowrap; }
.nav a:hover { color: var(--ink); }

/* intro */
.intro { padding-block: clamp(40px, 8vw, 88px) clamp(28px, 4vw, 44px); text-align: center; }
.intro .subtitle { margin-inline: auto; }
h1 { margin: 0; font-weight: 800; font-size: clamp(34px, 7.4vw, 62px); line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; }
h1 .sep { color: var(--red); font-weight: 300; margin-inline: 0.35em; }
h1 .role { font-weight: 400; color: var(--red); text-shadow: 0 0 30px rgba(183, 39, 20, 0.45); }
.subtitle { margin: 14px 0 0; color: var(--soft); font-size: clamp(16px, 2.2vw, 19px); font-weight: 300; max-width: 46ch; }
@media (max-width: 560px) {
  h1 .sep { display: none; }
  h1 .role { display: block; }
}

/* gallery: six vertical 9:16 videos, always 2 x 3 (built for the phone) */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 620px; margin-inline: auto; }
@media (min-width: 760px) { .gallery { gap: 20px; } }
.tile { all: unset; cursor: pointer; display: block; -webkit-tap-highlight-color: transparent; animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.frame {
  position: relative; display: block; width: 100%; max-width: 100%; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(160deg, #00183f, #06081a);
  box-shadow: 0 0 0 1px rgba(183, 39, 20, 0.16), 0 18px 44px -24px rgba(183, 39, 20, 0.45), 0 24px 48px -28px rgba(0, 0, 0, 0.9);
  transition: box-shadow .35s, transform .35s;
}
.frame img { width: 100%; height: 100%; object-fit: contain; background: #05060b; }
.frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(4, 5, 10, 0.55)); pointer-events: none; }
.play {
  position: absolute; z-index: 2; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(7, 8, 13, 0.42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(236, 234, 240, 0.45); transition: box-shadow .3s, transform .3s, background .3s;
}
.play::before { content: ""; margin-left: 4px; border: 8px solid transparent; border-left: 13px solid var(--ink); border-right: 0; }
.badge { position: absolute; z-index: 2; bottom: 10px; left: 10px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(4, 5, 10, 0.6); direction: ltr; font-variant-numeric: tabular-nums; }

/* red light under the pointer: --mx / --my are set by app.js, centre by default */
.frame::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(183, 39, 20, 0.46), transparent 70%); }
:is(.nav a, .brand, .wa, .skills li, .nav-btn, .icon-btn) { position: relative; isolation: isolate; }
:is(.nav a, .brand, .wa, .skills li, .nav-btn, .icon-btn)::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(130px circle at var(--mx, 50%) var(--my, 50%), rgba(183, 39, 20, 0.4), transparent 75%); }
@media (hover: hover) {
  .tile:hover .frame { transform: translateY(-4px);
    box-shadow: 0 0 0 1px rgba(183, 39, 20, 0.6), 0 0 60px -6px var(--red-glow), 0 30px 60px -28px rgba(0, 0, 0, 0.95); }
  .tile:hover .frame::before, :is(.nav a, .brand, .wa, .skills li, .nav-btn, .icon-btn):hover::before { opacity: 1; }
  .tile:hover .play { transform: scale(1.08); background: rgba(183, 39, 20, 0.35); box-shadow: inset 0 0 0 1px var(--red-hi), 0 0 30px -2px var(--red-glow); }
  :is(.nav a, .brand, .skills li, .nav-btn, .icon-btn):hover { box-shadow: 0 0 30px -8px var(--red-glow); }
  .skills li:hover { border-color: rgba(183, 39, 20, 0.5); }
}
/* on phones: the same light while the finger is down */
.tile:active .frame::before { opacity: 1; }
.tile:focus-visible { outline: none; }
.tile:focus-visible .frame { box-shadow: 0 0 0 2px var(--red), 0 0 50px -8px var(--red-glow); }
.sample-note { color: var(--soft); font-size: 13px; text-align: center; margin: 26px auto 0; max-width: 620px; }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start;
  padding-block: clamp(64px, 10vw, 120px) 0; }
h2 { margin: 0 0 14px; font-weight: 700; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; }
h2::after { content: ""; display: block; width: 44px; height: 2px; border-radius: 2px; background: var(--red); box-shadow: 0 0 14px var(--red-glow); margin-top: 14px; }
.about-text p { margin: 0 0 12px; color: #c6c8d3; max-width: 56ch; font-weight: 300; font-size: 17px; }
.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skills li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--ink); background: rgba(15, 16, 28, 0.5); transition: border-color .3s; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* contact */
.contact { padding-block: clamp(64px, 10vw, 120px) clamp(48px, 8vw, 90px); text-align: center; display: grid; justify-items: center; }
.contact h2::after { margin-inline: auto; }
.contact > p { margin: 0 0 22px; color: var(--soft); }
.wa {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px;
  text-decoration: none; font-weight: 500; color: #fff; background: linear-gradient(180deg, #b72714, #8c1d0f);
  box-shadow: 0 12px 36px -10px var(--red-glow); transition: transform .2s, box-shadow .2s;
}
.wa:hover { transform: translateY(-1px); box-shadow: 0 16px 44px -8px rgba(183, 39, 20, 0.75); }
.phone { margin: 14px 0 0; color: var(--soft); font-size: 15px; font-variant-numeric: tabular-nums; user-select: all; }

.site-footer { padding-block: 22px calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--soft); font-size: 13px; text-align: center; }

/* player */
.player {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: radial-gradient(80% 60% at 50% 55%, rgba(110, 23, 12, 0.35), transparent 70%), rgba(4, 5, 10, 0.97);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.player-top, .player-bottom { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter); }
.player-count { font-size: 14px; color: var(--soft); direction: ltr; font-variant-numeric: tabular-nums; padding-inline: 6px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; }
.player-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 var(--gutter); touch-action: pan-y; }
.screen {
  --r: 0.5625; position: relative; background: #000; border-radius: 12px; overflow: hidden;
  width: min(100%, calc((var(--vh) - 150px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * var(--r)));
  aspect-ratio: var(--r); max-width: 100%;
  box-shadow: 0 0 0 1px rgba(183, 39, 20, 0.25), 0 0 70px -20px var(--red-glow), 0 40px 80px -30px #000;
}
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.screen-msg { position: absolute; inset: auto 0 45%; margin: 0; text-align: center; color: var(--soft); padding: 0 16px; }
.player-bottom { justify-content: center; gap: 8px; }
.nav-btn {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(15, 16, 28, 0.6);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 15px; transition: border-color .2s, color .2s;
}
.nav-btn:hover { border-color: rgba(183, 39, 20, 0.55); color: var(--red-hi); }
.nav-btn:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 400px) { .nav-btn { padding: 0 12px; font-size: 14px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb { animation: none; }
  .tile, .player { animation: none; }
  .frame, .play, .wa { transition: none; }
}
