:root {
  color-scheme: light;
  --emerald: #0e7a5f;
  --emerald-light: #14946f;
  --gold: #c9a24b;
  --gold-light: #dcc079;
  --sand-light: #fdf6e6;
  --sand-mid: #f3e0ad;
  --sand-deep: #e3c17e;
  --cream: #f6e8c8;
  --surface: #fdf8ee;
  --text: #2a2013;
  --text-muted: #7c6f57;
  --divider: #e6d3a4;
  --radius: 18px;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(160deg, var(--sand-light) 0%, var(--sand-mid) 55%, var(--sand-deep) 100%);
  color: var(--text);
  font-family: "Tajawal", "Cairo", "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Cairo", "Tajawal", "Segoe UI", sans-serif;
  font-weight: 800;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--divider);
}

header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  height: 34px;
  width: auto;
}

nav.site-nav {
  display: flex;
  gap: 28px;
}

nav.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
}

nav.site-nav a:hover {
  color: var(--emerald);
}

/* Hero */
.hero {
  text-align: center;
  padding: 88px 24px 64px;
}

.hero img.logo {
  width: 220px;
  max-width: 60vw;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text);
}

.hero p.lede {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* Sections */
section.product {
  padding: 72px 24px;
  border-top: 1px solid var(--divider);
}

section.product .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  section.product .container {
    grid-template-columns: 1fr;
  }
}

/* The header is one row on desktop; on a phone the nav has to wrap under the
   brand instead of colliding with it. */
@media (max-width: 560px) {
  header.site .container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 20px;
  }

  nav.site-nav {
    gap: 20px;
  }

  nav.site-nav a {
    font-size: 0.88rem;
  }
}

#mobile .container {
  grid-template-columns: 1fr;
}

.product-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin-bottom: 20px;
}

section.product h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 12px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}

.feature-list li::before {
  content: "✓";
  color: var(--emerald);
  font-weight: 800;
  flex: none;
}

.store-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.store-badges a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--text);
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-badges a:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
  max-width: 640px;
}

.screens img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
}

.screenshot-trigger {
  all: unset;
  display: block;
  cursor: zoom-in;
  border-radius: 16px;
}

.screenshot-trigger img {
  display: block;
  transition: opacity 0.15s ease;
}

.screenshot-trigger:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 4px;
  border-radius: 16px;
}

.screenshot-trigger:hover img {
  opacity: 0.92;
}

.edu-visual .screenshot-trigger,
.edu-visual .screenshot-trigger:focus-visible {
  width: 100%;
  border-radius: var(--radius);
}

@media (max-width: 560px) {
  .screens {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

.edu-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--divider);
}

.edu-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.order-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  background: var(--emerald);
  color: var(--surface);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.order-cta:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.order-cta--wide {
  width: 100%;
  margin-top: 8px;
}

.windows-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  padding: 72px 24px 40px;
  border-top: 1px solid var(--divider);
  color: var(--text-muted);
  background: var(--surface);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: grid;
  gap: 48px;
}

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

.site-footer__identity img {
  width: 3rem;
  height: 3.75rem;
  object-fit: contain;
}

.site-footer__eyebrow {
  margin: 0;
  color: var(--emerald);
  font-size: 0.78rem;
  font-weight: 700;
}

.site-footer h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 1.1rem;
}

.site-footer__details {
  display: grid;
  gap: 24px;
  margin: 0;
}

.site-footer__detail {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.site-footer__detail > div {
  min-width: 0;
}

.site-footer__detail-badge {
  flex: none;
  width: 4.5rem;
  height: 3.25rem;
  object-fit: contain;
}

/* A fixed box, not an auto width at a fixed height: the ZATCA wordmark is a
   3.3:1 wide image, and sizing it by height alone let it blow past its
   half-column and crowd the tax number out of the row entirely. */
.site-footer__detail-badge--lg {
  width: 4.5rem;
  height: 4.5rem;
}

.site-footer__details dt {
  margin: 0 0 4px;
  font-size: 0.78rem;
}

.site-footer__details dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  text-align: start;
}

/* The national address is a full line: it never shares a row with an identifier. */
.site-footer__details-wide {
  grid-column: 1 / -1;
}

.site-footer__details-wide dd {
  overflow-wrap: anywhere;
  font-weight: 600;
  line-height: 1.7;
}

.site-footer__address-short {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--emerald) 22%, var(--surface));
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface) 0%, var(--cream) 100%);
}

.site-footer__contact h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.site-footer__contact-links {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  direction: ltr;
}

.site-footer__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  unicode-bidi: isolate;
  color: var(--text);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.site-footer__contact-link svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.site-footer__contact-link .site-footer__whatsapp-icon,
.site-footer__social-link svg {
  fill: currentColor;
  stroke: none;
}

.site-footer__bottom {
  padding-top: 28px;
  margin-top: 40px;
  border-top: 1px solid var(--divider);
  text-align: center;
}

.site-footer__bottom p {
  margin: 0;
}

.site-footer__bottom strong {
  color: var(--text);
}

@media (min-width: 48rem) {
  .site-footer__details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .site-footer__inner {
    grid-template-columns: minmax(14rem, 0.9fr) minmax(18rem, 1fr) minmax(15rem, 0.8fr);
    align-items: start;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(20, 14, 8, 0.86);
  cursor: zoom-out;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.lightbox__close {
  all: unset;
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
}

.lightbox__close:hover {
  background: var(--sand-mid);
}

.lightbox__close:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

/* Order request modal */
.order-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 14, 8, 0.5);
}

.order-modal.is-open {
  display: flex;
}

.order-modal__card {
  position: relative;
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.4);
}

.order-modal__lede {
  margin-bottom: 20px;
}

.order-modal .lightbox__close {
  position: absolute;
  color: var(--text);
  background: var(--sand-light);
}

.order-modal form {
  display: flex;
  flex-direction: column;
}

.order-modal label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 12px 0 6px;
}

.order-modal input,
.order-modal textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--divider);
  background: var(--sand-light);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.order-modal input:focus,
.order-modal textarea:focus {
  outline: 2px solid var(--emerald);
  outline-offset: 1px;
}

.order-modal textarea {
  resize: vertical;
}

.order-modal__error {
  color: #b3261e;
  font-size: 0.85rem;
  margin: 14px 0 0;
}

/* Pricing page */
.pricing .container {
  max-width: 1180px;
}

.pricing-hero {
  text-align: center;
  padding: 72px 0 40px;
}

.pricing-hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.pricing-hero .lede {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.02rem;
}

.plan-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 30px;
  padding: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cream) 80%, transparent);
  border: 1px solid var(--divider);
}

.plan-tab {
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.plan-tab:hover {
  color: var(--text);
}

.plan-tab.is-active {
  background: var(--surface);
  color: var(--emerald);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.18);
}

.plan-tab:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

.plans {
  padding-bottom: 72px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  /* Six named-by-position rows — eyebrow, title, blurb, price, CTA, features —
     that every card inherits through subgrid below, so a longer blurb in one
     card moves every card's price and button down together rather than leaving
     the row ragged. Browsers without subgrid fall back to per-card auto rows:
     the layout still reads, it just stops aligning across cards. */
  grid-template-rows: repeat(6, auto);
  gap: 20px;
  align-items: stretch;
}

.plan-grid[hidden] {
  display: none;
}

.plan-card {
  position: relative;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 6;
  row-gap: 0;
  padding: 30px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  background: var(--surface);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.4);
}

.plan-card--featured {
  border-color: var(--emerald);
  background: linear-gradient(180deg, color-mix(in srgb, var(--emerald) 8%, var(--surface)) 0%, var(--surface) 60%);
  box-shadow: 0 22px 48px -26px rgba(14, 122, 95, 0.55);
}

.plan-card__badge {
  position: absolute;
  top: 18px;
  inset-inline-end: 22px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--emerald);
  color: var(--surface);
  font-size: 0.72rem;
  font-weight: 800;
}

.plan-card__eyebrow {
  margin: 0 0 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald);
}

.plan-card__title {
  font-size: 1.35rem;
  margin: 0 0 10px;
}

.plan-card__desc {
  margin: 0;
  font-size: 0.92rem;
}

.plan-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--text);
}

.plan-card__currency {
  font-family: "Cairo", "Tajawal", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.plan-card__amount {
  font-family: "Cairo", "Tajawal", sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.plan-card__amount--text {
  font-size: 1.7rem;
}

.plan-card__period {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 20px 0 22px;
  padding: 13px 24px;
  border: 1px solid var(--emerald);
  border-radius: 12px;
  background: var(--emerald);
  color: var(--surface);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.plan-cta:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.plan-cta:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

.plan-cta--ghost {
  background: transparent;
  color: var(--emerald);
  border-color: var(--divider);
}

.plan-cta--ghost:hover {
  border-color: var(--emerald);
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  border-top: 1px solid var(--divider);
  padding-top: 20px;
}

.plan-features li {
  position: relative;
  padding-inline-start: 26px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: var(--emerald);
  font-weight: 800;
}

.plan-notes {
  list-style: none;
  margin: 48px auto 0;
  padding: 26px 28px;
  max-width: 52rem;
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  background: color-mix(in srgb, var(--cream) 55%, transparent);
}

.plan-notes li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.plan-notes li + li {
  margin-top: 8px;
}

.plan-notes strong {
  color: var(--text);
}

@media (max-width: 560px) {
  .plan-tabs {
    display: flex;
    width: 100%;
  }

  .plan-tab {
    flex: 1;
    padding-inline: 12px;
  }
}

.order-modal select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--divider);
  background: var(--sand-light);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.order-modal select:focus {
  outline: 2px solid var(--emerald);
  outline-offset: 1px;
}
