/* ─────────────────────────────────────────────────────
   Ajraan — Hajj Cost Calculator
   Manuscript palette + Outfit/Zain typography.
   Ink page shell · cream working card (form-heavy UIs
   read better on light ground — same as the app wireframes).
   ───────────────────────────────────────────────────── */

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --cream:  #F8F2E4;
  --sand:   #D9C9A4;
  --gold:   #AC8D6A;
  --brass:  #C9A766;
  --walnut: #7A6743;
  --ink:    #122128;
  --hairline: rgba(122, 103, 67, 0.22);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; }
h1, h2, p { margin: 0; }
svg { display: block; }
button, input, select, output { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Page shell — same background as ajraan.com ────── */
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  color: var(--sand);
  background-color: #08141A; /* fallback while image loads / if it fails */
  /* Layer order (top → bottom): gradient tint over Kaaba photo.
     Self-contained: images live in this deliverable's own assets/ folder,
     so file://, local http.server, and deployed layouts all resolve. */
  background-image:
    linear-gradient(180deg,
      rgba(8, 20, 26, 0.97)   0%,
      rgba(18, 33, 40, 0.95)  50%,
      rgba(27, 44, 52, 0.93)  100%),
    url("../assets/kaaba-hero.jpg");
  background-size: cover, cover;
  background-position: center, left center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
}

/* Serve the smaller image on smaller viewports (same as ajraan.com) */
@media (max-width: 900px) {
  body {
    background-image:
      linear-gradient(180deg,
        rgba(8, 20, 26, 0.97)   0%,
        rgba(18, 33, 40, 0.95)  50%,
        rgba(27, 44, 52, 0.93)  100%),
      url("../assets/kaaba-hero-mobile.jpg");
  }
}

.stage {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 32px;
  position: relative;
}

.ornament {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--brass);
  letter-spacing: 6px;
  font-size: 13px;
}

.dua { color: var(--brass); font-style: italic; }

/* ── Header ─────────────────────────────────────────── */
.head { text-align: center; margin-bottom: 32px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  margin-bottom: 28px;
}
.brand-glyph { width: 30px; height: 22px; color: var(--brass); }
.brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.head-title {
  font-weight: 800;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 14px;
}
.head-title em {
  color: var(--brass);
  font-style: italic;
  font-weight: 700;
}

.head-sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--sand);
  max-width: 460px;
  margin: 0 auto;
}

/* ── Calculator card ────────────────────────────────── */
.calc {
  background: var(--cream);
  color: var(--ink);
  border-radius: 24px;
  padding: 30px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.field { margin-bottom: 24px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
}
.optional { color: var(--walnut); font-weight: 400; font-size: 13px; }

.step-num {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--brass);
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Row layout for compact fields */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.field-row .field-label { margin-bottom: 0; }

/* Select */
.select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 15px;
  appearance: auto;
}
.select-inline { width: auto; min-width: 150px; }
.select:focus { outline: 2px solid var(--brass); outline-offset: 1px; }

/* Tier cards */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tier {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: #FFFFFF;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease;
}
.tier:hover { border-color: var(--gold); }
.tier.is-selected {
  border: 2px solid var(--gold);
  background: rgba(172, 141, 106, 0.12);
  padding: 11px 9px; /* compensate 2px border so layout doesn't shift */
}
.tier-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.tier-price { font-weight: 600; font-size: 13px; color: var(--gold); }
.tier-cap { font-size: 11px; color: var(--walnut); line-height: 1.3; }

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--hairline);
  border-radius: 99px;
  background: #FFFFFF;
  padding: 4px;
}
.stepper-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  color: var(--walnut);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease;
}
.stepper-btn:hover { background: rgba(172, 141, 106, 0.12); }
.stepper-value {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

/* Money input */
.money-input {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: #FFFFFF;
  padding: 0 14px;
  min-width: 160px;
}
.money-symbol { color: var(--walnut); font-weight: 600; }
.input {
  border: 0;
  padding: 12px 0;
  width: 110px;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  outline: none;
}

/* ── Results ────────────────────────────────────────── */
.results { margin-top: 20px; }

.result-hero {
  background: var(--ink);
  border-radius: 24px;
  padding: 26px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.result-hero::after {
  content: "· · ·";
  position: absolute;
  top: 14px;
  right: 18px;
  color: var(--brass);
  letter-spacing: 4px;
  font-size: 11px;
  opacity: 0.7;
}
.result-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 10px;
}
.result-total {
  font-weight: 800;
  font-size: clamp(36px, 8vw, 52px);
  letter-spacing: -0.02em;
  color: var(--cream);
  line-height: 1;
}
.result-cap { margin-top: 10px; font-size: 13px; color: var(--sand); }

.result-monthly {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--sand);
  color: var(--ink);
  border-radius: 16px;
  padding: 18px 22px;
  margin-top: 10px;
}
.rm-label { font-weight: 600; font-size: 14px; }
.rm-value { font-weight: 800; font-size: 26px; letter-spacing: -0.01em; }
.rm-cap { flex-basis: 100%; font-size: 12.5px; color: var(--walnut); }
.rm-note {
  flex-basis: 100%;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--walnut);
  opacity: 0.85;
}

.result-faster {
  background: rgba(248, 242, 228, 0.06);
  border: 1px solid rgba(201, 167, 102, 0.3);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 10px;
}
.rf-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 12px;
}
.rf-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
}
.rf-amount { color: var(--cream); font-weight: 600; min-width: 110px; }
.rf-track { flex: 1; height: 1px; background: rgba(201, 167, 102, 0.4); }
.rf-year { color: var(--brass); font-weight: 700; }
.rf-row-none { color: var(--sand); font-style: italic; }

/* ── CTA + waitlist ─────────────────────────────────── */
.cta { text-align: center; margin-top: 36px; }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.divider-line { flex: 0 0 60px; height: 1px; background: var(--brass); opacity: 0.55; }
.divider-pip { width: 6px; height: 6px; background: var(--brass); border-radius: 50%; }

.cta-title {
  font-weight: 800;
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: -0.015em;
  color: var(--cream);
  margin-bottom: 10px;
}
.cta-sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--sand);
  max-width: 440px;
  margin: 0 auto 24px;
}

.waitlist { margin: 0 auto; max-width: 440px; }
.waitlist-row {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(248, 242, 228, 0.05);
  border: 1px solid rgba(201, 167, 102, 0.4);
  border-radius: 99px;
  transition: border-color 160ms ease;
}
.waitlist-row:focus-within { border-color: var(--brass); }
.waitlist-input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  color: var(--cream);
  font-size: 15px;
  outline: none;
}
.waitlist-input::placeholder { color: rgba(217, 201, 164, 0.5); }
.waitlist-btn {
  background: var(--brass);
  color: var(--ink);
  padding: 10px 20px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 160ms ease, transform 100ms ease;
}
.waitlist-btn:hover { background: var(--cream); }
.waitlist-btn:active { transform: scale(0.98); }
.waitlist-msg { margin-top: 12px; min-height: 20px; font-size: 13px; color: var(--sand); opacity: 0.75; }
.waitlist-msg.is-error { color: #E4B8A0; opacity: 1; }
.waitlist-msg.is-success { color: var(--brass); opacity: 1; }

.share-btn {
  margin-top: 18px;
  font-size: 13px;
  color: var(--sand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(201, 167, 102, 0.6);
  transition: color 140ms ease;
}
.share-btn:hover { color: var(--brass); }

/* ── Footer — same as ajraan.com ────────────────────── */
.micro-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: #FFFFFF;
  letter-spacing: 0.02em;
}
.micro-footer a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(201, 167, 102, 0.6); /* brass underline */
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.micro-footer a:hover {
  color: var(--brass);
  text-decoration-color: var(--brass);
}
.disclaimer {
  max-width: 480px;
  margin: 0 auto 14px;
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(217, 201, 164, 0.55);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 520px) {
  .stage { padding: 28px 16px 24px; }
  .tiers { grid-template-columns: 1fr; }
  .tier { flex-direction: row; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
  .tier-cap { flex-basis: 100%; }
  .field-row { flex-wrap: wrap; }
  .waitlist-row { flex-direction: column; border-radius: 14px; padding: 8px; }
  .waitlist-btn { width: 100%; padding: 12px; }
  .rm-value { font-size: 22px; }
}

/* ── Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
