/* جهبذ — landing page
   Layout: a dark "shop counter" hero (the app's own chrome colour), then
   paper-coloured sections; voice examples read as spoken line → screen.
   Colours are the app's own (stocktaking/lib/const/app_theme.dart). */
:root {
  --ink: #2B2118;          /* app chrome / text */
  --ink-2: #4F4337;        /* secondary text */
  --paper: #F3EADB;        /* app background */
  --paper-2: #FFFCF6;      /* app surface */
  --line: #E3D6C1;         /* app outline */
  --green: #166534;        /* app primary */
  --green-soft: #E8F0E9;
  --amber: #B47A12;        /* logo dot on light */
  --amber-hi: #F2B544;     /* logo dot on dark */
  --amber-soft: #FBEED3;

  --f-display: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --f-body: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;

  --step--1: 0.95rem;
  --step-0: 1.125rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(1.85rem, 1.3rem + 2.2vw, 2.6rem);
  --step-4: clamp(2.1rem, 1.4rem + 2.6vw, 3rem);

  --wrap: 1120px;
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--amber-hi); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1.4; margin: 0; text-wrap: balance; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.eyebrow::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-head { display: grid; gap: .75rem; max-width: 40rem; margin-bottom: 2.75rem; }
.section-head p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.8; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(243, 234, 219, .08);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--paper); text-decoration: none; font-family: var(--f-display); font-size: 1.5rem; font-weight: 800; }
.brand svg { width: 34px; height: 36px; }
.nav { display: flex; gap: 1.5rem; margin-inline-start: auto; }
.nav a { color: rgba(243, 234, 219, .85); text-decoration: none; font-size: 1rem; font-weight: 500; }
.nav a:hover { color: var(--paper); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .55rem 1.3rem;
  border-radius: 999px; font: 700 var(--step-0)/1 var(--f-body);
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #12542b; }
.btn-sm { min-height: 40px; padding-inline: 1rem; font-size: var(--step--1); }

@media (max-width: 760px) { .nav { display: none; } .site-header .btn { margin-inline-start: auto; } }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: var(--paper); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 3rem;
  padding-block: clamp(3rem, 7vw, 5.5rem) 0;
}
.hero-copy { display: grid; gap: 1.5rem; padding-bottom: clamp(3rem, 7vw, 5.5rem); min-width: 0; }
.hero h1 { font-size: var(--step-4); line-height: 1.3; }
.nw { white-space: nowrap; }
.hero h1 .dot { color: var(--amber-hi); }
.hero .lead { font-size: var(--step-1); line-height: 1.8; color: rgba(243, 234, 219, .82); max-width: 34rem; }
.hero .eyebrow { color: var(--amber-hi); }
.stores { display: flex; flex-wrap: wrap; gap: .75rem; }
.store {
  display: inline-flex; align-items: center; gap: .7rem;
  min-height: 56px; padding: .5rem 1.15rem .5rem 1.3rem;
  border-radius: 14px; text-decoration: none;
  background: var(--paper); color: var(--ink);
  transition: transform .15s ease;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: grid; line-height: 1.2; }
.store small { font-size: .78rem; color: var(--ink-2); }
.store b { font-size: 1.08rem; font-family: "Inter", "Segoe UI", Arial, sans-serif; direction: ltr; text-align: start; }
.store.is-soon { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(243, 234, 219, .35); }
.store.is-soon small { color: rgba(243, 234, 219, .7); }
.hero-note { font-size: var(--step--1); color: rgba(243, 234, 219, .6); }

.hero-visual { position: relative; align-self: end; display: flex; justify-content: center; min-width: 0; }
.phone {
  width: min(310px, 78vw);
  border-radius: 44px 44px 0 0;
  padding: 12px 12px 0;
  background: #120d09;
  box-shadow: 0 0 0 1.5px rgba(243, 234, 219, .12), 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.phone img { border-radius: 33px 33px 0 0; width: 100%; height: auto; aspect-ratio: 1206 / 1780; object-fit: cover; object-position: 0 9%; }
.said {
  position: absolute; inset-inline-start: -2.5rem; top: 12%;
  max-width: 15.5rem;
  background: var(--paper-2); color: var(--ink);
  border-radius: 18px 18px 18px 4px;
  padding: .85rem 1rem; font-size: .98rem; line-height: 1.55;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  display: flex; gap: .6rem; align-items: flex-start;
}
.said svg { flex: none; width: 20px; height: 20px; margin-top: .2rem; color: var(--green); }
@media (prefers-reduced-motion: no-preference) {
  .said { animation: rise .7s .3s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes rise { from { transform: translateY(14px); opacity: .0; } to { transform: none; opacity: 1; } }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 1rem; }
  .hero-copy { padding-bottom: 1rem; }
  .hero-visual { padding-top: .5rem; }
  .said { inset-inline-start: 0; top: 0; }
}

/* ---------- voice ---------- */
.voice .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.voice .section-head { margin-bottom: 1.75rem; }
.lines { display: grid; gap: .85rem; list-style: none; margin: 0; padding: 0; }
.line {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem 1rem;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.line q { quotes: "«" "»"; font-weight: 500; min-width: 0; }
.line .to {
  font-size: var(--step--1); font-weight: 700; color: var(--green);
  background: var(--green-soft); border-radius: 999px; padding: .2rem .8rem; white-space: nowrap;
}
.line.ask .to { color: #92400E; background: var(--amber-soft); }
.trust {
  margin-top: 1.5rem; display: flex; gap: .75rem; align-items: flex-start;
  padding: 1rem 1.15rem; border-radius: var(--radius); background: var(--ink); color: var(--paper);
}
.trust svg { flex: none; width: 22px; height: 22px; color: var(--amber-hi); margin-top: .25rem; }
.voice-shot { display: flex; justify-content: center; position: sticky; top: 90px; }
.voice-shot img { width: min(330px, 100%); border-radius: 30px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(43, 33, 24, .45); }
@media (max-width: 860px) {
  .voice .wrap { grid-template-columns: 1fr; }
  .voice-shot { position: static; }
}
@media (max-width: 480px) { .line { grid-template-columns: 1fr; } .line .to { justify-self: start; } }

/* ---------- features ---------- */
.features { background: var(--paper-2); border-block: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--paper-2); padding: 1.75rem 1.5rem; display: grid; gap: .75rem; align-content: start; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.feature .ico svg { width: 24px; height: 24px; }
.feature ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; color: var(--ink-2); }
.feature li { position: relative; padding-inline-start: 1rem; line-height: 1.75; }
.feature li::before { content: ""; position: absolute; inset-inline-start: 0; top: .8em; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.shots { margin-top: 2.5rem; display: flex; justify-content: safe center; gap: 1.25rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 auto; width: 220px; scroll-snap-align: start; display: grid; gap: .6rem; }
.shots img { border-radius: 24px; box-shadow: 0 0 0 1px var(--line); aspect-ratio: 1206 / 2622; object-fit: cover; background: var(--paper); }
.shots figcaption { font-size: var(--step--1); color: var(--ink-2); text-align: center; }

/* ---------- shops ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.shop {
  border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .6rem; align-content: start;
  background: var(--paper-2); border: 1px solid var(--line);
}
.shop .tag { font-size: var(--step--1); color: var(--ink-2); }
.shop .uses { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.shop .uses span { font-size: .85rem; font-weight: 500; padding: .15rem .65rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.shop.any { background: var(--green); color: #fff; border-color: var(--green); }
.shop.any .tag { color: rgba(255, 255, 255, .85); }
.shop.any a { color: #fff; font-weight: 700; }
@media (max-width: 900px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .shop-grid { grid-template-columns: 1fr; } }

/* ---------- why: comparison ---------- */
.cmp { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.cmp-row { display: grid; grid-template-columns: 11rem 1fr 1.25fr; }
.cmp-row + .cmp-row { border-top: 1px solid var(--line); }
.cmp-row > * { padding: 1rem 1.25rem; min-width: 0; }
.cmp-row b { font-weight: 700; }
.cmp-old { color: var(--ink-2); }
.cmp-new { background: var(--green-soft); color: #14532D; font-weight: 500; }
.cmp-head { font-size: var(--step--1); font-weight: 700; color: var(--ink-2); }
.cmp-head .cmp-new { background: var(--green); color: #fff; font-size: var(--step-0); }
@media (max-width: 720px) {
  .cmp-head { display: none; }
  .cmp-row { grid-template-columns: 1fr; }
  .cmp-row > * { padding: .7rem 1.1rem; }
  .cmp-row b { padding-bottom: 0; padding-top: 1rem; }
  .cmp-old::before, .cmp-new::before { display: block; font-size: .82rem; font-weight: 700; opacity: .75; }
  .cmp-old::before { content: "برنامج محاسبة عادي"; }
  .cmp-new::before { content: "جهبذ"; }
}

/* ---------- day in the shop ---------- */
.day .section-head, .why .section-head { max-width: 48rem; }
.day { background: var(--paper-2); border-block: 1px solid var(--line); }
.day-list { list-style: none; margin: 0; padding: 0; display: grid; }
.day-list li {
  display: grid; grid-template-columns: 13.5rem 1fr 1.15fr; gap: .4rem 2rem; align-items: baseline;
  padding-block: 1.35rem; border-top: 1px solid var(--line);
}
.day-list li:last-child { border-bottom: 1px solid var(--line); }
.day-list .when { font-weight: 700; color: var(--amber); display: inline-flex; align-items: baseline; gap: .6rem; }
.day-list .when::before { content: ""; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--amber); transform: translateY(-.05em); }
.day-list h3 { font-size: 1.2rem; line-height: 1.6; }
.day-list p { color: var(--ink-2); padding-inline-start: 1rem; border-inline-start: 3px solid var(--green); }
@media (max-width: 860px) {
  .day-list li { grid-template-columns: 1fr; gap: .45rem; }
}

/* ---------- faq ---------- */
.faq .wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.faq-list { display: grid; gap: .75rem; }
.faq details { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 0 1.2rem; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 0; font-weight: 700;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--green); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1.1rem; color: var(--ink-2); }
@media (max-width: 860px) { .faq .wrap { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- contact / footer ---------- */
.contact { padding-block: 0 clamp(4rem, 8vw, 6rem); }
.contact-card {
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2rem; align-items: center;
  background: var(--amber-soft); border: 1px solid #EAD7AE; border-radius: 24px; padding: clamp(1.5rem, 4vw, 2.5rem);
}
.contact-card p { color: var(--ink-2); margin-top: .4rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn svg { width: 20px; height: 20px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 760px) { .contact-card { grid-template-columns: 1fr; } }

.site-footer { background: var(--ink); color: rgba(243, 234, 219, .7); font-size: var(--step--1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-block: 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- partner ---------- */
.partner { background: var(--green); color: #fff; }
.partner .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.partner-copy { display: grid; gap: 1.1rem; justify-items: start; min-width: 0; }
.partner .eyebrow { color: var(--amber-hi); }
.partner-copy p { font-size: var(--step-1); line-height: 1.8; color: rgba(255, 255, 255, .88); max-width: 36rem; }
.partner .btn-green { background: var(--paper); color: var(--ink); }
.partner .btn-green:hover { background: #fff; }
.partner-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; counter-reset: step; }
.partner-steps li {
  counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: .15rem 1rem; align-items: start;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.partner-steps li::before {
  content: counter(step); grid-row: span 2;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--amber-hi); color: var(--ink); font-weight: 800; font-size: 1.1rem;
}
.partner-steps b { font-size: var(--step-1); }
.partner-steps span { color: rgba(255, 255, 255, .82); line-height: 1.7; }
@media (max-width: 860px) { .partner .wrap { grid-template-columns: 1fr; } }

/* ---------- small print + optional add-on ---------- */
.fine { font-size: var(--step--1); color: var(--ink-2); }
.feature-note { margin-top: 1.25rem; }
.addon-wrap { padding-block: 0 clamp(4rem, 8vw, 6.5rem); }
.addon {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem clamp(1.5rem, 4vw, 3rem); align-items: center;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 24px; padding: clamp(1.5rem, 4vw, 2.5rem);
}
.addon-copy { display: grid; gap: .8rem; justify-items: start; min-width: 0; }
.addon h2 { font-size: var(--step-2); }
.addon-copy p:not(.fine) { color: var(--ink-2); }
.badge { font-size: .85rem; font-weight: 700; color: #92400E; background: var(--amber-soft); border: 1px solid #EAD7AE; border-radius: 999px; padding: .15rem .8rem; }
.addon .line { background: var(--paper); }
@media (max-width: 860px) { .addon { grid-template-columns: 1fr; } }

/* ---------- story ---------- */
.story-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: st; }
.story-steps li { counter-increment: st; position: relative; display: grid; gap: .5rem; align-content: start; padding-top: 3.6rem; }
.story-steps li::before {
  content: counter(st); position: absolute; top: 0; inset-inline-start: 0; z-index: 1;
  width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-weight: 800; font-size: 1.15rem;
}
.story-steps li::after {
  content: ""; position: absolute; top: 1.3rem; inset-inline-start: 2.6rem; inset-inline-end: -2rem; height: 2px; background: var(--line);
}
.story-steps li:last-child::before { background: var(--amber); color: #fff; }
.story-steps li:last-child::after { display: none; }
.story-steps p { color: var(--ink-2); }
.story-next { margin-top: 2.5rem; font-size: var(--step-1); font-weight: 500; }
.story-next a { font-weight: 700; }
@media (max-width: 900px) {
  .story-steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .story-steps li { padding-top: 0; padding-inline-start: 3.6rem; }
  .story-steps li::after { top: 2.6rem; bottom: -1.75rem; inset-inline-start: 1.3rem; inset-inline-end: auto; width: 2px; height: auto; }
}
.story { background: var(--paper-2); border-bottom: 1px solid var(--line); }

/* ---------- devices ---------- */
.store.web b { font-family: var(--f-body); direction: rtl; font-size: 1.02rem; }
.devices { background: var(--ink); color: var(--paper); }
.devices .eyebrow { color: var(--amber-hi); }
.devices .section-head p { color: rgba(243, 234, 219, .78); }
.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.device {
  display: grid; gap: .6rem; align-content: start; justify-items: start;
  border: 1px solid rgba(243, 234, 219, .16); background: rgba(243, 234, 219, .05); border-radius: var(--radius); padding: 1.5rem;
}
.device svg { width: 38px; height: 38px; color: var(--amber-hi); }
.device p { color: rgba(243, 234, 219, .78); }
.device a { color: var(--paper); font-weight: 700; margin-top: .25rem; }
.device-note { margin-top: 1.75rem; color: rgba(243, 234, 219, .85); font-weight: 500; }
@media (max-width: 860px) { .device-grid { grid-template-columns: 1fr; } }

/* ---------- desktop frame + hero composite ---------- */
.desk { margin: 0; background: #120d09; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1.5px rgba(243, 234, 219, .14), 0 40px 80px -30px rgba(0, 0, 0, .7); }
.desk-bar { height: 30px; display: flex; align-items: center; gap: 7px; padding-inline: 14px; direction: ltr; }
.desk-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(243, 234, 219, .28); }
.desk img { width: 100%; height: auto; }
.hero .wrap { grid-template-columns: 1.2fr 1fr; gap: 2rem; }
.hero-visual { display: block; padding-top: 1rem; }
.hero-visual .desk { border-radius: 14px 14px 0 0; }
.hero-visual .phone {
  position: absolute; bottom: 0; inset-inline-end: -1.25rem; width: 34%;
  border-radius: 24px 24px 0 0; padding: 6px 6px 0;
}
.hero-visual .phone img { border-radius: 18px 18px 0 0; aspect-ratio: 1206 / 1900; object-position: 0 9%; }
.desk-wide { margin-bottom: 1.5rem; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { padding-top: .5rem; }
  .hero-visual .phone { inset-inline-end: -.25rem; width: 36%; border-radius: 18px 18px 0 0; padding: 4px 4px 0; }
  .hero-visual .phone img { border-radius: 14px 14px 0 0; }
  .desk-bar { height: 22px; }
  .desk-bar i { width: 7px; height: 7px; }
}
