/* Mobile-first luxury salon styling */
:root,
[data-theme="light"] {
  --text-xs: clamp(0.75rem, 0.72rem + 0.2vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 1rem);
  --text-base: clamp(1rem, 0.98rem + 0.15vw, 1.08rem);
  --text-lg: clamp(1.2rem, 1.05rem + 0.8vw, 1.5rem);
  --text-xl: clamp(1.55rem, 1.15rem + 2vw, 2.2rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --color-bg: #f8f2ee;
  --color-surface: #fffaf7;
  --color-surface-2: #fffdfb;
  --color-surface-offset: #f2e7de;
  --color-border: #dbc9bc;
  --color-text: #2f211d;
  --color-text-muted: #7a6b62;
  --color-text-inverse: #fff9f6;
  --color-primary: #8d5d57;
  --color-primary-2: #c89d97;
  --color-primary-highlight: #ebd8d2;
  --color-success: #3f7750;

  --shadow-sm: 0 6px 18px rgba(47, 33, 29, 0.08);
  --shadow-md: 0 18px 40px rgba(47, 33, 29, 0.14);
  --shadow-lg: 0 28px 60px rgba(47, 33, 29, 0.18);

  --radius-md: 1rem;
  --radius-lg: 1.35rem;
  --radius-xl: 1.8rem;
  --radius-full: 9999px;

  --font-body: "Inter", "Cairo", sans-serif;
  --font-display: "Playfair Display", "Cairo", serif;
}

[data-theme="dark"] {
  --color-bg: #171210;
  --color-surface: #211a17;
  --color-surface-2: #29201d;
  --color-surface-offset: #302521;
  --color-border: #493932;
  --color-text: #f4e8e2;
  --color-text-muted: #b8a8a1;
  --color-text-inverse: #231916;
  --color-primary: #d0a39d;
  --color-primary-2: #e8c5bf;
  --color-primary-highlight: #3a2f2c;
  --color-success: #7cc28f;
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.42);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  padding-bottom: 108px;
  background: #f8f2ee;
  background: radial-gradient(circle at top right, rgba(200, 157, 151, 0.18), transparent 34%),
    linear-gradient(180deg, var(--color-bg), #ffffff);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
}

a,
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  width: min(calc(100% - 1rem), 430px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-full);
  z-index: 99;
}

.skip-link:focus {
  left: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 242, 238, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(47, 33, 29, 0.1);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.85rem 0 0.75rem;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--color-primary-highlight), var(--color-surface));
  box-shadow: var(--shadow-sm);
}

.brand-copy strong {
  display: block;
  font-size: var(--text-sm);
}

.brand-copy span {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  max-width: 20ch;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid rgba(47, 33, 29, 0.1);
  box-shadow: var(--shadow-sm);
}

.lang-switch {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  background: var(--color-surface);
  padding: 0.3rem;
  border-radius: 1rem;
  border: 1px solid rgba(47, 33, 29, 0.1);
}

.lang-switch button {
  min-height: 42px;
  border-radius: 0.85rem;
}

.lang-switch button.active,
.cta,
.slot.selected {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

section {
  padding: 1.2rem 0;
}

.hero {
  padding-top: 1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid rgba(47, 33, 29, 0.1);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  margin-bottom: 1rem;
}

h1,
h2,
h3 {
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 10vw, 3.4rem);
  margin-bottom: 0.9rem;
}

h2 {
  font-size: var(--text-xl);
  margin-bottom: 0.85rem;
}

h3 {
  font-size: var(--text-lg);
}

p {
  max-width: 34ch;
}

.muted {
  color: var(--color-text-muted);
}

.hero-shell {
  display: grid;
  gap: 1rem;
}

.hero-card,
.service-card,
.panel,
.admin-card,
.stack-card {
  background: linear-gradient(180deg, var(--color-surface), var(--color-surface-offset));
  border: 1px solid rgba(47, 33, 29, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.hero-card {
  padding: 1rem;
  overflow: hidden;
  position: relative;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.55;
}

.glow.a {
  width: 180px;
  height: 180px;
  background: rgba(200, 157, 151, 0.4);
  top: -40px;
  left: -30px;
}

.glow.b {
  width: 120px;
  height: 120px;
  background: rgba(141, 93, 87, 0.22);
  bottom: 10px;
  right: -20px;
}

.hero-quick {
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.quick-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, var(--color-primary), #6f4641);
  color: var(--color-text-inverse);
  border-radius: 1.15rem;
  box-shadow: var(--shadow-md);
}

.quick-chip small {
  display: block;
  opacity: 0.9;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.mini {
  padding: 0.9rem;
  border-radius: 1rem;
  background: var(--color-surface-2);
  border: 1px solid rgba(47, 33, 29, 0.08);
}

.mini strong {
  display: block;
  font-size: var(--text-lg);
}

.hero-actions {
  display: grid;
  gap: 0.7rem;
}

.cta {
  min-height: 50px;
  padding: 0.95rem 1.2rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(47, 33, 29, 0.12);
  box-shadow: none;
}

.section-head {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.services-list,
.stack-list,
.timeline {
  display: grid;
  gap: 0.85rem;
}

.service-card,
.panel,
.admin-card,
.stack-card {
  padding: 1rem;
}

.tag {
  display: inline-flex;
  width: max-content;
  padding: 0.42rem 0.72rem;
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  font-size: var(--text-xs);
  margin-bottom: 0.7rem;
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.price {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  min-height: 44px;
  padding: 0.8rem;
  border-radius: 1rem;
  background: var(--color-surface-offset);
  text-align: center;
}

.tab.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

label {
  font-size: var(--text-sm);
  font-weight: 700;
}

input,
select,
textarea {
  min-height: 52px;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: var(--color-surface-2);
  border: 1px solid rgba(47, 33, 29, 0.12);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.slot {
  min-height: 52px;
  padding: 0.75rem;
  border-radius: 1rem;
  background: var(--color-surface-offset);
  text-align: center;
  font-weight: 700;
}

.slot.disabled {
  opacity: 0.42;
  pointer-events: none;
  text-decoration: line-through;
}

.summary {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(47, 33, 29, 0.1);
}

.status-note {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: #edf6ef;
  font-size: var(--text-sm);
}

.mobile-bottom-bar {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 250, 247, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(47, 33, 29, 0.1);
  border-radius: 1.2rem;
  box-shadow: var(--shadow-lg);
}

.mobile-bottom-bar .cta {
  min-width: 146px;
  box-shadow: none;
}

.mobile-bottom-bar strong {
  display: block;
  font-size: var(--text-sm);
}

.mobile-bottom-bar span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.mobile-nav {
  position: sticky;
  bottom: 0;
  margin-top: 1rem;
}

.mobile-nav-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.2rem 0;
}

.mobile-nav a {
  text-decoration: none;
  text-align: center;
  padding: 0.82rem 0.45rem;
  border-radius: 1rem;
  background: var(--color-surface);
  border: 1px solid rgba(47, 33, 29, 0.1);
  font-size: var(--text-xs);
  color: inherit;
  box-shadow: var(--shadow-sm);
}

/* Simple reveal (always visible if JS لا يعمل) */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

/* Larger screens */
@media (min-width: 721px) {
  body {
    padding-bottom: 0;
  }
  .container {
    width: min(calc(100% - 2rem), 1120px);
  }
  .header-inner {
    grid-template-columns: 1fr auto auto;
  }
  .lang-switch {
    grid-column: auto;
    width: 280px;
  }
  .hero-shell {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 1.5rem;
  }
  .services-list,
  .stack-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .booking-shell {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 1.25rem;
  }
  .slot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .mobile-nav,
  .mobile-bottom-bar {
    display: none;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Optional nicer background when color-mix مدعوم */
@supports (background: color-mix(in srgb, black, white)) {
  body {
    background:
      radial-gradient(circle at top right, rgba(200, 157, 151, 0.18), transparent 34%),
      linear-gradient(180deg, var(--color-bg), color-mix(in srgb, var(--color-bg) 86%, #ffffff 14%));
  }
}