/* Piazza landing page — piazza.ly
 *
 * Tokens mirror customer-app/src/constants/brand.ts. The app is the source of
 * truth: if a value here disagrees with brand.ts, brand.ts wins and this file
 * is the one to fix. Values with no brand.ts counterpart (page-scale spacing,
 * the paper grain, the illustration tints) are marked landing-only.
 */

:root {
  /* BRAND */
  --gold: #B08D57;         /* decorative only, never text */
  --gold-strong: #8A6B3C;  /* fills that carry white text */
  --gold-text: #7A5F33;    /* gold as text on white / ivory */
  --gold-tint: #F5EEE3;
  --gold-light: #D4B27A;   /* rules; also gold text on near-black */
  --ink: #111111;
  --ivory: #FAF7F2;

  /* SURFACE / TEXT */
  --card: #FFFFFF;
  --border: #EFEAE2;
  --border-warm: #E4DDD0;
  --muted-warm: #6E6455;
  --body-warm: #57534B;
  --on-dark-muted: #B8AE9F; /* brand/ tagline on dark, 8.54:1 on ink */

  /* SHADOW (brand.ts card / modal, as CSS) */
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.10);
  --shadow-modal: 0 10px 20px rgba(0, 0, 0, 0.10);

  /* Type */
  --font-display: "El Messiri", "Tajawal", serif;
  --font-body: "Tajawal", system-ui, sans-serif;
  --font-latin-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Landing-only */
  --header-h: 88px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 120px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .11 0 0 0 0 .04 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

html[lang="en"] {
  --font-display: "Cormorant", Georgia, serif;
  --font-body: var(--font-latin-ui);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scrollbar-color: var(--gold-light) var(--ivory);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.6; }

::selection { background: var(--gold-light); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 3px;
  border-radius: 6px;
}

img, svg { max-width: 100%; }

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute;
  z-index: 100;
  top: -120px;
  inset-inline-start: 16px;
  padding: 8px 16px;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 12px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ─── Header ──────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.header__brand { display: block; flex: none; border-radius: 6px; }
.header__brand img { display: block; height: 56px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.5vw, 48px);
}

.nav a {
  padding-block: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.nav a:hover { color: var(--gold-text); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 0.9375rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out);
}
.lang:hover { background: var(--gold-tint); }
.lang__icon { width: 20px; height: 20px; flex: none; }
.lang [lang="en"] { font-family: var(--font-latin-ui); }
.lang [lang="ar"] { font-family: "Tajawal", system-ui, sans-serif; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--gold-strong);
  color: #FFFFFF;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease-out);
}
.button:hover { background: var(--gold-text); }

/* ─── Hero ────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(560px, calc(100svh - var(--header-h)), 860px);
  overflow: hidden;
  background: #2A2016;
  color: #FFFFFF;
}

.hero__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 45%;
}

/* Darkest behind the words, lighter where the hall shows. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to left, rgba(20, 15, 9, 0.86) 0%, rgba(20, 15, 9, 0.62) 42%, rgba(20, 15, 9, 0.22) 100%),
    linear-gradient(to top, rgba(20, 15, 9, 0.35), rgba(20, 15, 9, 0) 40%);
}
[dir="ltr"] .hero::before {
  background:
    linear-gradient(to right, rgba(20, 15, 9, 0.86) 0%, rgba(20, 15, 9, 0.62) 42%, rgba(20, 15, 9, 0.22) 100%),
    linear-gradient(to top, rgba(20, 15, 9, 0.35), rgba(20, 15, 9, 0) 40%);
}

.hero__content {
  width: 100%;
  padding-block: clamp(64px, 9vw, 112px);
}
.hero__content > * { max-width: 640px; }
.hero__content > .hero__title { max-width: 780px; }

.kicker {
  margin: 0 0 10px;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--gold-text);
}
.kicker--on-dark { color: var(--gold-light); }

.hero__title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.35rem + 3.1vw, 3.75rem);
  line-height: 1.35;
  text-wrap: balance;
}
html[lang="en"] .hero__title {
  font-size: clamp(2.625rem, 1.55rem + 3.8vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.hero__lead {
  margin: 0 0 32px;
  max-width: 54ch;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.9);
}
html[lang="en"] .hero__lead { line-height: 1.6; }

/* ─── Store badges (not links: nothing to open yet) ───────── */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: var(--ink);
  color: #FFFFFF;
}

.store__icon { width: 28px; height: 28px; flex: none; }

.store__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: start;
}

.store__soon {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--on-dark-muted);
}

.store__name {
  font-family: var(--font-latin-ui);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stores--light .store {
  border-color: transparent;
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.stores--light .store__soon { color: var(--muted-warm); }

/* ─── Shared section type ─────────────────────────────────── */

.section-head {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.section-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.875rem, 1.3rem + 2.1vw, 2.875rem);
  line-height: 1.4;
  text-wrap: balance;
  color: var(--ink);
}
html[lang="en"] .section-title {
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.section-title--on-dark { color: #FFFFFF; }

.section-lead {
  max-width: 62ch;
  margin: 0 auto;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.95;
  color: var(--body-warm);
}
html[lang="en"] .section-lead { line-height: 1.65; }
.section-lead--on-dark { margin: 0 0 28px; color: #FFFFFF; }

/* ─── About ───────────────────────────────────────────────── */

.about {
  padding-top: var(--section);
  overflow: hidden;
}

.about__text {
  max-width: 860px;
  text-align: center;
}

.skyline {
  display: block;
  width: 100%;
  height: clamp(200px, 26vw, 380px);
  margin-top: clamp(40px, 6vw, 72px);
}

/* ─── Services ────────────────────────────────────────────── */

.services { padding-block: var(--section); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: clamp(40px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.service {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 28px 24px 132px;
  border-radius: 20px;
  background-color: var(--gold-strong);
  background-image: var(--grain);
  color: #FFFFFF;
  box-shadow: var(--shadow-card);
}

.service__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.625rem);
  line-height: 1.45;
}
html[lang="en"] .service__title { font-size: clamp(1.625rem, 1.4rem + 0.6vw, 1.875rem); line-height: 1.1; }

.service__body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: #FFFFFF;
}
html[lang="en"] .service__body { line-height: 1.55; }

.service__art {
  position: absolute;
  bottom: 18px;
  inset-inline-end: 18px;
  width: 132px;
  height: auto;
}

/* ─── How it works ────────────────────────────────────────── */

.how {
  padding-block: var(--section);
  background: var(--gold-tint);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  text-align: center;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  inset-inline-start: calc(50% + 44px);
  width: calc(100% - 88px + 32px);
  border-top: 2px dashed var(--gold-light);
}

.step__number {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--gold-strong);
  color: #FFFFFF;
  font: 700 1.375rem/1 var(--font-latin-ui);
  box-shadow: 0 0 0 8px var(--gold-tint), 0 0 0 9px var(--border-warm);
}

.step__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.5;
}
html[lang="en"] .step__title { font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.75rem); line-height: 1.15; }

.step__body {
  margin: 0;
  color: var(--body-warm);
}

/* ─── Download ────────────────────────────────────────────── */

.download { padding-block: var(--section); }

.download__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 32px;
  min-height: 400px;
  padding: clamp(40px, 6vw, 72px);
  padding-bottom: 0;
  overflow: hidden;
  border-radius: 28px;
  background-color: var(--gold-strong);
  background-image: var(--grain);
  color: #FFFFFF;
}

.download__text {
  align-self: center;
  padding-bottom: clamp(40px, 6vw, 72px);
}

.download__phone {
  align-self: end;
  display: flex;
  justify-content: center;
  height: 100%;
  min-height: 340px;
  position: relative;
}

.phone {
  position: absolute;
  top: 12px;
  width: 230px;
  aspect-ratio: 9 / 19;
  padding: 9px;
  border-radius: 40px;
  background: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}
.phone::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 64px;
  height: 18px;
  margin-left: -32px;
  border-radius: 999px;
  background: var(--ink);
  z-index: 1;
}

.phone__screen {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: 32px;
  background: var(--ivory);
}
.phone__screen img { width: 70%; height: auto; margin-top: -30%; }

/* ─── Footer ──────────────────────────────────────────────── */

.footer {
  padding-top: clamp(48px, 6vw, 72px);
  background: var(--ink);
  color: #FFFFFF;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 40px;
}

.footer__brand img { display: block; height: 60px; width: auto; }
.footer__brand p { margin: 16px 0 0; max-width: 36ch; color: var(--on-dark-muted); }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.footer__nav a {
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.footer__nav a:hover { color: var(--gold-light); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer__bottom p { margin: 0; font-size: 0.9375rem; color: var(--on-dark-muted); }

.lang--dark { color: #FFFFFF; }
.lang--dark:hover { background: rgba(255, 255, 255, 0.1); }
.footer :focus-visible { outline-color: var(--gold-light); }

/* ─── Motion: one entrance ────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero__content > * { animation: rise 0.9s var(--ease-out) both; }
  .hero__content > :nth-child(2) { animation-delay: 0.06s; }
  .hero__content > :nth-child(3) { animation-delay: 0.12s; }
  .hero__content > :nth-child(4) { animation-delay: 0.18s; }
}

@keyframes rise {
  from { transform: translateY(24px); }
  to { transform: none; }
}

/* ─── Features ────────────────────────────────────────────── */

.features { padding-block: var(--section); }

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  margin: clamp(40px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 4px;
  align-content: start;
  padding-block: 26px;
  border-top: 1px solid var(--border-warm);
}

.feature__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-strong);
}
.feature__icon svg { width: 26px; height: 26px; }

.feature__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3125rem;
  line-height: 1.5;
  text-wrap: balance;
}
html[lang="en"] .feature__title { font-size: 1.5rem; line-height: 1.2; }

.feature__body { margin: 0; min-width: 0; color: var(--body-warm); line-height: 1.85; }
html[lang="en"] .feature__body { line-height: 1.55; }

/* ─── For business ────────────────────────────────────────── */

.business {
  padding-block: var(--section);
  background: var(--gold-tint);
}

.business__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(40px, 5vw, 56px);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 24px;
}
.panel--owner {
  background-color: var(--ink);
  background-image: var(--grain);
  color: #FFFFFF;
}
.panel--vendor {
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.panel .kicker { margin: 0; }

.panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.4;
  text-wrap: balance;
}
html[lang="en"] .panel__title { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1.15; }

.checks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.checks li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 12px;
  line-height: 1.75;
}
html[lang="en"] .checks li { line-height: 1.55; }
.checks svg { width: 22px; height: 22px; margin-top: 4px; }
.panel--owner .checks svg { color: var(--gold-light); }
.panel--vendor .checks li { color: var(--body-warm); }
.panel--vendor .checks svg { color: var(--gold-strong); }

/* A few categories by name, each after a small gold dot, then «والمزيد».
   Not the full list: the marketplace keeps growing. */
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cats li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
}
.cats li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
}
.cats__more { color: var(--gold-text); }

.path {
  align-self: flex-start;
  margin: auto 0 0;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--gold-tint);
  font-weight: 700;
}
.path span { color: var(--gold-text); }

/* ─── Narrow screens ──────────────────────────────────────── */

@media (max-width: 1080px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .nav { display: none; }
  .header__row { gap: 12px; }
  .header__actions { gap: 4px; }
  .header__brand img { height: 46px; }
  .button { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }

  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 520px; margin-inline: auto; }
  .step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 20px;
    padding-bottom: 32px;
    text-align: start;
  }
  .step__number { grid-row: span 2; margin-bottom: 0; }
  .step__title { align-self: end; }
  .step:not(:last-child)::after {
    top: 68px;
    bottom: 4px;
    inset-inline-start: 27px;
    width: 0;
    border-top: 0;
    border-inline-start: 2px dashed var(--gold-light);
  }

  .business__grid { grid-template-columns: minmax(0, 1fr); }

  .download__panel { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .download__text { padding-bottom: 0; }
  .download .section-lead--on-dark { margin-inline: auto; }
  .download .stores { justify-content: center; }
  .download__phone { min-height: 260px; }
  .phone { width: 200px; }
}

@media (max-width: 600px) {
  .hero { min-height: 0; }
  .hero::before,
  [dir="ltr"] .hero::before {
    background: linear-gradient(to top, rgba(20, 15, 9, 0.9) 0%, rgba(20, 15, 9, 0.72) 55%, rgba(20, 15, 9, 0.45) 100%);
  }
  .hero__content { padding-block: 72px 56px; }

  .services__grid { grid-template-columns: minmax(0, 1fr); }
  .service { min-height: 0; padding-bottom: 128px; }

  .features__grid { grid-template-columns: minmax(0, 1fr); }

  .stores { gap: 10px; }
  .store { flex: 1 1 150px; min-width: 0; padding: 10px 14px; gap: 10px; }
  .store__icon { width: 24px; height: 24px; }
  .store__name { font-size: 1.0625rem; }
}

@media (max-width: 420px) {
  .lang [data-lang-label] { display: none; }
  .lang { padding: 0 8px; }
}
