/* ==========================================================================
   Lienda Shop — website styles
   Mirrors the Flutter app: #64B5F6 primary, #E53935 section headings,
   #535353 body text, white cards on #F5F5F5, soft shadows, rounded corners.
   Layout uses CSS logical properties, so the Arabic (dir="rtl") pages mirror
   without a second stylesheet.
   ========================================================================== */

:root {
  --blue:        #64b5f6;   /* app primary — surfaces, accents, never small text */
  --blue-dark:   #1565c0;   /* interactive: AA for white text on it, and for links on grey */
  --blue-darker: #10508f;
  --blue-tint:   #e8f4fe;
  --red:         #e53935;   /* section headings only (AA-large: ≥24px bold) */
  --red-dark:    #c62828;   /* red on white for smaller text */
  --ink:         #535353;   /* app body text colour */
  --ink-strong:  #2f2f2f;
  --muted:       #686b6f;
  --line:        #e2e5e9;
  --surface:     #f5f5f5;
  --white:       #ffffff;
  --green:       #43a047;

  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
  --shadow:    0 2px 10px rgba(0, 0, 0, .08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .12);

  --container: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-ar: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Traditional Arabic", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;            /* belt and braces: never scroll sideways */
}

html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.9; }

img { max-width: 100%; height: auto; }

a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue-darker); }

h1, h2, h3, h4 { color: var(--ink-strong); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.95rem); color: var(--red); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 18px; }

.skip-link {
  position: absolute; inset-block-start: -60px; inset-inline-start: 12px; z-index: 200;
  background: var(--blue-dark); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 8px; text-decoration: none;
}
.skip-link:focus { inset-block-start: 0; }

:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 3px solid var(--blue-dark); outline-offset: 2px; border-radius: 6px;
}

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(10px);
  border-block-end: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 66px; }
/* direction:ltr keeps the Latin lockup reading "Lienda Shop" on the RTL pages */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: none; direction: ltr; }
.brand img { display: block; block-size: 34px; inline-size: auto; }
.brand span { font-weight: 700; color: var(--ink-strong); font-size: 1.05rem; }

.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500;
  padding: 8px 11px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { background: var(--blue-tint); color: var(--blue-darker); }
.nav a[aria-current="page"] { color: var(--blue-darker); background: var(--blue-tint); font-weight: 600; }

/* Language switcher */
.langs { display: inline-flex; gap: 2px; background: var(--surface); border-radius: 999px; padding: 3px; margin-inline-start: 6px; }
.langs a {
  font-size: .82rem; font-weight: 700; text-decoration: none; color: var(--ink);
  padding: 5px 11px; border-radius: 999px; line-height: 1.4;
}
.langs a:hover { background: #fff; }
.langs a[aria-current="true"] { background: var(--blue-dark); color: #fff; }

.nav-toggle {
  display: none; font: inherit; font-size: 1.3rem; line-height: 1; color: var(--ink-strong);
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; cursor: pointer;
  margin-inline-start: auto;
}

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .header-inner { position: relative; }
  .nav {
    display: none; position: absolute; inset-inline: 0; inset-block-start: calc(100% + 6px);
    flex-direction: column; align-items: stretch; gap: 2px; margin-inline-start: 0;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 10px; box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; }
  .langs { margin-inline-start: 0; margin-block-start: 6px; justify-content: center; }
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue-dark); color: #fff; box-shadow: 0 4px 14px rgba(21, 101, 192, .3); }
.btn-primary:hover { background: var(--blue-darker); color: #fff; }
.btn-outline { background: #fff; color: var(--blue-darker); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-tint); color: var(--blue-darker); }
.btn-wide { width: 100%; }

/* App store badges */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: #1f2429; color: #fff; padding: 9px 18px; border-radius: 12px;
  transition: background .12s ease, transform .12s ease;
}
.store-badge:hover { background: #313840; color: #fff; transform: translateY(-1px); }
.store-badge svg { flex: none; }
.store-badge b { display: block; font-size: 1rem; font-weight: 600; line-height: 1.2; }
.store-badge small { display: block; font-size: .68rem; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }
html[lang="ar"] .store-badge small { letter-spacing: normal; text-transform: none; }

/* --- Sections ------------------------------------------------------------- */
.section { padding-block: clamp(46px, 6vw, 76px); }
.section-alt { background: var(--surface); }
.section-head { max-width: 640px; margin-inline: auto; text-align: center; margin-block-end: 38px; }
.section-head p { color: var(--muted); margin: 0; }

/* --- Hero ----------------------------------------------------------------- */
.hero { background: linear-gradient(170deg, var(--blue-tint), #fff 72%); padding-block: clamp(36px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center; }
.hero h1 { color: var(--ink-strong); }
.hero .lead { font-size: 1.1rem; max-width: 52ch; }
.hero .badge-line { font-size: .93rem; color: var(--muted); margin-block-start: 18px; }
.hero-art { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-art { order: -1; }
}

/* Phone frame */
.phone-frame {
  background: #1f2429; border-radius: 30px; padding: 9px;
  box-shadow: var(--shadow-lg); inline-size: min(270px, 74vw); flex: none;
}
.phone-frame img { display: block; border-radius: 22px; width: 100%; }

/* --- Trust strip ---------------------------------------------------------- */
.trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm); margin-block-start: -28px; position: relative; z-index: 2;
}
.trust div { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 600; color: var(--ink-strong); }
.trust span { font-size: 1.35rem; line-height: 1; flex: none; }
@media (max-width: 780px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .trust { grid-template-columns: 1fr; } }

/* --- Cards ---------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cards, .cards-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cards, .cards-2, .cards-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.card h3 { color: var(--ink-strong); margin-block-end: 8px; }
.card p:last-child { margin-block-end: 0; }
.card .icon {
  inline-size: 44px; block-size: 44px; border-radius: 12px; background: var(--blue-tint);
  display: grid; place-items: center; font-size: 1.3rem; margin-block-end: 14px;
}

/* Numbered steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.step b {
  display: grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: 50%;
  background: var(--blue-dark); color: #fff; font-size: 1rem; margin-block-end: 12px;
}
.step h3 { font-size: 1.02rem; margin-block-end: 6px; }
.step p { margin: 0; font-size: .93rem; color: var(--muted); }

/* --- Feature (wheel) ------------------------------------------------------ */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }
.feature-media { display: flex; justify-content: center; gap: 18px; align-items: center; }
.feature-media .wheel { inline-size: min(190px, 40vw); filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .18)); }
.tick { list-style: none; padding: 0; margin: 0 0 1em; }
.tick li { position: relative; padding-inline-start: 28px; margin-block-end: 10px; }
.tick li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; inset-block-start: 0;
  color: var(--green); font-weight: 700;
}

/* --- Screenshot gallery --------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
@media (max-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px)  { .gallery { grid-template-columns: repeat(2, 1fr); } }
.shot { text-align: center; }
.shot .phone-frame { inline-size: 100%; border-radius: 20px; padding: 6px; }
.shot .phone-frame img { border-radius: 15px; }
.shot figcaption { font-size: .85rem; color: var(--muted); margin-block-start: 8px; }

/* --- Payment / shipping band ---------------------------------------------- */
.pay-band {
  background: var(--blue-tint); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); text-align: center;
}
.pay-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-block: 18px; padding: 0; list-style: none; }
.pay-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-weight: 600; font-size: .92rem; color: var(--ink-strong); box-shadow: var(--shadow-sm);
}

/* --- Countries ------------------------------------------------------------ */
.countries { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.countries li {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: .9rem;
}

/* --- FAQ ------------------------------------------------------------------ */
.faq { max-width: 800px; margin-inline: auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-block-end: 12px; padding: 2px 18px; }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: var(--blue); }
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--ink-strong); padding-block: 15px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue-dark); font-size: 1.4rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details > *:not(summary) { margin-block-end: 15px; font-size: .96rem; }

/* --- CTA ------------------------------------------------------------------ */
.cta {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 44px); text-align: center;
}
.cta h2, .cta h3 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .95); }
.cta a { color: #fff; font-weight: 700; }
.cta .btn-outline { background: #fff; color: var(--blue-darker); border-color: #fff; }

/* --- Legal / document pages ----------------------------------------------- */
.page-head { background: var(--surface); border-block-end: 1px solid var(--line); padding-block: clamp(26px, 4vw, 44px); }
.page-head h1 { margin-block-end: 6px; }
.page-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.crumb { font-size: .85rem; color: var(--muted); margin-block-end: 10px; }
.crumb a { color: var(--muted); }

.doc { max-width: 820px; margin-inline: auto; padding-block: clamp(30px, 4vw, 52px); }
.doc h2 { font-size: 1.32rem; margin-block: 38px 12px; }
.doc h2:first-of-type { margin-block-start: 0; }
.doc h3 { font-size: 1.05rem; color: var(--blue-darker); margin-block: 24px 8px; }
.doc ul, .doc ol { padding-inline-start: 22px; margin-block: 0 1em; }
.doc li { margin-block-end: 8px; }
.doc dt { font-weight: 700; color: var(--ink-strong); margin-block-start: 12px; }
.doc dd { margin-inline-start: 0; }
.doc table { width: 100%; border-collapse: collapse; margin-block: 10px 20px; font-size: .94rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 13px; text-align: start; vertical-align: top; }
.doc th { background: var(--surface); font-weight: 600; color: var(--ink-strong); }
.table-wrap { overflow-x: auto; }
.doc address { font-style: normal; }

/* Lawyer-review banner, required at the top of every legal page */
.notice {
  border-radius: var(--radius); padding: 15px 18px; margin-block-end: 26px;
  background: #fff8e1; border: 1px solid #ffe082; border-inline-start: 4px solid #ffb300;
  font-size: .93rem; color: #5d4037;
}
.notice strong { color: #4e342e; }
.notice p:last-child { margin-block-end: 0; }

.box {
  background: var(--blue-tint); border: 1px solid #cfe6fb; border-inline-start: 4px solid var(--blue);
  border-radius: var(--radius); padding: 16px 18px; margin-block: 20px;
}
.box p:last-child { margin-block-end: 0; }

/* [TO BE COMPLETED] markers */
.todo {
  background: #ffe0e0; color: #9b1c1c; border: 1px dashed #e57373;
  border-radius: 6px; padding: 1px 8px; font-weight: 700; font-size: .88em; white-space: nowrap;
}

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-block-end: 30px; }
.toc p { font-weight: 700; color: var(--ink-strong); margin: 0 0 8px; }
.toc ol { margin: 0; padding-inline-start: 20px; columns: 2; column-gap: 28px; }
.toc li { margin-block-end: 5px; font-size: .92rem; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* --- Contact -------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.contact-card .icon { inline-size: 42px; block-size: 42px; border-radius: 12px; background: var(--blue-tint); display: grid; place-items: center; font-size: 1.25rem; margin-block-end: 12px; }
.contact-card a { font-weight: 600; font-size: 1.05rem; }

/* --- Payment result pages (/return, /cancel) ------------------------------ */
.result { max-width: 560px; margin-inline: auto; text-align: center; padding-block: clamp(50px, 9vw, 90px); }
.result .mark {
  inline-size: 84px; block-size: 84px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.6rem; margin: 0 auto 22px;
}
.result .mark.ok   { background: #e8f5e9; color: var(--green); }
.result .mark.stop { background: #ffebee; color: var(--red-dark); }
.result h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }
/* the English/Arabic blocks use h2 for hierarchy, but red would read as an error */
.result h2 { color: var(--ink-strong); font-size: 1.3rem; }
.result .sub { color: var(--muted); }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--surface); border-block-start: 1px solid var(--line); padding-block: 42px 22px; margin-block-start: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: .95rem; color: var(--ink-strong); margin-block-end: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-block-end: 8px; font-size: .93rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--blue-darker); text-decoration: underline; }
.site-footer address { font-style: normal; font-size: .93rem; color: var(--muted); }
.site-footer .brand img { block-size: 30px; }
.footer-bottom {
  border-block-start: 1px solid var(--line); margin-block-start: 26px; padding-block-start: 18px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .86rem; color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
