/* ==================================================================
   Savio — public site + user app design system (light "Instinct" style)
   Warm cream background, Poppins (Latin) / Tajawal (Arabic) type,
   dark-brown pill CTAs.
   The OWNER dashboard keeps its own dark stylesheet (style.css).
   ================================================================== */
:root {
  --cream: #FAF6EF;
  --cream-2: #FBF8F3;
  --card: #FFFFFF;
  --ink: #3E2723;
  --body: #5D4A43;
  --muted: #9A877E;
  --line: #EAE0D2;
  --line-soft: #F0E7DA;
  --brown: #43302B;
  --brown-hover: #37251F;
  --green: #25D366;
  --green-dark: #128C4B;
  --green-soft: #E7F6EC;
  --sage: #8FAE94;
  --danger: #C0392B;
  --radius: 20px;
  --shadow: 0 10px 34px rgba(67, 48, 43, .08);
  --display: "Poppins", "Tajawal", "Segoe UI", sans-serif;
  --sans: "Poppins", "Tajawal", "Segoe UI", Tahoma, sans-serif;
}
/* Arabic pages (marketing AR + the Arabic app flow): Tajawal leads,
   so Arabic headings/body render in Tajawal throughout. */
html[lang="ar"] {
  --display: "Tajawal", "Poppins", "Segoe UI", sans-serif;
  --sans: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site {
  margin: 0; background: var(--cream); color: var(--body);
  font-family: var(--sans); font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: var(--display); color: var(--ink); font-weight: 700; line-height: 1.35; margin: 0; }
a { color: var(--brown); }
button, input, select, textarea { font-family: inherit; }
img, svg { vertical-align: middle; }

.wrap { width: min(1120px, 92vw); margin: 0 auto; }
.narrow { width: min(560px, 92vw); margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-size: 16px; font-weight: 600; padding: 13px 30px; text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brown); color: #FFF7EE; }
.btn-primary:hover { background: var(--brown-hover); }
.btn-secondary { background: var(--card); color: var(--brown); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-whatsapp { background: var(--green); color: #FFFFFF; }
.btn-whatsapp:hover { background: #1FB457; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 20px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 246, 239, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; gap: 26px; padding: 14px 0; }
.brand { font-family: var(--display); font-size: 27px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand small { font-family: var(--sans); font-size: 13px; color: var(--green-dark); font-weight: 700; letter-spacing: .4px; }
.main-nav { display: flex; gap: 22px; margin-inline-start: 8px; }
.main-nav a { color: var(--body); text-decoration: none; font-size: 15px; }
.main-nav a:hover { color: var(--ink); }
.header-cta { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }
@media (max-width: 720px) { .main-nav { display: none; } }

.site-footer { border-top: 1px solid var(--line-soft); margin-top: 80px; padding: 34px 0 46px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.site-footer nav { display: flex; gap: 18px; margin-inline-start: auto; }
.site-footer a { color: var(--body); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 72px 0 30px; }
.hero .kicker { display: inline-block; background: var(--green-soft); color: var(--green-dark); border-radius: 999px; padding: 4px 16px; font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: clamp(38px, 6vw, 58px); margin-bottom: 16px; }
.hero p.lead { font-size: clamp(17px, 2.4vw, 21px); color: var(--body); max-width: 640px; margin: 0 auto 30px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .fine { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* phone mockup chat */
.phone-stage { display: flex; justify-content: center; padding: 44px 0 8px; }
.phone {
  width: min(340px, 88vw); background: var(--card); border: 1px solid var(--line);
  border-radius: 34px; box-shadow: var(--shadow); padding: 14px 14px 20px; text-align: start;
}
.phone-head { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; border-bottom: 1px solid var(--line-soft); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brown); color: #FFF7EE; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 19px; flex: none; }
.phone-head b { color: var(--ink); display: block; line-height: 1.3; }
.phone-head small { color: var(--green-dark); font-size: 12px; }
.chat-flow { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.6; }
.bubble.in { background: #F3EDE3; color: var(--ink); align-self: flex-start; border-start-start-radius: 4px; }
.bubble.out { background: var(--green-soft); color: var(--ink); align-self: flex-end; border-start-end-radius: 4px; }
.bubble .t { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; text-align: end; }

/* ---------- sections ---------- */
.section { padding: 58px 0 6px; }
.section h2 { font-size: clamp(28px, 4vw, 38px); text-align: center; margin-bottom: 10px; }
.section .sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 34px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px; box-shadow: 0 4px 18px rgba(67,48,43,.04);
}
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { margin: 0; font-size: 15px; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brown); color: #FFF7EE;
  font-family: var(--display); font-size: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .features-grid { grid-template-columns: 1fr; } }
.icon-tile {
  width: 46px; height: 46px; border-radius: 14px; background: var(--cream);
  border: 1px solid var(--line-soft); display: inline-flex; align-items: center; justify-content: center;
  color: var(--brown); margin-bottom: 12px; flex: none;
}
.icon-tile.green { background: var(--green-soft); color: var(--green-dark); border-color: transparent; }
.banner {
  background: var(--brown); color: #F7EDE3; border-radius: 26px; padding: 42px 34px; text-align: center;
}
.banner h2 { color: #FFF7EE; }
.banner p { color: #D9C6B8; max-width: 560px; margin: 10px auto 24px; }
.banner .btn-primary { background: #FFF7EE; color: var(--brown); }
.banner .btn-primary:hover { background: #FFFFFF; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.faq-q { width: 100%; background: none; border: 0; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; font-size: 16.5px; font-weight: 600; color: var(--ink); text-align: start; }
.faq-q .chev { transition: transform .2s ease; color: var(--muted); flex: none; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 22px 20px; font-size: 15px; }
.faq-item.open .faq-a { display: block; }
.faq-a p { margin: 0 0 10px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- prose pages ---------- */
.prose { max-width: 780px; margin: 0 auto; padding: 46px 0 10px; }
.prose h1 { font-size: 36px; margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.prose h2 { font-size: 23px; margin: 30px 0 8px; }
.prose p, .prose li { font-size: 15.5px; }
.prose ul { padding-inline-start: 22px; }

/* ==================================================================
   APP FLOW (join / verify / profile / invite / channel / account)
   ================================================================== */
.app-stage { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 34px 16px 110px; }
.app-brand { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 26px; }
.app-brand small { font-family: var(--sans); font-size: 13px; color: var(--green-dark); font-weight: 700; }
.app-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 24px;
  box-shadow: var(--shadow); padding: 32px 30px; width: min(94vw, 460px);
}
.app-card.wide { width: min(94vw, 560px); }
.app-card h1 { font-size: 30px; margin-bottom: 6px; }
.app-card .sub { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.app-card h2.sec { font-size: 21px; margin: 26px 0 10px; }
.app-card h2.sec:first-child { margin-top: 0; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; color: var(--body); margin-bottom: 7px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; background: #FFF; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; font-size: 16px; color: var(--ink); outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brown); box-shadow: 0 0 0 3px rgba(67,48,43,.08); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.terms-line { font-size: 13px; color: var(--muted); text-align: center; margin-top: 18px; line-height: 1.8; }
.form-error { background: #FDECEA; color: var(--danger); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.form-note { background: var(--green-soft); color: var(--green-dark); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }

/* phone field with country selector */
.phone-field { display: flex; gap: 10px; }
.phone-field select {
  flex: none; width: 118px; background: #FFF; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 10px; font-size: 16px; color: var(--ink); outline: none;
}
.phone-field input { flex: 1; direction: ltr; text-align: left; letter-spacing: .3px; }

/* OTP boxes */
.wa-badge {
  width: 54px; height: 54px; border-radius: 16px; background: var(--green);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 16px;
}
.otp-row { display: flex; gap: 9px; direction: ltr; justify-content: center; margin: 8px 0 20px; }
.otp-box {
  width: 50px; height: 60px; border: 1.5px solid var(--line); border-radius: 14px; background: #FFF;
  text-align: center; font-size: 25px; font-weight: 700; color: var(--ink); outline: none; padding: 0;
}
.otp-box:focus { border-color: var(--brown); box-shadow: 0 0 0 3px rgba(67,48,43,.08); }
.resend-line { text-align: center; font-size: 14.5px; color: var(--body); margin-top: 18px; }
.resend-line button { background: none; border: 0; color: var(--brown); font-weight: 700; cursor: pointer; font-size: 14.5px; padding: 0; }
.resend-line button[disabled] { color: var(--muted); cursor: default; }

/* choice cards (channel step) */
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: start;
  background: #FFF; border: 1.5px solid var(--line); border-radius: 18px; padding: 16px 18px;
  cursor: pointer; margin-bottom: 12px; color: var(--ink);
}
.choice .icon-tile { margin: 0; width: 48px; height: 48px; border-radius: 14px; }
.choice b { display: block; font-size: 16.5px; }
.choice small { color: var(--muted); font-size: 13.5px; }
.choice .radio {
  margin-inline-start: auto; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line); flex: none; position: relative; background: #FFF;
}
.choice.selected { border-color: var(--brown); }
.choice.selected .radio { background: var(--sage); border-color: var(--sage); }
.choice.selected .radio::after {
  content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #FFF;
}
.choice.disabled { opacity: .55; cursor: not-allowed; }
.soon-tag { background: var(--cream); border: 1px solid var(--line); color: var(--muted); font-size: 12px; border-radius: 999px; padding: 2px 10px; font-weight: 600; }

/* invite progress + code */
.progress-track { background: var(--cream); border: 1px solid var(--line-soft); height: 12px; border-radius: 999px; overflow: hidden; }
.progress-fill { background: var(--sage); height: 100%; width: 0; transition: width .5s ease; }
.link-row { display: flex; gap: 9px; }
.link-row input {
  flex: 1; direction: ltr; text-align: left; font-size: 13.5px; background: var(--cream-2);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--body); min-width: 0;
}
.code-box {
  background: var(--cream-2); border: 1.5px dashed var(--sage); border-radius: 16px; padding: 16px;
  text-align: center; font-size: 27px; font-weight: 800; letter-spacing: 4px; direction: ltr; color: var(--ink);
}

/* list rows (account workspace) */
.list-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: 0; }
.list-row .icon-tile { margin: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row b { color: var(--ink); display: block; font-size: 15.5px; line-height: 1.5; }
.list-row small { color: var(--muted); font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .chev { color: var(--muted); flex: none; }
.icon-btn {
  background: var(--cream); border: 1px solid var(--line-soft); color: var(--body);
  width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line); }
.change-btn {
  background: #FFF; border: 1px solid var(--line); color: var(--brown); border-radius: 999px;
  padding: 7px 18px; font-size: 14px; font-weight: 600; cursor: pointer; flex: none;
}
.change-btn:hover { border-color: var(--muted); }
.sec-title { font-size: 21px; margin: 28px 0 12px; }
.sec-title:first-of-type { margin-top: 4px; }

/* toggle switch */
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: #D8CBBB; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFF; transition: .2s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--sage); }
.switch input:checked + .track::after { transform: translateX(-22px); }

/* chips */
.chip { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: 12.5px; font-weight: 700; background: var(--cream); color: var(--muted); border: 1px solid var(--line); }
.chip.on { background: var(--green-soft); color: var(--green-dark); border-color: transparent; }

/* floating bottom tab bar */
.tabbar {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 30;
  background: var(--brown); border-radius: 999px; padding: 9px 12px;
  display: flex; gap: 6px; box-shadow: 0 14px 34px rgba(62,39,35,.35);
}
.tabbar a {
  width: 52px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  color: #D9C6B8; text-decoration: none;
}
.tabbar a.active { background: rgba(255,247,238,.16); color: #FFF7EE; }
.tabbar a:hover { color: #FFF7EE; }

/* vault */
.vault-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.vault-tabs button {
  background: #FFF; border: 1px solid var(--line); color: var(--body); border-radius: 999px;
  padding: 8px 18px; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.vault-tabs button.active { background: var(--brown); color: #FFF7EE; border-color: var(--brown); }
.add-fab {
  position: fixed; bottom: 92px; inset-inline-end: max(18px, calc(50vw - 280px)); z-index: 30;
  background: var(--brown); color: #FFF7EE; border: 0; border-radius: 999px; padding: 13px 24px;
  font-size: 15.5px; font-weight: 700; cursor: pointer; box-shadow: 0 12px 28px rgba(62,39,35,.32);
  display: inline-flex; align-items: center; gap: 8px;
}
.add-fab:hover { background: var(--brown-hover); }
.masked { direction: ltr; unicode-bidi: embed; letter-spacing: 1px; }
.empty-note { color: var(--muted); font-size: 14.5px; text-align: center; padding: 20px 0 6px; }
.danger-link { color: var(--danger); background: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 600; padding: 0; }
dialog.sheet {
  border: 1px solid var(--line-soft); border-radius: 22px; padding: 0; width: min(94vw, 480px);
  background: var(--card); color: var(--body); box-shadow: var(--shadow);
}
dialog.sheet::backdrop { background: rgba(62,39,35,.4); }
.sheet-inner { padding: 28px; }
.sheet-inner h3 { font-size: 22px; margin-bottom: 16px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; }

@media (max-width: 560px) {
  .app-card { padding: 26px 20px; }
  .otp-box { width: 44px; height: 54px; font-size: 22px; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
}

/* ==================================================================
   MARKETING SITE v2 (Yolias-style rebuild, bilingual EN/AR)
   New classes only — the app-flow styles above are unchanged.
   ================================================================== */

/* logo lockups */
.brand-logo { height: 36px; width: auto; display: block; }
.site-footer .brand-logo { height: 30px; }
.phone-head .avatar { background: transparent; }
.phone-head .avatar img { width: 40px; height: 40px; border-radius: 12px; display: block; }

/* language switcher */
.lang-switch {
  font-weight: 700; color: var(--brown); text-decoration: none; font-size: 15px;
  padding: 6px 2px; white-space: nowrap;
}
.lang-switch:hover { color: var(--ink); text-decoration: underline; }

/* mobile menu (marketing pages) */
.nav-toggle {
  display: none; background: none; border: 0; color: var(--brown);
  cursor: pointer; padding: 6px; align-items: center;
}
.mobile-menu {
  display: none; flex-direction: column; padding: 8px 4vw 18px;
  border-top: 1px solid var(--line-soft); background: rgba(250, 246, 239, .98);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 11px 6px; color: var(--body); text-decoration: none; font-size: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu a.btn { border-bottom: 0; margin-top: 12px; color: #FFF7EE; }
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .header-cta .btn-secondary { display: none; }
}
@media (min-width: 721px) { .mobile-menu { display: none !important; } }

/* channels strip */
.channels-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 860px; margin: 0 auto; }
@media (max-width: 720px) { .channels-strip { grid-template-columns: 1fr; } }
.channel-card {
  display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px 20px;
}
.channel-card .icon-tile { margin: 0; }
.channel-card b { color: var(--ink); font-size: 17px; }
.channel-card .chip { margin-inline-start: auto; }

/* who-it-is-for grid */
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1020px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards-4 { grid-template-columns: 1fr; } }

/* founder block */
.founder-card {
  display: flex; gap: 32px; align-items: center; background: var(--card);
  border: 1px solid var(--line-soft); border-radius: 26px; padding: 36px;
  box-shadow: var(--shadow);
}
.founder-photo {
  width: 172px; height: 172px; object-fit: cover; object-position: top;
  border-radius: 22px; flex: none; border: 1px solid var(--line);
}
.founder-body .kicker {
  display: inline-block; background: var(--green-soft); color: var(--green-dark);
  border-radius: 999px; padding: 4px 16px; font-size: 14px; font-weight: 600; margin-bottom: 14px;
}
.founder-body blockquote {
  font-family: var(--display); font-size: clamp(19px, 2.6vw, 24px); line-height: 1.75;
  color: var(--ink); margin: 0 0 18px;
}
.founder-name { font-weight: 700; color: var(--ink); font-size: 17px; }
.founder-role { color: var(--muted); font-size: 14.5px; }
.founder-social { display: flex; gap: 10px; margin-top: 16px; }
.founder-social a {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: #FFF; color: var(--brown); display: inline-flex; align-items: center; justify-content: center;
}
.founder-social a:hover { color: var(--ink); border-color: var(--muted); }
@media (max-width: 720px) {
  .founder-card { flex-direction: column; text-align: center; padding: 28px 22px; }
  .founder-photo { width: 144px; height: 144px; }
  .founder-social { justify-content: center; }
}

/* invite banner logo */
.banner-logo { height: 42px; width: auto; margin-bottom: 18px; }
