/* Riquo site layer (Phase 2): the new home shell, the brand applied to the older shared styles
   (legacy.css, riquo.css), English/Arabic switching and right-to-left fixes.
   Colours come from brand-tokens.css; every text pair used here is listed in design/brand/BRAND.md. */

/* ---------- Language: show only the active language's copy ---------- */
html[lang="ar"] [data-l="en"], html[lang="en"] [data-l="ar"] { display: none !important; }

/* ---------- Brand applied to the older shared variables ---------- */
:root {
  --ink: var(--rq-ink); --muted: var(--rq-ink-soft); --paper: var(--rq-cream); --white: #ffffff;
  --line: #d9e0ea; --soft: var(--rq-peach-soft); --peach: var(--rq-peach); --coral: var(--rq-coral);
  --font: var(--rq-font-body); --display: var(--rq-font-display);
}
html { scroll-padding-top: 88px; }
body { background: var(--rq-cream); color: var(--rq-ink); font: var(--rq-fw-body) var(--rq-fs-body)/var(--rq-lh-body) var(--rq-font-body); }
:lang(ar) body, html[lang="ar"] body { font-family: var(--rq-font-arabic); }
h1, h2, h3, h4 { font-family: var(--rq-font-display); letter-spacing: 0; }
html[lang="ar"] :is(h1, h2, h3, h4, .rq-display, .rq-h1, .rq-h2, .rq-h3) { font-family: var(--rq-font-arabic); letter-spacing: 0; }
a { color: inherit; }
/* Georgia italics are retired: emphasis keeps the face and takes the accent colour of its surface. */
em { font-family: inherit; font-style: normal; font-weight: inherit; color: var(--rq-coral-deep); }
.rq-dark em, .day-feature em { color: var(--rq-peach); }
.eyebrow { color: var(--rq-ink-soft); letter-spacing: .08em; }
html[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; }
.rq-dark .eyebrow, .day-feature .eyebrow { color: var(--rq-cream-soft); }
.wrap { max-width: 1240px; padding-inline: clamp(16px, 4vw, 40px); }
.grow { flex: 1 1 auto; min-width: 0; }

/* Buttons used by the new shell */
.rq-btn { gap: 10px; padding: 12px 22px; border-radius: 14px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; }
.btn-peach { background: var(--rq-peach); color: var(--rq-ink); }
.btn-ghost { background: transparent; color: var(--rq-cream); border-color: rgba(250, 249, 245, .55); }
.btn-dark { background: var(--rq-ink); color: var(--rq-cream); }
.btn-light { background: var(--rq-cream); color: var(--rq-ink); }
.btn-outline { background: transparent; color: var(--rq-ink); border-color: var(--rq-ink); }
.rq-btn:active { transform: translateY(1px); }
.button { border-radius: 12px; }
.button.peach { color: var(--rq-ink); }

.skip-link { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 200; background: var(--rq-peach); color: var(--rq-ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--rq-ink); color: var(--rq-cream); border-bottom: 1px solid rgba(250, 249, 245, .12); }
.site-bar { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.site-logo { display: inline-flex; flex: none; }
.site-logo svg { width: 84px; height: 60px; display: block; }
/* The lockup is drawn left-to-right; only its Arabic line carries direction="rtl". Without this, an Arabic
   page would flip "riquo" out of the artwork. */
.site-logo svg, .footer-logo { direction: ltr; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.site-nav a { color: var(--rq-cream); text-decoration: none; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 1rem; }
.site-nav a:focus-visible, .site-nav a[aria-current="true"] { background: rgba(250, 249, 245, .1); }
.site-tools { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; border: 1px solid rgba(250, 249, 245, .35); border-radius: 14px; padding: 3px; }
.rq-lang { background: transparent; color: var(--rq-cream); border: 0; border-radius: 11px; padding: 0 12px; font-weight: 600; font-size: .9375rem; cursor: pointer; min-block-size: 38px; }
.rq-lang[aria-pressed="true"] { background: var(--rq-peach); color: var(--rq-ink); }
.rq-lang[lang="ar"] { font-family: var(--rq-font-arabic); }
.tool-btn { position: relative; background: transparent; color: var(--rq-cream); border: 1px solid rgba(250, 249, 245, .35); border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tool-btn .ico { width: 20px; height: 20px; }
.alert-dot { position: absolute; top: 8px; inset-inline-end: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--rq-peach); border: 2px solid var(--rq-ink); }
.tool-pref { background: transparent; color: var(--rq-peach); border: 1px solid rgba(255, 210, 63, .6); padding: 8px 14px; font-size: .9375rem; }
.tool-pref .ico { width: 18px; height: 18px; }
.menu-btn { display: none; }
.nav-account { border: 1px solid rgba(250, 249, 245, .35); }
.rq-progress { position: absolute; inset-inline: 0; bottom: -1px; height: 2px; }
.rq-progress span { background: var(--rq-coral); transform-origin: left; }
[dir="rtl"] .rq-progress span { transform-origin: right; }

/* ---------- Hero ---------- */
.home-hero { background: var(--rq-ink); color: var(--rq-cream); padding: clamp(40px, 6vw, 88px) 0 clamp(32px, 4vw, 56px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.hero-kicker, .section-kicker { font-size: .9375rem; font-weight: 600; color: var(--rq-cream-soft); margin: 0 0 18px; }
.home-hero h1 { margin: 0 0 22px; font-weight: 700; letter-spacing: -.02em; }
html[lang="ar"] .home-hero h1 { letter-spacing: 0; }
.home-hero h1 .accent { color: var(--rq-peach); }
.hero-lead { color: var(--rq-cream); max-width: 40ch; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.yalla-mini { width: 26px; height: 24px; flex: none; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; height: clamp(280px, 38vw, 520px); object-fit: cover; border-radius: 24px; display: block; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(32px, 5vw, 64px); border-top: 1px solid rgba(250, 249, 245, .2); }
.pillar { display: grid; gap: 6px; padding: 22px 22px 6px 0; text-decoration: none; color: var(--rq-cream); border-inline-end: 1px solid rgba(250, 249, 245, .2); padding-inline: 0 22px; }
.pillar + .pillar { padding-inline-start: 22px; }
.pillar:last-child { border-inline-end: 0; }
.pillar-num { color: var(--rq-peach); font-weight: 600; font-size: .9375rem; }
.pillar strong { font-family: var(--rq-font-display); font-size: var(--rq-fs-h3); font-weight: 700; }
html[lang="ar"] .pillar strong { font-family: var(--rq-font-arabic); }
.pillar-text { color: var(--rq-cream-soft); font-size: .9375rem; }

/* ---------- Discover (riquo.js) on cream ---------- */
.discover-section { padding-top: clamp(24px, 4vw, 48px); }
.discovery-intro h2 { font-size: var(--rq-fs-h1); font-weight: 700; line-height: var(--rq-lh-h1); letter-spacing: -.01em; }
html[lang="ar"] .discovery-intro h2 { letter-spacing: 0; }
.discovery-intro p, .discovery-subhead p, .discovery-note, .calendar-note, .outing-meta, .outing-bottom span, .outing-location { color: var(--rq-ink-soft); }
.discovery-tab { min-block-size: 44px; }
.location-control select, .location-control button { min-block-size: 44px; }

/* ---------- Generic home sections ---------- */
.home-section { padding: clamp(56px, 8vw, 112px) 0; }
.section-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: end; margin-bottom: clamp(28px, 4vw, 44px); }
.section-top h2, .yalla-head h2 { margin: 0; font-weight: 700; }
.section-lead { color: inherit; max-width: 52ch; margin: 0; font-size: var(--rq-fs-body-lg); line-height: var(--rq-lh-body-lg); }
.agencies-section .section-kicker { color: var(--rq-ink-soft); }
.fine { margin-top: 18px; font-size: .9375rem; color: var(--rq-ink-soft); }
.fine a { color: var(--rq-coral-deep); font-weight: 600; text-decoration: underline; }

/* Agencies: honest empty state */
.agencies-section { background: var(--rq-peach-soft); }
.agency-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; background: var(--rq-cream); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 4vw, 36px); }
.agency-empty h3 { margin: 0 0 8px; font-weight: 700; }
.agency-empty p { margin: 0; color: var(--rq-ink-soft); max-width: 60ch; }
.agency-empty-mark { width: 64px; height: 64px; border-radius: 18px; background: var(--rq-ink); color: var(--rq-peach); display: grid; place-items: center; flex: none; }
.agency-empty-mark .ico { width: 30px; height: 30px; }

/* Yalla Nsafer */
.yalla-section { background: var(--rq-ink); color: var(--rq-cream); }
.yalla-section .section-kicker { color: var(--rq-cream-soft); }
.yalla-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start; }
.yalla-head h2 { margin-bottom: 16px; }
.yalla-mark { width: 72px; height: 72px; flex: none; }
.steps { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(250, 249, 245, .2); }
.steps li { display: grid; gap: 8px; align-content: start; padding: 24px 22px 8px 0; color: var(--rq-cream-soft); }
.steps li + li { padding-inline-start: 22px; border-inline-start: 1px solid rgba(250, 249, 245, .2); }
.steps li strong { color: var(--rq-cream); font-size: 1.125rem; }
.step-n { color: var(--rq-peach); font-weight: 700; font-family: var(--rq-font-display); font-size: 1.5rem; }
.yalla-live { margin-top: clamp(40px, 6vw, 72px); }
.yalla-live-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.yalla-live-head h3 { margin: 0; font-weight: 700; }
.trip-teaser { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.muted-on-dark { color: var(--rq-cream-soft); }
.yalla-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.safety-strip { display: flex; gap: 14px; align-items: flex-start; margin-top: 32px; padding: 18px 20px; border-radius: 18px; background: var(--rq-rust); color: var(--rq-cream); }
.safety-strip .ico { width: 24px; height: 24px; color: var(--rq-peach); flex: none; margin-top: 2px; }
.safety-strip p { margin: 0; color: var(--rq-cream-soft); }
.safety-strip strong { color: var(--rq-cream); }

/* Trip cards (home teaser and Yalla Nsafer pages) */
.trip-card-y { display: grid; gap: 10px; padding: 20px; border-radius: 20px; background: var(--rq-rust); color: var(--rq-cream); text-decoration: none; border: 1px solid rgba(250, 249, 245, .12); }
.trip-card-y h4 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.trip-card-y .meta { color: var(--rq-cream-soft); font-size: .9375rem; }
.trip-card-y .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-y { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .875rem; font-weight: 600; background: rgba(255, 210, 63, .14); color: var(--rq-cream); } /* cream: 6.50 on the tinted rust card (peach was 3.95) */
.empty-y { padding: 28px; border: 1px dashed rgba(250, 249, 245, .35); border-radius: 20px; color: var(--rq-cream-soft); }
.empty-y strong { display: block; color: var(--rq-cream); font-size: 1.25rem; margin-bottom: 6px; }

.test-data-note { grid-column: 1 / -1; margin: 0 0 4px; color: var(--rq-cream-soft); font-size: .9375rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.test-data-note.light { color: var(--rq-ink-soft); margin-bottom: 16px; }
.inline-link { color: var(--rq-coral-deep); font-weight: 600; text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--rq-ink); color: var(--rq-cream); padding: 56px 0 24px; border-top: 1px solid rgba(250, 249, 245, .12); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-logo { width: 96px; height: 69px; display: block; margin-bottom: 12px; }
.site-footer p { color: var(--rq-cream-soft); margin: 0; }
.footer-col { display: grid; gap: 2px; align-content: start; }
.footer-col strong { margin-bottom: 8px; }
.footer-col a, .footer-col button { color: var(--rq-cream-soft); background: none; border: 0; padding: 0; text-align: start; font: inherit; cursor: pointer; text-decoration: none; min-block-size: 44px; display: flex; align-items: center; }
.footer-col a:focus-visible, .footer-col button:focus-visible { color: var(--rq-cream); }
.footer-bottom-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(250, 249, 245, .15); color: var(--rq-cream-soft); font-size: .9375rem; }

/* ---------- Floating assistant button ---------- */
.floating-ask { position: fixed; z-index: 45; bottom: 20px; inset-inline-end: 20px; display: inline-flex; align-items: center; gap: 10px; min-block-size: 52px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--rq-peach); color: var(--rq-ink); font-weight: 700; font-size: 1rem; box-shadow: 0 14px 40px -12px rgba(7, 13, 22, .6); cursor: pointer; }
.floating-ask .ico { width: 22px; height: 22px; }
body.chat-open .floating-ask { display: none; }

/* ---------- Dialog, toast, cookie banner, chat on the brand ---------- */
dialog { border-radius: 20px; }
.modal-head h2 { font-size: var(--rq-fs-h3); }
.modal-note { color: var(--rq-ink); }
.toast { color: var(--rq-ink); }
.cookie-banner { inset-inline-end: 96px; }
@media (min-width: 561px) { .chat-panel { inset-inline-end: 20px; inset-inline-start: auto; } }
@media (max-width: 560px) { .chat-panel { inset: 0; width: 100%; } }
[dir="rtl"] .chat-panel { transform-origin: bottom left; }

/* Agency offer cards in the assistant */
.agency-card .grow { display: grid; gap: 3px; min-width: 0; }
.agency-card .pill { white-space: nowrap; justify-self: start; }
.agency-card small { color: var(--rq-ink-soft); }

/* ---------- Right-to-left details ---------- */
[dir="rtl"] .ico:has(use[href="#i-arrow"]), [dir="rtl"] .ico:has(use[href="#i-arrow-left"]), [dir="rtl"] .ico:has(use[href="#i-send"]) { transform: scaleX(-1); }
[dir="rtl"] .rq-ticker-track { animation-direction: reverse; }
[dir="rtl"] input[type="date"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="number"] { direction: ltr; text-align: end; }

/* ---------- Phones and touch (no hover anywhere) ---------- */
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--rq-ink); border-bottom: 1px solid rgba(250, 249, 245, .15); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 8px; border-bottom: 1px solid rgba(250, 249, 245, .1); border-radius: 0; }
  .nav-account { border: 0; }
  .site-tools { margin-inline-start: auto; }
  .hero-grid, .section-top { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 18px 0; border-inline-end: 0; border-bottom: 1px solid rgba(250, 249, 245, .2); }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-bar { gap: 8px; min-height: 64px; }
  .site-logo svg { width: 64px; height: 46px; }
  .tool-pref span { display: none; }
  .tool-pref { padding: 0; min-inline-size: 44px; justify-content: center; }
  .rq-lang { padding: 0 9px; }
  .steps { grid-template-columns: 1fr; }
  .steps li + li, .steps li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid rgba(250, 249, 245, .2); }
  .yalla-head { grid-template-columns: 1fr; }
  .yalla-mark { width: 56px; height: 56px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .rq-btn, .yalla-actions .rq-btn { flex: 1 1 100%; }
  .floating-ask { bottom: 14px; inset-inline-end: 14px; }
  .cookie-banner { inset-inline: 12px; bottom: 80px; }
}

/* ---------- Poster lettering (landing only, 8 Nov 2026) ----------
   Rakkas, a display face with Latin and Arabic, echoes hand-lettered Egyptian film posters without copying any.
   Only the hero and the section titles use it; body text, buttons and the dashboard keep Figtree / IBM Plex. */
:root { --rq-font-poster: "Rakkas", var(--rq-font-display); }
#hero-title, #agencies-title, #yalla-title, #rq-title,
html[lang="ar"] :is(#hero-title, #agencies-title, #yalla-title, #rq-title) { font-family: var(--rq-font-poster); font-weight: 400; letter-spacing: 0; }
#hero-title { line-height: 1.12; }
html[lang="ar"] :is(#hero-title, #agencies-title, #yalla-title, #rq-title) { line-height: 1.35; }

/* Verified agencies from /api/agencies (home page). Shown only when at least one agency is verified. */
.agency-list-v { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-block: 20px; }
.agency-list-v .test-data-note { grid-column: 1 / -1; }
.agency-card-v { background: #ffffff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: grid; gap: 6px; }
.agency-card-v h3 { margin: 0; }
.agency-card-v .meta { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--rq-ink-soft); font-size: .9375rem; }
.agency-card-v .meta svg { inline-size: 18px; block-size: 18px; }
.agency-card-v p.small { margin: 0; color: var(--rq-ink); }
.agency-empty-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.agency-list-v .tag-y { background: var(--rq-peach-soft); color: var(--rq-ink); }
