/* Just2Pay tokens — single source of truth (DesignKit MASTER).
   Pages must inherit these values. Do not redeclare brand tokens in page CSS. */

@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap");

:root {
  /* Brand */
  --j2p-primary: #0b1f4d;
  --j2p-secondary: #1d4ed8;
  --j2p-accent: #b8842b;
  --j2p-accent-hover: #a67625;
  --j2p-accent-pressed: #8e641f;
  --j2p-accent-tint: #f3e9d4;

  /* Primary conversion CTA — Sign Up / Start / Launch */
  --j2p-cta: #f3e9d4;
  --j2p-cta-text: #0b1f4d;
  --j2p-cta-hover: #e7cfa3;
  --j2p-cta-pressed: #d9c08e;
  --j2p-cta-shadow: 0 12px 28px rgba(243, 233, 212, 0.28);

  /* Neutrals — primary text uses brand navy (not pure black) */
  --ink: var(--navy);
  --slate: #475569;
  --muted: #94a3b8;
  --border: #cbd5e1;
  --surface: #f8fafc;
  --white: #ffffff;

  /* Semantic */
  --success: #16a34a;
  --warning: #f59e0b;
  --error: #dc2626;
  --info: #1d4ed8;

  /* Radius */
  --r-control: 12px;
  --r-card: 16px;
  --r-panel: 24px;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Shadows */
  --shadow-card: 0 6px 20px rgba(2, 6, 23, 0.08);
  --shadow-float: 0 12px 40px rgba(2, 6, 23, 0.14);

  --max: 1180px;
  --header-h: 76px;
  --header-logo-h: 48px;
  --header-logo-max: 240px;

  /* Shared V3 top-of-page Hero family (derived from approved Homepage). */
  --j2p-hero-bg:
    radial-gradient(circle at 82% 7%, rgba(231, 207, 163, 0.25), transparent 26%),
    linear-gradient(180deg, #fff 0%, #fff 72%, #f7f9fc 100%);
  --j2p-hero-pad-top: 92px;
  --j2p-hero-pad-bottom: 72px;
  --j2p-hero-pad-bottom-home: 0;
  --j2p-hero-pad-compact: 56px;
  --j2p-hero-copy-max: 42rem;
  --j2p-hero-cta-h: 50px;
  --j2p-hero-cta-radius: 13px;
  --j2p-hero-visual-radius: 22px;
  --j2p-hero-h1: var(--text-h1);
  --j2p-hero-h1-legal: clamp(1.75rem, 1.1rem + 1.6vw, 2.5rem);

  /* Type — English uses the system UI stack. Arabic uses Cairo. */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-ar: Cairo, ui-sans-serif, system-ui, sans-serif;

  /* Restrained shared EN/AR scale. Homepage display Hero may use --text-display.
     Interior Heroes use --text-h1. Do not reuse display sizes inside cards. */
  --text-display: clamp(2rem, 4.2vw, 3.5rem);
  --text-h1: clamp(2rem, 3.6vw, 3.25rem);
  --text-h2: clamp(1.75rem, 3vw, 2.625rem);
  --text-h3: clamp(1.25rem, 2vw, 1.75rem);
  --text-h4: clamp(1.0625rem, 1.4vw, 1.3125rem);
  --text-h5: 1.0625rem;
  --text-h6: 1rem;
  --text-card-title: clamp(1.0625rem, 1.4vw, 1.3125rem);
  --text-body-large: clamp(1rem, 0.3vw + 0.94rem, 1.125rem);
  --text-body: clamp(1rem, 0.3vw + 0.94rem, 1.125rem);
  --text-small: 0.875rem;
  --text-meta: 0.8125rem;

  --lh-display: 1.08;
  --lh-h1: 1.1;
  --lh-h2: 1.14;
  --lh-h3: 1.18;
  --lh-h4: 1.28;
  --lh-body: 1.62;
  --lh-body-large: 1.6;
  --lh-card: 1.55;
  --tracking-heading: -0.03em;
  --fw-heading: 750;

  /* Hub / layout aliases — map preview names onto DesignKit. Do not override in pages. */
  --navy: var(--j2p-primary);
  --navy-deep: #06132f;
  --navy-mid: #102d68;
  --navy-2: #081638;
  --blue: var(--j2p-secondary);
  --blue-2: #2563eb;
  --blue-soft: #eaf1ff;
  --champagne: var(--j2p-cta);
  --champagne-gold: #e7cfa3;
  --champagne-soft: #f7eedd;
  --champagne-2: #fbf3e3;
  --line: #e4eaf2;
  --surface-2: #f1f5f9;
  --warm: #fbf7f0;
  --green: var(--success);
  --shadow: 0 30px 90px rgba(3, 13, 35, 0.13);
  --soft-shadow: 0 16px 50px rgba(3, 13, 35, 0.08);
  --shadow-soft: 0 12px 40px rgba(2, 6, 23, 0.08);

  /* Surface system — aliases onto the approved palette (no duplicate hex). */
  --surface-white: var(--white);
  --surface-soft: var(--surface);
  --surface-blue-soft: var(--blue-soft);
  --surface-champagne: var(--warm);
  --surface-navy: var(--navy);
  --surface-navy-soft: var(--navy-mid);
  --border-soft: rgba(11, 31, 77, 0.10);

  /* Readable muted text on light surfaces (WCAG AA vs white / surface-soft). */
  --muted-on-light: #5b6b82;

  /* Icon sizes */
  --icon-xs: 16px;
  --icon-sm: 20px;
  --icon-md: 24px;
  --icon-lg: 32px;
  --icon-xl: 40px;

  /* Three elevation levels */
  --elev-flat: none;
  --elev-raised: var(--shadow-card);
  --elev-featured: var(--shadow-float);

  /* Shared card / control geometry */
  --card-radius: var(--r-card);
  --card-pad: 22px;
  --control-h: 48px;
}

html[lang="ar"] {
  --font: var(--font-ar);
  --lh-display: 1.22;
  --lh-h1: 1.22;
  --lh-h2: 1.26;
  --lh-h3: 1.28;
  --lh-h4: 1.3;
  --lh-body: 1.8;
  --lh-body-large: 1.75;
  --lh-card: 1.65;
  --tracking-heading: normal;
  --fw-heading: 700;
}

/* Shared semantic type — do not use fixed heights on multiline headings. */
main.v3h h1,
main .display {
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tracking-heading);
  font-weight: var(--fw-heading);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  height: auto;
  min-height: 0;
  overflow: visible;
}
main.v3h h1.display,
main .display {
  font-size: var(--text-display);
  line-height: var(--lh-display);
}
main.v3h h2,
main .headline {
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--tracking-heading);
  font-weight: var(--fw-heading);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  height: auto;
  min-height: 0;
  overflow: visible;
}
main.v3h h3 {
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--tracking-heading);
  font-weight: var(--fw-heading);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  height: auto;
  min-height: 0;
  overflow: visible;
}
main.v3h h4 {
  font-size: var(--text-h4);
  line-height: var(--lh-h4);
  letter-spacing: var(--tracking-heading);
  height: auto;
  min-height: 0;
  overflow: visible;
}
main.v3h h5 { font-size: var(--text-h5); line-height: 1.35; }
main.v3h h6 { font-size: var(--text-h6); line-height: 1.4; }
main.v3h .connect-grow-card h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.22;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
html[lang="ar"] main.v3h .connect-grow-card h2 {
  line-height: 1.3;
  letter-spacing: 0;
}
main.v3h .card-title,
main.v3h .price-card h3,
main.v3h .feature-card h3,
main.v3h .plan-card h3,
main.v3h .connect-card h3,
main.v3h .office-card h3,
main.v3h .content-card h3,
main.v3h .hub-card h3 {
  font-size: var(--text-card-title);
  line-height: var(--lh-card);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
main.v3h .ed-card h2,
main.v3h .ed-card h3,
main.v3h .ed-card__title {
  font-size: clamp(1rem, 1.25vw, 1.1875rem);
  line-height: 1.25;
  font-weight: 600;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  height: auto;
  min-height: 0;
}
main.v3h p,
main.v3h .subhead,
main.v3h .hero-lead {
  font-size: var(--text-body-large);
  line-height: var(--lh-body-large);
}
main.v3h {
  font-size: var(--text-body);
  line-height: var(--lh-body);
}
main.v3h .meta,
main.v3h small {
  font-size: max(var(--text-meta), var(--text-small));
}

/* Arabic: never inherit English tracking; keep diacritics unclipped. */
html[lang="ar"] body main.v3h h1,
html[lang="ar"] body main.v3h h2,
html[lang="ar"] body main.v3h h3,
html[lang="ar"] body main.v3h h4,
html[lang="ar"] body main.v3h .headline,
html[lang="ar"] body main.v3h .display {
  letter-spacing: normal;
  overflow: visible;
  padding-block: 0.05em 0.1em;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}
