/* ============================================================
   Sahh صح — Smart nutrition menus for modern restaurants
   Premium SaaS design system
   Brand: deep green #0A5E3E · lime #C5F560
   ============================================================ */

:root {
  /* Surfaces */
  --paper: #FAF8F3;            /* warm off-white background */
  --paper-2: #F4F1EA;          /* sunken */
  --paper-3: #EDE8DD;          /* divider */
  --white: #FFFFFF;

  /* Brand */
  --green: #0A5E3E;            /* primary */
  --green-2: #084A30;          /* darker for hover/text */
  --green-3: #063623;          /* deepest */
  --green-tint: #E8F0EB;       /* surface tint */
  --green-soft: #F1F6F2;
  --lime: #C5F560;             /* accent / highlight */
  --lime-2: #B1E84B;
  --lime-soft: #EAF8C9;

  /* Ink */
  --ink: #0E1614;
  --ink-2: #344542;
  --ink-3: #67756F;
  --ink-4: #97A19B;

  /* Lines */
  --hair: #E4DFD2;
  --hair-2: #D4CDBC;
  --hair-dark: rgba(255,255,255,0.12);

  /* Status */
  --warn: #E08A2A;
  --danger: #C44637;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(10,30,22,0.04), 0 1px 1px rgba(10,30,22,0.03);
  --sh: 0 1px 3px rgba(10,30,22,0.05), 0 8px 24px -10px rgba(10,30,22,0.10);
  --sh-lg: 0 1px 3px rgba(10,30,22,0.05), 0 30px 60px -20px rgba(10,30,22,0.22);
  --sh-green: 0 24px 60px -22px rgba(10,94,62,0.45);

  /* Type */
  --f-sans: 'Inter', system-ui, sans-serif;
  --f-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', 'Times New Roman', serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --f-ar: 'Readex Pro', 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
  --f-ar-display: 'Rubik', 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --f-ar-serif: 'Amiri', 'Readex Pro', serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  scroll-behavior: smooth;
}
[dir="rtl"] body, [dir="rtl"] {
  font-family: var(--f-ar);
  font-feature-settings: normal;
  letter-spacing: 0;
}
/* Arabic display: serif headlines lose italic (no italic in Arabic) and use Aref Ruqaa */
[dir="rtl"] .h-display,
[dir="rtl"] .hero h1,
[dir="rtl"] .section-head h2,
[dir="rtl"] .price-card .price-amount {
  font-family: var(--f-ar-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.18;
}
[dir="rtl"] .h-serif,
[dir="rtl"] .hero h1 em {
  font-family: var(--f-ar-serif);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}
/* Arabic eyebrow: keep mono numerals readable, drop uppercase (no case in Arabic) */
[dir="rtl"] .eyebrow {
  font-family: var(--f-mono);
  text-transform: none;
  letter-spacing: 0.04em;
}
/* Arabic body: relax line-height for two-story letters */
[dir="rtl"] body { line-height: 1.7; }
[dir="rtl"] p, [dir="rtl"] li { line-height: 1.75; }
/* Tabular numerals stay LTR even inside RTL flow */
[dir="rtl"] .tnum, [dir="rtl"] .price-amount, [dir="rtl"] .stat-num {
  direction: ltr;
  unicode-bidi: isolate;
}
img, svg { max-width: 100%; display: block; }
button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
}
input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
a { color: inherit; text-decoration: none; }

/* ============================================================
   TYPE SCALE
   ============================================================ */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow-green { color: var(--green); }
.h-display {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.h-serif {
  font-family: var(--f-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
}
.mono { font-family: var(--f-mono); }
.tnum { font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }

/* ============================================================
   NAV
   ============================================================ */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250,248,243,0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav-wrap.scrolled {
  border-bottom-color: var(--hair);
  box-shadow: 0 1px 0 rgba(10,30,22,0.02);
}
.nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--paper-2); color: var(--ink); }
.nav-right { display: flex; gap: 8px; align-items: center; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform .08s, background .15s, color .15s, box-shadow .15s, border-color .15s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 1px 2px rgba(10,30,22,0.16);
}
.btn-primary:hover { background: var(--green-2); }
.btn-lime {
  background: var(--lime);
  color: var(--green-3);
}
.btn-lime:hover { background: var(--lime-2); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-outline {
  background: transparent;
  border-color: var(--hair-2);
  color: var(--ink);
}
.btn-outline:hover { background: var(--paper-2); border-color: var(--ink-3); }
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover { background: #1f2a26; }
.btn-on-green {
  background: var(--lime);
  color: var(--green-3);
}
.btn-on-green:hover { background: var(--lime-2); }
.btn-outline-on-green {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.btn-outline-on-green:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.4); }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ============================================================
   CHIPS
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--paper-2);
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.chip-green { background: var(--green-tint); color: var(--green-2); }
.chip-lime { background: var(--lime-soft); color: var(--green-3); }
.chip-outline {
  background: transparent;
  border: 1px solid var(--hair-2);
  color: var(--ink-2);
}
.chip-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card-pad { padding: 24px; }
.card-pad-lg { padding: 32px; }
.card-hover:hover {
  border-color: var(--hair-2);
  box-shadow: var(--sh);
}

/* ============================================================
   SECTION RHYTHM
   ============================================================ */
.section {
  padding: 120px 32px;
  position: relative;
}
.section-tight { padding: 80px 32px; }
.section-tighter { padding: 56px 32px; }
.container {
  max-width: 1280px;
  margin: 0 auto;
}
.container-narrow {
  max-width: 980px;
  margin: 0 auto;
}

.section-head {
  margin-bottom: 56px;
  max-width: 720px;
}
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.04;
  margin: 0 0 16px;
}
.section-head p {
  color: var(--ink-2);
  font-size: 18px;
  max-width: 600px;
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 80px 32px 100px;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  width: 720px; height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--lime) 0%, transparent 60%);
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--hair) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  opacity: 0.5;
}
.hero-content {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  z-index: 2;
}
.hero h1 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 0.98;
  margin: 24px 0 24px;
}
.hero h1 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--green);
}
.hero p.lede {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 540px;
  line-height: 1.55;
  margin: 0 0 32px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 36px;
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 13px;
}
.hero-meta b { color: var(--ink); font-weight: 600; }

/* ============================================================
   DASHBOARD MOCKUP (HERO RIGHT)
   ============================================================ */
.dash-frame {
  background: linear-gradient(180deg, var(--green-3) 0%, var(--green-2) 100%);
  border-radius: var(--r-2xl);
  padding: 14px;
  box-shadow: var(--sh-green);
  position: relative;
}
.dash-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent 30%);
  pointer-events: none;
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}
.dash-screen {
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
}
.dash-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair);
  background: var(--paper);
}
.dash-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--hair-2);
}
.dash-tab {
  margin-inline-start: auto;
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--f-mono);
}

/* ============================================================
   BANNER ON GREEN
   ============================================================ */
.green-section {
  background: var(--green);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.green-section h2 { color: #fff; }
.green-section .eyebrow { color: var(--lime); }
.green-section p { color: rgba(255,255,255,0.78); }

/* ============================================================
   PRICING
   ============================================================ */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.price-card {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--r-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.price-card-feature {
  background: var(--green-3);
  color: #fff;
  border-color: var(--green-3);
  box-shadow: var(--sh-green);
}
.price-card-feature h3 { color: #fff; }
.price-card .price-amount {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 56px;
  line-height: 1;
}

/* ============================================================
   PHONE
   ============================================================ */
.phone {
  width: 280px;
  background: var(--ink);
  border-radius: 38px;
  padding: 10px;
  box-shadow: var(--sh-lg);
  position: relative;
}
.phone::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 22px;
  background: #000;
  border-radius: 999px;
  z-index: 4;
}
.phone-screen {
  background: var(--paper);
  border-radius: 28px;
  overflow: hidden;
  height: 580px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ============================================================
   UTIL
   ============================================================ */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.divider { height: 1px; background: var(--hair); border: 0; margin: 0; }
.spacer-sm { height: 16px; } .spacer { height: 32px; } .spacer-lg { height: 64px; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--hair-2); border-radius: 999px; border: 2px solid var(--paper); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp 0.45s cubic-bezier(.2,.8,.2,1) both; }

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--paper-2) 0%, var(--paper-3) 50%, var(--paper-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .price-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 24px; }
}
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hero-content > div:last-child > div[style*="position: absolute"] { display: none; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { padding: 14px 20px; }
  .hero { padding: 48px 20px 60px; }
  .hero h1 { font-size: 44px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 64px 20px; }
  .section-head h2 { font-size: 32px; }
  .card-pad-lg { padding: 24px; }
  .price-card { padding: 24px; }
}
