/* Shared public-site backdrop, matched to workshop.lamma.online.
   Public navigation/footer links identify the marketing layout; admin screens
   retain their own theme. Cream text stays readable for saved light preferences. */
body:has(#root a[href="/pricing"]) {
  --background: 356 54% 5%;
  --foreground: 36 50% 96%;
  --card: 6 26% 13%;
  --card-foreground: 36 50% 96%;
  --popover: 6 26% 12%;
  --popover-foreground: 36 50% 96%;
  --muted: 6 26% 14%;
  --muted-foreground: 36 15% 70%;
  --border: 36 14% 24%;
  --input: 36 14% 24%;
  --primary: 36 50% 96%;
  --primary-foreground: 0 0% 0%;
  --c-terracotta: #000;
  --c-bg: #140607;
  --c-surface: rgba(255, 248, 240, .04);
  --c-surface-light: #36201e;
  --c-text-primary: #faf6f0;
  --c-text-secondary: rgba(250, 246, 240, .7);
  --c-text-tertiary: rgba(250, 246, 240, .55);
  --c-text-muted: rgba(250, 246, 240, .4);
  --c-border: rgba(250, 246, 240, .12);
  --c-border-hover: rgba(250, 246, 240, .24);
  --c-bg-card: rgba(250, 246, 240, .05);
  --c-bg-card-hover: rgba(250, 246, 240, .09);
  --c-cream70: rgba(250, 246, 240, .7);
  --c-cream50: rgba(250, 246, 240, .5);
  --c-cream45: rgba(250, 246, 240, .45);
  --c-cream40: rgba(250, 246, 240, .4);
  --c-cream30: rgba(250, 246, 240, .3);
  --c-cream08: rgba(250, 246, 240, .08);
  --c-cream06: rgba(250, 246, 240, .06);
  --c-cream04: rgba(250, 246, 240, .04);
  --c-espresso55: rgba(250, 246, 240, .7);
  --c-espresso45: rgba(250, 246, 240, .6);
  --c-espresso40: rgba(250, 246, 240, .55);
  --c-espresso35: rgba(250, 246, 240, .5);
  --c-espresso15: rgba(250, 246, 240, .15);
  --c-espresso12: rgba(250, 246, 240, .12);
  --c-espresso10: rgba(250, 246, 240, .1);
  --c-espresso08: rgba(250, 246, 240, .08);
  --c-espresso06: rgba(250, 246, 240, .06);
  --c-espresso04: rgba(250, 246, 240, .04);
  --c-navbar-bg: rgba(51, 20, 17, .35);
  --c-navbar-bg-scrolled: rgba(31, 11, 12, .9);
  --c-terminal-bg: #1f0b0c;
  background: #140607;
  color: #faf6f0;
  isolation: isolate;
}

body:has(#root a[href="/pricing"])::before,
body:has(#root a[href="/pricing"])::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body:has(#root a[href="/pricing"])::before {
  background:
    radial-gradient(35% 30% at 70% 20%, rgba(232, 166, 138, .08), transparent 70%),
    radial-gradient(55% 45% at 8% 6%, rgba(158, 66, 42, .55) 0%, transparent 70%),
    radial-gradient(40% 35% at 82% 8%, rgba(130, 81, 61, .4) 0%, transparent 70%),
    radial-gradient(70% 60% at 50% 45%, rgba(75, 25, 21, .6) 0%, transparent 75%),
    linear-gradient(160deg, #4b1915 0%, #331411 38%, #1f0b0c 70%, #140607 100%);
}

body:has(#root a[href="/pricing"])::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: .09;
  mix-blend-mode: overlay;
}

/* Keep a continuous viewport backdrop beneath the existing page sections. */
body:has(#root a[href="/pricing"]) #root > :is(div, main):has(a[href="/pricing"]),
body:has(#root a[href="/pricing"]) #root section,
body:has(#root a[href="/pricing"]) #root footer {
  background: transparent !important;
}

body:has(#root a[href="/pricing"]) .v5-aurora,
body:has(#root a[href="/pricing"]) .v5-aurora-orb,
body:has(#root a[href="/pricing"]) .v5-grid,
body:has(#root a[href="/pricing"]) .v4-grid-bg,
body:has(#root a[href="/pricing"]) section > div[style*="filter: blur"],
/* A fixed brand background does not expose a misleading light/dark toggle. */
body:has(#root a[href="/pricing"]) button[title="Light mode"],
body:has(#root a[href="/pricing"]) button[title="Dark mode"] {
  display: none !important;
}

body:has(#root a[href="/pricing"]) .v5-glass {
  background: var(--c-bg-card) !important;
  border-color: var(--c-border) !important;
}

/* Arabic editorial homepage uses its own colors rather than shared tokens. */
body:has(#hero) .home-hero,
body:has(#hero) .home-hero h1,
body:has(#hero) .home-hero-trust strong {
  color: #faf6f0;
}

body:has(#hero) .home-hero-description,
body:has(#hero) .home-hero-trust small {
  color: rgba(250, 246, 240, .7);
}

body:has(#hero) .home-hero h1 em,
body:has(#hero) .home-hero-trust > div > svg {
  color: #efa58a;
}

body:has(#hero) .home-hero-trust {
  border-color: var(--c-border);
}

body:has(#hero) .home-hero-visual::before {
  background: rgba(232, 166, 138, .15);
}

body:has(#hero) .home-hero-image-frame {
  border-color: rgba(250, 246, 240, .15);
}

body:has(#hero) .home-commerce-story {
  --home-bg: transparent;
  --home-card: rgba(250, 246, 240, .05);
  --home-ink: #faf6f0;
  --home-muted: rgba(250, 246, 240, .7);
  --home-line: rgba(250, 246, 240, .12);
  --home-soft: rgba(250, 246, 240, .04);
}

/* Black replaces orange on actions and text. Cream behind black emphasis
   keeps it readable over the workshop's dark burgundy background. */
body:has(#root a[href="/pricing"]) .v5-glow-btn,
body:has(#root a[href="/pricing"]) .home-hero-form-row button,
body:has(#root a[href="/pricing"]) .home-story-specialist a,
body:has(#root a[href="/pricing"]) :is(a, button)[style*="background:"][style*="rgb(229, 87, 63)"],
body:has(#root a[href="/pricing"]) :is(a, button)[style*="background: var(--c-terracotta"] {
  background: #000 !important;
  color: #fff !important;
  border-color: rgba(250, 246, 240, .3) !important;
  box-shadow: none !important;
}

body:has(#root a[href="/pricing"]) .v5-glow-btn:hover,
body:has(#root a[href="/pricing"]) .home-hero-form-row button:hover,
body:has(#root a[href="/pricing"]) .home-story-specialist a:hover {
  background: #171717 !important;
  box-shadow: none !important;
}

body:has(#root a[href="/pricing"]) .v5-gradient-text,
body:has(#root a[href="/pricing"]) .home-hero h1 em,
body:has(#root a[href="/pricing"]) .home-story-specialist > div > p,
body:has(#root a[href="/pricing"]) :is(a, em, span, p, div)[style*="color: rgb(229, 87, 63)"],
body:has(#root a[href="/pricing"]) :is(a, em, span, p, div)[style*="color: rgb(245, 158, 11)"] {
  color: #000 !important;
  -webkit-text-fill-color: #000;
  background: #faf6f0 !important;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding-inline: .12em;
}

body:has(#root a[href="/pricing"]) .home-hero-trust > div > svg,
body:has(#root a[href="/pricing"]) .home-story-steps b,
body:has(#root a[href="/pricing"]) .home-story-specialist li svg {
  color: #000;
  background: #faf6f0;
}

body:has(#root a[href="/pricing"]) .v5-divider,
body:has(#root a[href="/pricing"]) .v4-gradient-line {
  background: linear-gradient(90deg, transparent, #000, transparent);
}

/* Arabic lettering and the cream emphasis need room above and below each line. */
body:has(#hero) #hero h1 {
  line-height: 1.5 !important;
  margin-bottom: 32px !important;
}

body:has(#hero) #hero h1 .v5-gradient-text {
  padding: .04em .16em .08em;
}

body:has(#hero) #hero h1 + p {
  margin-top: 0;
  line-height: 1.8 !important;
}

@media (max-width: 600px) {
  body:has(#hero) #hero h1 {
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
  }
}

body:has(#hero) .lamma-agent-card {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.5vw, 28px);
  border: 1px solid rgba(250, 246, 240, .14);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
  min-width: 0;
}

.lamma-agent-header { display: flex; align-items: flex-start; gap: 14px; }
.lamma-agent-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 13px;
  background: #000;
  border: 1px solid rgba(250, 246, 240, .18);
  color: #faf6f0;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}
.lamma-agent-identity { min-width: 0; }
.lamma-agent-identity h3 { color: #faf6f0; font-size: 19px; font-weight: 700; line-height: 1.4; margin: 0 0 4px; }
.lamma-agent-identity p { color: rgba(250, 246, 240, .65); font-size: 13px; line-height: 1.7; margin: 0; }
.lamma-agent-message {
  flex: 1;
  margin-top: 22px;
  padding: 16px 18px;
  background: #faf6f0;
  color: #171717;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 13px;
  text-align: start;
}
.lamma-agent-message > span { display: block; color: #6b655e; font-size: 11px; font-weight: 600; line-height: 1.5; margin-bottom: 7px; }
.lamma-agent-message > p { color: #171717; font-family: inherit; font-size: 15px; line-height: 1.85; letter-spacing: normal; margin: 0; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .lamma-agent-message { margin-top: 18px; padding: 14px 16px; }
}

/* Mobile typography must allow full Arabic glyphs and highlighted phrases to
   wrap without painting over adjacent lines. The same rules cover the CTA. */
@media (max-width: 767px) {
  body:has(#hero) #root section:has(h2) {
    padding: 64px 20px !important;
  }

  body:has(#hero) #root h2 {
    font-size: clamp(26px, 7.2vw, 32px) !important;
    line-height: 1.65 !important;
    letter-spacing: normal !important;
    max-width: 100%;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  body:has(#hero) :is(h1, h2) :is(em, span)[style*="color: rgb(229, 87, 63)"],
  body:has(#hero) h1 .v5-gradient-text,
  body:has(#hero) .home-hero h1 em {
    display: inline-block;
    max-width: 100%;
    padding: .02em .16em .08em;
    margin-block: .08em;
    line-height: 1.4;
    vertical-align: baseline;
    box-sizing: border-box;
  }

  html[dir="rtl"] body:has(#hero) :is(h1, h2) :is(em, span) {
    font-family: inherit !important;
    font-style: normal !important;
    letter-spacing: normal !important;
  }

  body:has(#hero) #stores > div > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
    margin-bottom: 28px !important;
  }

  body:has(#hero) #stores > div > div:first-child > a {
    align-self: flex-start;
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  body:has(#hero) #testimonials > div > div:last-child {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:has(#hero) :is(.v3-hero-input, .v3-cta-input, .home-hero-form-row input) {
    font-size: 16px !important;
    min-height: 48px;
    width: 100%;
    min-width: 0;
    direction: ltr;
    text-align: left;
    box-sizing: border-box;
  }

  body:has(#hero) :is(.v3-hero-input, .v3-cta-input)::placeholder {
    color: rgba(250, 246, 240, .65) !important;
    opacity: 1;
  }

  body:has(#hero) div:has(> div > .v3-cta-input) {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 12px !important;
    width: 100%;
    box-sizing: border-box;
  }

  body:has(#hero) div:has(> .v3-cta-input) {
    width: 100%;
    min-width: 0;
    padding-inline: 6px;
    box-sizing: border-box;
  }

  body:has(#hero) div:has(> div > .v3-cta-input) > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    width: 100% !important;
    box-sizing: border-box;
  }

  body:has(#hero) section:has(.v3-cta-input) > div:last-child > p {
    color: rgba(250, 246, 240, .7) !important;
    line-height: 1.8 !important;
  }

  body:has(#hero) section:has(.v3-cta-input) a[style*="opacity: 0.45"] {
    opacity: .7 !important;
  }
}

/* The closing CTA needs the same safe line boxes on desktop as on phones.
   Keep a highlighted phrase in one box instead of cloning it across lines. */
body:has(#hero) #root section:has(.v3-cta-input) > div:last-child {
  max-width: 760px !important;
}

body:has(#hero) #root section:has(.v3-cta-input) h2 {
  line-height: 1.5 !important;
  letter-spacing: normal !important;
  margin: 0 0 28px !important;
  text-wrap: balance;
}

body:has(#hero) #root section:has(.v3-cta-input) h2 > :is(span, em) {
  display: inline-block;
  max-width: 100%;
  padding: .03em .16em .1em;
  margin-block: .06em;
  line-height: 1.35;
  vertical-align: baseline;
  box-sizing: border-box;
  box-decoration-break: slice;
  -webkit-box-decoration-break: slice;
}

html[dir="rtl"] body:has(#hero) #root section:has(.v3-cta-input) h2 > :is(span, em) {
  font-family: inherit !important;
  font-style: normal !important;
}

body:has(#hero) #root section:has(.v3-cta-input) h2 + p {
  max-width: 620px;
  margin: 0 auto 32px !important;
  line-height: 1.9 !important;
  color: rgba(250, 246, 240, .7) !important;
}

body:has(#hero) #root section:has(.v3-cta-input) div:has(> div > .v3-cta-input) {
  gap: 14px !important;
  padding: 12px !important;
  align-items: stretch !important;
}

body:has(#hero) #root section:has(.v3-cta-input) div:has(> .v3-cta-input) {
  min-width: 0;
}

body:has(#hero) #root .v3-cta-input {
  min-width: 0;
  min-height: 48px;
  font-size: 16px !important;
  direction: ltr;
  text-align: left;
}

body:has(#hero) #root div:has(> div > .v3-cta-input) > a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

@media (max-width: 767px) {
  body:has(#hero) #root section:has(.v3-cta-input) h2 {
    font-size: clamp(28px, 7.5vw, 34px) !important;
    line-height: 1.55 !important;
    margin-bottom: 24px !important;
  }
}

/* Other page titles need safe line boxes around their shared cream highlights. */
body:has(#root a[href="/pricing"]):not(:has(#hero)) #root :is(h1, h2) {
  line-height: 1.5 !important;
  letter-spacing: normal !important;
}
body:has(#root a[href="/pricing"]):not(:has(#hero)) :is(h1, h2) .v5-gradient-text {
  display: inline-block;
  max-width: 100%;
  padding: .02em .14em .08em;
  margin-block: .05em;
  line-height: 1.35;
  box-sizing: border-box;
}
html[dir="rtl"] body:has(#root a[href="/pricing"]):not(:has(#hero)) :is(h1, h2) .v5-gradient-text {
  font-family: inherit !important;
  font-style: normal !important;
}

body:has(#root a[href="/pricing"]):not(:has(#hero)) p[style*="color: rgb(229, 87, 63)"] {
  width: fit-content;
  max-width: 100%;
}

/* Legacy blog decorations must not tint the shared viewport backdrop. */
body:has(#root a[href="/pricing"]) .grain-texture main section > div.pointer-events-none {
  display: none;
}
body:has(#root a[href="/pricing"]) .grain-texture button[class*="bg-gradient-to-r"] {
  background: #000;
  color: #fff;
}
