/* =========================================================================
   ESSOR — website-building service / scroll-scrubbed film
   Standalone: does not share rules with story.css, so neither page can break
   the other. Palette is the brand's own (brand.js).
   ========================================================================= */

:root {
  --ink: #14112b;
  --violet: #5b2eff;
  --coral: #ff7a45;
  --cream: #fff6ec;
  --lilac: #e9e3ff;
  --muted: #7a7594;

  --hairline: rgba(233, 227, 255, 0.18);
  --font: 'Readex Pro', Tahoma, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Total scroll for the 10s film. The one knob. */
  --film-vh: 680;
  --pad: 5rem;
  color-scheme: dark;
}

@media (max-width: 1023px) { :root { --pad: 2rem; } }
@media (max-width: 767px)  { :root { --film-vh: 450; --pad: 1.25rem; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  direction: rtl;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------------------------------------------------------------- nav --- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem var(--pad);
  background: rgba(20, 17, 43, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
  transition: opacity 0.35s var(--ease);
}
.wordmark { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.wordmark b { color: var(--coral); }
.nav-links { display: flex; gap: 1.4rem; font-size: 0.9rem; }
.nav-links a { opacity: 0.66; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-cta {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--coral);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.86rem;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-cta:hover { background: var(--cream); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* --------------------------------------------------------------- film --- */

.film { position: relative; background: var(--ink); }

/* The scroll length of the whole film. Without this the page has no travel
   and the playhead can never move. */
html.cinematic .film { height: calc(var(--film-vh) * 1vh); }

.stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
  /* The copy layers get real depth on top of the footage. */
  perspective: 1200px;
}

.stage > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Tuned to this film: it is violet-lit, so the scrim carries violet too. */
  background:
    linear-gradient(to top,
      rgba(16, 12, 38, 0.94) 0%,
      rgba(22, 16, 56, 0.6) 30%,
      rgba(30, 20, 70, 0.12) 64%,
      rgba(30, 20, 70, 0) 84%),
    linear-gradient(to left,
      rgba(16, 12, 38, 0.66) 0%,
      rgba(16, 12, 38, 0) 56%);
}
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%,
    rgba(0,0,0,0) 44%, rgba(0,0,0,0.3) 78%, rgba(0,0,0,0.6) 100%);
}

/* --------------------------------------------------------------- beat --- */

.beat {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--pad) clamp(3rem, 9vh, 7rem);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform-style: preserve-3d;
  will-change: opacity, transform;
}
.beat-inner { width: 100%; max-width: 1280px; margin-inline: auto; }

.overline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--lilac);
}
.overline i {
  display: block;
  width: 2.4rem;
  height: 1px;
  background: linear-gradient(to left, var(--violet), var(--coral));
  transform-origin: right center;
  transform: scaleX(clamp(0, calc(var(--a) * 1.6), 1));
}

.headline {
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: #fff;
}
.headline span { display: block; overflow: hidden; }
.headline span > i {
  --t: clamp(0, calc((var(--a) - var(--d)) / 0.45), 1);
  display: block;
  font-style: normal;
  transform: translate3d(0, calc((1 - var(--t)) * 1em), 0);
}
.headline span:last-child > i { color: var(--coral); }

.note {
  --t: clamp(0, calc((var(--a) - 0.25) / 0.45), 1);
  max-width: 46ch;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.8;
  color: rgba(255, 246, 236, 0.78);
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 1rem), 0);
}

/* -------------------------------------------------- the options panel --- */

.options {
  --t: clamp(0, calc((var(--a) - 0.2) / 0.4), 1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 1.8rem;
  max-width: 920px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 1.5rem), 0);
  pointer-events: auto;
}
.option { background: rgba(20, 17, 43, 0.82); padding: 1.3rem 1.2rem; }
.option h3 { font-size: 1rem; margin-bottom: 0.45rem; color: #fff; }
.option p { font-size: 0.82rem; line-height: 1.6; color: var(--muted); }
.option b { display: block; margin-top: 0.7rem; font-size: 0.76rem; color: var(--lilac); font-weight: 600; }

.quote {
  --t: clamp(0, calc((var(--a) - 0.3) / 0.4), 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(233, 227, 255, 0.1);
  border: 1px solid var(--hairline);
  font-size: 0.8rem;
  opacity: var(--t);
}

.beat-cta {
  --t: clamp(0, calc((var(--a) - 0.3) / 0.4), 1);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  background: var(--coral);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: auto;
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 1rem), 0);
  transition: background-color 0.25s var(--ease);
}
.beat-cta:hover { background: var(--cream); }

@media (max-width: 767px) {
  .options { grid-template-columns: 1fr; margin-top: 1.1rem; }
  .option { padding: 0.85rem 1rem; }
  .option p { display: none; }
}

/* ---------------------------------------------------------- furniture --- */

.rail {
  --p: 0;
  position: absolute;
  top: 50%;
  left: var(--pad);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  pointer-events: none;
  z-index: 3;
  color: var(--cream);
}
.rail-num { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rail-num small { font-size: 0.7rem; opacity: 0.5; }
.rail-track { position: relative; width: 1px; height: clamp(100px, 24vh, 190px); background: currentColor; opacity: 0.3; }
.rail-fill { position: absolute; inset: 0; background: var(--coral); transform-origin: top center; transform: scaleY(var(--p)); }

.cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  opacity: 0.7;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.6s var(--ease);
}
.cue i { display: block; width: 1px; height: 2rem; background: linear-gradient(to bottom, var(--coral), transparent); }

@media (max-width: 767px) {
  .rail { left: auto; right: var(--pad); gap: 0.5rem; }
  .rail-num small, .cue { display: none; }
}

/* ------------------------------------------------------------ loading --- */

.loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { width: min(360px, 76vw); }
.loader-label { font-size: 0.72rem; letter-spacing: 0.22em; color: var(--coral); }
.loader-bar { height: 2px; margin-top: 1rem; background: rgba(233, 227, 255, 0.18); overflow: hidden; }
.loader-fill { display: block; height: 100%; background: var(--coral); transform-origin: right center; transform: scaleX(0); transition: transform 0.35s var(--ease); }

/* --------------------------------------------------------------- outro --- */

.outro { position: relative; z-index: 2; background: var(--cream); color: var(--ink); padding: clamp(4rem, 12vh, 9rem) var(--pad); }
.outro-inner { max-width: 1280px; margin-inline: auto; }
.outro .overline { color: var(--violet); }
.outro .overline i { background: var(--violet); transform: none; }
.outro h2 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.03em; margin-bottom: 1rem; }
.outro > .outro-inner > p { color: var(--muted); max-width: 48ch; margin-bottom: 2rem; }
.outro-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.9rem 1.7rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem; transition: transform 0.2s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-ghost { border: 1px solid rgba(20, 17, 43, 0.18); color: var(--ink); }
.foot { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: baseline; margin-top: clamp(3rem, 8vh, 5rem); padding-top: 1.5rem; border-top: 1px solid rgba(20, 17, 43, 0.14); font-size: 0.8rem; color: var(--muted); }

/* ------------------------------- no-JS / reduced motion: stay readable --- */

html:not(.cinematic) .film { height: auto; }
html:not(.cinematic) .stage { position: relative; height: auto; overflow: visible; padding-bottom: 2rem; }
html:not(.cinematic) .stage > video { position: relative; height: auto; }
html:not(.cinematic) .beat {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  min-height: auto;
  padding: 2.5rem var(--pad);
  border-bottom: 1px solid var(--hairline);
}
html:not(.cinematic) .beat .headline span > i,
html:not(.cinematic) .beat .note,
html:not(.cinematic) .beat .options,
html:not(.cinematic) .beat .quote,
html:not(.cinematic) .beat .beat-cta { transform: none; opacity: 1; }
html:not(.cinematic) .overline i { transform: none; }
html:not(.cinematic) .rail,
html:not(.cinematic) .cue,
html:not(.cinematic) .loader,
html:not(.cinematic) .scrim,
html:not(.cinematic) .vignette { display: none; }

/* =========================================================================
   Studio film — additions on top of the shared film layout.
   This cut is violet-lit and ends on neon result numbers, so the type picks
   up that light instead of fighting it.
   ========================================================================= */

/* Headline: white body, coral payoff line — keeps the brand tie while the
   rest of the frame goes violet. */
.headline span:last-child > i {
  color: var(--coral);
  text-shadow: 0 0 38px rgba(255, 122, 69, 0.3);
}

/* ------------------------------------------------------- the stat row --- */

.stats {
  --t: clamp(0, calc((var(--a) - 0.18) / 0.4), 1);
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
  margin-top: 1.9rem;
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 1.6rem), 0);
}

.stat { display: flex; flex-direction: column; gap: 0.3rem; }

.stat-value {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  /* Echoes the neon figures in the footage without inventing a new colour. */
  text-shadow: 0 0 34px rgba(91, 46, 255, 0.55), 0 0 10px rgba(201, 190, 255, 0.35);
}
.stat-value b { color: var(--lilac); font-weight: 700; }

.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(233, 227, 255, 0.72);
}

.stat-note {
  --t: clamp(0, calc((var(--a) - 0.34) / 0.4), 1);
  margin-top: 1.1rem;
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(233, 227, 255, 0.5);
  max-width: 48ch;
  opacity: var(--t);
}

@media (max-width: 767px) {
  .stats { gap: 1.2rem 1.8rem; margin-top: 1.2rem; }
  .stat-value { font-size: clamp(1.6rem, 9vw, 2.2rem); }
  .stat-label { font-size: 0.68rem; }
  .stat-note { display: none; }
}

/* ------------------------------------------------- the portfolio strip --- */

.tags {
  --t: clamp(0, calc((var(--a) - 0.22) / 0.4), 1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 1.2rem), 0);
}
.tag {
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 190, 255, 0.26);
  background: rgba(91, 46, 255, 0.14);
  font-size: 0.8rem;
  color: var(--lilac);
}

/* No-JS: counters already carry their final value in the HTML. */
html:not(.cinematic) .stats,
html:not(.cinematic) .stat-note,
html:not(.cinematic) .tags { opacity: 1; transform: none; }
