/* DR. BOSH HAIR AND SKIN CARE — site styles */

:root {
  --ivory: #F7F2EA;
  --cream: #EFE6D8;
  --beige: #DCC9B0;
  --nude: #C9A98A;
  --espresso: #2B211B;
  --ink-soft: #5A4A3F;
  --gold: #A8895A;
  --gold-deep: #7F6539;
  --olive: #3E4A3A;
  --olive-deep: #2F3A2D;
  --white: #FFFDF9;

  --font-display: "Alexandria", "Tajawal", system-ui, sans-serif;
  --font-body: "Tajawal", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-latin: "Cormorant Garamond", Georgia, serif;

  --wrap: min(1200px, 100% - 2 * clamp(20px, 5vw, 64px));
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Anchors land below the fixed header */
[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Photos fill their (positioned) frame */
.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

a {
  color: inherit;
}

h1, h2, h3, p {
  margin: 0;
}

h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Latin brand text inside Arabic copy */
.latin {
  font-family: var(--font-latin);
  letter-spacing: 0.04em;
  font-variant-numeric: lining-nums tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

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

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 100;
  background: var(--espresso);
  color: var(--ivory);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0.8em 1.8em;
  border: 1px solid var(--espresso);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.45s var(--ease),
    color 0.45s var(--ease),
    border-color 0.45s var(--ease),
    transform 0.45s var(--ease-out-soft);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--espresso);
  color: var(--ivory);
}

.btn--primary:hover {
  background: var(--olive);
  border-color: var(--olive);
}

.btn--ghost {
  background: transparent;
  color: var(--espresso);
}

.btn--ghost:hover {
  background: var(--espresso);
  color: var(--ivory);
}

.btn--small {
  min-height: 44px;
  padding: 0.6em 1.3em;
  font-size: 0.95rem;
}

.btn--large {
  min-height: 60px;
  padding: 1em 2.2em;
  font-size: 1.1rem;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  color: var(--espresso);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(247, 242, 234, 0.96);
  color: var(--espresso);
  box-shadow: 0 1px 0 rgba(43, 33, 27, 0.08);
}

.site-header__inner {
  height: 100%;
  width: var(--wrap);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}

.brand__name {
  font-family: var(--font-latin);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  direction: ltr;
}

.brand__sub {
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  direction: ltr;
  opacity: 0.85;
}

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

.site-nav__list {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  position: relative;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding-block: 6px;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out-soft);
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  position: relative;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  position: absolute;
  inset-inline-start: 13px;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.45s var(--ease-out-soft), opacity 0.3s var(--ease);
}

.nav-toggle__bars { top: 23px; content: ""; }
.nav-toggle__bars::before { content: ""; top: -7px; inset-inline-start: 0; }
.nav-toggle__bars::after { content: ""; top: 7px; inset-inline-start: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  width: var(--wrap);
  margin-inline: auto;
  padding: calc(var(--header-h) + 40px) 0 96px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--olive);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
}

.hero__eyebrow-sep {
  width: 48px;
  height: 1px;
  background: var(--gold);
}

.hero__title {
  margin-top: 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 1.12;
}

.hero__title-line {
  display: block;
  animation: rise 1.1s var(--ease-out-soft) both;
}

.hero__title-line:nth-child(2) {
  animation-delay: 0.18s;
}

.hero__title-line--accent {
  color: var(--olive);
  font-style: normal;
}

.hero__lead {
  margin-top: 28px;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 1.1rem;
  animation: rise 1.1s 0.4s var(--ease-out-soft) both;
}

.hero__actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: rise 1.1s 0.55s var(--ease-out-soft) both;
}

.hero__media {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

.hero__arch {
  position: absolute;
  inset: 0;
  border-radius: 999px 999px 18px 18px;
  overflow: hidden;
  background: var(--beige);
  clip-path: inset(100% 0 0 0);
  animation: reveal-mask 1.6s 0.2s var(--ease-out-soft) forwards;
}

.hero__arch-inner {
  position: absolute;
  inset: 0;
  background: var(--beige);
  animation: settle 2.6s 0.3s var(--ease-out-soft) both;
}

.hero__arch-inner::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 253, 249, 0.6);
  border-radius: 999px 999px 10px 10px;
}

.float {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--gold);
  animation: float 9s ease-in-out 2;
}

.float--one {
  width: 120px;
  height: 120px;
  inset-inline-start: -28px;
  top: 12%;
}

.float--two {
  width: 56px;
  height: 56px;
  background: var(--olive);
  border-color: var(--olive);
  inset-inline-end: -18px;
  bottom: 18%;
  animation-delay: -4s;
}

.scroll-cue {
  position: absolute;
  inset-inline-start: 50%;
  bottom: 32px;
  transform: translateX(50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.scroll-cue__line {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.4s var(--ease) infinite;
}

/* ---------- Reveal system ---------- */

/* Stagger the service cards. Set here rather than with an inline
   style attribute so the Content-Security-Policy can refuse inline
   styles outright. Extra cards beyond the fifth reveal with the
   same 400ms delay. */
.service-list > .service:nth-child(2) { --delay: 100ms; }
.service-list > .service:nth-child(3) { --delay: 200ms; }
.service-list > .service:nth-child(4) { --delay: 300ms; }
.service-list > .service:nth-child(n+5) { --delay: 400ms; }

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1s var(--ease-out-soft),
    transform 1s var(--ease-out-soft);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Shared typography ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--olive);
  margin-bottom: 14px;
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.22;
}

.section-head {
  margin-bottom: clamp(40px, 6vw, 72px);
}

/* ---------- Story ---------- */

.story {
  width: var(--wrap);
  margin-inline: auto;
  padding: clamp(96px, 14vw, 180px) 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}

.story__visual {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 82%;
}

.story__panel {
  position: absolute;
  inset: 0;
  background: var(--olive);
  border-radius: 2px;
}

.story__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(43, 33, 27, 0.6), transparent 42%);
  pointer-events: none;
}

.story__panel::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--gold);
  pointer-events: none;
}

.story__caption {
  position: absolute;
  z-index: 2;
  inset-inline-start: 24px;
  bottom: 22px;
  color: var(--ivory);
  font-size: 1.4rem;
}

.story__text {
  padding-bottom: 12px;
}

.story__text .display {
  margin-bottom: 28px;
}

.story__text p:not(.eyebrow):not(.display) {
  max-width: 30em;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

/* ---------- Services ---------- */

.services {
  background: var(--cream);
  padding: clamp(96px, 12vw, 160px) 0;
}

.services > *:not(.service-list) {
  width: var(--wrap);
  margin-inline: auto;
}

.service-list {
  width: var(--wrap);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(56px, 8vw, 96px);
  counter-reset: svc;
}

.service {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  position: relative;
  padding-block-start: 24px;
  border-block-start: 1px solid rgba(168, 137, 90, 0.4);
}

.service__index {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-latin);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--gold-deep);
}

.service__panel {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 2px;
  background: var(--beige);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: transform 0.9s var(--ease-out-soft);
}

.service__panel::before {
  content: "";
  position: absolute;
  inset: 12% 14%;
  z-index: 1;
  border-radius: 999px 999px 0 0;
  border: 1px solid rgba(255, 253, 249, 0.55);
  transition: transform 1.1s var(--ease-out-soft);
}

.service__panel .photo {
  transition: transform 1.2s var(--ease-out-soft);
}

.service:nth-child(odd) .service__panel { background: var(--beige); }
.service:nth-child(even) .service__panel { background: #CDB9A0; }
.service:nth-child(3) .service__panel { background: #C5B4A0; }

.service__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.35;
  transition: color 0.5s var(--ease), transform 0.7s var(--ease-out-soft);
}

.service__desc {
  margin-top: 12px;
  color: var(--ink-soft);
  max-width: 36em;
}

.service__more {
  display: inline-block;
  margin-top: 14px;
  font-size: 1.4rem;
  color: var(--gold-deep);
  transition: transform 0.6s var(--ease-out-soft);
}

.service:hover .service__panel { transform: translateY(-4px); }
.service:hover .service__panel::before { transform: scale(1.04); }
.service:hover .service__panel .photo { transform: scale(1.04); }
.service:hover .service__title { color: var(--olive); transform: translateX(-4px); }
.service:hover .service__more { transform: translateX(-8px); }

.services__note {
  width: var(--wrap);
  margin: 72px auto 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 40em;
}

/* ---------- Signature ---------- */

.signature {
  background: var(--olive-deep);
  color: var(--ivory);
  padding: clamp(120px, 18vw, 220px) 24px;
  text-align: center;
}

.signature__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: 1.25;
}

.signature__line {
  display: block;
}

.signature__line--soft {
  color: var(--beige);
  font-weight: 400;
  font-size: 0.72em;
  margin-top: 0.3em;
}

/* ---------- Why ---------- */

.why {
  width: var(--wrap);
  margin-inline: auto;
  padding: clamp(96px, 12vw, 160px) 0;
}

.section-head--left {
  max-width: 36em;
}

.why__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 72px) clamp(32px, 6vw, 96px);
}

.why__list li:nth-child(even) {
  margin-top: clamp(40px, 8vw, 96px);
}

.why__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding-block-start: 24px;
  border-block-start: 1px solid rgba(43, 33, 27, 0.15);
}

.why__num {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--gold);
}

.why__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.4;
}

.why__text {
  margin-top: 10px;
  color: var(--ink-soft);
}

/* ---------- Booking ---------- */

.booking {
  background: var(--cream);
  padding: clamp(96px, 12vw, 150px) 24px;
}

.booking__inner {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.booking__inner .display {
  margin-bottom: 22px;
}

.booking__text {
  color: var(--ink-soft);
  font-size: 1.15rem;
  margin-bottom: 40px;
}

.booking__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* ---------- Contact ---------- */

.contact {
  width: var(--wrap);
  margin-inline: auto;
  padding: clamp(96px, 12vw, 150px) 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
}

.contact__block {
  border-block-start: 1px solid rgba(168, 137, 90, 0.5);
  padding-block-start: 28px;
}

.contact__label {
  font-size: 0.85rem;
  color: var(--olive);
  margin-bottom: 14px;
}

.contact__phone {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3rem);
  text-decoration: none;
  line-height: 1.2;
  transition: color 0.4s var(--ease);
}

.contact__phone:hover {
  color: var(--olive);
}

.contact__buttons {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact__address {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.7;
  margin-bottom: 24px;
  user-select: all;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--espresso);
  color: var(--cream);
  padding: 80px 24px 40px;
}

.site-footer__inner {
  width: var(--wrap);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px 56px;
  align-items: start;
}

.site-footer__name {
  font-size: 2.2rem;
  letter-spacing: 0.14em;
}

.site-footer__sub {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  opacity: 0.75;
  margin-top: 4px;
}

.site-footer__slogan {
  margin-top: 24px;
  font-family: var(--font-display);
  color: var(--beige);
  font-size: 1rem;
}

.site-footer__nav {
  display: grid;
  gap: 12px;
}

.site-footer__nav a,
.site-footer__contact a {
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.site-footer__nav a:hover,
.site-footer__contact a:hover {
  color: var(--beige);
}

.site-footer__contact p + p {
  margin-top: 12px;
}

.site-footer__copy {
  grid-column: 1 / -1;
  padding-top: 28px;
  border-top: 1px solid rgba(247, 242, 234, 0.14);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ---------- Error pages ---------- */

.error-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 48px 24px;
  text-align: center;
}

.error-page__brand {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.error-page__code {
  font-size: clamp(5rem, 16vw, 9rem);
  line-height: 1;
  color: var(--gold);
}

.error-page__text {
  max-width: 30em;
  margin-bottom: 12px;
  color: var(--ink-soft);
}

/* ---------- Motion keyframes ---------- */

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

@keyframes reveal-mask {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes settle {
  from { transform: scale(1.1); }
  to { transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 32px clamp(20px, 5vw, 64px) 40px;
    background: var(--ivory);
    color: var(--espresso);
    box-shadow: 0 18px 40px rgba(43, 33, 27, 0.12);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease-out-soft), visibility 0s linear 0.5s;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease-out-soft), visibility 0s;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 4px;
  }

  .site-nav__link {
    display: block;
    font-size: 1.25rem;
    padding: 12px 0;
  }

  .site-nav__cta {
    width: 100%;
  }

  .nav-toggle {
    display: block;
  }

  .site-header.is-open {
    background: var(--ivory);
    color: var(--espresso);
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: start;
    padding-top: calc(var(--header-h) + 32px);
    padding-bottom: 120px;
  }

  .hero__media {
    justify-self: center;
    max-width: 300px;
    margin-top: 16px;
  }

  .story,
  .contact__grid,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .story__visual {
    width: 70%;
    max-width: 360px;
  }

  .why__list {
    grid-template-columns: 1fr;
  }

  .why__list li:nth-child(even) {
    margin-top: 0;
  }

  .services__note {
    margin-top: 48px;
  }
}

@media (min-width: 720px) {
  .service {
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(32px, 5vw, 72px);
  }

  .service:nth-child(even) .service__panel {
    order: 2;
  }

  .service__panel {
    aspect-ratio: 4 / 3;
  }
}

@media (min-width: 1280px) {
  .hero__media {
    max-width: 580px;
  }
}

@media (max-width: 380px) {
  body {
    font-size: 1rem;
  }

  .hero__title {
    font-size: 2.3rem;
  }

  .btn {
    width: 100%;
  }

  .booking__actions .btn {
    width: 100%;
  }
}

/* ---------- Reduced motion ---------- */

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
