/* Bayan sub-site. Qcore type and header, Bayan paper and green from tokens.json.
   Cairo is the Arabic face. Alexandria (already on the parent sheet) is the fallback. */

:root {
  --page-pad: max(32px, calc((100vw - 1240px) / 2));
  --bayan-ink: #191c1b;
  --bayan-soft: #3e4a46;
  --bayan-brand: #0b6b53;
  --bayan-brand-dark: #084f3d;
  --bayan-paper: #f5f4f1;
  --bayan-muted: #edece8;
  --bayan-line: #e5e4df;
  --bayan-on-navy: #e4eee9;
  --bayan-on-navy-soft: #c5ddd2;
}

html { scrollbar-color: var(--bayan-brand) var(--bayan-paper); color-scheme: light; }
::selection { background: #cfe6dc; color: var(--bayan-ink); }
body.bayan {
  background: var(--bayan-paper);
  color: var(--bayan-ink);
  overflow-x: clip;
  caret-color: var(--bayan-brand);
}
html[lang="ar"] body.bayan,
html[lang="ar"] body.bayan button,
html[lang="ar"] body.bayan input {
  font-family: "Cairo", "Alexandria", system-ui, sans-serif;
}
html[lang="ar"] body.bayan .wordmark-name,
html[lang="ar"] body.bayan .wordmark-sub,
html[lang="ar"] body.bayan .name-en,
html[lang="ar"] body.bayan [lang="en"] {
  font-family: Overpass, system-ui, sans-serif;
  letter-spacing: -0.02em;
}
html[dir="rtl"] .skip-link { left: auto; right: 16px; }

.bayan .site-header {
  background: #0b1220;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.bayan .main-nav { gap: 22px; }
.bayan .button-blue { background: var(--bayan-brand); color: #fff; }
.bayan .button-blue:hover { background: var(--bayan-brand-dark); }
.bayan .button:active { transform: translateY(0); }
.bayan .wordmark-name,
.bayan .wordmark-sub { font-family: Overpass, system-ui, sans-serif; }

.bayan-hero {
  background: #0b1220;
  color: #f4f7f5;
  padding: 128px var(--page-pad) 72px;
}
.bayan-hero-grid {
  max-width: 1240px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 40px;
  align-items: center;
}
/* Main-site .hero-copy is max-width:575px with extra padding. Size the block
   and start it on the page edge, in line with the header logo and every section below. */
.bayan .hero-copy {
  width: min(100%, 34rem);
  max-width: none;
  padding: 0;
  justify-self: start;
}
.bayan-name {
  width: fit-content;
  margin: 0 0 24px;
  padding: 16px 24px;
  border-radius: 20px;
  background: #f5f4f1;
  line-height: 0;
}
.bayan-logo {
  display: block;
  width: clamp(128px, 13vw, 170px);
  height: auto;
}
.hero-copy .hero-lead,
.bayan-close .hero-lead {
  max-width: 38em;
  margin: 0;
  color: var(--bayan-on-navy);
  font-size: clamp(1.125rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  font-weight: 400;
}
.hero-note {
  max-width: 38em;
  margin: 14px 0 0;
  color: var(--bayan-on-navy-soft);
  font-size: 1rem;
  line-height: 1.55;
}
.bayan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.phone-cluster {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  width: 448px;
  max-width: 100%;
  animation: bayan-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.shot-lift { margin-bottom: 64px; }
.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 280px;
  max-width: 100%;
  flex: none;
}
.phone-cluster .shot:first-child {
  width: 260px;
  position: relative;
  z-index: 1;
}
.phone-cluster .shot-lift {
  width: 210px;
  position: relative;
  z-index: 0;
  margin-inline-start: -22px;
}

/* Phone frame. Every measurement is in cqw of the .shot, so the bezel, corners
   and status bar keep the same proportions from the 154px hero phone to 280px. */
.shot { container-type: inline-size; }
.phone {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 3.2cqw;
  border-radius: 15.5cqw;
  background: linear-gradient(150deg, #34393a 0%, #121514 22%, #0b0d0c 70%, #262a2a 100%);
  box-shadow:
    inset 0 0 0 0.5cqw #050606,
    inset 0 0 0 0.9cqw rgba(255, 255, 255, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 40px -8px rgba(25, 28, 27, 0.28),
    0 4px 10px rgba(25, 28, 27, 0.12);
}
.bayan-hero .phone {
  box-shadow:
    inset 0 0 0 0.5cqw #050606,
    inset 0 0 0 0.9cqw rgba(255, 255, 255, 0.1),
    0 28px 56px -10px rgba(0, 0, 0, 0.55),
    0 6px 14px rgba(0, 0, 0, 0.3);
}
/* Side button. */
.phone::before {
  content: "";
  position: absolute;
  inset-inline-end: -0.9cqw;
  top: 24%;
  width: 1.1cqw;
  height: 11%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, #0b0d0c, #3a3f3f);
}
html[dir="rtl"] .phone::before { border-radius: 2px 0 0 2px; background: linear-gradient(270deg, #0b0d0c, #3a3f3f); }
/* Home indicator, drawn on the screen like the real thing. */
.phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(3.2cqw + 2.6cqw);
  z-index: 3;
  width: 34%;
  height: 1.3cqw;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(25, 28, 27, 0.72);
}
/* Main-site .phone-screen is a 84/94px flex mock. Keep the screen in the frame. */
.bayan .phone-screen {
  position: relative;
  display: block;
  height: auto;
  padding: 0;
  border-radius: 12.4cqw;
  overflow: hidden;
  background: var(--bayan-paper);
  isolation: isolate;
}
/* Status bar above the screenshot (the captures start below it). */
.phone-screen::before {
  content: "9:41";
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 11.5cqw;
  padding-inline: 8.5cqw;
  color: #191c1b;
  font: 600 4.1cqw/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
  direction: ltr;
  background: var(--bayan-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 12'%3E%3Cg fill='%23191c1b'%3E%3Crect x='0' y='8' width='3' height='4' rx='.8'/%3E%3Crect x='4.5' y='6' width='3' height='6' rx='.8'/%3E%3Crect x='9' y='3.5' width='3' height='8.5' rx='.8'/%3E%3Crect x='13.5' y='1' width='3' height='11' rx='.8'/%3E%3Cpath d='M30 11.6l-2.1-2.4a3 3 0 014.2 0zM26.5 7.7l-1.4-1.6a7 7 0 019.8 0l-1.4 1.6a5 5 0 00-7 0zM23.7 4.5l-1.4-1.6a11.2 11.2 0 0115.4 0l-1.4 1.6a9 9 0 00-12.6 0z'/%3E%3Crect x='44.5' y='1' width='20' height='10' rx='3' fill='none' stroke='%23191c1b' stroke-opacity='.45'/%3E%3Crect x='46.5' y='3' width='15' height='6' rx='1.6'/%3E%3Crect x='65.6' y='4' width='1.6' height='4' rx='.8' fill-opacity='.45'/%3E%3C/g%3E%3C/svg%3E") no-repeat right 7.5cqw center / 17.5cqw auto;
}
/* Home-indicator strip below the screenshot, so the bar never covers the app's own tab bar. */
.phone-screen::after {
  content: "";
  position: relative;
  z-index: 2;
  display: block;
  height: 6.5cqw;
  background: #fbfbfa;
}
.phone-fallback {
  position: absolute;
  inset: 0;
}
.phone-screen img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top center;
}
.phone.is-missing img { visibility: hidden; }
.phone-fallback {
  background-color: var(--bayan-paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, var(--bayan-line) 27px 28px);
}
.phone-fallback::before {
  content: "";
  position: absolute;
  inset-inline-start: 16px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #c13527;
}
.shot figcaption {
  margin: 0;
  max-width: 22ch;
  color: var(--bayan-soft);
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
}
.bayan-hero .shot figcaption { color: var(--bayan-on-navy-soft); }

.sheet { background: var(--bayan-paper); }
.sheet + .sheet { border-top: 1px solid var(--bayan-line); }
.sheet-muted { background: var(--bayan-muted); }
.block,
.notebook,
.spread {
  margin-inline: auto;
  padding: 72px var(--page-pad);
}
.hero-copy,
.spread-copy { min-width: 0; }
.notebook,
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 340px);
  gap: 36px 56px;
  align-items: center;
}
/* Column 1 is the inline-start side in both directions. Reverse swaps tracks
   so the copy stays on the wide one and the phone on the narrow one. */
.spread-reverse {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1.15fr);
}
.spread-reverse .spread-copy { grid-column: 2; grid-row: 1; }
.spread-reverse .spread-visual { grid-column: 1; grid-row: 1; }
.spread-visual { display: flex; justify-content: center; }
.bayan h2 {
  margin: 0 0 16px;
  max-width: 16em;
  color: var(--bayan-ink);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.lede {
  max-width: 62ch;
  margin: 0;
  color: var(--bayan-soft);
  font-size: 1.0625rem;
  line-height: 1.65;
}
.lede + .lede,
.lede + .slip,
.lede + .link-row { margin-top: 14px; }
.bayan h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

/* Every line of the notebook is one 36px rule, so text sits on the paper's lines. */
.kunnash {
  position: relative;
  padding-block: 0 36px;
  padding-inline: 36px 20px;
  border: 1px solid var(--bayan-line);
  border-radius: 20px;
  background-color: #fff;
  background-image: repeating-linear-gradient(to bottom, transparent 0 35px, var(--bayan-line) 35px 36px);
  line-height: 36px;
}
.kunnash::before {
  content: "";
  position: absolute;
  inset-inline-start: 22px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #c13527;
}
.kunnash-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 36px;
}
.kunnash-cols,
.kunnash-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.6fr;
  gap: 12px;
  white-space: nowrap;
}
.kunnash-cols {
  color: var(--bayan-soft);
  font-size: 0.875rem;
  font-weight: 600;
}
.kunnash-row {
  color: #2c3a52;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.kunnash-row s {
  color: var(--bayan-soft);
  text-decoration-color: #c13527;
  text-decoration-thickness: 1.5px;
}
.kunnash-total { font-weight: 600; }
.kunnash-total span:nth-child(2) { color: #c13527; }

.slip {
  margin-top: 22px;
  max-width: 40rem;
  padding: 18px 20px 16px;
  border: 1px solid var(--bayan-line);
  border-radius: 20px;
  background: #fff;
}
.slip-label {
  margin: 0;
  color: var(--bayan-soft);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
}
.slip-say {
  margin: 12px 0;
  color: var(--bayan-ink);
  font-family: "Cairo", "Alexandria", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.5;
}
.slip-note { margin: 0; color: var(--bayan-soft); font-size: 0.9375rem; line-height: 1.55; }

.sync-steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-width: 40rem;
}
.sync-steps li {
  position: relative;
  padding-inline-start: 28px;
  padding-bottom: 22px;
}
.sync-steps li:last-child { padding-bottom: 0; }
.sync-steps li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bayan-brand);
}
.sync-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 1.3em;
  bottom: 2px;
  width: 1px;
  background: #c9cdc8;
}
.sync-steps p { margin: 0; max-width: 52ch; color: var(--bayan-soft); font-size: 1.0625rem; line-height: 1.6; }

.spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
  margin: 8px 0 0;
}
.spec div {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr);
  gap: 8px 16px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--bayan-line);
}
.spec dt { font-weight: 600; }
.spec dd { margin: 0; color: var(--bayan-soft); line-height: 1.55; }

.link-row { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 22px 0 0; }
.inline-link {
  color: var(--bayan-brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
.inline-link:hover { color: var(--bayan-brand-dark); }

.bayan-close {
  background: #0b1220;
  color: #f4f7f5;
  padding: 72px var(--page-pad);
}
.bayan-close-inner {
  max-width: 1240px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 36px 48px;
  align-items: end;
}
.bayan-close h2 { color: #f7f6f3; }
.bayan-close .hero-lead { margin-top: 0; }
.bayan-close .contact-actions { border-top: 1px solid #334258; }
.bayan-close .contact-link {
  grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr) 18px;
  border-bottom-color: #334258;
}
.bayan-close .contact-link strong { white-space: normal; overflow-wrap: anywhere; }
.bayan-close .contact-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }

@keyframes bayan-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1000px) {
  :root { --page-pad: 30px; }
}
@media (max-width: 1040px) {
  .bayan .header-cta { display: none; }
  .bayan .menu-toggle { display: flex; }
  .bayan .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    inset-inline: 0;
    padding: 8px 18px 18px;
    background: #0e1622;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 24px rgba(3, 10, 20, 0.22);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .bayan .main-nav.is-open { display: flex; }
  .bayan .main-nav a {
    min-height: 48px;
    padding-inline: 8px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .bayan .main-nav a:after { display: none; }
}
@media (max-width: 900px) {
  .bayan-hero-grid,
  .notebook,
  .spread,
  .spread-reverse,
  .bayan-close-inner { grid-template-columns: 1fr; }
  .bayan .hero-copy { justify-self: stretch; width: 100%; }
  .phone-cluster { justify-self: center; }
  .spread-reverse .spread-copy,
  .spread-reverse .spread-visual { grid-column: auto; grid-row: auto; }
  .shot-lift { margin-bottom: 36px; }
}
@media (max-width: 700px) {
  :root { --page-pad: 18px; }
  .bayan-hero { padding-top: 112px; padding-bottom: 48px; }
  .bayan .main-nav { top: 68px; }
  .block, .notebook, .spread, .bayan-close { padding-top: 56px; padding-bottom: 56px; }
  .kunnash { padding-inline: 32px 16px; }
  .spec { grid-template-columns: 1fr; }
  .spec div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 520px) {
  .phone-cluster { width: min(100%, 332px); gap: 12px; }
  .phone-cluster .shot:first-child { width: 162px; }
  .phone-cluster .shot-lift { width: 154px; margin-inline-start: 0; margin-bottom: 22px; }
  .spread .shot { width: 240px; }
}
@media (max-width: 380px) {
  :root { --page-pad: 14px; }
  .bayan-actions { flex-direction: column; align-items: stretch; }
  .phone-cluster { gap: 10px; }
  .shot-lift { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .phone-cluster { animation: none; }
}

/* Design audit (2026-11-15): the hero's opening line is the real headline, so give it headline weight
   and let the logo tile step back. */
.bayan .hero-copy { width: min(100%, 40rem); }
.bayan-hero .bayan-name { padding: 12px 18px; border-radius: 16px; }
.bayan-hero .bayan-logo { width: clamp(96px, 8vw, 120px); }
.bayan-hero .hero-lead {
  max-width: 18em;
  color: #fff;
  font-size: clamp(2rem, 3.3vw, 2.875rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
html[lang="ar"] .bayan-hero .hero-lead { letter-spacing: 0; line-height: 1.45; }
.bayan-hero .hero-note { margin-top: 18px; font-size: 1.0625rem; }

/* 2026-11-16: the value line is the page's h1; the logo tile is decoration above it. */
.bayan-hero h1.hero-lead { margin: 0; }

/* The notebook's missing total, answered by the app. */
.kunnash-app {
  margin: 0 0 -36px;
  color: var(--bayan-brand);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 36px;
}
.kunnash-app b { font-variant-numeric: tabular-nums; }

/* Assistant example: say, draft, confirm. */
.draft-flow {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  max-width: 40rem;
  display: grid;
  gap: 10px;
}
.draft-flow li {
  padding: 14px 18px;
  border: 1px solid var(--bayan-line);
  border-radius: 16px;
  background: #fff;
}
.draft-flow li:nth-child(2) { border-color: #b7d6c9; }
.draft-flow li:last-child { background: #eef6f2; border-color: #cfe6dc; }
.draft-step {
  display: block;
  margin-bottom: 6px;
  color: var(--bayan-brand);
  font-size: 0.8125rem;
  font-weight: 700;
}
.draft-flow .slip-say { margin: 0; }
.draft-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 4px 0 0;
}
.draft-card div { min-width: 5.5rem; }
.draft-card dt { color: var(--bayan-soft); font-size: 0.8125rem; }
.draft-card dd { margin: 0; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.draft-state {
  display: inline-block;
  margin: 10px 0 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fdf3e1;
  color: #7a4b00;
  font-size: 0.8125rem;
  font-weight: 600;
}
.draft-flow + .slip-label { margin-top: 10px; font-weight: 400; }
.slip-label + .teaser { margin-top: 14px; }

/* Questions. Reuses the main site's .faq-list at Bayan's reading size. */
.bayan-faq {
  max-width: 1240px;
  margin-inline: auto;
  padding: 72px var(--page-pad);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px 56px;
  align-items: start;
}
.bayan-faq .faq-list summary { font-size: 1.0625rem; min-height: 64px; }
.bayan-faq .faq-list details p { max-width: 62ch; color: var(--bayan-soft); font-size: 1rem; line-height: 1.65; }
.bayan-faq .faq-list details,
.bayan-faq .faq-list details:first-child { border-color: var(--bayan-line); }

/* Early-access form on the navy closing band, under the contact links. */
.bayan-close-inner { align-items: start; }
.bayan-form .field select {
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid #334258;
  border-radius: 9px;
  background: #0f1a2b;
  color: #fff;
  font: inherit;
  font-size: 15px;
}
.bayan-form .field input:focus-visible,
.bayan-form .field select:focus-visible { outline: 2px solid #3fae8c; outline-offset: 1px; border-color: #3fae8c; }
html[dir="rtl"] .bayan-form .field input[dir="ltr"] { text-align: right; }

@media (max-width: 900px) {
  .bayan-faq { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .bayan-faq { padding-top: 56px; padding-bottom: 56px; }
  .bayan-faq .faq-list summary { font-size: 1rem; }
}

/* "Coming soon" demo-video teaser, in place of the video until it exists. */
.teaser {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 40rem;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(11, 107, 83, 0.55), transparent 55%),
    #0b1220;
  color: #f4f7f5;
}
html[dir="rtl"] .teaser {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(11, 107, 83, 0.55), transparent 55%),
    #0b1220;
}
.teaser-play {
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}
.teaser-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.teaser-tag {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e9b949;
  color: #2b1d00;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
html[lang="ar"] .teaser-tag { letter-spacing: 0; }
.teaser-title { margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.teaser-note { margin: 4px 0 0; color: var(--bayan-on-navy-soft); font-size: 0.9375rem; line-height: 1.5; }
@media (max-width: 380px) {
  .teaser { flex-direction: column; align-items: flex-start; }
}
