/* DALSEEN — Enterprise fintech design system */
:root {
  /* Brand palette — DALSEEN (navy primary, product accent colors per logo) */
  --navy:        #16324A;   /* PRIMARY — brand anchor, from the logo */
  --navy-deep:   #0E2238;
  --navy-darker: #081628;
  --navy-tint:   #EDF1F5;   /* section tints */
  --navy-tint-2: #DCE4EC;
  --navy-line:   rgba(22, 50, 74, 0.18);

  /* Product colors — from the logo sub-tags */
  --p-retail:      #3EA776;
  --p-retail-deep: #2D7D58;
  --p-retail-tint: #E6F2EC;
  --p-pay:         #E0A84E;
  --p-pay-deep:    #A87A2E;
  --p-pay-tint:    #FBF2E0;
  --p-flow:        #5AB8D8;
  --p-flow-deep:   #3E8AA8;
  --p-flow-tint:   #E3F1F7;
  --p-dine:        #E8733B;
  --p-dine-deep:   #B1521F;
  --p-dine-tint:   #FBEADF;

  /* Legacy aliases — map old green tokens to navy so pre-existing components don't break */
  --green:       var(--navy);
  --green-deep:  var(--navy-deep);
  --green-darker:var(--navy-darker);
  --green-tint:  var(--navy-tint);
  --green-tint-2:var(--navy-tint-2);
  --line-green:  var(--navy-line);
  --gold:        var(--p-pay);
  --gold-tint:   var(--p-pay-tint);

  --ink:         #0E1612;   /* headlines */
  --ink-2:       #232B27;   /* body primary */
  --warm-grey:   #5A5F5C;   /* secondary body */
  --neutral:     #F5F5F3;   /* page bg */
  --neutral-2:   #ECEBE5;
  --paper:       #FFFFFF;

  --line:        rgba(14, 22, 18, 0.10);
  --line-soft:   rgba(14, 22, 18, 0.06);

  /* Typography */
  --f-display: 'Readex Pro', system-ui, sans-serif;
  --f-body:    'Readex Pro', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;
  --f-arabic:  'Readex Pro', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(14,22,18,0.04), 0 1px 2px rgba(14,22,18,0.04);
  --shadow:    0 4px 12px rgba(14,22,18,0.08);
  --shadow-lg: 0 20px 60px rgba(14,22,18,0.12), 0 8px 24px rgba(14,22,18,0.06);

  --density: 1;
  --maxw: 1280px;
}

/* Product theming — set on body when on a product page */
body[data-product="retail"] { --accent: var(--p-retail); --accent-deep: var(--p-retail-deep); --accent-tint: var(--p-retail-tint); }
body[data-product="pay"]    { --accent: var(--p-pay);    --accent-deep: var(--p-pay-deep);    --accent-tint: var(--p-pay-tint); }
body[data-product="flow"]   { --accent: var(--p-flow);   --accent-deep: var(--p-flow-deep);   --accent-tint: var(--p-flow-tint); }
body[data-product="dine"]   { --accent: var(--p-dine);   --accent-deep: var(--p-dine-deep);   --accent-tint: var(--p-dine-tint); }
body { --accent: var(--navy); --accent-deep: var(--navy-deep); --accent-tint: var(--navy-tint); }

/* When on a product page, remap the legacy green aliases to the product accent
   so all hero/CTA/pill/eyebrow elements pick up the right color without refactoring. */
body[data-product] {
  --green:       var(--accent);
  --green-deep:  var(--accent-deep);
  --green-tint:  var(--accent-tint);
  --green-tint-2:var(--accent-tint);
  --line-green:  color-mix(in srgb, var(--accent) 18%, transparent);
}

[data-theme="dark"] {
  --ink:       #F2F4F2;
  --ink-2:     #D7DCD9;
  --warm-grey: #95A09A;
  --neutral:   #0B110D;
  --neutral-2: #131A15;
  --paper:     #0E1612;
  --line:      rgba(255,255,255,0.10);
  --line-soft: rgba(255,255,255,0.06);
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* Arabic / RTL */
html[lang="ar"] body { font-family: var(--f-arabic); direction: rtl; }
html[lang="ar"] .display-font { font-family: var(--f-arabic); letter-spacing: 0; }
html[lang="ar"] .mono { font-family: var(--f-mono); letter-spacing: 0.1em; direction: ltr; display: inline-block; }
.latin { font-family: var(--f-body); direction: ltr; display: inline-block; }
.arabic { font-family: var(--f-arabic); direction: rtl; display: inline-block; }
html[dir="rtl"] .icon-dir { transform: scaleX(-1); }

/* Typography utility */
.display-font {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.02;
}
.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: currentColor;
}
.eyebrow.on-green { color: var(--green-tint-2); }
.eyebrow.neutral { color: var(--warm-grey); }

/* Layout */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}
.hairline { height: 1px; background: var(--line); }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  width: 36px; height: 36px;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-word {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-word-ar {
  font-family: var(--f-arabic);
  font-weight: 500;
  font-size: 15px;
  color: var(--warm-grey);
  margin-inline-start: 4px;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.nav-link {
  font-size: 14px;
  font-weight: 450;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s, color .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.nav-link:hover { background: var(--neutral); color: var(--ink); }
.nav-link.active { color: var(--green-deep); }
.nav-link .chev {
  width: 10px; height: 10px;
  opacity: 0.6;
  transition: transform .2s;
}
.nav-link:hover .chev { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 340px;
  opacity: 0;
  pointer-events: none;
  transition: all .2s;
  z-index: 90;
}
.nav-link-wrap::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 12px;
}
.nav-link-wrap:hover .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.nav-dropdown-item:hover { background: var(--neutral); }
.nav-dropdown-item .ico {
  width: 36px; height: 36px;
  background: var(--green-tint);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--green-deep);
}
.nav-dropdown-item h5 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}
.nav-dropdown-item p {
  font-size: 12px;
  color: var(--warm-grey);
  line-height: 1.4;
}
.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background .15s, transform .15s;
}
.nav-cta:hover { background: var(--green-deep); }
.nav-cta svg { width: 14px; height: 14px; }
.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--warm-grey);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all .15s;
}
.nav-lang:hover { border-color: var(--ink); color: var(--ink); }
.nav-lang .sep { color: var(--line); margin: 0 2px; }
.nav-lang .on { color: var(--ink); }
.nav-menu-btn {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center; justify-content: center;
}

/* Tweaks-panel toggle (small, discrete) */
.nav-tweaks-btn {
  display: inline-flex;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center; justify-content: center;
  color: var(--warm-grey);
  transition: all .15s;
}
.nav-tweaks-btn:hover { color: var(--ink); border-color: var(--ink); }

.page { padding-top: 62px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(18, 79, 49, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--neutral); }
.btn-on-green {
  background: #fff;
  color: var(--green-deep);
}
.btn-on-green:hover { background: var(--green-tint); }
.btn-ghost-on-green {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-ghost-on-green:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-lg {
  padding: 15px 26px;
  font-size: 15px;
}

/* ============ CARDS / PRIMITIVES ============ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: all .2s ease;
}
.card:hover { border-color: rgba(22, 50, 74, 0.3); box-shadow: var(--shadow); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--green-tint);
  color: var(--green-deep);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.pill-gold {
  background: var(--gold-tint);
  color: #8A6A1F;
}
.pill-dot {
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* ============ FOOTER ============ */
.site-foot {
  background: var(--green-darker);
  color: #D6EADD;
  padding: 80px clamp(20px, 4vw, 40px) 32px;
  margin-top: 0;
}
.site-foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.site-foot-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.site-foot-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.site-foot-brand .brand {
  display: flex; align-items: center; gap: 10px;
}
.site-foot-brand .brand-mark {
  /* white the logo for dark footer */
  filter: brightness(0) invert(1);
}
.site-foot-brand .brand-word { color: #fff; }
.site-foot-brand p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(214, 234, 221, 0.75);
  max-width: 32ch;
}
.site-foot-brand .ar {
  font-family: var(--f-arabic);
  font-size: 15px;
  color: rgba(214, 234, 221, 0.55);
  direction: rtl;
  max-width: 32ch;
}
.site-foot h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
  font-weight: 500;
}
.site-foot ul { display: flex; flex-direction: column; gap: 10px; }
.site-foot a {
  font-size: 13.5px;
  color: rgba(214, 234, 221, 0.85);
  transition: color .15s;
}
.site-foot a:hover { color: #fff; }
.site-foot-bottom {
  max-width: var(--maxw);
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  color: rgba(214, 234, 221, 0.55);
  flex-wrap: wrap;
}
.site-foot-bottom .badges {
  display: flex; gap: 16px; align-items: center;
}
.site-foot-bottom .badge {
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

/* ============ TWEAKS PANEL ============ */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  display: none;
  font-family: var(--f-body);
  font-size: 13px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.tweaks.is-open { display: block; }
.tweaks h3 {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.tweaks-sub {
  font-size: 11px;
  color: var(--warm-grey);
  margin-bottom: 18px;
  font-family: var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tweak { margin-bottom: 16px; }
.tweak-label {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--warm-grey);
  margin-bottom: 8px;
  font-family: var(--f-mono);
  font-weight: 500;
}
.tweak-options { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-chip {
  padding: 6px 11px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
  background: var(--paper);
  color: var(--ink-2);
}
.tweak-chip:hover { border-color: var(--ink); }
.tweak-chip.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* ============ MOBILE ============ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: inline-flex; }
  .brand-word { display: none; }
  .brand-word-ar { display: none; }
  .site-foot-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .tweaks { width: calc(100vw - 40px); right: 20px; }
}
@media (max-width: 600px) {
  .nav-cta span { display: none; }
  .site-foot-top { grid-template-columns: 1fr; }
}

/* Reveal */
.reveal { opacity: 1; transform: none; }

/* Remove stale ink-stop etc from old design */
.ink-stop, .cta-ar, .cta-id, .cta-id-r { display: none; }
