/* Hayyen marketing site. Builds on ds/tokens.css + ds/bundle.css (hy- components).
   Layout uses logical properties so the same markup works in RTL (Arabic) and LTR (English). */

:root {
  --site-max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ink-soft: #2f2d35;
  --brand-tint: #edeafe;
  --brand-ring: #a391e3;
  --night: #1f1a2e;
  --night-card: #2b2440;
  --night-line: #3a3446;
  --brand-deep: #3c2271;
  --on-deep-muted: #ddd6fa;
  --info-tint: #e5f4ff;
  --success-ink: #2c8a52;
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg-canvas); color: var(--fg-default); }
html[lang="ar"] body { font-family: "Tajawal", "Noto Sans", system-ui, sans-serif; }
html[lang="en"] body { font-family: "Noto Sans", system-ui, sans-serif; }
a { color: var(--fg-brand); }
a:hover { color: var(--bg-brand-hover); }
img { max-width: 100%; }
button { font-family: inherit; }
/* FocusOnNavigate moves focus to the page <h1> for screen readers; no ring needed for that programmatic focus. */
[tabindex="-1"]:focus { outline: none; }

.site { min-height: 100vh; display: flex; flex-direction: column; }
.site > main, .site > .page { flex: 1 1 auto; }
.wrap { width: 100%; max-width: var(--site-max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 1120px; }

/* ---------- Buttons (extends hy-btn) ---------- */
.hy-btn--lg { min-height: 56px; padding-inline: 26px; font-size: 17px; border-radius: var(--radius-md); }
.hy-btn--on-dark { background: #fff; color: var(--brand-deep); border-color: #fff; }
.hy-btn--on-dark:hover { background: #f7f5fe; color: var(--brand-deep); }
.hy-btn--outline-dark { background: transparent; color: #fff; border-color: rgb(255 255 255 / .5); }
.hy-btn--outline-dark:hover { background: rgb(255 255 255 / .08); color: #fff; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 10; background: #fff; border-bottom: 1px solid var(--border-subtle); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px clamp(16px, 4vw, 64px); }
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 40px; width: auto; display: block; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { min-height: 40px; padding: 0 14px; display: flex; align-items: center; border-radius: var(--radius-full); text-decoration: none; font-size: 15px; font-weight: 500; color: var(--fg-muted); }
.site-nav a:hover { background: var(--bg-brand-subtle); color: var(--fg-on-brand-subtle); }
.site-nav a[aria-current="page"] { font-weight: 700; color: var(--fg-on-brand-subtle); background: var(--bg-brand-subtle); }
.site-header__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lang-btn { min-height: 40px; padding: 0 12px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: #fff; color: var(--fg-default); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.lang-btn:hover { color: var(--fg-default); border-color: var(--border-strong); }
.lang-btn[lang="en"] { font-family: "Noto Sans", system-ui, sans-serif; }
.lang-btn[lang="ar"] { font-family: "Tajawal", system-ui, sans-serif; }
.nav-toggle { display: none; }

@media (max-width: 1180px) {
  /* Row 1: logo · language · menu button. Opening the menu adds the nav and the sign-in / app buttons below. */
  .site-header__bar { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
  .site-header__logo { order: 1; }
  .site-header__actions { order: 2; }
  .nav-toggle { order: 3; display: inline-flex; min-height: 40px; min-width: 40px; align-items: center; justify-content: center; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: #fff; color: var(--fg-default); cursor: pointer; }
  .site-nav { grid-column: 1 / -1; order: 4; display: none; flex-direction: column; padding-top: 8px; }
  .site-nav a { min-height: 44px; }
  .site-header.is-open .site-nav { display: flex; }
  .site-header__actions .hy-btn { display: none; }
  .site-header.is-open .site-header__actions { grid-column: 1 / -1; order: 5; padding-block: 8px 4px; }
  .site-header.is-open .site-header__actions .hy-btn { display: inline-flex; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; padding: 48px clamp(16px, 4vw, 64px) 32px; background: var(--night); color: #e9e8ec; }
.site-footer__inner { width: 100%; max-width: var(--site-max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.site-footer__brand { display: flex; flex-direction: column; gap: 12px; max-width: 340px; }
.site-footer__brand b { font-size: 22px; color: #fff; }
.site-footer__brand span { font-size: 15px; line-height: 25px; color: #bfbec5; }
.site-footer__app { align-self: flex-start; min-height: 40px; padding: 0 16px; display: flex; align-items: center; border-radius: var(--radius-full); background: #fff; color: var(--brand-deep); font-size: 14px; font-weight: 700; text-decoration: none; }
.site-footer__app:hover { color: var(--brand-deep); background: #f7f5fe; }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 56px; }
.site-footer__col { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.site-footer__col b { font-size: 14px; color: #fff; padding-bottom: 6px; }
.site-footer__col a { color: #d4d2da; text-decoration: none; min-height: 32px; display: flex; align-items: center; font-size: 14px; }
.site-footer__col a:hover { color: #fff; }
.site-footer__copy { width: 100%; padding-top: 20px; border-top: 1px solid var(--night-line); font-size: 12px; color: #a3a1aa; }

/* ---------- Type ---------- */
.display { margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.display--sm { font-size: clamp(32px, 4vw, 48px); line-height: 1.25; }
.h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.3; font-weight: 800; }
.lead { margin: 0; font-size: 19px; line-height: 32px; color: var(--fg-muted); }
.lead--sm { font-size: 18px; line-height: 30px; }
.muted { color: var(--fg-muted); }
.accent { color: var(--fg-brand); }
.body-copy { margin: 0; font-size: 17px; line-height: 30px; color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding-block: 72px; display: flex; flex-direction: column; gap: 28px; }
.section--tight { padding-block: 40px; }
.band { background: #fff; border-block: 1px solid var(--border-subtle); }
.band--dark { background: var(--night); color: #fff; border: 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 720px; align-items: center; text-align: center; margin-inline: auto; }
.section-head--start { align-items: flex-start; text-align: start; margin-inline: 0; }
.row-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }

.hero { background: linear-gradient(180deg, var(--brand-tint) 0%, var(--bg-canvas) 100%); }
.hero--info { background: linear-gradient(180deg, var(--info-tint) 0%, var(--bg-canvas) 100%); }
.hero__grid { padding-block: 64px 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero__text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero__media { flex: 1 1 400px; min-width: 0; position: relative; }
.hero--center .hero__inner { padding-block: 64px 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }

.eyebrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--radius-full); background: #fff; color: var(--fg-brand); font-size: 14px; font-weight: 700; box-shadow: 0 1px 0 rgb(77 46 142 / .08); }
.eyebrow--info { color: var(--status-info-fg); }
.eyebrow .hy-icon { width: 16px; height: 16px; }

.photo { position: relative; border-radius: var(--radius-2xl); overflow: hidden; background: #efeafc; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 300px), 100%), 1fr)); gap: 16px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--border-subtle); border-radius: 20px; background: #fff; }
.card--lg { padding: 28px; }
.card--tint { background: var(--bg-canvas); }
.card--brand { background: var(--bg-brand-subtle); border-color: #c9bdf2; }
.card--dark { background: var(--night-card); border-color: var(--night-line); }
.card__title { font-size: 19px; line-height: 29px; font-weight: 700; }
.card__title--lg { font-size: 21px; line-height: 31px; }
.card__body { font-size: 16px; line-height: 27px; color: var(--fg-muted); }

.tile { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--brand-tint); color: var(--fg-brand); }
.tile--info { background: var(--info-tint); color: var(--status-info-fg); }
.tile--solid { background: var(--bg-brand); color: #fff; }
.tile--white { background: #fff; }
.tile--night { background: var(--brand-deep); color: var(--on-deep-muted); }
.tile--sm { width: 40px; height: 40px; }

.step-num { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--bg-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.step-num--sm { width: 30px; height: 30px; font-size: 15px; background: var(--brand-tint); color: var(--brand-deep); }
.step-num--done { background: var(--success-ink); }

.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.check-list .hy-icon { color: var(--success-ink); flex-shrink: 0; }
.check-dot { width: 26px; height: 26px; border-radius: var(--radius-full); background: var(--status-success-bg); color: var(--status-success-fg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check-dot .hy-icon { width: 16px; height: 16px; color: inherit; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; }
.chip { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full); background: #fff; color: var(--fg-brand); }

/* ---------- Toggles: segmented control + pills ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-full); background: #eeedf1; max-width: 100%; flex-wrap: wrap; }
.seg button { min-height: 44px; padding: 0 22px; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--fg-muted); font-size: 16px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: #fff; color: var(--brand-deep); font-weight: 700; box-shadow: 0 1px 3px rgb(23 22 27 / .12); }
.seg--brand { background: #fff; border: 1px solid #e3ddfa; }
.seg--brand button { font-weight: 700; padding: 0 20px; }
.seg--brand button[aria-pressed="true"] { background: var(--bg-brand); color: #fff; box-shadow: none; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 40px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: var(--radius-full); background: #fff; color: var(--fg-default); font-size: 15px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.pill:hover { border-color: var(--border-strong); }
.pill[aria-pressed="true"], .pill[aria-selected="true"] { background: var(--bg-brand); color: #fff; border-color: var(--bg-brand); }
.pill--soft[aria-pressed="true"] { background: var(--bg-brand-subtle); color: var(--brand-deep); border-color: var(--bg-brand); }
.pill--sm { font-size: 14px; }
.pill--bold { font-weight: 700; min-height: 44px; padding: 0 16px; }

/* ---------- FAQ (native <details>, no script) ---------- */
.faq { width: 100%; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { border: 1px solid #e9e8ec; border-radius: 16px; background: #fff; overflow: hidden; }
.faq details[open] { border-color: var(--brand-ring); }
.faq summary { list-style: none; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; font-size: 18px; font-weight: 700; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .hy-icon { flex-shrink: 0; transition: transform 160ms; }
.faq details[open] summary .hy-icon { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 20px 18px; font-size: 17px; line-height: 29px; color: var(--ink-soft); }
.faq--compact details { border-radius: 14px; }
.faq--compact summary { min-height: 56px; padding: 12px 16px; font-size: 17px; }
.faq--compact details p { padding: 0 16px 16px; font-size: 16px; line-height: 28px; }

/* ---------- CTA band ---------- */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-2xl); background: var(--brand-deep); color: #fff; overflow: hidden; }
.cta-band__text { flex: 2 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cta-band__text p { margin: 0; font-size: 18px; line-height: 30px; color: var(--on-deep-muted); }
.cta-band__media { flex: 1 1 220px; max-width: 280px; margin-inline: auto; }
.cta-band .h2 { color: #fff; }

/* ---------- Article cards ---------- */
.art-card { display: flex; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: 20px; background: #fff; overflow: hidden; text-decoration: none; color: var(--fg-default); transition: box-shadow 160ms, transform 160ms; }
.art-card:hover { color: var(--fg-default); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.art-card__cover { height: 132px; display: flex; align-items: flex-end; justify-content: space-between; padding: 16px 18px; }
.art-card__cat { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full); background: rgb(255 255 255 / .75); }
.art-card__icon { width: 56px; height: 56px; border-radius: 18px; background: rgb(255 255 255 / .6); display: flex; align-items: center; justify-content: center; }
.art-card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.art-card__title { font-size: 19px; line-height: 29px; font-weight: 700; }
.art-card__excerpt { font-size: 15px; line-height: 25px; color: var(--fg-muted); }
.art-card__meta { font-size: 13px; color: var(--fg-muted); display: flex; align-items: center; gap: 6px; }
.art-card__meta .hy-icon { width: 16px; height: 16px; }

/* ---------- Floating hero cards ---------- */
.float-card { position: absolute; display: flex; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: 0 18px 36px -18px rgb(60 34 113 / .45); }
.progress-track { height: 8px; border-radius: var(--radius-full); background: var(--brand-tint); overflow: hidden; display: block; }
.progress-track > span { display: block; height: 100%; border-radius: var(--radius-full); background: var(--bg-brand); }

/* ---------- Legal pages ---------- */
.legal { padding-block: 48px 64px; display: flex; flex-direction: column; gap: 24px; }
.legal__layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.toc { flex: 1 1 220px; max-width: 280px; display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 16px; background: #fff; }
.toc b { font-size: 13px; color: var(--fg-muted); padding: 0 8px 8px; }
.toc a { min-height: 36px; padding: 6px 8px; display: flex; align-items: center; gap: 8px; border-radius: var(--radius-sm); text-decoration: none; font-size: 14px; line-height: 20px; color: var(--fg-default); }
.toc a:hover { background: var(--bg-brand-subtle); }
.legal__body { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.legal__body section { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 24px; }
.legal__body h2 { margin: 0; font-size: 24px; line-height: 34px; font-weight: 700; }
.legal__body p, .legal__body ul { margin: 0; font-size: 17px; line-height: 30px; color: var(--ink-soft); max-width: 720px; }
.legal__body ul { padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 28px; }
.note-warn { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: 1px solid #f7d2a8; border-radius: 12px; background: var(--status-warning-bg); color: var(--status-warning-fg); font-size: 14px; line-height: 23px; }
.note-warn .hy-icon { flex-shrink: 0; margin-top: 2px; }
.ask-band { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px; border-radius: 16px; background: var(--bg-brand-subtle); }
.ask-band b { font-size: 18px; color: var(--fg-on-brand-subtle); }

/* ---------- Phone mock (families tour) ---------- */
.phone { flex: 0 0 auto; width: 300px; max-width: 100%; height: 600px; border-radius: 44px; background: #17161b; padding: 12px; box-shadow: 0 30px 60px -30px rgb(60 34 113 / .6); }
.phone__screen { width: 100%; height: 100%; border-radius: 34px; background: var(--bg-canvas); overflow: hidden; display: flex; flex-direction: column; }

/* ---------- Radio pills (SSR forms) ---------- */
.radio-pills { border: 0; margin: 0; padding: 0; min-width: 0; }
.radio-pills legend { padding: 0; margin-bottom: 6px; }
.radio-pills .pill { cursor: pointer; }
.radio-pills .pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-pills .pill:has(input:checked) { background: var(--bg-brand-subtle); color: var(--brand-deep); border-color: var(--bg-brand); font-weight: 700; }
.radio-pills .pill:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* ---------- Not found ---------- */
.empty-state { padding: 28px; border: 1px dashed var(--border-default); border-radius: 18px; text-align: center; color: var(--fg-muted); margin: 0; }

/* ---------- Blazor error bar (shown by the framework only when something fails) ---------- */
#blazor-error-ui { display: none; position: fixed; inset-inline: 0; bottom: 0; z-index: 1000; padding: 12px 20px; background: var(--status-warning-bg); color: var(--status-warning-fg); box-shadow: var(--shadow-lg); font-size: 15px; }
#blazor-error-ui .reload { margin-inline-start: 8px; font-weight: 700; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; inset-inline-end: 16px; top: 10px; }

@media (max-width: 560px) {
  .section { padding-block: 56px; }
  .hero__grid { padding-block: 40px 56px; }
  .float-card { display: none; }
}
