/* ============================================================
   Tawle — WOW layer
   Loaded AFTER styles.css + experience.css.
   Adds: real-product mockup, capability counters, side-rail,
   scroll-pinned storytelling, horizontal-snap use-cases,
   card tilt, mask-reveal, top progress bar, mobile sticky CTA,
   back-to-top, exit intent, cookie banner, language switcher.
   All animations respect prefers-reduced-motion.
   ============================================================ */

/* ---------- CSS-only device frame (for the SVG mockup) ---------- */
.device {
  position: relative;
  background: #1b110c;
  border-radius: 18px;
  padding: 14px 14px 22px;
  box-shadow:
    0 2px 0 rgba(255,255,255,.04) inset,
    0 30px 60px -20px rgba(0,0,0,.6),
    0 60px 120px -30px rgba(196,84,26,.18);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
  max-width: 100%;
}
.device::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 76px; height: 18px;
  background: #0e0907;
  border-radius: 0 0 10px 10px;
}
.device .device-screen {
  position: relative;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 880 / 600;
  width: 100%;
}
.device .device-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.device .device-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
}
.device .device-stage > .device-screen {
  grid-row: 1;
  grid-column: 1;
  transition: opacity .8s ease;
}
.device .device-stage > .device-screen:nth-child(2) { opacity: 0; }
.device.is-flipped > .device-stage > .device-screen:nth-child(1) { opacity: 0; }
.device.is-flipped > .device-stage > .device-screen:nth-child(2) { opacity: 1; }

/* tilt the whole mockup in 3D on hover (desktop only) */
@media (hover: hover) {
  .device:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }
}

/* ---------- Capability counters strip ---------- */
.counters {
  background: var(--ink);
  color: #cbd5e1;
  padding: 36px 0;
  border-top: 1px solid #1e293b;
  border-bottom: 1px solid #1e293b;
}
.counters .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.counter .num {
  font-family: var(--font);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--brand-light);
  letter-spacing: -.02em;
  line-height: 1;
  display: block;
}
.counter .lbl {
  display: block;
  font-size: .9rem;
  color: #94a3b8;
  margin-top: 8px;
}
@media (max-width: 720px) {
  .counters .grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

/* ---------- Top scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--brand-light), var(--gold));
  z-index: 100;
  transition: width 80ms linear;
  box-shadow: 0 0 10px var(--brand-glow);
}

/* ---------- Side-rail dot nav ---------- */
.side-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 8px;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.side-rail.is-visible { opacity: 1; pointer-events: auto; }
.side-rail a {
  display: block;
  width: 8px; height: 8px;
  border-radius: 99px;
  background: var(--line);
  transition: transform .25s ease, background .25s ease;
  position: relative;
}
.side-rail a::after {
  content: attr(data-label);
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.side-rail a:hover { background: var(--brand); transform: scale(1.4); }
.side-rail a:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.side-rail a.is-active { background: var(--brand); transform: scale(1.3); }
@media (max-width: 960px) { .side-rail { display: none; } }

/* ---------- Back-to-top button ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: grid; place-items: center;
  z-index: 40;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  box-shadow: 0 8px 24px -8px var(--brand-glow);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand-dark); }

/* ---------- Mobile sticky bottom CTA bar ---------- */
.mobile-cta {
  position: fixed;
  left: 12px; right: 12px;
  bottom: 12px;
  z-index: 35;
  display: none;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  gap: 8px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.18);
  transform: translateY(120%);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.mobile-cta.is-visible { transform: none; }
.mobile-cta .btn { flex: 1; justify-content: center; }
@media (max-width: 720px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 84px; }
}

/* ---------- Skip-to-content (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -40px; left: 16px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 200;
  font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Mask-reveal headings ---------- */
.reveal-lines > * {
  display: block;
  overflow: hidden;
}
.reveal-lines > * > span {
  display: block;
  transform: translateY(110%);
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal-lines.is-in > * > span { transform: none; }
.reveal-lines > *:nth-child(1) > span { transition-delay: 0ms; }
.reveal-lines > *:nth-child(2) > span { transition-delay: 80ms; }
.reveal-lines > *:nth-child(3) > span { transition-delay: 160ms; }

/* ---------- Card 3D tilt ---------- */
.tilt {
  transform-style: preserve-3d;
  transition: transform .25s ease;
  will-change: transform;
}

/* ---------- Horizontal-snap use-cases section ---------- */
.usecases {
  background: linear-gradient(180deg, var(--os-bg2), var(--os-bg));
  color: #c7d3e8;
  padding: 90px 0 110px;
  overflow: hidden;
}
.usecases h2, .usecases h3 { color: #fff; }
.usecases .eyebrow { color: var(--teal-500); }
.usecases-intro { max-width: 720px; margin: 0 auto 28px; text-align: center; }
.usecases-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
}
.usecases-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--os-panel);
  border: 1px solid var(--os-line);
  color: #c7d3e8;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.usecases-arrow:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: scale(1.05);
}
.usecases-arrow:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.usecases-arrow svg { width: 18px; height: 18px; }
.usecases-dots { display: flex; gap: 8px; }
.usecases-dots .dot {
  width: 8px; height: 8px;
  border-radius: 99px;
  background: var(--os-line);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s, width .2s;
}
.usecases-dots .dot.is-active { background: var(--brand); width: 24px; }
.usecases-dots .dot:hover { background: var(--brand-light); }
.usecases-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px max(24px, calc((100% - var(--maxw)) / 2)) 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--os-line) transparent;
  scroll-behavior: smooth;
  cursor: grab;
}
.usecases-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.usecases-track::-webkit-scrollbar { height: 6px; }
.usecases-track::-webkit-scrollbar-track { background: transparent; }
.usecases-track::-webkit-scrollbar-thumb { background: var(--os-line); border-radius: 99px; }
.usecase {
  flex: 0 0 360px;
  scroll-snap-align: start;
  background: var(--os-panel);
  border: 1px solid var(--os-line);
  border-radius: 20px;
  padding: 32px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease;
  user-select: none;
}
.usecase:hover { transform: translateY(-4px); border-color: var(--teal-500); }
.usecase::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.usecase:hover::before { transform: scaleX(1); }
.usecase-emoji {
  font-size: 2.4rem;
  margin-bottom: 16px;
  display: block;
  filter: saturate(1.1);
}
.usecase h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.usecase .usecase-tag {
  display: inline-block;
  background: rgba(196,84,26,.18);
  color: var(--brand-light);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 16px;
  align-self: flex-start;
}
.usecase p { color: #9fb0cf; font-size: .96rem; margin-bottom: 18px; }
.usecase-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .9rem;
  color: #c7d3e8;
}
.usecase-features li { display: flex; align-items: flex-start; gap: 8px; }
.usecase-features li::before {
  content: "✓";
  color: var(--brand-light);
  font-weight: 800;
  flex: none;
}
@media (max-width: 960px) {
  .usecases { padding: 56px 0 60px; }
  .prop-tile { display: none; }
}
@media (max-width: 720px) {
  .usecases { padding: 40px 0 48px; }
  .usecase { flex-basis: 300px; min-height: 420px; }
}

/* ---------- Scroll-pinned storytelling section ---------- */
.pin-section {
  position: relative;
  height: 320vh; /* the scroll runway */
}
.pin-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  background: linear-gradient(180deg, var(--os-bg), var(--os-bg2));
  color: #c7d3e8;
  padding: 60px max(24px, calc((100% - var(--maxw)) / 2));
  overflow: hidden;
}
.pin-stage h2 { color: #fff; }
.pin-stage .eyebrow { color: var(--teal-500); }
.pin-graphic {
  position: relative;
  width: 100%;
  height: 80%;
  max-height: 560px;
  display: grid;
  place-items: center;
}
.pin-graphic .pin-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .55s ease, transform .55s ease;
  pointer-events: none;
}
.pin-graphic .pin-layer.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.pin-steps {
  position: relative;
  height: 100%;
  display: grid;
  align-items: center;
  min-height: 380px;
}
.pin-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.pin-step.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pin-step h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin-bottom: 1rem; }
.pin-step p { color: #9fb0cf; font-size: 1.05rem; }
.pin-num {
  font-family: Georgia, serif;
  font-size: 5rem;
  font-weight: 400;
  color: var(--brand);
  opacity: .25;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}
.pin-progress {
  position: absolute;
  left: max(24px, calc((100% - var(--maxw)) / 2));
  right: max(24px, calc((100% - var(--maxw)) / 2));
  bottom: 32px;
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  overflow: hidden;
  z-index: 4;
}
.pin-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width .1s linear;
}

/* Phone & KDS props inside the pin graphic */
.prop-phone {
  width: 240px;
  height: 480px;
  background: #0b1220;
  border-radius: 36px;
  padding: 10px;
  border: 2px solid #1e293b;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  position: relative;
  z-index: 1;
}
.prop-phone::before {
  content: "";
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 5px;
  background: #1e293b;
  border-radius: 99px;
  z-index: 2;
}
.prop-screen {
  width: 100%; height: 100%;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  padding: 36px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
}
.prop-screen--menu { padding: 24px 18px 18px; }
.prop-screen--pay  { padding: 24px 18px 18px; }
.prop-menu-hero {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #fff7f1, #fcefe7);
  border-radius: 14px;
  padding: 18px 12px;
  border: 1px solid #f3d8c5;
  margin-bottom: 6px;
}
.prop-menu-emoji { font-size: 2.2rem; }
.prop-menu-title { font-weight: 700; color: var(--ink); font-size: .95rem; }
.prop-menu-price { color: var(--brand); font-weight: 800; font-size: 1.1rem; }
.prop-line {
  height: 12px;
  border-radius: 4px;
  background: #f2ece2;
}
.prop-line.short { width: 60%; }
.prop-line.mid   { width: 80%; }
.prop-line.brand { background: rgba(196,84,26,.2); }
.prop-cta {
  margin-top: auto;
  background: var(--brand);
  color: #fff;
  text-align: center;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  font-size: .92rem;
}
.prop-cta--pay { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); padding: 14px; font-size: 1rem; }
.prop-pay-tip { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.prop-pay-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px dashed #f2ece2; color: var(--ink-soft);
  font-size: .88rem;
}
.prop-pay-row b { color: var(--ink); font-weight: 700; }
.prop-pay-row.total { border-top: 1.5px solid var(--ink); border-bottom: 0; padding-top: 12px; margin-top: 6px; font-weight: 700; }
.prop-pay-row.total b { font-size: 1.05rem; color: var(--brand-dark); }

/* KDS prop */
.prop-kds {
  width: 320px;
  background: #2c1d14;
  border: 1px solid #44301f;
  border-radius: 18px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
  z-index: 1;
}
.prop-kds-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px; border-bottom: 1px solid #44301f; margin-bottom: 6px;
}
.prop-kds-title { color: #fff; font-weight: 700; font-size: .9rem; }
.prop-kds-time {
  background: rgba(196,84,26,.25); color: #F3B68E; font-weight: 700;
  padding: 2px 10px; border-radius: 99px; font-size: .78rem;
}
.prop-kds-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px dashed #44301f;
}
.prop-kds-item { color: #c7d3e8; font-size: .88rem; }
.prop-kds-pill {
  padding: 2px 10px; border-radius: 99px; font-size: .72rem; font-weight: 700;
}
.prop-kds-pill.prep { background: rgba(251,191,36,.18); color: #fcd34d; }
.prop-kds-tick { color: #34d399; font-weight: 700; font-size: .82rem; }
.prop-kds-action {
  margin-top: 10px; text-align: center;
  background: rgba(52,211,153,.2); color: #6ee7b7; font-weight: 700;
  padding: 10px; border-radius: 10px; font-size: .88rem;
}

/* Floating tiles around the props */
.prop-tile {
  position: absolute;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 14px 30px -10px var(--brand-glow);
  z-index: 2;
}
.prop-tile svg { width: 28px; height: 28px; }
.prop-tile.t1 { top: 4%;  left: 4%;  animation: floaty 5s ease-in-out infinite; }
.prop-tile.t2 { top: 18%; right: 2%; animation: floaty 5s ease-in-out infinite 1.2s; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.prop-tile.t3 { bottom: 6%; left: 8%; animation: floaty 5s ease-in-out infinite 2.4s; background: linear-gradient(135deg, #008BBA, #1e6f8e); }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 960px) {
  /* Mobile: pin the graphic, let steps scroll over it.
     Each step fills the viewport so the IntersectionObserver
     fires reliably — no dead zones between steps. */
  .pin-section {
    height: auto;
  }
  .pin-stage {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 0;
    gap: 0;
    overflow: visible; /* CRITICAL: overflow:hidden kills position:sticky */
  }
  .pin-graphic {
    height: 45vh;
    min-height: 240px;
    max-height: 360px;
    position: sticky;
    top: 0;
    z-index: 1;
    align-self: start; /* sticky needs self-start in grid */
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(180deg, var(--os-bg), var(--os-bg2));
  }
  .pin-graphic .pin-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
  }
  .prop-phone {
    width: min(180px, 42vw);
    height: auto;
    aspect-ratio: 9/19;
    max-height: 100%;
    border-radius: 28px;
    padding: 8px;
  }
  .prop-phone .prop-screen {
    border-radius: 22px;
    padding: 28px 10px 10px;
  }
  .prop-kds {
    width: min(260px, 72vw);
    max-width: 100%;
    padding: 14px;
    font-size: .82rem;
  }
  .pin-steps {
    position: relative;
    z-index: 2;
    min-height: auto;
    display: flex;
    flex-direction: column;
  }
  .pin-step {
    position: relative;
    min-height: 70vh;
    min-height: 70dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 20px 40px;
    background: linear-gradient(180deg, rgba(11,18,32,.92) 0%, rgba(11,18,32,.97) 100%);
  }
  .pin-step + .pin-step {
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .pin-step.is-active h2 { color: #fff; }
  .pin-step.is-active p { color: #c7d3e8; }
  .pin-progress { display: none; }
  .pin-num {
    font-size: 3rem;
    margin-bottom: 8px;
  }
}

/* Phone frame inside the pin graphic (visual prop) */
.prop-phone {
  width: 240px;
  height: 480px;
  background: #0b1220;
  border-radius: 36px;
  padding: 10px;
  border: 2px solid #1e293b;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  position: relative;
}
.prop-phone::before {
  content: "";
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 5px;
  background: #1e293b;
  border-radius: 99px;
}
.prop-phone .prop-screen {
  width: 100%; height: 100%;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  padding: 36px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prop-line {
  height: 12px;
  border-radius: 4px;
  background: #f2ece2;
}
.prop-line.short { width: 60%; }
.prop-line.mid   { width: 80%; }
.prop-line.brand { background: rgba(196,84,26,.2); }
.prop-card {
  margin-top: auto;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  font-weight: 700;
  text-align: center;
  font-size: 14px;
}
.prop-tile {
  position: absolute;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 14px 30px -10px var(--brand-glow);
}
.prop-tile.t1 { top: 8%; left: 6%; animation: floaty 5s ease-in-out infinite; }
.prop-tile.t2 { top: 24%; right: 4%; animation: floaty 5s ease-in-out infinite 1.2s; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.prop-tile.t3 { bottom: 12%; left: 12%; animation: floaty 5s ease-in-out infinite 2.4s; background: linear-gradient(135deg, #008BBA, #1e6f8e); }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Cursor-follow glow on CTAs ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn--glow {
    position: relative;
    overflow: hidden;
  }
  .btn--glow::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255,255,255,.35), transparent 40%);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
  }
  .btn--glow:hover::after { opacity: 1; }
}

/* ---------- Use-case alternatives (highlight cards) ---------- */
.highlight-strip {
  background: var(--soft);
  padding: 60px 0;
}
.highlight-strip .grid { gap: 18px; }
.highlight-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.highlight-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.highlight-card .ic {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--brand-pale);
  color: var(--brand-dark);
  display: grid; place-items: center;
  flex: none;
}
.highlight-card .ic svg { width: 22px; height: 22px; }
.highlight-card h4 { font-size: 1rem; margin: 0 0 4px; }
.highlight-card p { font-size: .9rem; margin: 0; color: var(--ink-soft); }

/* ---------- Pilot programme (customers page) ---------- */
.pilot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}
.pilot-slot {
  background: #fff;
  border: 2px dashed var(--brand);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  position: relative;
  transition: transform .25s ease;
}
.pilot-slot:hover { transform: translateY(-3px); }
.pilot-slot .badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
}
.pilot-slot .num {
  font-family: Georgia, serif;
  font-size: 3rem;
  color: var(--brand);
  font-weight: 400;
  line-height: 1;
}
.pilot-slot h4 { margin: 8px 0 4px; }
.pilot-slot p { color: var(--ink-soft); font-size: .92rem; margin: 0; }
.pilot-cta {
  background: linear-gradient(120deg, var(--teal-700), var(--teal-900));
  color: #fff;
  border-radius: 18px;
  padding: 36px;
  text-align: center;
}
.pilot-cta h3 { color: #fff; margin-bottom: 8px; }
.pilot-cta p { color: #c7f0eb; margin-bottom: 20px; }
@media (max-width: 720px) { .pilot-grid { grid-template-columns: 1fr; } .pilot-cta { padding: 28px 20px; } }

/* ---------- Security badges row ---------- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 36px;
}
.badge-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.badge-pill svg { width: 22px; height: 22px; color: var(--brand); }

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--soft-2);
  border-radius: 99px;
  padding: 4px;
  font-size: .82rem;
  font-weight: 600;
}
.lang-switch a {
  padding: 10px 14px;
  border-radius: 99px;
  color: var(--ink-soft);
  white-space: nowrap;
  display: inline-block;
}
.lang-switch a.is-active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

/* ---------- IP-based Arabic suggest banner ---------- */
.ar-suggest {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px -10px rgba(0,0,0,.18);
  padding: 16px 20px;
  display: none;
  align-items: center;
  gap: 14px;
  max-width: 360px;
  animation: pop-in .4s cubic-bezier(.2,.7,.2,1);
}
.ar-suggest.is-shown { display: flex; }
.ar-suggest .ar-text { font-size: .92rem; color: var(--ink); }
.ar-suggest .ar-text b { display: block; font-size: 1rem; }
.ar-suggest .ar-actions { display: flex; gap: 6px; }
.ar-suggest .ar-actions button {
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.ar-suggest .ar-actions .ar-dismiss {
  background: transparent;
  color: var(--ink-soft);
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Exit-intent modal ---------- */
.exit-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s ease;
}
.exit-modal.is-shown { display: flex; opacity: 1; }
.exit-modal .exit-card {
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.3);
  position: relative;
  animation: pop-in .35s cubic-bezier(.2,.7,.2,1);
}
.exit-modal h3 { margin-bottom: 8px; }
.exit-modal p { color: var(--ink-soft); margin-bottom: 18px; }
.exit-modal .exit-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--soft-2);
  color: var(--ink);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 18px;
}
.exit-modal .exit-close:hover { background: var(--brand-pale); color: var(--brand-dark); }
.exit-modal input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 12px;
}
.exit-modal input:focus { outline: none; border-color: var(--brand); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 75;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.18);
  padding: 14px 18px;
  display: none;
  align-items: center;
  gap: 16px;
  max-width: 480px;
  font-size: .88rem;
  color: var(--ink-soft);
  animation: pop-in .4s cubic-bezier(.2,.7,.2,1);
}
.cookie-banner.is-shown { display: flex; }
.cookie-banner a { color: var(--brand-dark); font-weight: 600; }
.cookie-banner button {
  background: var(--brand);
  color: #fff;
  border: 0;
  font-size: .82rem;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}
.cookie-banner .cookie-dismiss {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
@media (max-width: 540px) {
  .cookie-banner { right: 16px; flex-direction: column; align-items: flex-start; }
  .cookie-banner .cookie-actions { display: flex; gap: 6px; }
}

/* ---------- RTL overrides ---------- */
[dir="rtl"] body { font-family: 'Tajawal', 'Cairo', var(--font); }
[dir="rtl"] .brand { font-family: 'Tajawal', 'Cairo', var(--display); }
[dir="rtl"] .nav-links a:hover { background: var(--teal-50); }
[dir="rtl"] .counters .grid { direction: rtl; }
[dir="rtl"] .replace-track { direction: rtl; }
[dir="rtl"] .side-rail { right: auto; left: 22px; }
[dir="rtl"] .side-rail a::after {
  right: auto; left: 18px;
  transform: translateY(-50%) translateX(-6px);
}
[dir="rtl"] .side-rail a:hover::after { transform: translateY(-50%) translateX(0); }
[dir="rtl"] .to-top { right: auto; left: 22px; }
[dir="rtl"] .mobile-cta { direction: rtl; }
[dir="rtl"] .ar-suggest { right: auto; left: 16px; }
[dir="rtl"] .ar-suggest .ar-actions { flex-direction: row-reverse; }
[dir="rtl"] .cookie-banner { left: auto; right: 16px; }

/* ---------- Reduced motion guard ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal-lines > * > span,
  .usecase,
  .highlight-card,
  .pilot-slot,
  .device,
  .prop-tile {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .replace-track { animation-duration: 60s !important; }
}

/* ---------- Role icons (SVG in tab avatars) ---------- */
.role-tab .av {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(196,84,26,.12);
  color: var(--brand-dark);
  transition: background .2s, color .2s;
  flex: none;
}
.role-tab .av svg { width: 18px; height: 18px; stroke-width: 1.8; }
.role-tab.active .av { background: var(--brand); color: #fff; }

.role-head .av {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  flex: none;
}
.role-head .av svg { width: 30px; height: 30px; stroke-width: 1.7; }

/* ---------- Clever flows (tabbed) ---------- */
.flow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 auto 36px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  max-width: 880px;
}
.flow-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
  white-space: nowrap;
}
.flow-tab:hover { background: var(--brand-pale); color: var(--brand-dark); }
.flow-tab.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.flow-tab .ft-ic {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.18);
  color: inherit;
}
.flow-tab .ft-ic svg { width: 14px; height: 14px; stroke-width: 2.2; }
.flow-tab:not(.active) .ft-ic { background: var(--brand-pale); color: var(--brand-dark); }

.flow-panels { position: relative; }
.flow-panel { display: none; }
.flow-panel.active { display: block; animation: fadeUp .45s ease; }
/* Always render the clever-flow SVGs as solid diagrams — override the
   lifecycle's drawing animation, which depends on the .flow-in class
   that only the lifecycle's IntersectionObserver adds. */
.flow-panel .flow-svg .edge,
.flow-panel .flow-svg .edge.alt {
  stroke-dasharray: none !important;
  stroke-dashoffset: 0 !important;
  transition: none !important;
}
.flow-panel .flow-svg .edge.danger {
  /* Keep danger edges visibly dashed (the lifecycle-style exceptions) */
  stroke-dasharray: 6 6 !important;
  stroke-dashoffset: 0 !important;
}
.flow-panel .flow-svg .arrow { opacity: 1 !important; }
.flow-panel .flow-svg .arrow.danger,
.flow-panel .flow-svg .arrow.alt { opacity: 1 !important; }
.flow-panel .flow-svg .pop {
  opacity: 1 !important;
  transform: scale(1) !important;
  transition: none !important;
}
.flow-panel .flow-svg text { fill: var(--ink); }
.flow-panel .flow-svg text.end { fill: #fff; }
.flow-panel .flow-svg text.sub { fill: var(--muted); }
.flow-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--shadow);
}
.flow-panel-grid h3 { font-size: 1.5rem; margin-bottom: 12px; }
.flow-panel-grid p { color: var(--ink-soft); margin-bottom: 18px; }
.flow-bullets {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
}
.flow-bullets li {
  position: relative;
  padding: 6px 0 6px 22px;
  color: var(--ink-soft);
  font-size: .94rem;
}
.flow-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 13px;
  width: 10px; height: 6px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
@media (max-width: 880px) {
  .flow-panel-grid { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .flow-bullets { grid-template-columns: 1fr; }
  .flow-tab { padding: 8px 10px; font-size: .82rem; }
  .flow-tab .ft-ic { display: none; }
}

/* ---------- Simulator replay button ---------- */
.sim-replay {
  background: none;
  border: 0;
  color: var(--teal-500);
  font-size: .82rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: none;
}
.sim-replay.is-shown { display: inline-flex; align-items: center; gap: 4px; }
.sim-replay:hover { background: rgba(196,84,26,.1); }

/* ---------- Replace bar always-on (no reduced-motion disable) ---------- */
.replace-track { animation: marquee 26s linear infinite !important; }
