:root {
  --brand: #0f2f24;
  --brand-deep: #0a1f18;
  --accent: #c4a35a;
  --ink: #14201b;
  --mute: #5c6862;
  --line: #d8d4cb;
  --paper: #f0ebe3;
  --surface: #faf8f4;
  --white: #fffcf8;
  --hero-img: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=1920&q=80');
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}

/* boot */
.store-boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--mute);
  background:
    radial-gradient(ellipse 60% 40% at 70% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent),
    var(--paper);
}
.store-loader {
  width: 34px;
  height: 34px;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.boot-err {
  text-align: center;
  max-width: 20rem;
  padding: 2rem;
}
.boot-err h2 {
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
  color: var(--brand);
  margin: 0 0 0.5rem;
}

#storeApp {
  opacity: 0;
  transition: opacity 0.55s ease;
}
#storeApp.ready {
  opacity: 1;
}

/* top — floats over hero then solidifies */
.top {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 0 max(1.1rem, calc(50% - 28rem));
  color: #f4f1ea;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.top.is-solid {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: 0 8px 24px rgba(15, 32, 24, 0.06);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, #fff 14%, transparent);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  color: #fff;
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}
.top.is-solid .logo {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-txt {
  display: grid;
  min-width: 0;
}
.brand-txt b {
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-txt small {
  opacity: 0.72;
  font-size: 0.78rem;
  font-weight: 500;
}
.nav {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.88;
}
.nav a:hover {
  opacity: 1;
  background: color-mix(in srgb, #fff 10%, transparent);
}
.top.is-solid .nav a:hover {
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.nav-cta {
  margin-inline-start: 4px;
  background: var(--accent) !important;
  color: #1a1510 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}
.top.is-solid .nav-cta {
  background: var(--brand) !important;
  color: #fff !important;
}

/* hero — full-bleed place / architecture */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: #f6f3ec;
  overflow: hidden;
  width: 100%;
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-photo {
  position: absolute;
  inset: -4%;
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--brand-deep) 35%, transparent), transparent 42%),
    var(--hero-img) center / cover no-repeat;
  transform: scale(1.04);
  animation: ken 18s ease-in-out infinite alternate;
}
@keyframes ken {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1%, 0);
  }
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      108deg,
      color-mix(in srgb, var(--brand-deep) 78%, #000) 0%,
      color-mix(in srgb, var(--brand) 48%, transparent) 48%,
      color-mix(in srgb, var(--brand-deep) 18%, transparent) 100%
    ),
    linear-gradient(to top, rgba(6, 14, 11, 0.72) 0%, rgba(6, 14, 11, 0.12) 52%, rgba(6, 14, 11, 0.28) 100%);
}
.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 7.5rem 1.35rem clamp(2.8rem, 7vh, 4.5rem);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--accent) 88%, #fff);
}
.hero h1 {
  margin: 0 0 1rem;
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(2.55rem, 7.2vw, 4.1rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: min(100%, 18rem);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
  word-break: keep-all;
}
.lead {
  margin: 0 0 1.65rem;
  font-size: clamp(1.05rem, 2.1vw, 1.22rem);
  line-height: 1.85;
  color: rgba(246, 243, 236, 0.9);
  max-width: 32rem;
  font-weight: 400;
}
.meta {
  margin: 1.35rem 0 0;
  font-size: 0.92rem;
  color: rgba(246, 243, 236, 0.58);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  min-width: 10rem;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-light {
  background: #fff;
  color: var(--brand);
}
.btn-light:hover {
  background: #f7f2e8;
}
.btn-line {
  background: color-mix(in srgb, #fff 8%, transparent);
  color: #fff;
  border-color: color-mix(in srgb, #fff 42%, transparent);
  backdrop-filter: blur(6px);
}
.btn-line:hover {
  background: color-mix(in srgb, #fff 14%, transparent);
  border-color: color-mix(in srgb, #fff 60%, transparent);
}
.btn-brand {
  background: var(--brand);
  color: #fff;
  border: 0;
  width: auto;
  min-width: 12rem;
}
.btn-brand:hover {
  background: color-mix(in srgb, var(--brand) 88%, #000);
}

/* intro — definition + contact, no cards */
.intro {
  scroll-margin-top: 80px;
  padding: clamp(3rem, 7vw, 5rem) 1.35rem;
  background:
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--paper) 70%, var(--surface))),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.intro-wrap {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  display: grid;
  gap: 2.75rem;
}
@media (min-width: 860px) {
  .intro-wrap {
    grid-template-columns: 1.45fr 0.9fr;
    gap: 4rem;
    align-items: start;
  }
}
.kicker {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--accent) 70%, var(--brand));
  text-transform: none;
}
.intro h2 {
  margin: 0 0 1.15rem;
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  color: var(--brand);
  line-height: 1.3;
}
.about {
  margin: 0;
  font-size: 1.1rem;
  line-height: 2;
  color: #2d3a34;
  max-width: 38em;
}
.side-label {
  margin: 0 0 0.95rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--mute);
}
.facts {
  margin: 0 0 1.35rem;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
}
.facts dt {
  color: var(--mute);
  font-weight: 600;
}
.facts dd {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
}

.path {
  padding: clamp(2.2rem, 5vw, 3.2rem) 1.35rem;
  background:
    radial-gradient(ellipse 80% 100% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 9%, var(--paper)), var(--paper));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.path-inner {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
}
.path h2 {
  margin: 0 0 0.7rem;
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  color: var(--brand);
  max-width: 22ch;
  line-height: 1.4;
}
.path-note {
  margin: 0;
  color: var(--mute);
  line-height: 1.85;
  font-size: 1rem;
  max-width: 36rem;
}

/* forms → internal chat bot */
.forms-zone {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.5rem 1.35rem 2.8rem;
  display: grid;
  gap: 0.5rem;
  box-sizing: border-box;
  background: var(--paper);
}
.form-block {
  scroll-margin-top: 84px;
  padding: 2rem 0 0.75rem;
  border-top: 1px solid var(--line);
}
.form-head h2 {
  margin: 0 0 0.4rem;
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 1.3rem;
  color: var(--brand);
}
.form-head p {
  margin: 0 0 1.2rem;
  color: var(--mute);
  line-height: 1.7;
}

.chat-bot {
  display: grid;
  gap: 12px;
  max-width: 40rem;
}
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 4px 2px 8px;
  scroll-behavior: smooth;
}
.chat-bubble {
  max-width: min(92%, 34rem);
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.7;
  animation: chatIn 0.28s ease both;
}
@keyframes chatIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.chat-bubble.bot {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-start-start-radius: 4px;
}
.chat-bubble.user {
  align-self: end;
  background: var(--brand);
  color: #fff;
  border-start-end-radius: 4px;
}
.chat-bubble.user p,
.chat-bubble.bot p {
  margin: 0;
}
.chat-who {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--accent) 70%, var(--brand));
  margin-bottom: 0.35rem;
}
.chat-bubble.review {
  max-width: 100%;
  width: 100%;
}
.chat-summary {
  margin: 0.85rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.chat-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0.55rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  font-size: 0.92rem;
}
.chat-summary dt {
  color: var(--mute);
  font-weight: 600;
}
.chat-summary dd {
  margin: 0;
  font-weight: 700;
  text-align: left;
  word-break: break-word;
}
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
}
.btn-ghost:hover {
  background: color-mix(in srgb, var(--brand) 6%, #fff);
}

.chat-composer {
  min-height: 52px;
}
.chat-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-choice {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.chat-choice:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, #fff);
}
.chat-form {
  display: grid;
  gap: 6px;
}
.chat-skip-tip {
  margin: 0;
  font-size: 0.8rem;
  color: var(--mute);
}
.chat-row {
  display: flex;
  gap: 8px;
}
.chat-input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
}
.chat-input:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 28%, transparent);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
}
.chat-send {
  flex: 0 0 auto;
  min-height: 48px;
  min-width: 5.5rem;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.chat-send:hover {
  background: color-mix(in srgb, var(--brand) 88%, #000);
}
.chat-again {
  width: auto;
  min-width: 10rem;
}
.chat-status {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--mute);
}
.chat-status.err {
  color: #8b2e2e;
  font-weight: 700;
}
.chat-status.ok {
  color: #1a5c3a;
  font-weight: 700;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 1.65rem max(16px, calc((100vw - 56rem) / 2)) calc(1.65rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.9rem;
  margin-bottom: 4.2rem;
  background: var(--surface);
}
.foot b {
  display: block;
  color: var(--ink);
  margin-bottom: 0.15rem;
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
}
.foot-brand {
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.04em;
}

.dock {
  display: none;
}

@media (max-width: 720px) {
  .hero h1 {
    max-width: none;
    font-size: clamp(2.2rem, 11vw, 2.85rem);
  }
  .nav a:not(.nav-cta) {
    display: none;
  }
  .btn-brand {
    max-width: none;
  }
  .chat-actions .btn {
    flex: 1 1 auto;
  }
  .chat-send {
    min-width: 4.8rem;
  }
  .actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
  .dock {
    display: flex;
    position: fixed;
    inset-inline: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0));
    z-index: 50;
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(15, 26, 21, 0.14);
  }
  .dock a {
    flex: 1;
    min-height: 44px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 7%, #fff);
  }
  .dock a:last-child:not([hidden]) {
    background: var(--brand);
    color: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero-photo {
    transform: none;
  }
}
