/* B-Doz website. Colours mirror brand/tokens.json (light + dark).
   Shape rule: interactive things are pills, containers use --r-lg,
   phone frames use their own device radius. */

/* Fonts are hosted here, not loaded from Google (made by site_src/fonts.py). */
@font-face {
  font-family: Manrope;
  src: url("/assets/fonts/manrope.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212;
}
@font-face {
  font-family: "Noto Sans Arabic";
  src: url("/assets/fonts/noto-sans-arabic.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F;
}
/* The app's rounded Material icons; write them as codes, e.g. &#xf7f5; */
@font-face {
  font-family: "B-Doz Icons";
  src: url("/assets/fonts/icons.woff2") format("woff2");
  font-display: block;
}

:root {
  --brand: #2B35F0;
  --brand-strong: #1F27C4;
  --brand-text: #2B35F0;
  --brand-soft: #E6E8FF;
  --violet: #6A3DF5;
  --violet-text: #6A3DF5;
  --violet-soft: #EEE8FF;
  --teal: #16E0BD;
  --teal-soft: #D3FAF2;
  --on-teal: #0B0C2A;
  --night: #0B0C2A;
  --ink: #0B0C2A;
  --ink-muted: #565B82;
  --bg: #F5F6FF;
  --surface: #FFFFFF;
  --border: #E1E3F5;
  --shadow-phone: 0 40px 80px -24px rgb(11 12 42 / .45), 0 12px 24px -12px rgb(11 12 42 / .3);

  --r-lg: 28px;
  --r-xl: 40px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --dir: 1;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4B55FF;
    --brand-strong: #3A44F0;
    --brand-text: #9EA5FF;
    --brand-soft: #1D2160;
    --violet-text: #B7A4FF;
    --violet-soft: #2A1F5C;
    --teal-soft: #0F3B3A;
    --ink: #F2F3FF;
    --ink-muted: #A7ABD6;
    --bg: #0B0C22;
    --surface: #171A3D;
    --border: #2A2E5E;
  }
}

[dir="rtl"] { --dir: -1; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, "Noto Sans Arabic", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

/* Latin headlines get Apple-style tight tracking. Arabic script must keep
   0 letter-spacing or the letters stop joining. */
h1, h2, h3 { font-weight: 800; line-height: 1.08; }
:lang(en) :is(h1, h2, h3) { letter-spacing: -0.035em; }
[dir="rtl"] :is(h1, h2, h3) { line-height: 1.3; }
[dir="rtl"] body { line-height: 1.8; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ms {
  font-family: "B-Doz Icons";
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--brand);
  color: #fff;
  border-end-start-radius: var(--r-xl);
  border-end-end-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}
.nav-logo img { height: 34px; width: auto; }

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgb(255 255 255 / .14);
}
.lang a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.lang a:hover { background: rgb(255 255 255 / .16); }
.lang a[aria-current="page"] { background: #fff; color: var(--night); }
.lang a:active { transform: scale(.97); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: clamp(600px, calc(100dvh - 76px), 820px);
}

.hero-copy { padding-block: 32px 72px; }

/* Sized so each line fits the column on one line (2 lines in total). */
.hero h1 { font-size: clamp(44px, 5.2vw, 76px); }
[dir="rtl"] .hero h1 { font-size: clamp(36px, 3.9vw, 56px); }
.hero h1 .line { display: block; }
@media (min-width: 901px) { .hero h1 .line { white-space: nowrap; } }
.hero h1 .line + .line { color: var(--teal); }

.lede {
  margin-top: 24px;
  max-width: 34ch;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 500;
  color: rgb(255 255 255 / .88);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 22px 0 16px;
  border-radius: 999px;
  background: var(--night);
  color: #fff;
  line-height: 1.15;
}
[dir="rtl"] .store { padding: 0 16px 0 22px; }
.store .ms { font-size: 28px; }
.store small { display: block; font-size: 12px; font-weight: 600; color: rgb(255 255 255 / .72); }
.store b { display: block; font-size: 17px; font-weight: 800; direction: ltr; text-align: start; }
[dir="rtl"] .store b { text-align: end; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}
.text-link .ms { font-size: 20px; transform: scaleX(var(--dir)); transition: transform .35s var(--ease); }
.text-link:hover .ms { transform: translateX(calc(4px * var(--dir))) scaleX(var(--dir)); }

/* Three phones: the home screen in front, roommates and offers fanned behind. */
.hero-art {
  position: relative;
  align-self: end;
  height: 100%;
  min-height: 560px;
  perspective: 1400px;
}
.phones {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .8s var(--ease);
}
.phones .phone {
  position: absolute;
  bottom: -90px;
  left: 50%;
  width: clamp(240px, 22vw, 300px);
  --x: -50%;
}
.phones .phone--front { z-index: 3; transform: translateX(var(--x)); }
.phones .phone--a {
  z-index: 1;
  transform: translateX(calc(var(--x) - 50% * var(--dir))) translateY(-36px) rotate(calc(-7deg * var(--dir))) scale(.86);
}
.phones .phone--b {
  z-index: 2;
  transform: translateX(calc(var(--x) + 50% * var(--dir))) translateY(-36px) rotate(calc(7deg * var(--dir))) scale(.86);
}

/* ---------- Phone frame ---------- */

.phone {
  margin: 0;
  padding: 9px;
  border-radius: 50px;
  background: var(--night);
  box-shadow: var(--shadow-phone), inset 0 0 0 1.5px rgb(255 255 255 / .14);
}
.phone::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 20px;
  left: 50%;
  width: 30%;
  height: 26px;
  border-radius: 999px;
  background: var(--night);
  transform: translateX(-50%);
}
.phone { position: relative; }
.phone img {
  width: 100%;
  aspect-ratio: 390 / 844;
  border-radius: 41px;
  background: #F5F6FF;
}

/* ---------- Sections ---------- */

.section { padding-block-start: clamp(80px, 11vw, 140px); }

.section-title {
  font-size: clamp(34px, 4.4vw, 56px);
  max-width: 16ch;
}

/* Features: text steps on one side, a sticky phone that follows them. */
.features-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(24px, 4vw, 48px);
}

.step {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  max-width: 30rem;
  opacity: .32;
  transition: opacity .6s var(--ease);
}
.step.is-active { opacity: 1; }
.step h3 { font-size: clamp(28px, 3vw, 40px); }
.step p { color: var(--ink-muted); font-size: 18px; max-width: 40ch; }

.tile {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.tile .ms { font-size: 28px; }
.tone-brand .tile { background: var(--brand); color: #fff; }
.tone-violet .tile { background: var(--violet); color: #fff; }
.tone-teal .tile { background: var(--teal); color: var(--on-teal); }

.stage { position: relative; }
.stage-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
}
.stage-panel {
  position: relative;
  width: min(100%, 470px);
  aspect-ratio: 470 / 640;
  max-height: 84vh;
  border-radius: var(--r-xl);
  background: var(--brand);
  overflow: hidden;
  transition: background-color .7s var(--ease);
}
.stage[data-active="1"] .stage-panel { background: var(--violet); }
.stage[data-active="2"] .stage-panel { background: var(--teal); }

.stage .phone {
  position: absolute;
  left: 50%;
  top: 11%;
  width: 66%;
  transform: translateX(-50%);
}
.stage .phone .shots { position: relative; }
.stage .phone img + img { position: absolute; inset: 0; }
.stage .phone img {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .55s var(--ease), transform .8s var(--ease);
}
.stage[data-active="0"] img[data-step="0"],
.stage[data-active="1"] img[data-step="1"],
.stage[data-active="2"] img[data-step="2"] { opacity: 1; transform: none; }

.step-shot { display: none; }

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}
.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.cell h3 { font-size: clamp(22px, 2vw, 28px); margin-top: auto; }
.cell p { color: var(--ink-muted); max-width: 36ch; }
.cell .ms { font-size: 36px; }
.cell--wide { grid-column: span 2; }

.cell--brand { background: var(--brand); color: #fff; }
.cell--brand p { color: rgb(255 255 255 / .86); }
.cell--brand .big-ms {
  position: absolute;
  inset-inline-end: -24px;
  top: -24px;
  font-size: 220px;
  color: rgb(255 255 255 / .14);
}
.cell--teal { background: var(--teal); color: var(--on-teal); }
.cell--teal p { color: rgb(11 12 42 / .78); }
.cell--violet { background: var(--violet-soft); }
.cell--violet .ms { color: var(--violet-text); }
.cell--plain .ms { color: var(--brand-text); }

.langs-word {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--brand-text);
}

/* Landlords */
.owners {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(40px, 7vw, 96px) clamp(24px, 6vw, 80px);
  border-radius: var(--r-xl);
  background: var(--brand-soft);
}
.owners-lede {
  margin-top: 20px;
  font-size: 19px;
  color: var(--ink-muted);
  max-width: 34ch;
}
.flow {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}
.flow::before {
  content: "";
  position: absolute;
  inset-inline-start: 27px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: var(--brand-text);
  opacity: .35;
  transform-origin: top;
}
.flow li {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.flow .tile { background: var(--brand); color: #fff; }
.flow h3 { font-size: 22px; line-height: 1.3; }
.flow p { color: var(--ink-muted); margin-top: 4px; }

/* Launch */
.launch {
  text-align: center;
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  overflow: hidden;
  position: relative;
}
.launch .mark { width: 72px; margin: 0 auto 28px; }
.launch h2 {
  font-size: clamp(36px, 5.2vw, 68px);
  max-width: 16ch;
  margin-inline: auto;
}
.launch p { margin-top: 18px; font-size: 19px; color: rgb(255 255 255 / .88); }
.launch .stores { justify-content: center; }
.launch .contact { margin-top: 36px; font-size: 16px; color: rgb(255 255 255 / .88); }
.launch .contact a { color: #fff; font-weight: 700; text-underline-offset: 4px; }

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 48px 56px;
  color: var(--ink-muted);
  font-size: 15px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.footer-brand img { width: 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
}
.footer nav a:hover, .footer nav a[aria-current="page"] { color: var(--ink); }
.footer-links { margin-inline-start: auto; }

/* ---------- Legal and support pages ---------- */

.doc-head {
  background: var(--brand);
  color: #fff;
  border-end-start-radius: var(--r-lg);
  border-end-end-radius: var(--r-lg);
}

.doc { max-width: 800px; padding-block: clamp(40px, 7vw, 80px) 24px; }

.doc-body { font-size: 17px; }
.doc-body h1 { font-size: clamp(36px, 5.2vw, 56px); }
.doc-body .updated { margin-top: 14px; color: var(--ink-muted); font-size: 15px; font-weight: 600; }
.doc-body .lead { margin-top: 20px; font-size: 19px; color: var(--ink-muted); }
.doc-body h2 {
  margin-top: 52px;
  font-size: clamp(22px, 2.4vw, 27px);
  line-height: 1.3;
  scroll-margin-top: 24px;
}
.doc-body p { margin-top: 14px; }
.doc-body ul, .doc-body ol { margin: 14px 0 0; padding-inline-start: 24px; }
.doc-body li + li { margin-top: 10px; }
.doc-body li::marker { color: var(--brand-text); font-weight: 800; }
.doc-body strong { font-weight: 800; }
.doc-body a { color: var(--brand-text); font-weight: 700; text-underline-offset: 3px; }

.contact-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 36px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--brand-soft);
}
.contact-card .tile { background: var(--brand); color: #fff; }
.contact-card h2 { margin-top: 0; font-size: 22px; }
.contact-card p { margin-top: 6px; color: var(--ink-muted); }
.contact-card .contact-email { font-size: 20px; }

/* Questions open and close; the chevron turns. */
.faq { margin-top: 20px; border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.faq details + details { border-top: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 22px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "\f720";
  font-family: "B-Doz Icons";
  font-size: 24px;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq summary:hover { color: var(--brand-text); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--ink-muted); }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] p { animation: rise .45s var(--ease) both; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise 1s var(--ease) both;
    animation-delay: calc(120ms + var(--i, 0) * 90ms);
  }
  .phones .phone--front { animation: phone-front 1.3s var(--ease) both .25s; }
  .phones .phone--a { animation: phone-fan 1.3s var(--ease) both .55s; }
  .phones .phone--b { animation: phone-fan 1.3s var(--ease) both .65s; }

  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }

  .js .flow::before { transform: scaleY(0); transition: transform 1.4s var(--ease) .2s; }
  .js .flow.is-in::before { transform: scaleY(1); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(32px); }
}
@keyframes phone-front {
  from { opacity: 0; transform: translateX(var(--x)) translateY(140px); }
}
/* The back phones start hidden behind the front one, then fan out. */
@keyframes phone-fan {
  from { opacity: 0; transform: translateX(var(--x)) translateY(60px) rotate(0deg) scale(.8); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phones, .step, .stage-panel, .stage .phone img { transition: none; }
}

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero-copy { padding-block: 24px 16px; }
  /* Tall enough to show the top two thirds of the front phone. */
  .hero-art { min-height: 0; height: min(calc(125vw - 80px), 500px); }
  .phones .phone { width: clamp(210px, 58vw, 270px); bottom: -120px; }

  .features-grid { grid-template-columns: 1fr; }
  .stage { display: none; }
  .step { min-height: 0; opacity: 1; max-width: none; padding-block: 28px; }
  .step-shot {
    display: block;
    position: relative;
    height: 440px;
    margin-top: 12px;
    border-radius: var(--r-lg);
    overflow: hidden;
  }
  .tone-brand .step-shot { background: var(--brand); }
  .tone-violet .step-shot { background: var(--violet); }
  .tone-teal .step-shot { background: var(--teal); }
  .step-shot .phone {
    position: absolute;
    left: 50%;
    top: 40px;
    width: min(270px, 72%);
    transform: translateX(-50%);
  }

  .bento { grid-template-columns: 1fr; }
  .cell--wide { grid-column: auto; }
  .cell { min-height: 0; }
  .cell h3 { margin-top: 24px; }

  .owners { grid-template-columns: 1fr; }

  .footer { flex-direction: column; align-items: flex-start; }
  .footer-links { margin-inline-start: 0; }
  .contact-card { flex-direction: column; }
}

@media (max-width: 520px) {
  .nav-logo img { height: 28px; }
  .lang a { padding: 0 10px; font-size: 13px; }
  .store { flex: 1 1 auto; justify-content: center; }
  .phones .phone--a { transform: translateX(calc(var(--x) - 48% * var(--dir))) translateY(-24px) rotate(calc(-8deg * var(--dir))) scale(.84); }
  .phones .phone--b { transform: translateX(calc(var(--x) + 48% * var(--dir))) translateY(-24px) rotate(calc(8deg * var(--dir))) scale(.84); }
}
