/* Lamma's site. Colours are the app's own "Mist" palette (app/lib/core/palettes.dart), light and dark. */
:root {
  --primary: #3F6F8F;
  --on-primary: #FFFFFF;
  --primary-soft: #DCE7F0;
  --on-primary-soft: #1F3A4E;
  --bg: #F2F5F8;
  --card: #FFFFFF;
  --container: #E7ECF0;
  --high: #E1E7EC;
  --text: #1D252C;
  --muted: #627080;
  --line: #D3DBE2;
  --bubble-in: #FFFFFF;
  --bubble-out: #DCE7F0;
  --shadow: 0 1px 2px rgba(29, 37, 44, .06), 0 8px 24px rgba(29, 37, 44, .06);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #9DBDD6;
    --on-primary: #14212C;
    --primary-soft: #2A3D4E;
    --on-primary-soft: #DCE7F0;
    --bg: #14181D;
    --card: #1B2127;
    --container: #1B2127;
    --high: #1F262D;
    --text: #DDE3E9;
    --muted: #8D99A6;
    --line: #2B343D;
    --bubble-in: #1F262D;
    --bubble-out: #2A3D4E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif; }
a { color: var(--primary); text-underline-offset: 3px; }
img { display: block; }

/* One language at a time. The server picks it (Accept-Language or the visitor's choice); the button switches. */
html[lang="en"] body [lang="ar"], html[lang="ar"] body [lang="en"] { display: none !important; }

/* English names of buttons inside Arabic sentences keep their own order and punctuation. */
[lang="ar"] b[dir="ltr"] { unicode-bidi: isolate; white-space: nowrap; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ----- top bar ----- */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { border-radius: 11px; }
.brand-name { font-size: 20px; font-weight: 600; letter-spacing: -.2px; }
.brand-ar { color: var(--muted); font-weight: 500; margin-inline-start: 4px; font-family: "IBM Plex Sans Arabic", sans-serif; }
.lang {
  font: inherit; font-size: 15px; color: var(--text); background: var(--container);
  border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; min-height: 40px;
}
.lang:hover { background: var(--high); }
.lang:focus-visible, .btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.lang [lang="en"] { font-family: "IBM Plex Sans Arabic", sans-serif; }

/* ----- hero ----- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 32px; padding-bottom: 64px; }
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.12; letter-spacing: -1px; margin: 0 0 18px; font-weight: 650; }
html[lang="ar"] h1 { letter-spacing: 0; line-height: 1.3; font-weight: 600; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 30px; max-width: 34em; }

.get { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  border-radius: 14px; padding: 12px 20px 12px 16px; min-height: 60px; min-width: 220px;
  transition: transform .12s ease, background-color .12s ease;
}
html[dir="rtl"] .btn { padding: 12px 16px 12px 20px; }
.btn:active { transform: scale(.98); }
.btn-text { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 17px; }
.btn-small { font-size: 13px; font-weight: 500; opacity: .8; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-secondary:hover { background: var(--high); }
/* On a phone or a PC, its own download comes first and stands out. */
.get .btn.mine { order: -1; background: var(--primary); color: var(--on-primary); box-shadow: none; }
.get .btn.other { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.fine { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.fine b { font-weight: 600; }
.fine:not(.ready) { visibility: hidden; }

/* ----- the drawn phone ----- */
.phone {
  justify-self: center; width: 330px; max-width: 100%; aspect-ratio: 9 / 18.5;
  border-radius: 42px; padding: 10px; background: #1D252C; box-shadow: 0 30px 60px rgba(29, 37, 44, .18);
}
@media (prefers-color-scheme: dark) { .phone { background: #0B0E11; box-shadow: 0 0 0 1px #2B343D, 0 30px 60px rgba(0, 0, 0, .5); } }
.screen {
  height: 100%; border-radius: 33px; overflow: hidden; display: flex; flex-direction: column;
  background: var(--bg); font-size: 13.5px; line-height: 1.35;
}
.bar { display: flex; align-items: center; gap: 9px; padding: 26px 12px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.back { font-size: 26px; line-height: 1; color: var(--text); width: 14px; }
html[dir="rtl"] .back { transform: scaleX(-1); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-family: "IBM Plex Sans Arabic", sans-serif; }
.av-fam { background: #5B8A72; }
.who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.who b { font-size: 15px; font-weight: 600; }
.who small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icons { display: flex; gap: 12px; color: var(--text); }
.icons svg { width: 20px; height: 20px; }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px; overflow: hidden; }
.day { align-self: center; font-size: 11px; color: var(--muted); background: var(--container); border-radius: 8px; padding: 2px 10px; margin-bottom: 4px; }
.m { max-width: 82%; padding: 7px 11px 6px; border-radius: 16px; background: var(--bubble-in); box-shadow: 0 0 0 1px var(--line); }
.m.in { align-self: flex-start; border-end-start-radius: 5px; }
.m.out { align-self: flex-end; background: var(--bubble-out); box-shadow: none; border-end-end-radius: 5px; }
.m i { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--primary); margin-bottom: 1px; }
.m s { text-decoration: none; float: inline-end; font-size: 10.5px; color: var(--muted); margin-inline-start: 8px; margin-top: 4px; }
.m.photo { padding: 4px 4px 6px; }
.m.photo i { margin: 3px 7px 4px; }
.m.photo > span:not(.pic) { padding: 0 7px; }
.pic {
  display: block; width: 190px; max-width: 100%; height: 108px; border-radius: 12px; margin-bottom: 5px;
  background:
    radial-gradient(circle at 75% 30%, #F4D8A0 0 14px, transparent 15px),
    linear-gradient(180deg, transparent 62%, #8DB38A 62%),
    linear-gradient(180deg, #BFD6E6, #E3EDF3);
}
.react { align-self: flex-start; font-size: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); border-radius: 999px; padding: 1px 8px; margin-top: -2px; }
.m.call { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.callicon { font-size: 12px; }
.input { display: flex; align-items: center; gap: 8px; padding: 8px 10px 16px; }
.input > span { flex: 1; background: var(--high); color: var(--muted); border-radius: 999px; padding: 9px 14px; }
.input b { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; font-size: 15px; }

/* ----- sections ----- */
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -.5px; margin: 0 0 12px; font-weight: 650; }
html[lang="ar"] h2 { letter-spacing: 0; font-weight: 600; }
h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.section-lead { color: var(--muted); margin: 0 0 28px; max-width: 40em; }

.steps-wrap { background: var(--container); padding: 64px 0; }
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: var(--card); border-radius: var(--radius); padding: 26px 26px 18px; box-shadow: var(--shadow); }
.card h3 svg { color: var(--primary); flex: none; }
.card.mine { box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
ol { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: step; }
ol li { counter-increment: step; position: relative; padding-inline-start: 44px; margin-bottom: 16px; }
ol li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 600; font-size: 15px;
}
html.launched [data-testing] { display: none; }

#features { padding-top: 72px; padding-bottom: 72px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.feat { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feat p { margin: 0; color: var(--muted); font-size: 15.5px; }
.ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }

.private-wrap { background: var(--primary-soft); color: var(--on-primary-soft); padding: 64px 0; }
.private { display: flex; gap: 28px; align-items: flex-start; }
.lock { flex: none; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.ticks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; max-width: 46em; }
.ticks li { position: relative; padding-inline-start: 30px; }
.ticks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; font-weight: 700; color: var(--primary); }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding-top: 32px; padding-bottom: 40px; color: var(--muted); font-size: 15px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.foot-brand img { border-radius: 8px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.copy { margin: 0; width: 100%; font-size: 14px; }

/* ----- smaller screens ----- */
@media (max-width: 960px) {
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 12px; }
  .platforms { grid-template-columns: 1fr; }
  .phone { width: 290px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .lead { font-size: 17px; }
  .get { flex-direction: column; }
  .btn { width: 100%; }
  .features { grid-template-columns: 1fr; }
  .private { flex-direction: column; gap: 18px; }
  .card { padding: 22px 18px 10px; }
  .steps-wrap, .private-wrap { padding: 48px 0; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
