/* ============================================================
   RAVID — Design System & Landing Page Styles
   Mobile-first. CSS logical properties throughout for RTL/LTR.
   ============================================================ */

:root {
  /* Corporate palette (derived from logo.png navy + refined spectrum) */
  --navy-950: #0a1024;
  --navy-900: #0d1530;
  --navy-850: #101a3a;
  --navy-800: #142046;
  --navy-700: #1b2b5c;

  --cyan-300: #7debff;
  --cyan-400: #22d3ee;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  /* Von Restorff contrast CTA color — refined gold */
  --gold-400: #e8b44a;
  --gold-300: #f2c567;
  --gold-500: #d19c2e;
  --gold-ink: #1a1204;

  --text-primary: #eef3fc;
  --text-secondary: #aab8d8;
  --text-muted: #7b8ab0;

  --line-subtle: rgba(90, 130, 210, 0.18);
  --line-strong: rgba(90, 150, 235, 0.35);

  --grad-tech: linear-gradient(120deg, var(--cyan-400), var(--blue-500) 55%, var(--blue-700));
  --grad-metal: linear-gradient(160deg, #c9d8f2 0%, #8fa8d4 45%, #5d729e 100%);

  --font-en-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-en-body: "Inter", "Segoe UI", sans-serif;
  --font-he: "Heebo", "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --space-section: clamp(4.5rem, 10vw, 8rem);
  --container: 72rem;

  --shadow-card: 0 18px 50px -18px rgba(3, 8, 25, 0.85);
  --shadow-glow-cyan: 0 0 34px -6px rgba(34, 211, 238, 0.35);
  --shadow-glow-gold: 0 10px 38px -8px rgba(232, 180, 74, 0.45);
}

/* ---------- Reset & base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(37, 99, 235, 0.14), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(34, 211, 238, 0.07), transparent 55%),
    var(--navy-950);
  color: var(--text-primary);
  font-family: var(--font-en-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: var(--font-en-display);
  line-height: 1.15;
  letter-spacing: 0.01em;
  font-weight: 600;
}

/* Hebrew typography: Heebo everywhere, tighter tracking */
html[lang="he"] body,
html[lang="he"] h1,
html[lang="he"] h2,
html[lang="he"] h3,
html[lang="he"] .display,
html[lang="he"] button,
html[lang="he"] input,
html[lang="he"] select,
html[lang="he"] textarea {
  font-family: var(--font-he);
  letter-spacing: 0;
}

img, svg { display: block; max-inline-size: 100%; }

a { color: inherit; }

::selection { background: rgba(34, 211, 238, 0.35); color: #fff; }

/* ---------- Utility ---------- */

.container {
  inline-size: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

html[lang="he"] .eyebrow { letter-spacing: 0.08em; }

.eyebrow::before {
  content: "";
  inline-size: 2.2rem;
  block-size: 1px;
  background: var(--grad-tech);
  flex-shrink: 0;
}

.section {
  padding-block: var(--space-section);
  position: relative;
}

.section-title {
  font-size: clamp(1.75rem, 4.4vw, 2.75rem);
  margin-block: 1rem 1.25rem;
  max-inline-size: 22ch;
}

.section-lead {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-inline-size: 58ch;
}

.text-gradient {
  background: var(--grad-tech);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 3px;
}

/* Primary contrast CTA — gold (Von Restorff) */
.btn-gold {
  background: linear-gradient(160deg, var(--gold-300), var(--gold-400) 55%, var(--gold-500));
  color: var(--gold-ink);
  box-shadow: var(--shadow-glow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 46px -8px rgba(232, 180, 74, 0.6);
}

.btn-ghost {
  background: rgba(20, 32, 70, 0.55);
  border-color: var(--line-strong);
  color: var(--text-primary);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  border-color: var(--cyan-400);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.btn .btn-arrow { transition: transform 0.25s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }
html[dir="rtl"] .btn .btn-arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .btn-arrow { transform: scaleX(-1) translateX(4px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: rgba(10, 16, 36, 0.82);
  backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--line-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.8rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark { inline-size: 44px; block-size: auto; }

.brand-text { line-height: 1.2; }

.brand-name {
  font-family: var(--font-en-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: lowercase;
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(13, 21, 48, 0.7);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn[aria-pressed="true"] {
  background: var(--grad-tech);
  color: #04101f;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(4rem, 9vw, 6.5rem);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.15rem, 6vw, 3.6rem);
  font-weight: 700;
  max-inline-size: 16ch;
  margin-block: 1.1rem 1.35rem;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  max-inline-size: 52ch;
  margin-block-end: 2.2rem;
}

.hero-sub strong { color: var(--text-primary); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-visual {
  position: relative;
  margin-inline: auto;
  inline-size: min(100%, 30rem);
}

.hero-visual svg { inline-size: 100%; block-size: auto; }

/* animated gaze-cue flow lines inside hero visual */
.flow-line path {
  stroke-dashoffset: 0;
  animation: flow-dash 6s linear infinite;
}

@keyframes flow-dash {
  to { stroke-dashoffset: -160; }
}

/* mirror the visual so gaze lines still point toward the copy/CTA in RTL */
html[dir="rtl"] .hero-visual svg { transform: scaleX(-1); }

/* Gaze-cue line: animated stroke that flows toward CTA */
.gaze-cue {
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: -1.4rem;
  inline-size: 100%;
  block-size: 2px;
  background: linear-gradient(to right, transparent, var(--cyan-400) 60%, var(--gold-400));
  opacity: 0.55;
  pointer-events: none;
}

html[dir="rtl"] .gaze-cue {
  background: linear-gradient(to left, transparent, var(--cyan-400) 60%, var(--gold-400));
}

.hero-scarcity {
  margin-block-start: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-scarcity::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 12px rgba(232, 180, 74, 0.8);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

/* ---------- Problem Agitation ---------- */

.section-problem {
  background:
    linear-gradient(180deg, transparent, rgba(13, 21, 48, 0.65) 20% 80%, transparent);
}

.challenge-grid {
  display: grid;
  gap: 1.25rem;
  margin-block-start: 3rem;
}

.challenge-card {
  position: relative;
  padding: 1.8rem 1.6rem;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  background: linear-gradient(165deg, rgba(20, 32, 70, 0.55), rgba(13, 21, 48, 0.35));
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.challenge-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.challenge-card .q-index {
  font-family: var(--font-en-display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--cyan-400);
}

.challenge-card h3 {
  font-size: 1.12rem;
  margin-block: 0.7rem 0.6rem;
}

.challenge-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------- Approach / Authority ---------- */

.pillars {
  display: grid;
  gap: 1.25rem;
  margin-block-start: 3rem;
}

.pillar-card {
  padding: 2rem 1.7rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  background: linear-gradient(200deg, rgba(27, 43, 92, 0.4), rgba(13, 21, 48, 0.55));
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.pillar-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: var(--shadow-card), var(--shadow-glow-cyan);
}

.pillar-icon {
  inline-size: 52px;
  block-size: 52px;
  margin-block-end: 1.2rem;
}

.pillar-card h3 { font-size: 1.2rem; margin-block-end: 0.65rem; }
.pillar-card p { color: var(--text-secondary); font-size: 0.96rem; }

/* ---------- Who this is NOT for ---------- */

.section-notfor .section-title { max-inline-size: 26ch; }

.notfor-list {
  list-style: none;
  margin-block-start: 2.6rem;
  display: grid;
  gap: 1rem;
  max-inline-size: 46rem;
}

.notfor-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(200, 90, 90, 0.16);
  background: rgba(20, 14, 30, 0.35);
  color: var(--text-secondary);
}

.notfor-x {
  flex-shrink: 0;
  inline-size: 26px;
  block-size: 26px;
  margin-block-start: 0.1rem;
}

.notfor-note {
  margin-block-start: 2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-inline-size: 52ch;
}

.notfor-note strong { color: var(--gold-400); font-weight: 600; }

/* ---------- Trust signals ---------- */

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-block-start: 2.8rem;
}

.trust-card {
  padding: 1.7rem 1.2rem;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-subtle);
  background: linear-gradient(180deg, rgba(20, 32, 70, 0.45), rgba(13, 21, 48, 0.25));
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.trust-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }

.trust-icon { inline-size: 46px; block-size: 46px; margin-inline: auto; margin-block-end: 0.9rem; }

.trust-card h3 { font-size: 0.98rem; margin-block-end: 0.3rem; }

.placeholder-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  margin-block-start: 0.4rem;
}

/* ---------- Micro-commitment ---------- */

.section-commit { padding-block-end: 3rem; }

.commit-card {
  position: relative;
  max-inline-size: 46rem;
  margin-inline: auto;
  text-align: center;
  padding: clamp(2.4rem, 6vw, 3.8rem) clamp(1.4rem, 5vw, 3.5rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(500px 220px at 50% -30%, rgba(34, 211, 238, 0.14), transparent 70%),
    linear-gradient(190deg, rgba(27, 43, 92, 0.6), rgba(13, 21, 48, 0.85));
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* converging gaze lines pointing to the YES button */
.commit-card::before,
.commit-card::after {
  content: "";
  position: absolute;
  inset-block-start: 18%;
  inline-size: 34%;
  block-size: 1px;
  background: linear-gradient(to right, transparent, rgba(34, 211, 238, 0.6));
  pointer-events: none;
}

.commit-card::before { inset-inline-start: 0; transform: rotate(14deg); }
.commit-card::after {
  inset-inline-end: 0;
  background: linear-gradient(to left, transparent, rgba(34, 211, 238, 0.6));
  transform: rotate(-14deg);
}

.commit-question {
  font-size: clamp(1.4rem, 3.6vw, 2.1rem);
  font-weight: 700;
  max-inline-size: 24ch;
  margin-inline: auto;
  margin-block: 0.9rem 2rem;
}

.commit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.commit-later-msg {
  margin-block-start: 1.6rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-inline-size: 44ch;
  margin-inline: auto;
  display: none;
}

.commit-later-msg.is-visible { display: block; animation: fade-up 0.5s ease both; }

/* ---------- Qualifying application ---------- */

.section-application[hidden] { display: none; }

.section-application {
  animation: fade-up 0.7s ease both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-shell {
  max-inline-size: 44rem;
  margin-inline: auto;
}

.app-head { text-align: center; margin-block-end: 2.4rem; }
.app-head .section-title { margin-inline: auto; }
.app-head .section-lead { margin-inline: auto; }

.scarcity-note {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-block-start: 1.3rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 180, 74, 0.4);
  background: rgba(232, 180, 74, 0.08);
  color: var(--gold-300);
  font-size: 0.85rem;
  font-weight: 500;
}

.app-form {
  padding: clamp(1.6rem, 4.5vw, 2.6rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20, 32, 70, 0.55), rgba(13, 21, 48, 0.8));
  box-shadow: var(--shadow-card);
}

/* progress */
.form-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block-end: 2rem;
}

.progress-seg {
  flex: 1;
  block-size: 4px;
  border-radius: 999px;
  background: var(--navy-700);
  overflow: hidden;
  position: relative;
}

.progress-seg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-tech);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s ease;
}

html[dir="rtl"] .progress-seg::after { transform-origin: 100% 50%; }

.progress-seg.is-done::after,
.progress-seg.is-active::after { transform: scaleX(1); }

.progress-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* steps */
.form-step { display: none; }
.form-step.is-active { display: block; animation: fade-up 0.45s ease both; }

.step-title {
  font-size: 1.25rem;
  margin-block-end: 0.4rem;
}

.step-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-block-end: 1.6rem;
}

.field { margin-block-end: 1.3rem; }

.field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-block-end: 0.45rem;
}

.field input,
.field select,
.field textarea {
  inline-size: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text-primary);
  background: rgba(10, 16, 36, 0.75);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea { min-block-size: 6.2rem; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%237b8ab0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-inline-end: 2.6rem;
}

html[dir="rtl"] .field select { background-position: left 1rem center; }

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #e0655f; }

.field-error {
  display: none;
  color: #ef8a85;
  font-size: 0.82rem;
  margin-block-start: 0.4rem;
}

.field.has-error .field-error { display: block; }

/* radio pills (budget authority) */
.radio-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.radio-pill { position: relative; }

.radio-pill input {
  position: absolute;
  opacity: 0;
  inline-size: 100%;
  block-size: 100%;
  cursor: pointer;
}

.radio-pill span {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 16, 36, 0.6);
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.radio-pill input:checked + span {
  background: var(--grad-tech);
  border-color: transparent;
  color: #04101f;
  font-weight: 600;
}

.radio-pill input:focus-visible + span {
  outline: 2px solid var(--cyan-400);
  outline-offset: 2px;
}

/* step nav */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-block-start: 1.8rem;
}

.btn-back {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.6rem 0.4rem;
}

.btn-back:hover { color: var(--text-primary); }

/* success */
.app-success {
  text-align: center;
  padding: clamp(2.5rem, 7vw, 4rem) 1.5rem;
  display: none;
}

.app-success.is-visible { display: block; animation: fade-up 0.6s ease both; }

.success-icon { inline-size: 74px; block-size: 74px; margin-inline: auto; margin-block-end: 1.4rem; }

.app-success h3 { font-size: 1.6rem; margin-block-end: 0.7rem; }
.app-success p { color: var(--text-secondary); max-inline-size: 44ch; margin-inline: auto; }

/* ---------- Footer ---------- */

.site-footer {
  border-block-start: 1px solid var(--line-subtle);
  padding-block: 2.6rem;
  margin-block-start: var(--space-section);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

.footer-inner .brand-mark { inline-size: 38px; opacity: 0.9; }

.footer-copy { color: var(--text-muted); font-size: 0.84rem; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-revealed { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   BRILLIANCE LAYER
   Preloader, living field, custom cursor, kinetic type,
   tilt glare, manifesto ticker, atmosphere.
   ============================================================ */

/* ---------- Preloader: the mark draws itself ---------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--navy-950);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.preloader-mark { inline-size: min(38vw, 190px); }

.pl-hex path {
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: pl-draw 1.15s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

.pl-hex path:nth-child(2) { animation-delay: 0.18s; }
.pl-hex path:nth-child(3) { animation-delay: 0.36s; }

@keyframes pl-draw {
  to { stroke-dashoffset: 0; }
}

.preloader.is-done { opacity: 0; visibility: hidden; }

/* staged entrance once the preloader lifts */
.hero-sub,
.hero-actions,
.hero-scarcity {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

body.is-loaded .hero-sub { opacity: 1; transform: none; transition-delay: 0.55s; }
body.is-loaded .hero-actions { opacity: 1; transform: none; transition-delay: 0.75s; }
body.is-loaded .hero-scarcity { opacity: 1; transform: none; transition-delay: 0.95s; }

/* ---------- Word-mask headline reveal ---------- */

.hero-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-block-end: 0.08em;
  margin-block-end: -0.08em;
}

.hero-title .wi {
  display: inline-block;
  transform: translateY(115%) rotate(2deg);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-title.is-split .wi { transform: none; }

/* ---------- The Living Field canvas ---------- */

.field-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease 0.4s;
}

body.is-loaded .field-canvas { opacity: 1; }

.hero-inner { position: relative; z-index: 1; }

/* ---------- Scroll progress line ---------- */

.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 2px;
  z-index: 120;
  background: linear-gradient(90deg, var(--cyan-400), var(--blue-500), var(--gold-400));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

html[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

/* ---------- Film grain (SVG turbulence, no image asset) ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Custom cursor ---------- */

body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor input,
body.has-cursor select,
body.has-cursor textarea,
body.has-cursor label { cursor: none; }

/* Physical top/left on purpose: the cursor lives in screen space and must
   never flip with the document's inline direction (RTL). */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  pointer-events: none;
  border-radius: 50%;
  display: none;
}

body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring { display: block; }

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--gold-400);
  box-shadow: 0 0 10px rgba(232, 180, 74, 0.9);
  mix-blend-mode: difference;
}

.cursor-ring {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(140, 230, 255, 0.9);
  mix-blend-mode: difference;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease,
              border-color 0.25s ease, background-color 0.25s ease;
}

body.cursor-hover .cursor-ring {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-color: rgba(232, 180, 74, 0.95);
  background: rgba(232, 180, 74, 0.08);
}

body.cursor-down .cursor-ring {
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
}

/* ---------- Manifesto ticker ---------- */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line-subtle);
  background: rgba(13, 21, 48, 0.5);
  padding-block: 1.05rem;
  position: relative;
}

.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inline-size: 90px;
  z-index: 1;
  pointer-events: none;
}

.ticker::before { inset-inline-start: 0; background: linear-gradient(to right, var(--navy-950), transparent); }
.ticker::after { inset-inline-end: 0; background: linear-gradient(to left, var(--navy-950), transparent); }

html[dir="rtl"] .ticker::before { background: linear-gradient(to left, var(--navy-950), transparent); }
html[dir="rtl"] .ticker::after { background: linear-gradient(to right, var(--navy-950), transparent); }

.ticker-track {
  display: flex;
  white-space: nowrap;
  inline-size: max-content;
  animation: ticker-scroll 36s linear infinite;
}

html[dir="rtl"] .ticker-track { animation-direction: reverse; }

.ticker-run {
  font-family: var(--font-en-display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding-inline-end: 0.5rem;
}

html[lang="he"] .ticker-run { font-family: var(--font-he); letter-spacing: 0.1em; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

html[dir="rtl"] .ticker-track { animation-name: ticker-scroll-rtl; }

@keyframes ticker-scroll-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* ---------- Ghost numerals ---------- */

.section .container { position: relative; z-index: 1; }

.ghost-num {
  position: absolute;
  inset-block-start: clamp(1rem, 4vw, 2.5rem);
  inset-inline-end: clamp(0.5rem, 4vw, 4rem);
  z-index: 0;
  font-family: var(--font-en-display);
  font-size: clamp(7rem, 18vw, 15rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(96, 140, 220, 0.13);
  user-select: none;
  pointer-events: none;
}

/* ---------- 3D tilt + specular glare ---------- */

.tilt {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
  --gx: 50%;
  --gy: 50%;
}

.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--gx) var(--gy), rgba(160, 210, 255, 0.1), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tilt:hover::after { opacity: 1; }

/* ---------- Rotating energy ring on the commit card ---------- */

@property --ring-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.commit-ring {
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  pointer-events: none;
  background: conic-gradient(
    from var(--ring-angle),
    transparent 0deg 250deg,
    rgba(34, 211, 238, 0.85) 300deg,
    rgba(232, 180, 74, 0.95) 330deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: ring-spin 5s linear infinite;
}

@keyframes ring-spin {
  to { --ring-angle: 360deg; }
}

/* ---------- Statement: ink fills the words as you scroll ---------- */

.statement {
  padding-block: clamp(5rem, 12vw, 9rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.statement::before {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: min(80vw, 900px);
  aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.12), transparent 65%);
  pointer-events: none;
}

html[dir="rtl"] .statement::before { transform: translate(50%, -50%); }

/* Longhand background properties only: the `background` shorthand would
   reset background-clip and break the text-fill effect. */
.statement-line {
  font-family: var(--font-en-display);
  font-size: clamp(2.4rem, 7.5vw, 5.8rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: transparent;
  background-image: linear-gradient(90deg, #f2f6ff 50%, rgba(150, 175, 225, 0.14) 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}

html[lang="he"] .statement-line { font-family: var(--font-he); }

html[dir="rtl"] .statement-line {
  background-image: linear-gradient(-90deg, #f2f6ff 50%, rgba(150, 175, 225, 0.14) 50%);
  background-position: 0% 0;
}

.statement-line-gold {
  background-image: linear-gradient(90deg, #f2c567 25%, #e8b44a 50%, rgba(150, 175, 225, 0.14) 50%);
}

html[dir="rtl"] .statement-line-gold {
  background-image: linear-gradient(-90deg, #f2c567 25%, #e8b44a 50%, rgba(150, 175, 225, 0.14) 50%);
}

/* scroll-driven ink fill (Chrome 115+ / Safari 17.4+) */
@supports (animation-timeline: view()) {
  .statement-line {
    animation: ink-fill linear both;
    animation-timeline: view();
    animation-range: entry 60% cover 45%;
  }
  .statement-line-gold {
    animation-range: entry 80% cover 60%;
  }
  @keyframes ink-fill {
    to { background-position: 0% 0; }
  }
  html[dir="rtl"] .statement-line {
    animation-name: ink-fill-rtl;
  }
  @keyframes ink-fill-rtl {
    to { background-position: 100% 0; }
  }
}

/* browsers without scroll timelines get the finished state */
@supports not (animation-timeline: view()) {
  .statement-line { background-position: 0% 0; }
  html[dir="rtl"] .statement-line { background-position: 100% 0; }
}

/* ---------- Shine sweep across gold CTAs ---------- */

.btn-gold {
  position: relative;
  overflow: hidden;
}

.btn-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.55) 50%, transparent 68%);
  background-size: 250% 100%;
  background-position: 180% 0;
  transition: background-position 0.7s ease;
  pointer-events: none;
}

.btn-gold:hover::after { background-position: -80% 0; }

/* ---------- View Transitions: the language morph ---------- */

::view-transition-old(root) {
  animation: vt-out 0.42s cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: vt-in 0.5s cubic-bezier(0, 0, 0.2, 1) 0.06s both;
}

@keyframes vt-out {
  to { opacity: 0; transform: scale(0.985); filter: blur(6px); }
}

@keyframes vt-in {
  from { opacity: 0; transform: scale(1.015); filter: blur(6px); }
}

/* ---------- Motion safety for the brilliance layer ---------- */

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
  .hero-sub, .hero-actions, .hero-scarcity { opacity: 1; transform: none; }
  .field-canvas { display: none; }
  .ticker-track { animation: none; }
  .commit-ring { animation: none; }
  .hero-title .wi { transform: none; }
  .statement-line { animation: none; background-position: 0% 0; }
  html[dir="rtl"] .statement-line { background-position: 100% 0; }
}

/* ---------- Breakpoints ---------- */

@media (min-width: 640px) {
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
  .challenge-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
  }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .brand-mark { inline-size: 50px; }
}
