/* =========================================================================
   base.css v2 — shared showcase + demo styles.
   Light default + dark toggle (data-theme) · premium motion · RTL-ready.
   Each demo's theme.css sets only accent colors + hero image + heading font.
   ========================================================================= */

:root {
  /* Neutral surfaces — light default */
  --bg:        #F6F7FB;
  --surface:   #FFFFFF;
  --surface-2: #F1F4FA;
  --text:      #0B0F17;
  --muted:     #566072;
  --border:    rgba(11, 15, 23, 0.10);
  --shadow:    0 18px 40px -18px rgba(20, 30, 60, 0.28);
  --shadow-lg: 0 40px 80px -28px rgba(20, 30, 60, 0.36);
  --glass:     rgba(255, 255, 255, 0.72);
  --hero-overlay: linear-gradient(180deg, rgba(8,12,20,0.46), rgba(8,12,20,0.72));

  /* Accents (overridden per demo in theme.css) */
  --accent:    #2D7FF9;
  --accent-2:  #F5A623;
  --on-accent: #ffffff;
  --green:     #25D366;

  --heading-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans Arabic", sans-serif;
  --body-font:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans Arabic", sans-serif;
  --hero-img: none;

  --radius:      16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --maxw: 1160px; --pad: 22px; --header-h: 66px; --preview-h: 46px;
  color-scheme: light; -webkit-text-size-adjust: 100%; font-synthesis: none;
}
:root[data-theme="dark"] {
  --bg:        #080B11;
  --surface:   #121826;
  --surface-2: #182031;
  --text:      #EAEEF6;
  --muted:     #9AA6B8;
  --border:    rgba(255, 255, 255, 0.10);
  --shadow:    0 18px 40px -18px rgba(0,0,0,0.6);
  --shadow-lg: 0 40px 90px -30px rgba(0,0,0,0.7);
  --glass:     rgba(18, 24, 38, 0.72);
  --hero-overlay: linear-gradient(180deg, rgba(4,7,12,0.55), rgba(4,7,12,0.82));
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--preview-h) + 12px); }
body { background: var(--bg); color: var(--text); font-family: var(--body-font); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background 0.4s var(--ease), color 0.4s var(--ease); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
h1, h2, h3, h4 { font-family: var(--heading-font); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(52px, 8vw, 100px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.section-title { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; }
.section-sub { color: var(--muted); margin-block-start: 12px; max-width: 60ch; }
.center { text-align: center; } .center .section-sub { margin-inline: auto; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-block-start: 8px; inset-inline-start: 50%; transform: translateX(-50%) translateY(-160%); background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--radius-pill); z-index: 200; transition: transform 0.2s var(--ease); }
.skip-link:focus { transform: translateX(-50%) translateY(0); }

/* Motion */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.cursor-glow { position: fixed; inset-block-start: 0; inset-inline-start: 0; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%); transform: translate(-50%,-50%); pointer-events: none; z-index: 0; opacity: 0; transition: opacity 0.4s var(--ease); }
@media (hover: hover) and (pointer: fine) { .cursor-glow.on { opacity: 1; } }

/* Buttons */
.btn { --btn-bg: var(--surface-2); --btn-fg: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 26px; border: none; border-radius: var(--radius-pill); background: var(--btn-bg); color: var(--btn-fg); font-family: var(--body-font); font-size: 1.02rem; font-weight: 700; cursor: pointer; text-align: center; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease); }
.btn:hover { transform: translateY(-3px); filter: brightness(1.03); box-shadow: var(--shadow); }
.btn:active { transform: translateY(-1px) scale(0.99); }
.btn svg { width: 20px; height: 20px; }
.btn-accent { --btn-bg: var(--accent); --btn-fg: var(--on-accent); box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-accent-2 { --btn-bg: var(--accent-2); --btn-fg: #241700; }
.btn-whatsapp { --btn-bg: var(--green); --btn-fg: #04210f; }
.btn-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Preview bar (kept dark in both themes — reads like browser chrome) */
.preview-bar { position: sticky; inset-block-start: 0; z-index: 120; height: var(--preview-h); display: flex; align-items: center; gap: 12px; padding-inline: 14px; background: #0A0E14; color: #E8EAED; border-block-end: 1px solid rgba(255,255,255,0.12); font-family: var(--body-font); font-size: 0.9rem; }
.preview-bar a { color: #E8EAED; }
.preview-bar .pv-back { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.preview-bar .pv-back:hover { color: #5b9bff; }
.preview-bar .pv-label { color: #9BA3AF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-bar .pv-label b { color: #fff; }
.preview-bar .pv-cta { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #04210f; font-weight: 800; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.preview-bar .pv-cta svg { width: 16px; height: 16px; }
[dir="rtl"] .preview-bar .pv-back svg { transform: scaleX(-1); }
@media (max-width: 560px) { .preview-bar .pv-label { display: none; } }

/* Demo header */
.d-header { position: sticky; inset-block-start: var(--preview-h); z-index: 100; background: var(--glass); -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px); border-block-end: 1px solid var(--border); }
.d-header-inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.d-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-family: var(--heading-font); font-size: 1.15rem; }
.d-brand .logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.d-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.d-nav { display: flex; gap: 2px; }
.d-nav a { color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: var(--radius-pill); }
.d-nav a:hover, .d-nav a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; background: color-mix(in srgb, var(--text) 6%, transparent); border: 1px solid var(--border); border-radius: var(--radius-pill); }
.lang-btn { background: transparent; border: none; color: var(--muted); font: inherit; font-size: 0.78rem; font-weight: 700; padding: 6px 9px; border-radius: var(--radius-pill); cursor: pointer; }
.lang-btn.is-active { background: var(--accent); color: var(--on-accent); }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: color-mix(in srgb, var(--text) 6%, transparent); border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: transform 0.2s var(--ease); }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; } .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; } :root[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu-toggle { display: none; }

/* Hero — image-forward with overlay + white text (works in both themes) */
.d-hero { position: relative; overflow: hidden; isolation: isolate; }
.d-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: var(--hero-img); background-size: cover; background-position: center; transform: scale(1.05); animation: kenburns 20s ease-out infinite alternate; }
.d-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-overlay); }
.d-hero .d-hero-inner { padding-block: clamp(72px, 12vw, 150px) clamp(56px, 9vw, 110px); max-width: 760px; }
.d-hero .eyebrow { color: #fff; opacity: 0.92; }
.d-hero h1 { color: #fff; font-size: clamp(2.3rem, 7vw, 4rem); text-shadow: 0 2px 30px rgba(0,0,0,0.3); }
.d-hero .lead { color: rgba(255,255,255,0.92); font-size: clamp(1.05rem, 3vw, 1.35rem); margin-block: 18px 28px; max-width: 54ch; }
@keyframes kenburns { to { transform: scale(1.16); } }

/* Placeholder / image blocks */
.ph { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #000), color-mix(in srgb, var(--accent-2) 55%, #000)); background-size: cover; background-position: center; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.ph.tall { aspect-ratio: 3 / 4; } .ph.wide { aspect-ratio: 16 / 9; }
.ph .ph-emoji { position: relative; font-size: clamp(2.2rem, 8vw, 3.6rem); filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3)); }
.ph.has-img .ph-emoji { display: none; }
.ph.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.16)); }

/* Cards & blocks */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: 1fr; } .grid.cols-3 { grid-template-columns: 1fr; } .grid.cols-4 { grid-template-columns: 1fr 1fr; }
.feature { padding: 26px; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature .ficon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 1.5rem; margin-block-end: 14px; }
.feature h3 { font-size: 1.2rem; margin-block-end: 6px; }
.feature p { color: var(--muted); font-size: 0.96rem; }

.menu-list { display: grid; gap: 14px; }
.menu-item { display: flex; align-items: baseline; gap: 12px; padding-block-end: 14px; border-block-end: 1px dashed var(--border); }
.menu-item .mi-name { font-weight: 700; } .menu-item .mi-desc { color: var(--muted); font-size: 0.9rem; }
.menu-item .mi-dots { flex: 1 1 auto; border-block-end: 1px dotted var(--border); transform: translateY(-4px); }
.menu-item .mi-price { font-weight: 800; color: var(--accent); white-space: nowrap; }
.menu-group h3 { font-size: 1.4rem; margin-block-end: 16px; }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tile-grid figure { display: grid; gap: 10px; }
.tile-grid figcaption { font-weight: 700; }
.tile-grid figcaption small { display: block; color: var(--muted); font-weight: 500; }
.tile-grid .ph { aspect-ratio: 4 / 3; box-shadow: var(--shadow); transition: transform 0.4s var(--ease); }
.tile-grid figure:hover .ph { transform: translateY(-5px) scale(1.01); }
.split { display: grid; gap: 30px; align-items: center; }
.split .ph { box-shadow: var(--shadow-lg); }

.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.prod { display: flex; flex-direction: column; overflow: hidden; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.prod:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.prod .ph { border-radius: 0; aspect-ratio: 1 / 1; }
.prod .prod-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.prod .prod-name { font-weight: 700; } .prod .prod-desc { color: var(--muted); font-size: 0.9rem; flex: 1 1 auto; }
.prod .prod-price { color: var(--accent); font-weight: 800; font-size: 1.1rem; }
.prod .btn { margin-block-start: 10px; min-height: 44px; padding: 10px 18px; font-size: 0.95rem; }

.info-row { display: flex; align-items: flex-start; gap: 14px; padding-block: 12px; border-block-end: 1px solid var(--border); }
.info-row:last-child { border-block-end: none; }
.info-row .ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.info-row .lbl { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.info-row .val { font-weight: 700; }

.form { padding: 26px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.field input, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; color: var(--text); padding: 14px 16px; font: inherit; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.field textarea { resize: vertical; min-height: 120px; }
.form-status { font-size: 0.95rem; padding: 12px 14px; border-radius: 12px; }
.form-status.is-ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: #12894a; }
:root[data-theme="dark"] .form-status.is-ok { color: #7ff0ad; }
.form-status.is-err { background: rgba(245,80,80,0.16); color: #cc3b3b; }

.banner { text-align: center; padding: clamp(36px,6vw,64px) 24px; border-radius: var(--radius-xl); position: relative; overflow: hidden; color: #fff; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 92%, #000), color-mix(in srgb, var(--accent-2) 80%, #000)); box-shadow: var(--shadow-lg); }
.banner h2 { color: #fff; font-size: clamp(1.6rem, 5vw, 2.4rem); }
.banner p { color: rgba(255,255,255,0.9); margin-block: 12px 24px; }
.banner .cta-row { justify-content: center; }
.banner .btn-outline { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.55); }
.banner .btn-outline:hover { background: rgba(255,255,255,0.12); box-shadow: inset 0 0 0 1.5px #fff; }

/* Footer */
.d-footer { border-block-start: 1px solid var(--border); background: var(--surface); padding-block: 42px; margin-block-start: 20px; }
.d-footer-inner { display: grid; gap: 22px; }
.d-footer .d-brand { font-size: 1.05rem; }
.d-footer .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.d-footer .muted { color: var(--muted); font-size: 0.9rem; max-width: 42ch; }
.d-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.d-footer nav a { color: var(--muted); font-weight: 600; }
.d-footer nav a:hover { color: var(--text); }
.made-by { color: var(--muted); font-size: 0.82rem; padding-block-start: 14px; border-block-start: 1px solid var(--border); }
.made-by a { font-weight: 700; color: var(--accent); }

@media (min-width: 640px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; } .grid.cols-3 { grid-template-columns: repeat(3,1fr); } .grid.cols-4 { grid-template-columns: repeat(4,1fr); }
  .tile-grid { grid-template-columns: repeat(3,1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .prod-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 767px) {
  .d-nav { position: fixed; inset-block-start: calc(var(--preview-h) + var(--header-h)); inset-inline: 0; flex-direction: column; gap: 4px; padding: 14px var(--pad) 22px; background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-block-end: 1px solid var(--border); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
  .d-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .d-nav a { padding: 12px 14px; font-size: 1.05rem; }
  .menu-toggle { display: grid; }
}
@keyframes kenburns-none {}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .d-hero::before { animation: none; transform: none; }
}
