[hidden] { display: none !important; }

:root {
  --bg: #ffffff;
  --bg-cloud: #f2f4f7;
  --surface: #ffffff;
  --surface-hover: #f9fafb;
  --border: #e5e7eb;
  --border-subtle: #f3f4f6;
  --border-strong: #d1d5db;
  --text: #555555;
  --muted: #6b7280;
  --heading: #21164c;
  --purple: #7063db;
  --royal: #5c4ce4;
  --live: #10b981;
  --grad: linear-gradient(135deg, var(--royal), var(--purple));
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(33, 22, 76, .04);
  --shadow: 0 10px 30px rgba(33, 22, 76, .07);
  --shadow-lg: 0 20px 50px rgba(33, 22, 76, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Tajawal, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
.container { width: min(100% - 32px, 1180px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 840px); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--border-subtle);
}
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: var(--heading); font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.brand span { color: var(--purple); }
.menu-toggle { display: inline-grid; gap: 4px; width: 42px; padding: 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.menu-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--heading); }
.main-nav { display: none; }
.main-nav a { color: var(--muted); font-size: 15px; font-weight: 600; transition: color .2s ease; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--royal); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.language-toggle { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--heading); font-size: 13px; font-weight: 700; transition: all .2s; }
.language-toggle:hover { border-color: var(--purple); color: var(--purple); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--purple); color: #fff; box-shadow: 0 4px 14px rgba(112, 99, 219, .3);
  font-size: 15px; font-weight: 700; text-align: center; transition: all .2s ease;
}
.button:hover, .button:focus-visible {
  background: var(--royal); color: #fff;
  transform: translateY(-2px); box-shadow: 0 8px 22px rgba(92, 76, 228, .38);
}
.button-small { min-height: 40px; padding: 8px 18px; font-size: 13.5px; }
.site-header a.button[data-trial-trigger],
.site-header a.button[data-trial-trigger]:hover,
.site-header a.button[data-trial-trigger]:focus-visible { color: #fff; }
.site-header a.button[data-trial-trigger] .btn-text .anim-txt:last-of-type { visibility: hidden; }
.site-header a.button[data-trial-trigger]:hover .btn-text .anim-txt:last-of-type,
.site-header a.button[data-trial-trigger]:focus-visible .btn-text .anim-txt:last-of-type { visibility: visible; }
.button-ghost {
  border-color: var(--border); background: var(--bg); box-shadow: var(--shadow-sm);
  color: var(--heading);
}
.button-ghost:hover, .button-ghost:focus-visible {
  background: var(--bg-cloud); border-color: var(--border-strong);
  color: var(--royal); transform: translateY(-2px);
}

/* HERO (Matches demo-2.html hero-2 with hero-2.jpg background) */
.hero {
  position: relative;
  padding: 60px 0 90px;
  background-color: #fafbfc;
  background-image: url('../images/hero-2.jpg');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}
.hero-grid, .hero-layout { display: grid; gap: 48px; align-items: center; }
.hero-centered { text-align: center; }
.hero-centered .hero-copy { display: grid; justify-items: center; }
.hero-copy { min-width: 0; }
.eyebrow, .section-kicker { color: var(--royal); font-size: 13px; font-weight: 700; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 4px 15px rgba(33, 22, 76, .05);
  color: var(--heading);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.eyebrow-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--royal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .2);
}
h1 {
  max-width: 740px; margin: 22px 0 18px;
  color: var(--heading);
  font-size: clamp(2.35rem, 6vw, 3.8rem);
  line-height: 1.18; letter-spacing: -.03em;
  font-weight: 800;
}
.hero-lead {
  max-width: 640px; margin: 0;
  color: var(--text);
  font-size: 17px; line-height: 1.85;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-actions .button { white-space: normal; }

.hero-product-stage {
  position: relative; min-width: 0; width: min(100%, 1020px);
  margin: 46px auto 0; padding: 0;
}
.product-frame {
  position: relative; overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}
.product-frame-bar {
  display: flex; align-items: center; gap: 12px;
  min-height: 42px; padding: 0 16px;
  border-block-end: 1px solid var(--border-subtle);
  background: #f8fafc;
  color: var(--muted); font-size: 12px; font-weight: 600;
  text-align: start;
}
.window-dots { display: inline-flex; gap: 6px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.window-dots i:first-child { background: #f87171; }
.window-dots i:nth-child(2) { background: #fbbf24; }
.live-status {
  display: inline-flex; align-items: center; gap: 7px;
  margin-inline-start: auto; color: var(--live); font-size: 11.5px; font-weight: 700;
}
.dashboard-preview { display: block; width: 100%; height: auto; }
.owner-app-preview {
  position: absolute; inset-block-end: -18px; inset-inline-end: 2%;
  z-index: 2; width: 23%; height: auto;
  border: 4px solid #ffffff; border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

/* TOUR TABS */
.tour-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 auto 24px; }
.tour-tabs button {
  flex: 1 1 150px; padding: 13px 18px;
  border: 1px solid var(--border); border-radius: 999px;
  background: #ffffff; color: var(--text);
  font-weight: 700; font-size: 14.5px;
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}
.tour-tabs button:hover { border-color: var(--purple); color: var(--royal); }
.tour-tabs button[aria-selected="true"] {
  border-color: var(--purple); background: var(--purple); color: #fff;
  box-shadow: 0 6px 18px rgba(112, 99, 219, .32);
}
.tour-panel { min-width: 0; }
.tour-panel[hidden] { display: none; }
.tour-visual { min-width: 0; }
.tour-visual img, .tour-visual svg { display: block; width: min(100%, 250px); height: auto; margin-inline: auto; }
.stat-chip {
  display: inline-flex; margin: 6px 4px 0; padding: 6px 12px;
  border: 1px solid rgba(112, 99, 219, .2); border-radius: 999px;
  background: rgba(112, 99, 219, .08); color: var(--royal);
  font-size: 11.5px; font-weight: 700;
}

/* FOOTER */
.site-footer {
  background: #ffffff;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.sticky-cta {
  position: fixed; inset-inline: 16px; inset-block-end: 16px; z-index: 90;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 18px; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 700; color: var(--heading);
}
.sticky-cta[hidden] { display: none; }
.sticky-dismiss { padding: 2px 6px; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.whatsapp-button {
  position: fixed; inset-inline-end: 18px; inset-block-end: 18px; z-index: 89;
  display: inline-flex; align-items: center; gap: 8px;
  max-width: calc(100% - 36px); padding: 12px 18px;
  border-radius: 999px; background: #25d366; color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .38);
  font-size: 13.5px; font-weight: 800; transition: transform .2s;
}
.whatsapp-button:hover { transform: translateY(-2px); }
body.sticky-visible { padding-block-end: 80px; }

/* TRIAL MODAL */
dialog#trial-dialog {
  width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 32px);
  padding: 0; overflow: auto;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: #ffffff; color: var(--heading); box-shadow: var(--shadow-lg);
}
dialog#trial-dialog::backdrop { background: rgba(33, 22, 76, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog#trial-dialog form { display: grid; gap: 12px; padding: 32px; }
dialog#trial-dialog input {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-cloud); color: var(--heading);
  font-size: 14px; transition: border-color .2s;
}
dialog#trial-dialog input:focus {
  outline: none; border-color: var(--purple); background: #fff;
  box-shadow: 0 0 0 3px rgba(112, 99, 219, .15);
}
dialog#trial-dialog label { color: var(--heading); font-size: 13.5px; font-weight: 700; }
.trial-close { justify-self: end; padding: 0 6px; border: 0; background: transparent; color: var(--muted); font-size: 26px; }
.trial-honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trial-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.trial-consent input { width: 18px !important; flex: 0 0 18px; margin-top: 3px; }
.trial-message { min-height: 1.5em; color: #dc2626; font-size: 13px; font-weight: 600; }
.trial-success { color: #059669; font-size: 18px; line-height: 1.7; font-weight: 700; }

@media (min-width: 640px) {
  .container, .narrow { width: min(100% - 48px, 1180px); }
  .hero { padding-block: 84px 110px; }
  .hero-actions .button { white-space: nowrap; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .testimonial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .owner-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .roi-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .roi-result { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tour-panel { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .main-nav { display: flex; align-items: center; gap: 28px; }
  .nav-actions { margin-inline-start: 12px; }
  .hero-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; }
  .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .owner-grid { gap: 80px; }
  .roi-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(150px, .8fr); }
  .roi-result { grid-column: auto; grid-template-columns: 1fr; }
}

@media (min-width: 1200px) {
  .container { width: min(100% - 64px, 1200px); }
  .hero { padding-block: 98px 130px; }
}

@media (max-width: 959px) {
  .main-nav {
    position: absolute; inset-inline: 16px; inset-block-start: 78px;
    padding: 18px; border: 1px solid var(--border); border-radius: var(--radius);
    background: #ffffff; box-shadow: var(--shadow-lg);
  }
  .menu-open .main-nav { display: grid; gap: 8px; }
  .main-nav > a { padding: 12px 10px; border-block-end: 1px solid var(--border-subtle); }
  .nav-actions { justify-content: space-between; padding-top: 10px; }
}

@media (max-width: 639px) {
  .hero { padding-block: 42px 74px; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .hero-product-stage { margin-top: 32px; }
  .owner-app-preview { inset-block-end: -10px; width: 24%; border-width: 3px; }
  .feature-grid, .pricing-grid, .testimonial-grid, .owner-grid, .roi-card { grid-template-columns: 1fr; }
  .roi-result { display: grid; grid-template-columns: 1fr; }
  .tour-panel { grid-template-columns: 1fr; }
  .contact-card { display: block; }
  .whatsapp-button { width: 48px; height: 48px; padding: 0; justify-content: center; font-size: 22px; }
  .whatsapp-button [data-i18n] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  dialog#trial-dialog { align-self: end; width: 100%; max-width: none; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

dialog#trial-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: 90dvh; overflow: auto; align-self: center;
  border: 0; border-radius: 20px; background: #ffffff; color: var(--text);
  box-shadow: 0 24px 80px rgba(15, 23, 42, .3);
}
dialog#trial-dialog::backdrop { background: rgba(11, 15, 25, .72); backdrop-filter: blur(4px); }
dialog#trial-dialog form { display: block; padding: 32px; }
.trial-close { position: absolute; inset-block-start: 14px; inset-inline-end: 18px; }
.trial-dialog-header { padding: 4px 32px 20px 0; }
.trial-dialog-header h2 { margin: 12px 0 8px; color: var(--heading); font-size: 26px; line-height: 1.25; }
.trial-dialog-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.trial-step-chip { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(92, 76, 228, .1); color: var(--royal); font-size: 12px; font-weight: 800; }
.trial-fields { display: grid; gap: 16px; }
.trial-field { min-width: 0; }
.trial-field > label, .trial-branches-field > label { display: block; margin-bottom: 7px; color: var(--heading); font-size: 13.5px; font-weight: 700; }
dialog#trial-dialog input:not([type='radio']):not([type='checkbox']) { box-sizing: border-box; width: 100%; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; color: var(--heading); }
dialog#trial-dialog input:not([type='radio']):not([type='checkbox']):focus { outline: none; border-color: #5c4ce4; box-shadow: 0 0 0 4px rgba(92, 76, 228, .15); }
dialog#trial-dialog input[aria-invalid='true'] { border-color: #dc2626; }
.trial-phone-input { display: flex; align-items: stretch; direction: ltr; }
.trial-phone-prefix { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #e5e7eb; border-inline-end: 0; border-radius: 12px 0 0 12px; background: #f8fafc; color: var(--muted); font-size: 13px; white-space: nowrap; }
.trial-phone-input input { border-radius: 0 12px 12px 0 !important; }
.field-help { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.field-error { min-height: 1.25em; margin: 5px 0 0; color: #dc2626; font-size: 12px; font-weight: 700; }
.branch-options { display: flex; flex-wrap: wrap; gap: 8px; }
.branch-chip { position: relative; cursor: pointer; }
.branch-chip input { position: absolute; width: 1px !important; height: 1px; padding: 0 !important; opacity: 0; }
.branch-chip span { display: block; min-width: 42px; padding: 10px 13px; border: 1px solid #e5e7eb; border-radius: 12px; color: var(--heading); text-align: center; font-size: 13px; font-weight: 800; }
.branch-chip input:checked + span { border-color: #5c4ce4; background: rgba(92, 76, 228, .1); color: #5c4ce4; }
.branch-stepper { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.branch-stepper button { width: 38px; height: 38px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; color: var(--heading); font-size: 20px; }
.branch-stepper input { flex: 1; text-align: center; }
.trial-consent { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; color: var(--text); font-size: 13px; }
.trial-consent input { flex: 0 0 18px; width: 18px !important; height: 18px; margin-top: 2px; }
.trial-privacy { display: flex; align-items: center; gap: 8px; margin: 18px 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.privacy-icon { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: #10b981; stroke-width: 1.7; }
.trial-submit { position: relative; width: 100%; margin-top: 8px; }
.trial-submit[aria-busy='true'] { cursor: wait; opacity: .85; }
.trial-submit[aria-busy='true']::before { display: inline-block; width: 14px; height: 14px; margin-inline-end: 8px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; content: ''; vertical-align: -2px; animation: trialSpin .7s linear infinite; }
.trial-loading-label { display: inline; }
.trial-success { padding: 42px 32px; text-align: center; }
.trial-success h2 { margin: 18px 0 10px; color: var(--heading); font-size: 25px; }
.trial-success p { margin: 0 auto 24px; max-width: 420px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.success-check { width: 72px; height: 72px; margin: 0 auto; color: #10b981; }
.success-check svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.success-check circle { stroke-dasharray: 126; stroke-dashoffset: 126; animation: trialDraw .6s ease forwards; }
.success-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: trialDraw .6s .15s ease forwards; }
@keyframes trialSpin { to { transform: rotate(360deg); } }
@keyframes trialDraw { to { stroke-dashoffset: 0; } }
@media (min-width: 640px) { .trial-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .trial-branches-field { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .trial-submit[aria-busy='true']::before, .success-check circle, .success-check path { animation: none; stroke-dashoffset: 0; } }
