/* 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 {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 10px 10px 16px;
  border-radius: 36px;
  background: #141716;
  box-shadow: 0 16px 36px rgba(25, 28, 27, 0.18);
}
.bayan-hero .phone { box-shadow: 0 22px 44px rgba(0, 0, 0, 0.35); }
.phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 32%;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}
/* 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;
  aspect-ratio: 390 / 844;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bayan-paper);
}
.phone-fallback,
.phone-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.phone-screen img {
  object-fit: cover;
  object-position: top center;
  z-index: 1;
}
.phone.is-missing img { display: none; }
.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);
}
.block-end { padding-bottom: 24px; }
.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; }

.gallery-row {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 8px var(--page-pad) 64px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: inline mandatory;
  scroll-padding-inline: var(--page-pad);
  scrollbar-color: var(--bayan-brand) var(--bayan-muted);
  scrollbar-width: thin;
}
.gallery-row > li { flex: 0 0 190px; scroll-snap-align: start; }
.gallery-row .shot { width: 190px; }
.gallery-row .phone { width: 100%; }

.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; }
  .block-end { padding-bottom: 16px; }
  .gallery-row { padding-bottom: 48px; }
  .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; }
}
