/* ================= Fonts ================= */
@font-face {
  font-family: "Mahoor";
  src: url("../fonts/Mahoor_CNTR_wght_-FD.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-UI-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-UI-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-UI-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-UI-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ================= Tokens ================= */
:root {
  --bg: #0b0a09;
  --bg-elev: #141312;
  --surface: #1a1917;
  --surface-2: #221f1c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --gold: #d4af37;
  --gold-soft: #e8cd7a;
  --gold-ink: #241c08;

  --text: #f3f0ea;
  --text-muted: #9c948a;
  --text-faint: #635c53;

  --success: #35c46a;
  --danger: #e35b5b;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);

  --container: 960px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Mahoor", "Vazirmatn", "Tahoma", sans-serif;
  direction: rtl;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================= Layout helpers ================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.page-section {
  padding: 48px 0 96px;
}

/* ================= Header ================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 10, 9, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-diamond {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-diamond span {
  transform: rotate(-45deg);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-text .name {
  font-weight: 700;
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0.3px;
}
.brand-text .tag {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-faint);
  font-family: Georgia, serif;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}
.main-nav a {
  color: var(--text-muted);
  font-size: 14.5px;
  transition: color 0.2s ease;
  position: relative;
}
.main-nav a:hover {
  color: var(--text);
}
.main-nav a.active {
  color: var(--gold);
}

.header-side {
  display: flex;
  align-items: center;
  gap: 18px;
}
.theme-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: 74px 16px auto 16px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 0;
    display: none;
    box-shadow: var(--shadow-card);
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
  }
  .main-nav a:hover {
    background: var(--surface);
  }
  .nav-toggle {
    display: flex;
  }
}

/* ================= Hero ================= */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(
      ellipse 900px 500px at 50% 0%,
      rgba(120, 92, 42, 0.35),
      transparent 70%
    ),
    linear-gradient(180deg, #171310 0%, #0b0a09 60%);
}

.hero-content {
  max-width: 720px;
  padding: 0 24px;
  animation: fadeUp 0.9s ease both;
}

.eyebrow {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  margin: 0 0 20px;
  line-height: 1.3;
}
.hero h1 .accent {
  color: var(--gold);
}

.hero p {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 0 36px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 34px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.98);
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--gold-ink);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover {
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-strong);
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================= Section heading ================= */
.section-title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 10px;
}
.section-title-bar {
  width: 56px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto 44px;
  border-radius: 2px;
}

/* ================= Service cards ================= */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 720px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 190px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.service-card.featured {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--gold-ink);
  border-color: transparent;
}
.service-card.featured .service-desc {
  color: rgba(36, 28, 8, 0.75);
}
.service-card.featured .badge {
  background: rgba(0, 0, 0, 0.12);
  color: var(--gold-ink);
}

.service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.service-icon {
  font-size: 26px;
  color: var(--gold);
}
.service-card.featured .service-icon {
  color: var(--gold-ink);
}
.badge {
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 999px;
}
.service-name {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 6px;
}
.service-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}
.service-cta {
  align-self: flex-start;
  margin-top: auto;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* ================= Footer ================= */
.site-footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
  padding: 30px 20px;
  border-top: 1px solid var(--border);
}

/* ================= Stepper (booking) ================= */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 40px 0 46px;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
}
.step.active .step-circle,
.step.done .step-circle {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}
.step-label {
  font-size: 14.5px;
  color: var(--text-muted);
}
.step.active .step-label {
  color: var(--text);
}
.step-line {
  width: 44px;
  height: 1px;
  background: var(--border-strong);
}

.step-heading {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 32px;
}

/* ================= Booking service list ================= */
.pick-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto 30px;
}
.pick-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: right;
  width: 100%;
}
.pick-item:hover {
  border-color: var(--border-strong);
}
.pick-item.selected {
  border-color: var(--gold);
  background: var(--surface-2);
}
.pick-item .name {
  font-weight: 700;
  font-size: 16.5px;
  margin: 0 0 6px;
}
.pick-item .meta {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0;
}

/* ================= Calendar ================= */
.calendar-card {
  max-width: 760px;
  margin: 0 auto 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-weight: 700;
  font-size: 17px;
}
.calendar-nav button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.calendar-nav button:hover {
  color: var(--text);
  background: var(--surface-2);
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}
.calendar-grid .wd {
  color: var(--text-faint);
  font-size: 13px;
  padding-bottom: 10px;
}
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--text);
  border: 1.5px solid transparent;
}
.calendar-day:hover:not(.disabled) {
  border-color: var(--border-strong);
}
.calendar-day.disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}
.calendar-day.selected {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
}
.calendar-day.empty {
  visibility: hidden;
}

/* ================= Time slots ================= */
.slots-card {
  max-width: 760px;
  margin: 0 auto 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.slots-heading {
  text-align: center;
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 10px;
}
.slots-legend {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-inline-start: 6px;
}
.legend-dot.free {
  background: var(--success);
}
.legend-dot.booked {
  background: var(--gold);
}
.legend-dot.past {
  background: var(--text-faint);
}
.slots-period-label {
  font-weight: 700;
  margin: 18px 0 12px;
  font-size: 15px;
}
.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 560px) {
  .slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.slot-btn {
  border: 1.5px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-faint);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  font-size: 13.5px;
  cursor: not-allowed;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.slot-btn .tag {
  font-size: 11px;
}
.slot-btn.free {
  border-color: rgba(53, 196, 106, 0.4);
  color: var(--success);
  cursor: pointer;
}
.slot-btn.free:hover {
  background: rgba(53, 196, 106, 0.08);
}
.slot-btn.free.selected {
  background: var(--success);
  border-color: var(--success);
  color: #06210f;
}
.slot-btn.booked {
  border-color: rgba(212, 175, 55, 0.35);
  color: var(--gold);
}

/* ================= Form elements ================= */
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  direction: rtl;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}
.field .char-count {
  text-align: left;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 6px;
}
.field-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}
.field.has-error input {
  border-color: var(--danger);
}
.field.has-error .field-error {
  display: block;
}

/* ================= Modal (auth) ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  max-width: 460px;
  width: 100%;
  position: relative;
  text-align: center;
  animation: fadeUp 0.25s ease both;
}
.modal-close {
  position: absolute;
  top: 18px;
  inset-inline-start: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}
.modal-logo {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 26px;
}
.modal-logo span {
  transform: rotate(-45deg);
  font-family: Georgia, serif;
  font-weight: 700;
  color: var(--gold);
}
.modal-card h3 {
  font-size: 21px;
  margin: 0 0 8px;
}
.modal-card .sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 30px;
}
.otp-hint {
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 18px;
}
.otp-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 26px;
  direction: ltr;
}
.otp-inputs input {
  width: 56px;
  height: 60px;
  text-align: center;
  font-size: 22px;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.otp-inputs input:focus {
  border-color: var(--gold);
}
.resend-line {
  color: var(--text-muted);
  font-size: 13.5px;
  cursor: pointer;
}
.resend-line.disabled {
  opacity: 0.5;
  cursor: default;
}
.modal-error {
  color: var(--danger);
  font-size: 13.5px;
  margin-top: 14px;
  min-height: 18px;
}

/* ================= Confirm summary ================= */
.summary-card {
  max-width: 760px;
  margin: 0 auto 24px;
  background: var(--surface);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.summary-row:last-child {
  border-bottom: none;
}
.summary-row .k {
  color: var(--text-muted);
  font-size: 13.5px;
}
.summary-row .v {
  font-weight: 600;
}
.note-box {
  max-width: 760px;
  margin: 0 auto 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
}
.note-box .field label {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 14px;
}

.actions-col {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ================= Success page ================= */
.success-wrap {
  text-align: center;
  max-width: 560px;
  margin: 40px auto 0;
}
.success-check {
  width: 84px;
  height: 84px;
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 26px;
  color: var(--success);
  font-size: 36px;
}
.success-wrap h2 {
  font-size: 22px;
  margin-bottom: 32px;
}
.tracking-box {
  border: 1.5px dashed var(--gold);
  background: rgba(212, 175, 55, 0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}
.tracking-box .lbl {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.tracking-box .code {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  direction: ltr;
}
.success-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: right;
  margin-bottom: 22px;
}
.pay-note {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 26px;
}

/* ================= Utility ================= */
.loading-text {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}
.empty-text {
  text-align: center;
  color: var(--text-faint);
  padding: 30px 0;
}
.hidden {
  display: none !important;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 300;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}
.toast.error {
  border-color: var(--danger);
  color: #ffb3b3;
}

.back-link {
  display: block;
  text-align: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 16px;
  max-width: 760px;
  margin: 10px auto 0;
  cursor: pointer;
  background: none;
  width: 100%;
  font-size: 14.5px;
}
.back-link:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* ================= Light theme ================= */
[data-theme="light"] {
  --bg: #faf8f4;
  --bg-elev: #f1ede4;
  --surface: #ffffff;
  --surface-2: #f5f1e8;
  --border: rgba(20, 15, 5, 0.1);
  --border-strong: rgba(20, 15, 5, 0.18);

  --text: #221f1c;
  --text-muted: #6b6459;
  --text-faint: #a39b8c;

  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .hero {
  background: radial-gradient(
      ellipse 900px 500px at 50% 0%,
      rgba(212, 175, 55, 0.15),
      transparent 70%
    ),
    linear-gradient(180deg, #fff9ec 0%, #faf8f4 60%);
}
[data-theme="light"] .site-header {
  background: rgba(250, 248, 244, 0.8);
}
[data-theme="light"] .modal-overlay {
  background: rgba(20, 15, 5, 0.45);
}

/* ================= SPA: scroll anchors + reveal animation ================= */
section[id] {
  scroll-margin-top: 96px;
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
