:root {
  --bg-cream: #f6f0e7;
  --abx-brown: #62392b;
  --abx-ink: #2a1810;
  --abx-muted: rgba(42, 24, 16, 0.68);
  --abx-card-edge: rgba(98, 57, 43, 0.18);
  --font: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --font-display: "El Messiri", "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: #1c1612;
  color: #fffdf8;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font-family: inherit;
}

.masterplan {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  line-height: 0;
  background: #1c1612;
  pointer-events: none;
}

.masterplan picture,
.masterplan img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.masterplan__ph img {
  filter: blur(14px);
  transform: scale(1.06);
}

.masterplan::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 10, 8, 0.48) 0%, rgba(18, 10, 8, 0.18) 42%, rgba(18, 10, 8, 0.72) 100%),
    linear-gradient(90deg, rgba(18, 10, 8, 0.22), transparent 58%);
}

.abx {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 1.15rem max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  min-height: 100vh;
  min-height: 100dvh;
}

.sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(100%, 360px);
  margin: 0 auto;
}

.brand-row__split {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.7);
  flex: 0 0 auto;
}

.brand-tatwir,
.brand-entity {
  display: block;
  width: auto;
  height: 48px;
  max-width: 180px;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
}

.brand-entity--haras {
  height: 64px;
  max-width: 128px;
}

.brand-entity--diwan {
  height: 54px;
  max-width: 200px;
}

.intro-kicker {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 253, 248, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.intro-title {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 6vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.55);
}

.intro-sub {
  margin: 0.2rem 0 0;
  max-width: 22rem;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.55;
  color: rgba(255, 253, 248, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.step-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 253, 248, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 253, 248, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
}

.step-pill.is-active {
  background: rgba(255, 253, 248, 0.92);
  border-color: transparent;
  color: #2a1810;
}

.step-panel[hidden] {
  display: none !important;
}

.step-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  animation: stepIn 0.28s ease;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 253, 248, 0.9);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.back-link svg {
  transform: scaleX(-1);
}

.selected-project-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.95);
  color: var(--abx-ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.selected-project-chip img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  background: rgba(98, 57, 43, 0.08);
  padding: 0.35rem;
  flex: 0 0 auto;
}

.selected-project-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.selected-project-chip span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: rgba(42, 24, 16, 0.62);
}

.project-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.project-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  text-align: start;
  text-shadow:
    0 0 1px #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.project-select-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255, 253, 249, 0.96), rgba(247, 239, 229, 0.94));
  color: var(--abx-ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.project-select-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  background: rgba(98, 57, 43, 0.07);
}

.project-select-preview img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  background: #fff;
  padding: 0.3rem;
  flex: 0 0 auto;
}

.project-select-preview strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.project-select-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.project-select-field span {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(42, 24, 16, 0.72);
}

.project-select-field select {
  width: 100%;
  appearance: none;
  border: 1.5px solid rgba(98, 57, 43, 0.22);
  border-radius: 14px;
  background:
    #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%2362392b' d='M7.4 8.6 12 13.2l4.6-4.6L18 10l-6 6-6-6z'/%3E%3C/svg%3E")
    no-repeat left 0.9rem center / 16px;
  color: var(--abx-ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.9rem 1rem 0.9rem 2.4rem;
  outline: none;
}

.project-select-field select:focus {
  border-color: #62392b;
  box-shadow: 0 0 0 3px rgba(98, 57, 43, 0.16);
}

.project-select-card .submit {
  margin-top: 0.15rem;
}

.project-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.95rem 0.65rem 0.85rem;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 253, 248, 0.28);
  background:
    linear-gradient(160deg, rgba(255, 253, 249, 0.96), rgba(247, 239, 229, 0.94));
  color: var(--abx-ink);
  cursor: pointer;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-option:hover {
  transform: translateY(-2px);
  border-color: rgba(98, 57, 43, 0.45);
}

.project-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.project-option.is-selected,
.project-option:has(input:checked) {
  border-color: #62392b;
  box-shadow:
    0 0 0 2px rgba(98, 57, 43, 0.28),
    0 12px 28px rgba(0, 0, 0, 0.22);
}

.project-option__mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(98, 57, 43, 0.08);
  border: 1px solid rgba(98, 57, 43, 0.16);
  overflow: hidden;
}

.project-option__mark img {
  display: block;
  width: 38px;
  height: 38px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.project-option__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-option__meta {
  font-size: 0.75rem;
  color: rgba(42, 24, 16, 0.62);
  line-height: 1.35;
}

.project-option__check {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(98, 57, 43, 0.28);
  background: #fff;
}

.project-option.is-selected .project-option__check,
.project-option:has(input:checked) .project-option__check {
  border-color: #62392b;
  background: #62392b;
  box-shadow: inset 0 0 0 3px #fff;
}

.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.15rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: start;
}

.field span {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  text-shadow:
    0 0 1px #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000;
}

.field input {
  width: 100%;
  height: 54px;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 253, 248, 0.35);
  background: #fffdf9;
  color: var(--abx-ink);
  font-size: 1.02rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.field input::placeholder {
  color: rgba(42, 24, 16, 0.38);
}

.field input:focus {
  outline: 2px solid rgba(255, 253, 248, 0.55);
  border-color: transparent;
}

.submit {
  height: 56px;
  margin-top: 0.2rem;
  border: 0;
  border-radius: 16px;
  color: #fffdf9;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(145deg, #7a4836 0%, #62392b 48%, #4a2a1f 100%);
  box-shadow: 0 12px 26px rgba(98, 57, 43, 0.35);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.submit:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.submit:disabled {
  opacity: 0.65;
  cursor: progress;
}

.form-error {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: start;
  text-shadow:
    0 0 1px #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000;
}

.thanks-card {
  width: 100%;
  margin-top: 0.35rem;
  padding: 1.25rem 1rem 1.15rem;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.96);
  color: var(--abx-ink);
  text-align: center;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.thanks-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
}

.thanks-card__ticket {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--abx-brown);
}

.thanks-card__note {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--abx-muted);
}

.thanks-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

.thanks-card__actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--abx-brown);
  background: transparent;
  border: 1.5px solid rgba(98, 57, 43, 0.28);
}

@media (min-width: 960px) {
  .masterplan picture,
  .masterplan img {
    object-position: 58% center;
  }

  .masterplan::after {
    background:
      linear-gradient(to left, rgba(18, 10, 8, 0.92) 0%, rgba(18, 10, 8, 0.78) 28%, rgba(18, 10, 8, 0.28) 55%, rgba(18, 10, 8, 0) 72%),
      linear-gradient(to top, rgba(18, 10, 8, 0.45), rgba(18, 10, 8, 0) 34%);
  }

  .abx {
    width: min(440px, 36vw);
    margin: 0 max(5vw, 2rem) 0 auto;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 420px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-option,
  .submit {
    transition: none;
  }
}
