/* Kashtat website — shared styles (RTL first, LTR when English) */

:root {
  --canvas: #F5F1E9;
  --canvas-deep: #ECE5D8;
  --surface: #FFFFFF;
  --ink: #1C1714;
  --muted: #6F665A;
  --stroke: rgba(28, 23, 20, .08);
  --orange: #E86A2A;
  --orange-deep: #C9541A;
  --green: #2F9B64;
  --forest: #23533F;
  --sand: #EEC492;
  --sky: #8CC7EB;
  --gold: #FAC242;
  --night: #0E1430;
  --shadow: 0 1px 2px rgba(28,23,20,.04), 0 12px 32px rgba(28,23,20,.08);
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1180px;
  --font: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111318;
    --canvas-deep: #1C2028;
    --surface: #242730;
    --ink: #F6F1E8;
    --muted: #A39990;
    --stroke: rgba(255, 255, 255, .08);
    --forest: #193C2E;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  border-bottom: 1px solid var(--stroke);
}
.header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang {
  border: 1px solid var(--stroke); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font: 600 14px var(--font); cursor: pointer;
}
.menu-btn { display: none; background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; inset-inline: 0; top: 68px; flex-direction: column; gap: 0;
         background: var(--canvas); border-bottom: 1px solid var(--stroke); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; font-size: 17px; border-bottom: 1px solid var(--stroke); }
  .menu-btn { display: inline-flex; }
  .header .btn-store-sm { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; padding: 14px 24px; font: 700 16px var(--font);
  text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 22px rgba(232,106,42,.35); }
.btn-primary:hover { background: var(--orange-deep); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--stroke); }
.btn-store {
  background: #000; color: #fff; padding: 10px 20px 10px 18px; border-radius: 14px; gap: 10px; text-align: start;
}
@media (prefers-color-scheme: dark) { .btn-store { background: #fff; color: #000; } }
.btn-store svg { width: 26px; height: 26px; flex: none; }
.btn-store small { display: block; font-size: 11px; font-weight: 500; opacity: .85; line-height: 1.2; }
.btn-store strong { display: block; font-size: 18px; line-height: 1.15; }
.btn-store-sm { padding: 8px 16px; font-size: 14px; border-radius: 999px; background: var(--ink); color: var(--canvas); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(232,106,42,.18), transparent 70%),
    radial-gradient(500px 380px at 10% 30%, rgba(47,155,100,.14), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--stroke); font-size: 14px; font-weight: 600; color: var(--muted);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47,155,100,.18); }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.12; margin: 18px 0 18px; letter-spacing: -.01em; font-weight: 700; }
h1 .accent { color: var(--orange); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 34ch; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span::before { content: "✓"; color: var(--green); font-weight: 700; margin-inline-end: 6px; }

.phone-stage { position: relative; display: grid; place-items: center; min-height: 600px; }
.phone {
  width: 290px; aspect-ratio: 1206 / 2622; border-radius: 46px; padding: 10px; background: #111;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.45), inset 0 0 0 2px #2b2b2b; position: relative;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.phone.tilt { transform: rotate(-4deg); }
.float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--stroke); border-radius: 20px;
  padding: 12px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; font-size: 14px;
  animation: bob 6s ease-in-out infinite;
}
.float-card b { display: block; font-size: 16px; }
.float-card .ring {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: conic-gradient(var(--green) 0 81%, var(--canvas-deep) 0); position: relative;
}
.float-card .ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.float-card .ring span { position: relative; z-index: 1; font-size: 14px; }
.fc-1 { inset-inline-start: -10px; top: 90px; }
.fc-2 { inset-inline-end: -14px; bottom: 120px; animation-delay: -3s; }
.fc-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(232,106,42,.12); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 960px) {
  .hero { padding-top: 44px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .hero-cta, .hero-note { justify-content: center; }
  .phone-stage { min-height: 520px; }
  .phone { width: 250px; }
  .fc-1 { inset-inline-start: 0; top: 60px; }
  .fc-2 { inset-inline-end: 0; bottom: 70px; }
}
@media (max-width: 420px) { .float-card { font-size: 12px; padding: 10px 12px; } .fc-1 { top: 30px; } }

/* ---------- Trust strip ---------- */
.strip { padding: 22px 0; border-block: 1px solid var(--stroke); background: var(--surface); }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; color: var(--muted); font-weight: 600; font-size: 15px; }
.strip span { display: inline-flex; align-items: center; gap: 8px; }
.strip svg { width: 20px; height: 20px; color: var(--orange); }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.kicker { color: var(--orange); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.2; margin: 8px 0 14px; font-weight: 700; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
@media (max-width: 640px) { section { padding: 68px 0; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-4px); }
.feature .icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; color: #fff;
}
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 20px; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }
.c-orange { background: var(--orange); } .c-green { background: var(--green); } .c-sky { background: #3F8FCB; }
.c-night { background: #3B3C8F; } .c-gold { background: #D9971B; } .c-forest { background: var(--forest); }
.c-coral { background: #E5584A; } .c-sand { background: #B98448; } .c-teal { background: #1F9A9A; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Spotlight (split) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 96px; }
.split.reverse .split-media { order: 2; }
.split h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1.25; margin: 6px 0 14px; }
.split p { color: var(--muted); font-size: 18px; margin: 0 0 20px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat;
}
.split-media { position: relative; display: grid; place-items: center; padding: 30px; border-radius: 36px; min-height: 520px; overflow: hidden; }
.split-media.bg-sand { background: linear-gradient(160deg, #F6D7B0, #EFB97E); }
.split-media.bg-night { background: radial-gradient(circle at 70% 20%, #3A3F86, #0E1430 70%); }
.split-media.bg-green { background: linear-gradient(160deg, #BFE3CB, #6DBE92); }
.split-media.bg-night::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, #fff, transparent), radial-gradient(1px 1px at 85% 25%, #fff, transparent),
    radial-gradient(1px 1px at 10% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 15%, #fff, transparent);
  opacity: .7;
}
.split-media .phone { width: 250px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media { order: 0; }
  .split-media { min-height: 460px; }
}

/* Gallery */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 10px 16px 30px; scroll-snap-type: x mandatory; justify-content: center; }
.gallery figure { margin: 0; flex: none; scroll-snap-align: center; text-align: center; }
.gallery .phone { width: 230px; }
.gallery figcaption { margin-top: 16px; font-weight: 600; color: var(--muted); font-size: 15px; }
@media (max-width: 1060px) { .gallery { justify-content: flex-start; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 30px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--ink); color: var(--canvas); font-weight: 800; font-size: 18px;
}
.step h3 { margin: 0 0 6px; font-size: 20px; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Safety band */
.band { background: var(--forest); color: #F3EEE6; border-radius: 40px; padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.band h2 { color: #fff; margin-top: 0; }
.band p { color: rgba(243,238,230,.8); font-size: 18px; }
.band .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.band .tile { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 18px; }
.band .tile b { display: block; font-size: 17px; margin-bottom: 4px; color: #fff; }
.band .tile span { font-size: 14px; color: rgba(243,238,230,.75); }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; padding: 34px 22px; border-radius: 30px; } }
@media (max-width: 460px) { .band .grid2 { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--stroke); border-radius: 20px; padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--orange); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* CTA */
.cta {
  text-align: center; border-radius: 40px; padding: 64px 24px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #E86A2A, #D24A1E 55%, #9C3A1B);
}
.cta::after {
  content: ""; position: absolute; inset: auto -10% -45% -10%; height: 70%;
  background: radial-gradient(ellipse at center, rgba(255,214,150,.35), transparent 65%);
}
.cta h2 { color: #fff; margin-top: 0; position: relative; }
.cta p { color: rgba(255,255,255,.88); font-size: 19px; position: relative; margin: 0 auto 28px; max-width: 46ch; }
.cta .btn-store { background: #fff; color: #000; position: relative; }
.cta img.cta-icon { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); position: relative; }

/* Footer */
.footer { padding: 56px 0 40px; color: var(--muted); font-size: 15px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h4 { color: var(--ink); font-size: 15px; margin: 0 0 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .copy { grid-column: 1 / -1; border-top: 1px solid var(--stroke); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr 1fr; } .footer .about { grid-column: 1 / -1; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); margin: 8px 0 6px; }
.doc .updated { color: var(--muted); font-size: 15px; margin-bottom: 36px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc h3 { font-size: 19px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--ink); opacity: .9; }
.doc ul { padding-inline-start: 22px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }
.doc .card { background: var(--surface); border: 1px solid var(--stroke); border-radius: 22px; padding: 22px 24px; margin: 18px 0; }
.doc .table-scroll { overflow-x: auto; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.cards3 a { text-decoration: none; background: var(--surface); border: 1px solid var(--stroke); border-radius: 22px; padding: 20px; display: block; }
.cards3 a b { display: block; font-size: 17px; margin-bottom: 4px; }
.cards3 a span { color: var(--muted); font-size: 15px; }
@media (max-width: 700px) { .cards3 { grid-template-columns: 1fr; } }

/* Language blocks on document pages */
html[lang="ar"] [data-only="en"], html[lang="en"] [data-only="ar"] { display: none !important; }
