/* ==========================================================================
   جنان (JENAN) - SAAS LANDING PAGE STYLESHEET
   Design Concept: "From Chaos to Calm" | Modern Arabic Geometric (Square-Kufic DNA)
   Primary Typography: "Alexandria" (Variable Google Fonts)
   Color System: Lavender #7F75B5, Deep Violet #2A2350, Warm Gold #F2C46D
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Brand Core Palette */
  --brand: #7F75B5;           /* Logo lavender, primary */
  --brand-light: #9B92D1;
  --brand-deep: #2A2350;      /* Deep violet, main dark bg */
  --brand-deep-surface: #352D63;
  --brand-ink: #15112B;       /* Darkest, hero / footer base */
  --brand-soft: #E9E6F5;      /* Light lavender tint for light sections */
  --paper: #F7F6FB;           /* Near-white with violet tint, light bg */

  /* Contrast Accents */
  --accent: #F2C46D;          /* Warm sand-gold, used SPARINGLY for CTAs/highlights */
  --accent-hover: #FFD585;
  --accent-glow: rgba(242, 196, 109, 0.35);
  --ok: #5FD3A6;              /* Success / live states only */
  --ok-glow: rgba(95, 211, 166, 0.35);
  --chaos: #E5604D;           /* Used ONLY in the chaos phase */
  --chaos-light: #FF7B69;

  /* Borders & Surfaces */
  --border-dark: rgba(127, 117, 181, 0.18);
  --border-dark-hover: rgba(242, 196, 109, 0.45);
  --border-light: rgba(42, 35, 80, 0.1);
  --border-light-hover: rgba(127, 117, 181, 0.5);

  /* Verified AA Text Colors */
  --text-dark-theme: #F1EFFA;        /* Near white-lavender on dark */
  --text-muted-dark-theme: #A79FC9;  /* Muted on dark */
  --text-subtle-dark-theme: #7A719E;

  --text-light-theme: #1E1A3A;       /* High-contrast ink on paper */
  --text-muted-light-theme: #4E4675; /* Muted on paper */
  --text-subtle-light-theme: #7C73A6;

  /* Typography */
  --font-arabic: 'Alexandria', 'Tajawal', system-ui, -apple-system, sans-serif;

  /* Dimensions & Spacing Base (8px grid) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Border Radii (24px+ for cards, pill for buttons, diamond clips) */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --shadow-dark-card: 0 20px 45px -15px rgba(10, 8, 22, 0.7);
  --shadow-light-card: 0 20px 45px -15px rgba(42, 35, 80, 0.08);
  --shadow-hover: 0 30px 60px -15px rgba(0, 0, 0, 0.25);

  --container-max: 1280px;
}

/* --------------------------------------------------------------------------
   2. RESET & GLOBAL BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.page-body {
  font-family: var(--font-arabic);
  background-color: var(--brand-ink);
  color: var(--text-dark-theme);
  line-height: 1.9;
  font-weight: 400;
  letter-spacing: 0; /* Zero letter-spacing strictly for Arabic */
  overflow-x: clip;
  position: relative;
  min-height: 100vh;
}

/* Numbers: Tabular Figures */
.font-tabular {
  font-variant-numeric: tabular-nums;
}

/* Selection */
::selection {
  background-color: var(--brand);
  color: #FFFFFF;
}

/* Ambient Glowing Violet Lights */
.ambient-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  z-index: 0;
}

.glow-top {
  top: -10vw;
  inset-inline-start: 20vw;
  inline-size: 60vw;
  block-size: 50vw;
  background: radial-gradient(circle, rgba(127, 117, 181, 0.16) 0%, rgba(242, 196, 109, 0.06) 45%, transparent 70%);
}

.glow-middle {
  top: 140vh;
  inset-inline-end: -10vw;
  inline-size: 50vw;
  block-size: 50vw;
  background: radial-gradient(circle, rgba(127, 117, 181, 0.12) 0%, transparent 60%);
}

/* Container */
.container {
  inline-size: 100%;
  max-inline-size: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  position: relative;
  z-index: 1;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-arabic);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Section Theming & Rhythm */
.section {
  position: relative;
  padding-block: var(--space-20);
  transition: background-color var(--transition-normal);
}

.section[data-theme="dark"] {
  background-color: var(--brand-ink);
  color: var(--text-dark-theme);
}

.section[data-theme="light"] {
  background-color: var(--paper);
  color: var(--text-light-theme);
}

.section[data-theme="brand-soft"] {
  background-color: var(--brand-soft);
  color: var(--text-light-theme);
}

.text-ink { color: var(--text-light-theme) !important; }
.text-light { color: var(--text-dark-theme) !important; }
.text-muted-ink { color: var(--text-muted-light-theme) !important; }
.text-muted-light { color: var(--text-muted-dark-theme) !important; }
.text-center { text-align: center; }

/* Official Saudi Riyal (SAR) Symbol & Price (SAMA Guidelines) */
.sar {
  display: inline-block;
  inline-size: 0.9em;
  block-size: 0.9em;
  vertical-align: -0.1em;
  fill: currentColor;
  flex-shrink: 0;
  pointer-events: none;
}

.price {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  direction: ltr !important;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.price-num {
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}

.price-sign {
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   4. BUTTONS & BADGES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 0.85rem 1.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-arabic);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary CTA: Warm Sand-Gold Accent with Dark Text */
.btn-accent {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  color: var(--brand-ink);
  font-weight: 700;
  box-shadow: 0 8px 24px -4px var(--accent-glow);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #FFE09B, var(--accent));
  box-shadow: 0 12px 30px -4px rgba(242, 196, 109, 0.6);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-dark-theme);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(127, 117, 181, 0.15);
  border-color: var(--brand);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.1rem 2.25rem;
  font-size: 1.125rem;
}

.btn-full {
  inline-size: 100%;
}

.btn-circle {
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-deep);
  color: var(--text-dark-theme);
  border: 1px solid var(--border-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-circle:hover {
  background: var(--accent);
  color: var(--brand-ink);
  border-color: var(--accent);
  transform: scale(1.08);
}

/* Badge Pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-block-end: var(--space-4);
}

.hero-badge {
  background: rgba(127, 117, 181, 0.15);
  border: 1px solid rgba(127, 117, 181, 0.35);
  color: #D3CEF2;
}

.paper-badge {
  background: rgba(42, 35, 80, 0.06);
  border: 1px solid rgba(42, 35, 80, 0.15);
  color: var(--brand-deep);
}

.brand-soft-badge {
  background: rgba(127, 117, 181, 0.18);
  border: 1px solid rgba(127, 117, 181, 0.35);
  color: var(--brand-deep);
}

.proof-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.badge-diamond-icon {
  color: var(--accent);
  font-size: 0.75rem;
  animation: pulseDiamond 2s infinite ease-in-out;
}

@keyframes pulseDiamond {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.3) rotate(45deg); opacity: 0.7; }
}

/* Section Header Shared Block */
.section-header-block {
  max-inline-size: 680px;
  margin-inline: auto;
  margin-block-end: var(--space-16);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 850;
  line-height: 1.15;
  margin-block-end: var(--space-4);
}

.section-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.85;
}

/* --------------------------------------------------------------------------
   5. STICKY GLASS NAVBAR
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  inline-size: 100%;
  z-index: 1000;
  padding-block: var(--space-4);
  transition: background-color 0.3s ease;
}

.site-header.nav-scrolled {
  background-color: rgba(21, 17, 43, 0.97);
  border-block-end: 1px solid var(--border-dark);
  padding-block: var(--space-3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header-container {
  max-inline-size: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand Logo (Image on dark header) */
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform var(--transition-spring);
}

.brand-logo:hover {
  transform: scale(1.04);
}

.logo-image {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: var(--space-1);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.nav-link {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted-dark-theme);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-dark-theme);
  background: rgba(127, 117, 181, 0.15);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  inline-size: 44px;
  block-size: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.hamburger-line {
  inline-size: 20px;
  block-size: 2px;
  background-color: var(--text-dark-theme);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s ease;
}

.mobile-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 22, 0.75);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mobile-drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer-content {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  inline-size: min(85vw, 360px);
  block-size: 100%;
  background: var(--brand-deep);
  border-inline-start: 1px solid var(--border-dark);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
}

html[dir="rtl"] .drawer-content {
  transform: translateX(-100%);
}

.mobile-drawer.open .drawer-content {
  transform: translateX(0) !important;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--space-8);
}

.drawer-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-dark-theme);
  cursor: pointer;
  inline-size: 36px;
  block-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.drawer-link {
  font-family: var(--font-arabic);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark-theme);
  padding-block: var(--space-2);
  display: block;
  border-block-end: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-link:hover {
  color: var(--accent);
  padding-inline-start: var(--space-2);
}

.drawer-cta {
  min-block-size: 44px;
  padding: .625rem .75rem;
  font-size: .875rem;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 14px -4px var(--accent-glow);
}

.drawer-cta:hover {
  box-shadow: 0 4px 14px -4px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   6. HERO SECTION (Dark --brand-ink, 100vh)
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block-start: calc(var(--space-20) + 40px);
  padding-block-end: var(--space-12);
  overflow: hidden;
  background-color: var(--brand-ink);
}

/* Background Kufic Pattern & Watermark Diamond */
.kufic-pattern-bg {
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  inline-size: 120vw;
  max-inline-size: 1400px;
  block-size: 120vw;
  max-block-size: 1400px;
  pointer-events: none;
}

.kufic-svg-grid {
  inline-size: 100%;
  block-size: 100%;
}

.hero-watermark-diamond {
  position: absolute;
  top: 50%;
  inset-inline-end: 5%;
  transform: translateY(-50%);
  inline-size: 500px;
  block-size: 500px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  overflow: hidden;
  animation: rotateDiamond 120s linear infinite;
}

@keyframes rotateDiamond {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

.violet-light-beam {
  position: absolute;
  top: -10%;
  inset-inline-end: 20%;
  inline-size: 450px;
  block-size: 850px;
  background: linear-gradient(135deg, rgba(127, 117, 181, 0.15) 0%, rgba(242, 196, 109, 0.04) 50%, transparent 80%);
  transform: rotate(-30deg);
  filter: blur(60px);
  pointer-events: none;
}

/* Hero 2-Column Grid Layout */
.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-12);
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2rem, 4.2vw, 4.25rem);
  font-weight: 800;
  line-height: 1.48;
  letter-spacing: 0;
  word-spacing: 0.04em;
  max-inline-size: 17ch;
  text-wrap: balance;
  margin-block-end: 1.25rem;
}

.reveal-line {
  display: block;
  overflow: hidden;
  padding-block: 0.12em;
}

.reveal-word {
  display: inline-block;
  transform: translateY(0);
  padding-block: 0.12em;
}

.highlight-brand {
  color: var(--brand);
  position: relative;
  display: inline-block;
}

.kufic-pill-underline {
  position: absolute;
  bottom: -8px;
  inset-inline-start: 0;
  inline-size: 100%;
  height: 20px;
  pointer-events: none;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: drawPillUnderline 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.8s forwards;
}

@keyframes drawPillUnderline {
  to { stroke-dashoffset: 0; }
}

.hero-description {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--text-muted-dark-theme);
  line-height: 1.85;
  max-inline-size: 580px;
  margin-block-end: var(--space-8);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-block-end: var(--space-10);
}

.play-diamond-icon {
  inline-size: 24px;
  block-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

/* Trust Strip with Diamond Avatars */
.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-full);
}

.trust-diamonds {
  display: flex;
  align-items: center;
  margin-inline-end: var(--space-1);
}

.trust-diamond {
  inline-size: 32px;
  block-size: 32px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  margin-inline-start: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-ink);
}

.d-1 { background-color: var(--accent); }
.d-2 { background-color: var(--brand); color: #FFF; }
.d-3 { background-color: var(--ok); }
.d-4 { background-color: var(--brand-soft); font-size: 0.65rem; }

.trust-text {
  display: flex;
  flex-direction: column;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.trust-text strong {
  color: var(--text-dark-theme);
}

.trust-text span {
  color: var(--text-muted-dark-theme);
}

/* Hero Visual: Diamond-Cornered Live Canvas */
.hero-visual {
  position: relative;
  z-index: 2;
  perspective: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  inline-size: 100%;
}

.diamond-frame-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  inline-size: 100%;
  max-inline-size: 440px;
  margin: 0 auto;
}

.diamond-cornered-canvas {
  inline-size: 100%;
  max-inline-size: 430px;
  block-size: 530px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(42, 35, 80, 0.88) 0%, rgba(21, 17, 43, 0.96) 100%);
  border: 1.5px solid var(--border-dark);
  box-shadow: var(--shadow-dark-card), 0 0 40px rgba(127, 117, 181, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-end: var(--space-3);
  border-block-end: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.live-dot-pulse {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background-color: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.status-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dark-theme);
}

.dashboard-date {
  font-size: 0.75rem;
  color: var(--text-muted-dark-theme);
}

/* Revenue Live Bar */
.revenue-ticker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
}

.rev-label {
  font-size: 0.75rem;
  color: var(--text-muted-dark-theme);
}

.rev-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  min-inline-size: 7.5ch;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rev-growth {
  font-size: 0.75rem;
  color: var(--ok);
  background: rgba(95, 211, 166, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* Live Calendar View */
.live-calendar-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: rgba(0, 0, 0, 0.25);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted-dark-theme);
  padding-block-end: var(--space-2);
}

.cal-days-header .highlight-day {
  color: var(--accent);
  font-weight: 700;
}

.cal-slots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-slot-item {
  block-size: 42px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  position: relative;
  transition: all var(--transition-fast);
}

.cal-slot-item.booked-brand {
  background: rgba(127, 117, 181, 0.25);
  border-color: var(--brand);
  color: #D6D0F5;
  transform: scale(1.02);
}

.cal-slot-item.booked-accent {
  background: rgba(242, 196, 109, 0.22);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.02);
}

.booking-chip-anim {
  animation: landBooking 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes landBooking {
  0% { transform: translateY(-20px) scale(0.6); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Activity Toasts Queue */
.live-toasts-queue {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block-start: auto;
  min-height: 80px;
}

.toast-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  animation: slideToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-brand {
  background: rgba(127, 117, 181, 0.2);
  border: 1px solid rgba(127, 117, 181, 0.4);
  color: #E6E2FA;
}

.toast-accent {
  background: rgba(242, 196, 109, 0.18);
  border: 1px solid rgba(242, 196, 109, 0.4);
  color: #FFF0D0;
}

@keyframes slideToast {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Floating 3D Parallax Glass Cards */
.floating-glass-card {
  position: absolute;
  background: rgba(42, 35, 80, 0.88);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  inline-size: max-content;
  min-inline-size: max-content;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
  z-index: 5;
  pointer-events: none;
  transition: transform 0.1s ease-out;
}


.card-rating {
  top: 35%;
  inset-inline-end: -2.5rem;
}

.card-instant {
  bottom: -1.25rem;
  inset-inline-start: -1rem;
}

.floating-diamond-icon {
  inline-size: 36px;
  block-size: 36px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-ok { background: rgba(95, 211, 166, 0.25); color: var(--ok); }
.icon-accent { background: rgba(242, 196, 109, 0.25); color: var(--accent); }

.floating-glass-card .floating-data {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  white-space: nowrap;
}

.floating-glass-card .floating-label {
  position: static !important;
  inset-inline-start: auto;
  top: auto;
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--text-muted-dark-theme);
  font-weight: 500;
  pointer-events: none;
}

.floating-glass-card .floating-val {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark-theme);
  white-space: nowrap;
}

.floating-glass-card .floating-stars {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 2px;
  line-height: 1;
  flex-shrink: 0;
}

.badge-mini {
  font-size: 0.625rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.badge-mini.ok {
  background: rgba(95, 211, 166, 0.2);
  color: var(--ok);
}

/* --------------------------------------------------------------------------
   7. THE STORY SECTION: "FROM CHAOS TO CALM"
   -------------------------------------------------------------------------- */
.story-section {
  position: relative;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background-color: var(--brand-ink);
}

.story-sticky-container {
  position: relative;
  inline-size: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--space-16);
}

.story-ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(229, 96, 77, 0.14) 0%, transparent 70%);
  transition: background 0.8s ease;
  pointer-events: none;
}

.story-content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  inline-size: 100%;
}

.story-header {
  max-inline-size: 720px;
  margin-block-end: var(--space-10);
  transition: all 0.5s ease;
}

.story-phase-badge {
  background: rgba(229, 96, 77, 0.16);
  border: 1px solid rgba(229, 96, 77, 0.35);
  color: #FFA396;
  transition: all 0.5s ease;
}

.story-title {
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  margin-block-end: var(--space-3);
  transition: all 0.5s ease;
}

.story-subtitle {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: var(--text-muted-dark-theme);
  transition: all 0.5s ease;
}

.story-arena {
  position: relative;
  inline-size: 100%;
  max-inline-size: 960px;
  block-size: 520px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* Phase A: Chaos Layer */
.chaos-elements-layer {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.chaos-alert-banner {
  position: absolute;
  top: 6%;
  inset-inline-start: 50%;
  transform: translateX(50%);
  background: rgba(229, 96, 77, 0.92);
  border: 1.5px solid #FF8D75;
  color: #FFFFFF;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: 0 10px 30px rgba(229, 96, 77, 0.45);
  z-index: 10;
  animation: alertPulse 1.8s infinite ease-in-out;
}

@keyframes alertPulse {
  0%, 100% { transform: translateX(50%) scale(1); }
  50% { transform: translateX(50%) scale(1.04); }
}

.alert-text {
  display: flex;
  flex-direction: column;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.chaos-bubble {
  position: absolute;
  top: var(--y, 20%);
  inset-inline-start: var(--x, 20%);
  transform: rotate(var(--rot, 0deg));
  background: #2E2548;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  max-inline-size: 260px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  font-size: 0.8125rem;
  line-height: 1.4;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.bubble-sender {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  margin-block-end: 2px;
}

.bubble-time {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted-dark-theme);
  text-align: end;
  margin-block-start: 4px;
}

.note-yellow {
  background: #F3DC87 !important;
  color: #3C2E0A !important;
  border: none !important;
}

.note-pink {
  background: #F0A5AD !important;
  color: #3D0E14 !important;
  border: none !important;
}

.handwriting {
  font-size: 0.9375rem;
  font-weight: 600;
}

.note-pin {
  position: absolute;
  top: -10px;
  inset-inline-start: 50%;
  transform: translateX(50%);
}

.paper-notebook {
  background: #F8F5EE !important;
  color: #2D251D !important;
  border: 1px solid #D6C8B2 !important;
}

.notebook-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
}

.crossed {
  text-decoration: line-through;
  color: #8C7B6D;
}

.danger-text {
  color: var(--chaos);
  font-weight: 800;
}

/* Phase B & C: Calm Layer */
.calm-elements-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.calm-elements-layer.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.calm-order-card {
  inline-size: 100%;
  max-inline-size: 880px;
  background: linear-gradient(180deg, var(--brand-deep) 0%, var(--brand-ink) 100%);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  box-shadow: var(--shadow-dark-card), 0 0 50px rgba(127, 117, 181, 0.15);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block-end: 1px solid rgba(255, 255, 255, 0.08);
  padding-block-end: var(--space-4);
}

.order-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.25rem;
  color: var(--brand);
  font-weight: 700;
}

.diamond-sparkle {
  color: var(--accent);
}

.order-status {
  font-size: 0.8125rem;
  color: var(--text-muted-dark-theme);
}

/* Calm Schedule Table */
.calm-schedule-preview {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.schedule-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1.2fr 1.2fr 1fr;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.schedule-row.header-row {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  color: var(--text-muted-dark-theme);
  font-weight: 600;
  padding-block: 0.25rem;
}

.date-tag {
  color: var(--accent);
  font-weight: 700;
}

.status-pill.confirmed {
  background: rgba(95, 211, 166, 0.18);
  color: var(--ok);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  text-align: center;
  font-weight: 700;
}

/* 3 Count-Up Stats */
.calm-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  padding-block-start: var(--space-6);
}

.calm-stat-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 850;
  color: var(--accent);
  line-height: 1.1;
  margin-block-end: 2px;
}

.stat-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark-theme);
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted-dark-theme);
}

/* --------------------------------------------------------------------------
   9. ميزات النظام BENTO GRID (Dark --brand-deep)
   -------------------------------------------------------------------------- */
.features-section {
  background-color: var(--brand-deep);
  color: var(--text-dark-theme);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.bento-card {
  background: var(--brand-ink);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), border-color var(--transition-fast);
}

.bento-card:hover {
  border-color: var(--border-dark-hover);
  transform: translateY(-4px);
}

.bento-large {
  grid-column: span 2;
}

.bento-wide {
  grid-column: span 2;
}

.spotlight-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(127, 117, 181, 0.2), transparent 40%);
}

.bento-card:hover .spotlight-border {
  opacity: 1;
}

.bento-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  z-index: 2;
  height: 100%;
}

.bento-icon-tag {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--brand-light);
  font-weight: 600;
}

.bento-icon-tag svg {
  inline-size: 20px;
  block-size: 20px;
}

.bento-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark-theme);
}

.bento-desc {
  font-size: 0.9375rem;
  color: var(--text-muted-dark-theme);
  line-height: 1.8;
}

.bento-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Micro-Demo 1: Interactive Drag Calendar */
.demo-calendar-drag {
  margin-block-start: auto;
  padding-block-start: var(--space-6);
}

.demo-instruction {
  font-size: 0.75rem;
  color: var(--accent);
  margin-block-end: var(--space-3);
  font-weight: 600;
}

.drag-days-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.drop-day-slot {
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px dashed rgba(127, 117, 181, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.drop-day-slot.drag-over {
  border-color: var(--ok);
  background: rgba(95, 211, 166, 0.1);
  transform: scale(1.02);
}

.day-name {
  font-size: 0.75rem;
  color: var(--text-muted-dark-theme);
  margin-block-end: 4px;
}

.slot-placeholder {
  font-size: 0.7rem;
  color: var(--text-subtle-dark-theme);
}

.draggable-booking-chip {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  color: var(--brand-ink);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: grab;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: transform var(--transition-fast);
  max-inline-size: 100%;
  min-inline-size: 0;
}

.chip-text {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.chip-diamond,
.chip-handle {
  flex-shrink: 0;
}

.draggable-booking-chip:active {
  cursor: grabbing;
  transform: scale(0.95);
}

@media (max-width: 640px) {
  .drag-days-container {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .drop-day-slot {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 64px;
    padding: var(--space-2) var(--space-3);
  }

  .drop-day-slot .day-name {
    flex: 0 0 auto;
    margin-block-end: 0;
  }

  .draggable-booking-chip {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    min-height: 44px;
    line-height: 1.5;
    text-align: start;
  }

  .draggable-booking-chip .chip-handle {
    display: none;
  }
}

.chip-diamond {
  font-size: 0.65rem;
  color: var(--brand-ink);
}

.chip-handle {
  font-size: 0.85rem;
  opacity: 0.6;
}

.demo-feedback-toast {
  margin-block-start: var(--space-3);
  font-size: 0.75rem;
  color: var(--ok);
  text-align: center;
  opacity: 0;
  transform: translateY(5px);
  transition: all var(--transition-fast);
  font-weight: 600;
}

.demo-feedback-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Micro-Demo 2: Typewriter URL & Real Clipboard */
.demo-url-box {
  margin-block-start: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block-start: var(--space-4);
}

.url-input-mimic {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  font-family: monospace;
  font-size: 0.875rem;
  color: #FFFFFF;
  overflow: hidden;
}

.url-protocol {
  color: var(--text-muted-dark-theme);
  margin-inline-end: 2px;
}

.cursor-blink {
  animation: blinkCursor 1s infinite;
  color: var(--accent);
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.btn-copy-link {
  background: rgba(127, 117, 181, 0.2);
  border: 1px solid var(--brand);
  color: #FFFFFF;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-link:hover {
  background: var(--brand);
  color: #FFFFFF;
}

.btn-copy-link.copied {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--brand-ink);
}

/* Micro-Demo 3: Animated SVG Chart */
.demo-chart-area {
  margin-block-start: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.chart-period-tabs {
  display: flex;
  gap: var(--space-1);
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: var(--radius-full);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted-dark-theme);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: var(--brand);
  color: #FFFFFF;
}

@media (max-width: 768px) {
  #bentoAnalytics .bento-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  #bentoAnalytics .chart-period-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    inline-size: 100%;
    min-inline-size: 0;
  }

  #bentoAnalytics .tab-btn {
    min-inline-size: 0;
    min-block-size: 44px;
    padding: 0.5rem 0.25rem;
    overflow-wrap: anywhere;
  }

  #bentoAnalytics .chart-summary-stat {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
}

.chart-summary-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--space-3);
}

.stat-growth-tag {
  font-size: 0.75rem;
  color: var(--ok);
  font-weight: 700;
}

.stat-amount {
  font-size: 1.25rem;
  color: var(--text-dark-theme);
  font-weight: 800;
}

.svg-chart-container {
  inline-size: 100%;
  block-size: 120px;
}

.analytics-svg {
  inline-size: 100%;
  block-size: 100%;
}

.chart-line-path, .chart-area-path {
  transition: d 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pulse-dot {
  animation: pulseDot 1.5s infinite;
}

/* Micro-Demo 4: Security Shield & Scramble */
.demo-security-box {
  margin-block-start: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-block-start: var(--space-4);
}

.shield-lock-icon {
  position: relative;
  inline-size: 54px;
  block-size: 54px;
  border-radius: 50%;
  background: rgba(95, 211, 166, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.shield-svg {
  inline-size: 28px;
  block-size: 28px;
}

.lock-pulse-ring {
  position: absolute;
  inset: -6px;
  border: 1.5px solid var(--ok);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

.security-card-preview {
  inline-size: 100%;
  background: linear-gradient(135deg, #231C42 0%, #15112B 100%);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.card-chip {
  inline-size: 28px;
  block-size: 20px;
  background: var(--accent);
  border-radius: 4px;
}

.scramble-number {
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: var(--ok);
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted-dark-theme);
}

.verified-badge {
  color: var(--ok);
  font-weight: 700;
}

/* Micro-Demo 5: Support Chat Simulator */
.demo-chat-box {
  margin-block-start: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-bubbles-stream {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.chat-msg {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.5;
  max-inline-size: 88%;
}

.msg-user {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dark-theme);
  border-end-start-radius: 2px;
}

.msg-agent {
  align-self: flex-end;
  background: rgba(127, 117, 181, 0.25);
  color: #FFFFFF;
  border-end-end-radius: 2px;
  display: flex;
  gap: var(--space-2);
}

.agent-avatar {
  inline-size: 22px;
  block-size: 22px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: var(--accent);
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  inline-size: max-content;
  align-self: flex-end;
}

.chat-typing-indicator span {
  inline-size: 5px;
  block-size: 5px;
  background: var(--brand-light);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.chat-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

.btn-chat-prompt {
  background: transparent;
  border: 1px dashed rgba(242, 196, 109, 0.4);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  align-self: center;
  transition: all var(--transition-fast);
  font-weight: 600;
}

.btn-chat-prompt:hover {
  background: rgba(242, 196, 109, 0.15);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   11. لماذا جنان شريك مثالي (Light --brand-soft)
   -------------------------------------------------------------------------- */
.why-section {
  background-color: var(--brand-soft);
  color: var(--text-light-theme);
  padding-block-start: calc(var(--space-20) + 2vw);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.benefit-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-light-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
}

.benefit-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light-hover);
}

.benefit-watermark {
  position: absolute;
  top: -10px;
  inset-inline-end: 15px;
  font-size: 4.5rem;
  font-weight: 900;
  color: rgba(42, 35, 80, 0.05);
  pointer-events: none;
  line-height: 1;
}

.benefit-icon-box {
  inline-size: 56px;
  block-size: 56px;
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
  border: 1px solid rgba(42, 35, 80, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit-svg {
  inline-size: 32px;
  block-size: 32px;
}

.svg-draw {
  stroke-dasharray: 200;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.benefit-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-light-theme);
}

.benefit-desc {
  font-size: 0.9375rem;
  color: var(--text-muted-light-theme);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   13. احصل على نسختك الخاصة (CONTACT SECTION)
   -------------------------------------------------------------------------- */
.contact-section {
  background-color: var(--paper);
  padding-block: var(--space-20);
}

.contact-card-brand {
  background: var(--brand-deep);
  color: var(--text-dark-theme);
  border-radius: var(--radius-xl);
  padding: var(--space-12);
  border: 1.5px solid var(--border-dark);
  box-shadow: 0 30px 70px rgba(21, 17, 43, 0.35);
  position: relative;
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-12);
  align-items: center;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 850;
  line-height: 1.2;
}

.contact-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted-dark-theme);
  line-height: 1.8;
}

.contact-value-points {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.value-point-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.value-check-icon {
  inline-size: 28px;
  block-size: 28px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: rgba(95, 211, 166, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-block-start: 2px;
}

.value-text {
  font-size: 0.9375rem;
  color: var(--text-dark-theme);
  line-height: 1.7;
}

.contact-direct-support {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
}

.support-label {
  font-size: 0.8125rem;
  color: var(--text-muted-dark-theme);
}

.support-phone {
  font-size: 1.35rem;
  color: var(--accent);
  font-weight: 800;
}

/* Contact Form with Floating Labels */
.contact-form-col {
  position: relative;
  background: var(--brand-ink);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.form-field-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-input, .form-select {
  inline-size: 100%;
  padding: 1.25rem 1rem 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-dark-theme);
  font-size: 0.9375rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(242, 196, 109, 0.15);
}

.form-input.error, .form-select.error {
  border-color: var(--chaos) !important;
  box-shadow: 0 0 0 3px rgba(229, 96, 77, 0.25) !important;
}

.form-floating-label,
.form-field-group > .floating-label {
  position: absolute;
  inset-inline-start: 1rem;
  top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted-dark-theme);
  pointer-events: none;
  transition: all 0.2s ease;
}

.form-input:focus ~ .floating-label,
.form-input:not(:placeholder-shown) ~ .floating-label,
.form-select:valid ~ .floating-label,
.form-input:focus ~ .form-floating-label,
.form-input:not(:placeholder-shown) ~ .form-floating-label,
.form-select:valid ~ .form-floating-label {
  top: 0.35rem;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
}

.country-picker { position: relative; }
.country-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-block-size: 48px;
  text-align: start;
  font-family: inherit;
  cursor: pointer;
}
.country-value { min-inline-size: 0; overflow-wrap: anywhere; }
.country-chevron {
  inline-size: 8px;
  block-size: 8px;
  margin-block-end: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
}
.country-trigger[aria-expanded="true"] .country-chevron { transform: rotate(225deg); }
.country-enhanced:focus-within > .floating-label {
  top: .35rem;
  font-size: .7rem;
  color: var(--accent);
  font-weight: 700;
}
.country-options {
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(100% + 8px);
  z-index: 20;
  max-block-size: 280px;
  padding: 6px;
  margin: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) var(--brand-ink);
  background: var(--brand-ink);
  border: 1px solid var(--border-dark-hover);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
}
.country-options[hidden] { display: none; }
.country-picker.opens-upward .country-options {
  inset-block-start: auto;
  inset-block-end: calc(100% + 8px);
}
.country-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-block-size: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-dark-theme);
  font-size: .8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.country-option:hover, .country-option.is-active { background: var(--brand-deep-surface); }
.country-option[aria-selected="true"] { color: var(--accent); background: rgba(242, 196, 109, .1); }
.country-option[aria-selected="true"]::after { content: '✓'; flex-shrink: 0; }

.field-error-msg {
  font-size: 0.75rem;
  color: #FFA396;
  margin-block-start: 4px;
  display: none;
}

.field-error-msg.visible {
  display: block;
}

.btn-submit-lead {
  margin-block-start: var(--space-2);
}

.btn-spinner {
  inline-size: 20px;
  block-size: 20px;
  border: 2.5px solid var(--brand-ink);
  border-block-start-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.btn-submit-lead.loading .btn-spinner {
  display: inline-block;
}

.btn-submit-lead.loading .btn-text,
.btn-submit-lead.loading .btn-arrow {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-privacy-note {
  font-size: 0.75rem;
  color: var(--text-muted-dark-theme);
  text-align: center;
  margin-block-start: var(--space-2);
}

/* Success State Screen */
.form-success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-4);
}

.form-success-state.active {
  display: flex;
}

.success-icon-animation {
  inline-size: 72px;
  block-size: 72px;
}

.checkmark-svg {
  inline-size: 72px;
  block-size: 72px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--ok);
  stroke-miterlimit: 10;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: var(--ok);
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

.success-title {
  font-size: 1.75rem;
  font-weight: 850;
  color: var(--text-dark-theme);
}

.success-desc {
  font-size: 0.9375rem;
  color: var(--text-muted-dark-theme);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   14. FOOTER (Dark --brand-ink)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--brand-ink);
  color: var(--text-dark-theme);
  padding-block-start: var(--space-12);
  padding-block-end: var(--space-8);
  position: relative;
  overflow: hidden;
  border-block-start: 1px solid var(--border-dark);
}

.footer-wordmark-wrap {
  inline-size: 100%;
  text-align: center;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.footer-container {
  position: relative;
  z-index: 1;
}

.giant-wordmark {
  font-family: var(--font-arabic);
  font-size: clamp(5rem, 15vw, 14rem);
  font-weight: 900;
  color: rgba(241, 239, 250, 0.03);
  letter-spacing: 0.05em;
  display: block;
  user-select: none;
  pointer-events: none;
}

.footer-watermark-logo-overlay {
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.03;
  pointer-events: none;
}

.footer-cropped-logo {
  inline-size: 320px;
  height: auto;
  filter: grayscale(1);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-8);
  margin-block-end: var(--space-8);
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-brand-desc {
  font-size: 0.9375rem;
  color: var(--text-muted-dark-theme);
  line-height: 1.8;
  max-inline-size: 380px;
}

.footer-col-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin-block-end: var(--space-4);
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links-list a {
  font-size: 0.9375rem;
  color: var(--text-muted-dark-theme);
}

.footer-links-list a:hover {
  color: #FFFFFF;
  padding-inline-start: 4px;
}

.footer-sub-text {
  font-size: 0.875rem;
  color: var(--text-muted-dark-theme);
  margin-block-end: var(--space-4);
}

/* Bottom Bar & Circular Scroll-to-Top Button */
.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block-start: 1px solid rgba(255, 255, 255, 0.06);
  padding-block-start: var(--space-8);
}

.copyright-text {
  font-size: 0.875rem;
  color: var(--text-muted-dark-theme);
}

.back-to-top-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-dark-theme);
  cursor: pointer;
  position: relative;
}

.btn-progress-svg {
  inline-size: 40px;
  block-size: 40px;
  transform: rotate(-90deg);
}

.btn-progress-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2.5;
}

.btn-progress-meter {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 119.38;
  stroke-dashoffset: 119.38;
  transition: stroke-dashoffset 0.1s linear;
}

.btn-top-arrow {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--accent);
}

.btn-top-label {
  font-size: 0.875rem;
  font-weight: 700;
}

/* Confetti Container */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  will-change: transform, opacity;
}

/* --------------------------------------------------------------------------
   Bento tiles 6 & 7: QR digital process + automatic seasonal pricing
   -------------------------------------------------------------------------- */
.demo-qr-box {
  margin-block-start: auto;
  padding-block-start: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.qr-frame {
  position: relative;
  inline-size: 150px;
  block-size: 150px;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 4px rgba(127, 117, 181, 0.25), var(--shadow-dark-card);
  overflow: hidden;
}

.qr-frame svg {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

.qr-scan-line {
  position: absolute;
  inset-inline: 8px;
  block-size: 2px;
  top: 10px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  border-radius: 2px;
  animation: qrScan 2.4s ease-in-out infinite alternate;
}

@keyframes qrScan {
  from { top: 10px; }
  to { top: calc(100% - 12px); }
}

.qr-caption {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ok);
  background: rgba(95, 211, 166, 0.12);
  border: 1px solid rgba(95, 211, 166, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
}

.qr-caption svg {
  inline-size: 14px;
  block-size: 14px;
}

.demo-season-box {
  margin-block-start: auto;
  padding-block-start: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.season-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.6rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-dark-theme);
  animation: seasonGlow 8s ease-in-out infinite;
}

.season-row:nth-child(2) { animation-delay: 2s; }
.season-row:nth-child(3) { animation-delay: 4s; }
.season-row:nth-child(4) { animation-delay: 6s; }

@keyframes seasonGlow {
  0%, 22% { border-color: rgba(242, 196, 109, 0.6); background: rgba(242, 196, 109, 0.1); }
  30%, 100% { border-color: var(--border-dark); background: rgba(0, 0, 0, 0.3); }
}

.season-name {
  flex: 1;
  font-weight: 600;
}

.season-uplift {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(242, 196, 109, 0.14);
  color: var(--accent);
  white-space: nowrap;
}

.season-uplift.is-base {
  background: rgba(127, 117, 181, 0.2);
  color: var(--brand-light);
}

.season-price {
  font-weight: 800;
  min-inline-size: 4.5rem;
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   PRICING & SUBSCRIPTIONS SECTION (Light --brand-soft)
   -------------------------------------------------------------------------- */
.pricing-section {
  background: var(--brand-soft);
  position: relative;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6);
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-light-card);
  transition: transform var(--transition-normal), border-color var(--transition-fast), box-shadow var(--transition-normal);
}

.plan-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-light-hover);
  box-shadow: var(--shadow-hover);
}

.plan-card.is-featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(127, 117, 181, 0.2), var(--shadow-light-card);
}

.plan-card.plan-enterprise {
  background: linear-gradient(165deg, var(--brand-deep), var(--brand-ink));
  border-color: var(--border-dark);
  color: var(--text-dark-theme);
}

.plan-ribbon {
  position: absolute;
  top: -0.8rem;
  inset-inline-start: var(--space-6);
  padding: 0.25rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--accent);
  color: var(--brand-ink);
  border-radius: var(--radius-full);
}

.plan-ribbon-light {
  background: var(--brand);
  color: #fff;
}

.plan-name {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-light-theme);
}

.plan-tagline {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted-light-theme);
  min-block-size: 3.4em;
}

.plan-enterprise .plan-name { color: var(--text-dark-theme); }
.plan-enterprise .plan-tagline { color: var(--text-muted-dark-theme); }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-block-size: 3.25rem;
  color: var(--brand-deep);
}

.plan-price .price {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.plan-period {
  font-size: 0.875rem;
  color: var(--text-muted-light-theme);
}

.plan-price-custom {
  align-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-light-theme);
}

.plan-enterprise .plan-features {
  border-block-start-color: var(--border-dark);
  color: var(--text-dark-theme);
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.6;
}

.plan-features li svg {
  flex-shrink: 0;
  inline-size: 16px;
  block-size: 16px;
  margin-block-start: 0.3rem;
  color: var(--brand);
}

.plan-enterprise .plan-features li svg { color: var(--ok); }

.plan-card:not(.plan-enterprise) .btn-ghost {
  color: var(--brand-deep);
  border-color: var(--border-light-hover);
}

.plan-card:not(.plan-enterprise) .btn-ghost:hover,
.plan-card:not(.plan-enterprise) .btn-ghost:focus-visible {
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-color: var(--brand);
}

.btn-plan {
  background: var(--brand-deep);
  color: #fff;
}

.btn-plan:hover {
  background: var(--brand);
}

/* Free trial card */
.trial-card {
  position: relative;
  margin-block-start: var(--space-8);
  padding: var(--space-8) var(--space-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  background: linear-gradient(120deg, var(--brand-deep), var(--brand-deep-surface));
  border-radius: var(--radius-xl);
  color: var(--text-dark-theme);
  overflow: hidden;
  box-shadow: var(--shadow-dark-card);
}

.trial-card::after {
  content: '';
  position: absolute;
  inset-block-start: -60px;
  inset-inline-end: -60px;
  inline-size: 220px;
  block-size: 220px;
  border: 6px solid rgba(127, 117, 181, 0.18);
  border-radius: 28px;
  transform: rotate(45deg);
  pointer-events: none;
}

.trial-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trial-kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
}

.trial-title {
  font-size: 1.75rem;
  font-weight: 800;
}

.trial-desc {
  font-size: 1rem;
  color: var(--text-muted-dark-theme);
}

.trial-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-2);
}

.trial-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ok);
  background: rgba(95, 211, 166, 0.12);
  border: 1px solid rgba(95, 211, 166, 0.3);
  border-radius: var(--radius-full);
}

.trial-chip svg {
  inline-size: 14px;
  block-size: 14px;
}

.trial-card .btn {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-8); }
}

@media (max-width: 640px) {
  .plans-grid { grid-template-columns: 1fr; }
  .plan-tagline { min-block-size: 0; }
  .trial-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: var(--space-8) var(--space-6);
  }
  .trial-chips { justify-content: center; }
  .trial-card .btn {
    align-self: center;
    max-inline-size: 100%;
    min-block-size: 44px;
    padding: .625rem 1rem;
    gap: .5rem;
    font-size: .875rem;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 4px 14px -4px var(--accent-glow);
  }
  .trial-card .btn-text { min-inline-size: 0; overflow-wrap: anywhere; }
  .trial-card .btn-arrow { flex-shrink: 0; }
  .trial-card .btn:hover { box-shadow: 0 4px 14px -4px var(--accent-glow); }
}

/* --------------------------------------------------------------------------
   15. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .hero-visual {
    order: -1;
    margin: 0 auto;
    inline-size: 100%;
    max-inline-size: 420px;
    transform: scale(0.96);
    transform-origin: center center;
  }

  .diamond-cornered-canvas {
    max-inline-size: 380px;
    block-size: 480px;
  }

  /* Hide one floating card at <= 1024px */
  .card-instant {
    display: none !important;
  }


  .card-rating {
    top: 30%;
    inset-inline-end: -1.25rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-large, .bento-wide {
    grid-column: span 1;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu, .header-actions .btn {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .calm-stats-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .schedule-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .schedule-row.header-row {
    display: none;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom-bar {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

@media (max-width: 640px) {
  .hero-visual {
    max-inline-size: 330px;
    transform: scale(0.92);
  }

  .diamond-cornered-canvas {
    max-inline-size: 320px;
    block-size: 450px;
    padding: var(--space-4);
  }

  /* Keep only the panel plus ONE floating card at <= 640px */
  .card-instant {
    display: none !important;
  }

  .card-rating {
    display: flex !important;
    top: -0.75rem;
    inset-inline-start: 0;
    inset-inline-end: auto;
    max-inline-size: 90%;
  }

}

/* Accessibility: Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-watermark-diamond {
    animation: none !important;
  }
}

/* Server feedback uses the reference form palette. */
.form-submit-error { color: #FFB8AF; font-size: .875rem; }
.form-submit-error[hidden] { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
html { scroll-padding-top: 80px; }

/* Let the unpinned story fit its content on small screens. */
@media (max-width: 768px) {
  .story-arena { block-size: auto; }
  .calm-elements-layer { position: relative; }
  .order-card-header { flex-wrap: wrap; gap: var(--space-3); }
  .calm-order-card { padding-inline: var(--space-4); }
  .contact-card-brand { padding: var(--space-6); }
  .contact-form-col { padding: var(--space-5); }
  .form-field-group > .floating-label { font-size: .75rem; }
  .btn-submit-lead {
    min-block-size: 44px;
    padding: .625rem .75rem;
    gap: .5rem;
    font-size: .875rem;
    line-height: 1.4;
    box-shadow: 0 4px 14px -4px var(--accent-glow);
  }
  .btn-submit-lead .btn-text { min-inline-size: 0; }
  .btn-submit-lead .btn-arrow { flex-shrink: 0; }
  .btn-submit-lead:hover { box-shadow: 0 4px 14px -4px var(--accent-glow); }
  .site-footer {
    padding-block-start: var(--space-8);
    padding-block-end: var(--space-6);
  }
  .footer-top-grid {
    gap: var(--space-6);
    margin-block-end: var(--space-6);
  }
  .footer-bottom-bar { padding-block-start: var(--space-6); }
}

/* Keep scroll work small: animate the story once and pause offscreen decoration. */
.story-is-calm .chaos-elements-layer {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}
main section:not(.is-in-view) *,
main section:not(.is-in-view) *::before,
main section:not(.is-in-view) *::after,
.page-is-hidden *, .page-is-hidden *::before, .page-is-hidden *::after {
  animation-play-state: paused !important;
}
