/* ===== Base page styles ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  color: #3a3937;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #8a7f6f;
  color: #ffffff;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid #8a7f6f;
  outline-offset: 3px;
}

/* ===== Navigation bar (body > nav = the top bar only, not the footer nav) ===== */
body > nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 44px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(207, 203, 196, 0.6);
}

.nav-brand__img {
  display: block;
  height: 36px;
  width: auto;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 36px;
}

nav ul a {
  text-decoration: none;
  color: #333333;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 15px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

nav ul a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #8a7f6f;
  transition: width 0.35s ease;
}

nav ul a:hover {
  color: #8a7f6f;
}

nav ul a:hover::after,
nav ul a.active::after {
  width: 100%;
}

nav ul a.active {
  color: #8a7f6f;
}

/* ===== Hero section ===== */
.hero {
  text-align: center;
  padding: 120px 20px;
  background-color: #e9e8e6;
}

/* Cover hero: photo background with a dark overlay, light text */
.hero--cover {
  position: relative;
  padding: 160px 20px;
  color: #ffffff;
  background-image:
    linear-gradient(rgba(30, 28, 27, 0.5), rgba(30, 28, 27, 0.62)),
    url("photos/cover-1.jpeg");
  background-size: cover;
  background-position: center;
}

/* Hairline frame inset in the hero, like a framed canvas */
.hero--cover::after {
  content: '';
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(232, 221, 202, 0.35);
  pointer-events: none;
  animation: frameFade 1.8s ease 0.9s both;
}

@keyframes frameFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Animated scroll cue: a thin line drawing down through the frame */
.hero--cover::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 70px;
  background: linear-gradient(to bottom,
    rgba(232, 221, 202, 0),
    rgba(232, 221, 202, 0.9));
  animation: scrollCue 2.8s cubic-bezier(0.65, 0, 0.35, 1) 1.6s infinite;
}

@keyframes scrollCue {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Projects page cover hero (overrides the cover-1 background) */
.hero--projects {
  background-image:
    linear-gradient(rgba(30, 28, 27, 0.55), rgba(30, 28, 27, 0.55)),
    url("photos/shaza-makkah-1.jpeg");
}

.hero-eyebrow {
  display: block;
  font-family: "Pinyon Script", cursive;
  font-size: 40px;
  color: #e8ddca;
}

.hero-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 88px;
  font-weight: 400;
  letter-spacing: 6px;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 8px 0 20px;
}

.hero-tagline {
  font-size: 18px;
  letter-spacing: 1px;
  margin: 0;
}

/* Brand logo used as the homepage hero title */
.hero-logo {
  display: block;
  width: min(620px, 86vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 3px 22px rgba(20, 18, 17, 0.45));
}

/* ===== Reusable layout ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section {
  padding: 90px 20px;
}

.section--light {
  background-color: #ffffff;
}

.section--grey {
  background-color: #e9e8e6;
}

.section--dark {
  background-color: #2e2c2b;
  color: #e8ddca;
}

/* Compact page header used on inner pages */
.page-hero {
  padding: 80px 20px 40px;
  text-align: center;
  background-color: #e9e8e6;
}

.page-hero__sub {
  font-size: 17px;
  font-style: italic;
  color: #6b6b6b;
  margin: 20px 0 0;
}

/* Script-over-serif heading used across the site */
.section-heading {
  margin-bottom: 40px;
}

.section-heading__script {
  display: block;
  font-family: "Pinyon Script", cursive;
  font-size: 36px;
  color: #8a7f6f;
  line-height: 1;
}

.section-heading__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 56px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #cfcbc4;
}

.section-heading--center {
  text-align: center;
}

.section-heading--center .section-heading__title {
  display: inline-block;
}

.lede {
  font-size: 18px;
  line-height: 1.8;
  max-width: 720px;
  margin: 0 0 20px;
}

.lede--center {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ===== Services grid (3 columns) ===== */
.services {
  display: flex;
  flex-wrap: wrap;
  gap: 50px 40px;
  counter-reset: service;
}

.service {
  flex: 1 1 260px;
}

/* Editorial numbering (01–06), generated by CSS counters */
.service::before {
  counter-increment: service;
  content: counter(service, decimal-leading-zero);
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 3px;
  color: #8a7f6f;
  margin-bottom: 10px;
}

.service__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #cfcbc4;
}

.service__desc {
  font-size: 16px;
  line-height: 1.7;
  color: #555555;
  margin: 0;
}

/* Two-column text + image layout */
.split {
  display: flex;
  align-items: center;
  gap: 50px;
}

.split__text {
  flex: 1;
}

.split__img {
  flex: 1;
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* Portrait photos of people: keep the head in frame by cropping from the top */
.split__img--portrait {
  height: 520px;
  object-position: top center;
}

/* Centered pull-quote (mission statement) */
.quote {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  font-style: italic;
  line-height: 1.7;
}

/* Leadership portraits */
.people {
  display: flex;
  justify-content: center;
  gap: 80px;
  text-align: center;
}

.person__img {
  width: 240px;
  height: 280px;
  object-fit: cover;
}

.person__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 16px 0 4px;
}

.person__role {
  font-style: italic;
  color: #b8b2a7;
  margin: 0;
}

/* ===== Featured project cards ===== */
.cards {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  flex: 1;
  text-decoration: none;
  color: #333333;
}

.card__img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.card__label {
  display: block;
  margin-top: 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  letter-spacing: 1px;
}

/* ===== Project gallery (3-column photo grid) ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery__img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* ===== Signature projects list (2 columns) ===== */
.signature {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 60px;
}

.signature__item {
  padding: 16px 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 20px;
  letter-spacing: 1px;
  border-bottom: 1px solid #4a4744;
}

/* ===== Contact details ===== */
.contact-details {
  text-align: center;
}

.contact-line {
  font-size: 20px;
  margin: 0 0 18px;
}

.contact-line a {
  color: #2e2c2b;
  text-decoration: none;
}

.contact-label {
  display: inline-block;
  min-width: 130px;
  font-family: "Pinyon Script", cursive;
  font-size: 26px;
  color: #8a7f6f;
}

/* The "WhatsApp" link inside a label keeps the label's script color */
.contact-label a {
  color: inherit;
}

/* ===== Office cards ===== */
.offices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  text-align: center;
}

.office__img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.office__city {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 20px 0 8px;
}

.office__address {
  line-height: 1.7;
  color: #555555;
  margin: 0 0 8px;
}

.office__phone {
  margin: 0;
}

.office__phone a {
  color: #8a7f6f;
  text-decoration: none;
}

/* ===== Button ===== */
.button {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid #2e2c2b;
  color: #2e2c2b;
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 14px;
}

/* ===== Footer ===== */
.footer {
  background-color: #2e2c2b;
  color: #b8b2a7;
  padding: 70px 20px 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 60px;
}

.footer__logo {
  display: block;
  height: 52px;
  width: auto;
  margin-bottom: 20px;
}

.footer__tagline {
  font-style: italic;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

.footer__script {
  font-family: "Pinyon Script", cursive;
  font-size: 26px;
  color: #e8ddca;
  margin: 0 0 6px;
  line-height: 1;
}

.footer__nav,
.footer__contact-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__nav a {
  width: max-content;
  color: #b8b2a7;
  text-decoration: none;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.footer__contact-col a {
  width: max-content;
  color: #b8b2a7;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
}

.footer__nav a:hover,
.footer__contact-col a:hover {
  color: #e8ddca;
}

/* WhatsApp icon link shown beside the +971 50 mobile number
   (contact page, Mecca office card, footer). script.js swaps the
   "WhatsApp" text in the HTML for this inline SVG logo on load.
   fill: currentColor makes the icon take whatever text color its
   surroundings use (tan on the contact page, beige in the footer). */
a.whatsapp-link svg {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  vertical-align: -0.18em;
  transition: fill 0.3s ease;
}

a.whatsapp-link:hover svg {
  fill: #4caf50; /* hint of WhatsApp green on hover */
}

/* Inside the big script-font "Phone /" label the icon would scale up
   with the 26px font — cap it so it sits politely beside the words */
.contact-label a.whatsapp-link svg {
  width: 20px;
  height: 20px;
}

.footer__bottom {
  border-top: 1px solid rgba(184, 178, 167, 0.25);
  padding: 22px 0;
  text-align: center;
}

.footer__bottom p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #8d877c;
}

/* ===== Hero entrance animation ===== */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.hero-eyebrow {
  animation: heroFadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

.hero-title {
  animation: heroFadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.hero-tagline {
  animation: heroFadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.55s both;
}

/* ===== Scroll-reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Anchor scroll offset for sticky nav ===== */
section[id] {
  scroll-margin-top: 80px;
}

/* ===== Card hover ===== */
.card {
  overflow: hidden;
}

.card__img {
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card__img {
  transform: scale(1.05);
}

.card__label {
  transition: color 0.3s ease;
}

.card:hover .card__label {
  color: #8a7f6f;
}

/* ===== Gallery image hover ===== */
.gallery__img {
  clip-path: inset(0);
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.65s ease;
}

.gallery__img:hover {
  transform: scale(1.05);
  filter: brightness(1.07);
}

/* ===== Person portrait hover ===== */
.person__img {
  clip-path: inset(0);
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.person:hover .person__img {
  transform: scale(1.04);
}

/* ===== Office image hover ===== */
.office__img {
  clip-path: inset(0);
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.office:hover .office__img {
  transform: scale(1.04);
}

/* ===== Service item hover ===== */
.service {
  transition: transform 0.35s ease;
}

.service:hover {
  transform: translateY(-5px);
}

/* ===== Button hover ===== */
.button {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.button:hover {
  background-color: #2e2c2b;
  color: #e8ddca;
}

/* ===== Signature list hover ===== */
.signature__item {
  transition: padding-left 0.3s ease, color 0.3s ease;
}

.signature__item:hover {
  padding-left: 10px;
  color: #c4b89a;
}

/* ===== Contact link hover ===== */
.contact-line a {
  transition: color 0.3s ease;
}

.contact-line a:hover {
  color: #8a7f6f;
}

/* ===== Hamburger button (hidden on desktop) ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: #333333;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ===== Responsive: tablets and phones ===== */
@media (max-width: 768px) {
  body > nav {
    padding: 0 24px;
    height: 64px;
  }

  .nav-brand__img {
    height: 30px;
  }

  .nav-toggle {
    display: flex;
  }

  nav ul {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
    padding: 0;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(207, 203, 196, 0.6);
    z-index: 99;
  }

  nav ul.is-open {
    display: flex;
  }

  nav ul a {
    display: block;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(207, 203, 196, 0.4);
    letter-spacing: 2px;
  }

  nav ul a::after {
    display: none;
  }

  /* Hero frame sits closer to the edge on small screens */
  .hero--cover::after {
    inset: 12px;
  }

  /* Footer stacks into one centered column */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: center;
  }

  .footer__logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer__nav,
  .footer__contact-col {
    align-items: center;
  }

  /* Hero */
  .hero--cover {
    padding: 100px 24px;
  }

  .hero-title {
    font-size: 52px;
    letter-spacing: 3px;
  }

  .hero-eyebrow {
    font-size: 30px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  /* Sections */
  .section {
    padding: 60px 20px;
  }

  .page-hero {
    padding: 50px 20px 30px;
  }

  /* Headings */
  .section-heading__title {
    font-size: 38px;
    letter-spacing: 2px;
  }

  .section-heading__script {
    font-size: 28px;
  }

  /* Split → stack vertically */
  .split {
    flex-direction: column;
    gap: 30px;
  }

  .split__img {
    height: 260px;
    width: 100%;
  }

  .split__img--portrait {
    height: 340px;
  }

  /* Cards → stack */
  .cards {
    flex-direction: column;
  }

  /* Gallery → 2 columns */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Services → full width */
  .service {
    flex: 1 1 100%;
  }

  /* People → reduce gap */
  .people {
    gap: 36px;
  }

  /* Offices → single column */
  .offices {
    grid-template-columns: 1fr;
  }

  /* Signature → single column */
  .signature {
    grid-template-columns: 1fr;
  }

  /* Quote */
  .quote {
    font-size: 21px;
  }

  /* Button */
  .button {
    display: block;
    text-align: center;
  }
}

/* ===== Responsive: small phones ===== */
@media (max-width: 480px) {
  .hero-title {
    font-size: 40px;
    letter-spacing: 2px;
  }

  .section-heading__title {
    font-size: 32px;
  }

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

  .people {
    flex-direction: column;
    align-items: center;
  }
}

/* ===== Signature intro overlay (homepage) ===== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2e2c2b;
  cursor: pointer;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.intro--done {
  opacity: 0;
  visibility: hidden;
}

.intro__logo {
  display: block;
  width: min(560px, 80vw);
  height: auto;
  overflow: visible;
}

/* The grey DA: outlines trace on like ink, then the brush fill floods in.
   pathLength="1" on the paths lets one dash unit cover the whole outline. */
.intro .i-da {
  fill: #e8ddca;
  fill-opacity: 0;
  stroke: #e8ddca;
  stroke-width: 0.35;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    introTrace 1.3s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards,
    introInk 0.7s ease 1.15s forwards;
}

.intro .i-wd,
.intro .i-rl,
.intro .i-sb {
  fill: #f4f0e7;
}

/* "international" sweeps on left-to-right, like connected script being written */
.intro__word {
  clip-path: inset(-10% 102% -10% -2%);
  animation: introWipe 1s cubic-bezier(0.65, 0, 0.35, 1) 1.6s forwards;
}

/* The underline draws across */
.intro__rule {
  clip-path: inset(-10% 102% -10% -2%);
  animation: introWipe 0.6s cubic-bezier(0.65, 0, 0.35, 1) 2.4s forwards;
}

/* "Interior Design LLC" settles in last */
.intro__sub {
  opacity: 0;
  animation: introRise 0.6s ease 2.7s forwards;
}

@keyframes introTrace {
  to { stroke-dashoffset: 0; }
}

@keyframes introInk {
  to { fill-opacity: 1; }
}

@keyframes introWipe {
  to { clip-path: inset(-10% -2% -10% -2%); }
}

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

/* While the intro plays: no scrolling, and the hero entrance waits its turn */
.intro-lock {
  overflow: hidden;
}

.intro-lock .hero-eyebrow,
.intro-lock .hero-title,
.intro-lock .hero-tagline {
  animation-play-state: paused;
}

/* ===== Respect users who turn off animations ===== */
@media (prefers-reduced-motion: reduce) {
  .intro {
    display: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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