/* ============================================================
   RISHON — Corporate Website
   Single stylesheet · All colors in :root · Mobile-first
   Breakpoints: <600px (mobile), 600–960px (tablet), 961px+ (desktop)
   ============================================================ */

/* — CSS Custom Properties ————————————————————————————————————— */
:root {
  --bg:         #ffffff;
  --bg-dark:    #0a0a0a;
  --bg-muted:   #f7f7f7;

  --fg:         #111111;
  --fg-sec:     #555555;
  --fg-muted:   #999999;
  --fg-inv:     #ffffff;

  --accent:       #0057B8;
  --accent-hover: #004494;
  --accent-light: #EEF4FF;

  --border:       #e0e0e0;
  --border-subtle: rgba(0,0,0,0.06);

  --max-w: 960px;

  --font-display: 'Orbitron', sans-serif;
  --font-body:    'Sora', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

/* — Reset & Base ————————————————————————————————————————————— */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; overflow-anchor: none; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-sec);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip to content (accessibility) */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--accent); color: #fff;
  padding: 8px 16px; z-index: 1000; font-size: 14px;
}
.skip-link:focus { top: 0; }

/* — Typography ——————————————————————————————————————————————— */
h1, h2, h3, h4 { color: var(--fg); font-weight: 700; line-height: 1.3; }
h1 { font-size: 28px; margin-bottom: 12px; }
h2 { font-size: 22px; margin-bottom: 10px; }
h3 { font-size: 18px; margin-bottom: 8px; }
p  { margin-bottom: 16px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--fg); }

/* — Layout —————————————————————————————————————————————————— */
main {
  flex: 1;
  width: 100%;
}
.content-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* — Header ————————————————————————————————————————————————— */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.site-logo img {
  height: 42px; width: auto;
  filter: invert(1);
}

/* Desktop nav — hidden by default (mobile-first) */
.main-nav {
  display: none;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.nav-link {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  text-decoration: none;
  padding: 6px 12px 3px;
  border-bottom: 4px solid transparent;
  transition: border-color 0.15s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--fg);
  text-decoration: none;
  border-bottom-color: var(--accent);
}
.nav-link.active {
  color: var(--fg);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.nav-cta {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 8px 18px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

/* Hamburger button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px; height: 44px;
  border: none; background: transparent;
  cursor: pointer; gap: 5px; padding: 10px;
  flex-shrink: 0;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--fg); border-radius: 1px;
}

/* Mobile overlay nav */
.mobile-nav-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 20px;
}
.mobile-nav-overlay.open { display: flex; }

.mobile-nav-close {
  align-self: flex-end;
  width: 44px; height: 44px;
  border: none; background: transparent;
  color: var(--fg); font-size: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.mobile-nav-link {
  display: inline-flex; align-items: center;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--fg);
  text-decoration: none;
  padding: 14px 16px;
  min-height: 52px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-link:active,
.mobile-nav-link:focus,
.mobile-nav-link:hover {
  text-decoration: none;
  outline: none;
}
.mobile-nav-link.active {
  font-weight: 600;
}
.mobile-nav-link.active::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.mobile-nav-cta {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 14px 16px;
  min-height: 52px;
  border-radius: 4px;
  margin: 8px 16px 0;
}

/* — Hero (black bar) ——————————————————————————————————————— */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: var(--fg-inv);
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px 48px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--fg-inv);
  margin-bottom: 16px;
}
.hero p {
  font-size: 17px;
  color: #999;
  max-width: 540px;
  margin-bottom: 32px;
}
.hero-btns {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-btns a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.15s;
  min-width: 220px;
}
.hero-btns .btn-primary {
  background: var(--accent);
  color: #fff;
}
.hero-btns .btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}
.hero-btns .btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid #666;
}
.hero-btns .btn-secondary:hover {
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

/* — Section Styles ————————————————————————————————————————— */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
}
.section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-sec);
}
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--fg);
  padding: 10px 18px;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* Bubble expand animation — shared by section-label and chat-section-label */
@keyframes bubble-expand {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}
@keyframes bubble-text-appear {
  0%, 80% { opacity: 0; }
  100%    { opacity: 1; }
}
/* Initial state: bubble collapsed, text hidden — set in HTML to prevent FOUC */
.bubble-init {
  transform: scaleX(0);
  transform-origin: left center;
}
.bubble-init .bubble-text {
  opacity: 0;
}
/* Animated state */
.bubble-animate {
  transform-origin: left center;
  animation: bubble-expand 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.bubble-animate .bubble-text {
  display: inline-block;
  opacity: 0;
  animation: bubble-text-appear 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.25s;
}
/* Page content hidden until bubble animation completes */
.section-content-hidden {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.section-content-visible {
  opacity: 1;
}
.section h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

/* Scroll target offset — account for sticky header + breathing room */
#about {
  scroll-margin-top: 70px;
}

/* — About Section (index.html) ————————————————————————————— */
.about-text {
  max-width: 720px;
}
.about-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-sec);
}
.about-text ul {
  list-style: disc;
  list-style-position: outside;
  padding-left: 1em;
  margin: 0;
}
.about-text ul li {
  font-size: 15px;
  //line-height: 1.8;
  color: var(--fg-sec);
  margin-bottom: 1em;
  margin-top: 0;
}
.about-text ul li::marker {
  content: "⏺︎  ";
  color: var(--fg-muted); 
  //font-size: 2em;
  //line-height: 0;
}

/* Founder */
.founder {
  max-width: 720px;
}
.founder p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-sec);
}

/* Technical Details — XML-tag styled blocks */
.tech-details {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg);
  padding: 4px 0;
}
/* Component tags — bracketed items styled like tech-tags */
.component-tag {
  color: var(--accent);
  background: #EEF4FF;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
}

.tech-details .tech-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  display: inline-block;
  background: #EEF4FF;
  padding: 2px 8px;
  border-radius: 3px;
}
.tech-details .tech-tag-open { margin-bottom: 6px; }
.tech-details .tech-tag-close { margin-top: 6px; }
.tech-details .tech-body {
  color: var(--fg-sec);
  padding-left: 3.5ch;
}

/* — Video Wrapper ————————————————————————————————————————— */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
  overflow: hidden;
  margin-top: 24px;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* — HLS Video Player (Glass Morphism) ————————————————————— */
.hls-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #0a0a0a;
  overflow: hidden;
  margin-top: 24px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}
.hls-player video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #0a0a0a;
}

/* Poster */
.hls-player .player-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  transition: opacity 0.4s ease;
}
.hls-player .player-poster.hidden {
  opacity: 0;
  pointer-events: none;
}
.hls-player .player-poster-img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Big center play button */
.hls-player .player-big-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(0, 87, 184, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.2s ease, background 0.2s ease;
}
.hls-player .player-big-play:hover {
  background: rgba(0, 87, 184, 1);
  transform: translate(-50%, -50%) scale(1.08);
}
.hls-player .player-big-play.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.hls-player .player-big-play svg {
  fill: white;
  width: 24px; height: 24px;
  margin-left: 3px;
}

/* Glass controls bar */
.hls-player .player-controls {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  padding: 10px 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.hls-player .player-controls.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Play/pause button */
.hls-player .player-play-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.hls-player .player-play-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
.hls-player .player-play-btn svg {
  fill: white;
  width: 13px; height: 13px;
  margin-left: 2px;
}
.hls-player .player-pause-icon { margin-left: 0 !important; }

/* Progress bar */
.hls-player .player-progress {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}
.hls-player .player-progress-buffer {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  width: 0;
}
.hls-player .player-progress-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  width: 0;
  z-index: 1;
}

/* Expand click area for progress bar */
.hls-player .player-progress::before {
  content: '';
  position: absolute;
  top: -8px; bottom: -8px;
  left: 0; right: 0;
}

/* Time display */
.hls-player .player-time-current,
.hls-player .player-time-duration {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  white-space: nowrap;
  flex-shrink: 0;
}
.hls-player .player-time-sep {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  margin: 0 -4px;
}

/* Volume button */
.hls-player .player-volume-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}
.hls-player .player-volume-btn svg {
  width: 16px; height: 16px;
  fill: white;
}
.hls-player .player-volume-btn.muted .vol-on { display: none; }
.hls-player .player-volume-btn.muted .vol-off { display: block !important; }

/* Fullscreen button */
.hls-player .player-fullscreen-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}
.hls-player .player-fullscreen-btn svg {
  width: 16px; height: 16px;
  fill: white;
}

/* Fullscreen mode */
.hls-player:fullscreen {
  border-radius: 0;
}
.hls-player:fullscreen .player-controls {
  bottom: 24px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .hls-player .player-controls {
    bottom: 8px;
    width: 92%;
    padding: 8px 10px;
    gap: 8px;
  }
  .hls-player .player-time-sep,
  .hls-player .player-time-duration {
    display: none;
  }
}

/* — Form Embed (Typeform) ————————————————————————————————— */
.form-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
}
.form-section p {
  margin-bottom: 24px;
}
.form-section .form {
  min-height: 500px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

/* — Footer ———————————————————————————————————————————————— */
.site-footer {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 24px;
}
.site-footer p {
  font-size: 12px;
  color: var(--fg-sec);
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════
   TIER 2: Tablet / Small Desktop (600px – 960px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  .main-nav   { display: flex; }
  .hamburger  { display: none; }
  .nav-link   { font-size: 14px; }

  .hero h1    { font-size: 40px; }
  .hero-btns  { flex-direction: row; }
}

/* ═══════════════════════════════════════════════════════════
   TIER 3: Desktop (961px+)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 961px) {
  .nav-link   { font-size: 15px; }

  .hero-inner  { padding: 80px 24px 60px; }
  .hero h1     { font-size: 48px; }

  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .section h2  { font-size: 28px; }
}

/* — Visually Hidden (SEO: text in DOM, invisible to users) ——— */
.sr-only-visual {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

/* — Chat Animation (inline on page) ————————————————————————— */

.chat-flow {
  max-width: var(--max-w);
  overflow-anchor: none;
  min-height: 80vh;
}

/* Chat input box — always visible, rounded pill shape */
.chat-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  max-width: 480px;
  transition: opacity 600ms ease;
}
.chat-input-text {
  flex: 1;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  min-height: 24px;
  display: flex;
  align-items: center;
}
.chat-input-placeholder {
  color: #bbb;
}
.chat-input-send {
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
}
/* Typing cursor in the input */
.typing-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent);
  margin-left: 1px;
  animation: cursor-blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* User question bubble — right-aligned, dark */
.chat-question {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
  transition: opacity 300ms ease;
}
.chat-question-bubble {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 10px 18px;
  border-radius: 18px;
  border-bottom-right-radius: 4px;
  font-size: 15px;
  line-height: 1.5;
  max-width: 80%;
}

/* Thinking dots */
.chat-thinking {
  margin-bottom: 20px;
  transition: opacity 300ms ease;
}
.thinking-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 3px;
  animation: thinking-bounce 1.4s infinite;
}
.thinking-dot:nth-child(1) { animation-delay: 0ms; }
.thinking-dot:nth-child(2) { animation-delay: 200ms; }
.thinking-dot:nth-child(3) { animation-delay: 400ms; }

@keyframes thinking-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-8px); opacity: 1; }
}

/* AI response — normal page content */
.chat-response {
  margin-bottom: 28px;
  transition: opacity 400ms ease;
}
.chat-response p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-sec);
}
.chat-response ul {
  list-style: disc;
  list-style-position: outside;
  padding-left: 1em;
  margin: 0;
}
.chat-response ul li {
  font-size: 15px;
  //line-height: 1.8;
  color: var(--fg-sec);
  margin-bottom: 1em;
  margin-top: 0;
}
.chat-response ul li::marker {
  content: "⏺︎  ";
  color: var(--fg-muted);
  //font-size: 2em;
  //line-height: 0;
}

/* Section label — styled as a dark response bubble, left-aligned */
.chat-section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--fg);
  padding: 10px 18px;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  transition: opacity 300ms ease;
}

/* Fade-out for chat elements when sequence is done */
.chat-el-fading {
  opacity: 0 !important;
  transition: opacity 600ms ease !important;
}

/* CTA buttons after chat animation */
.chat-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  transition: opacity 600ms ease;
}
.chat-cta-buttons a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.15s;
  min-width: 220px;
}
.chat-cta-buttons .btn-primary {
  background: var(--accent);
  color: #fff;
}
.chat-cta-buttons .btn-primary:hover {
  background: var(--accent-hover);
}
.chat-cta-buttons .btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--fg-sec);
}
.chat-cta-buttons .btn-secondary:hover {
  border-color: var(--fg);
}

@media (min-width: 600px) {
  .chat-cta-buttons {
    flex-direction: row;
  }
}

/* — Utilities ————————————————————————————————————————————— */
img[loading="lazy"] { opacity: 1; }

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .mobile-nav-overlay { display: none; }
}
