:root {
  --ink: #161C1E;
  --stone: #526066;
  --paper: #F3F0EA;
  --paper-2: #E8E4DB;
  --slate: #2A3438;
  --gold: #A27C36;
  --gold-soft: #C4A45E;
  --gold-deep: #7D5E24;
  --line: rgba(22, 28, 30, 0.1);
  --cream: #F7F3EA;
  --font-brand: "Libre Bodoni", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.5rem;
  --wrap: 1180px;
}

html[lang="ar"] {
  --font-brand: "Aref Ruqaa", serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(162, 124, 54, 0.14), transparent 55%),
    radial-gradient(700px 360px at 0% 30%, rgba(42, 52, 56, 0.06), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, #efebe3 45%, var(--paper-2) 100%);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open,
body.is-loading {
  overflow: hidden;
}

.wrap {
  width: min(100% - 2.4rem, var(--wrap));
  margin-inline: auto;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.page-loader img {
  width: 3.4rem;
  height: auto;
  animation: logoPulse 1.2s var(--ease) infinite;
}

body.is-ready .page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scroll-progress {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

html[dir="rtl"] .scroll-progress {
  transform-origin: right center;
}

/* Header */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0.9rem clamp(1.1rem, 4vw, 2.75rem);
  color: var(--cream);
  transition:
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(243, 240, 234, 0.92);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.logo {
  position: relative;
  z-index: 41;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-brand);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 700;
}

.logo-mark {
  width: 2.4rem;
  height: auto;
  object-fit: contain;
}

.site-header:not(.is-scrolled):not(.is-open) .logo-mark {
  filter: brightness(0) invert(1);
}

.site-header.is-open .logo-mark {
  filter: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.7rem);
  margin-inline-start: auto;
  margin-inline-end: 1rem;
  font-size: 0.94rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.nav a {
  position: relative;
  opacity: 0.9;
  transition: opacity 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.25rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: inline-end;
  transition: transform 0.3s var(--ease);
}

.nav a:hover {
  opacity: 1;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  z-index: 41;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.lang-toggle {
  min-height: 2.15rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lang-toggle:hover {
  border-color: var(--gold-soft);
  background: rgba(162, 124, 54, 0.14);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  margin: 0.35rem auto;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(-45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--cream);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero .hero-media {
  animation: heroFadeIn 1.5s var(--ease) both;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.08);
  animation: kenburns 22s var(--ease) infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 16, 18, 0.25) 0%, rgba(12, 16, 18, 0.42) 42%, rgba(12, 16, 18, 0.88) 100%),
    linear-gradient(115deg, rgba(22, 28, 30, 0.55), transparent 58%);
}

.hero .hero-veil {
  animation: veilSettle 1.6s var(--ease) both;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.4rem, 46rem);
  margin-inline: clamp(1.2rem, 5vw, 4rem);
  padding: calc(var(--header-h) + 3rem) 0 clamp(4rem, 9vh, 5.5rem);
}

.hero-logo {
  width: clamp(4.8rem, 11vw, 6.5rem);
  height: auto;
  margin-bottom: 1.1rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.hero-logo.is-visible {
  animation: logoFloat 5.8s var(--ease) 0.9s infinite;
}

.brand {
  margin: 0 0 0.7rem;
  font-family: var(--font-brand);
  font-size: clamp(3rem, 9.5vw, 5.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.headline {
  margin: 0 0 0.9rem;
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.lede {
  margin: 0 0 1.9rem;
  max-width: 30rem;
  font-size: clamp(1.02rem, 1.8vw, 1.15rem);
  font-weight: 300;
  color: rgba(247, 243, 234, 0.9);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.scroll-hint {
  position: absolute;
  z-index: 2;
  bottom: 1.5rem;
  left: 50%;
  width: 1.35rem;
  height: 2.2rem;
  border: 1px solid rgba(247, 243, 234, 0.4);
  transform: translateX(-50%);
  display: grid;
  place-items: start center;
  padding-top: 0.35rem;
}

.scroll-hint span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-soft);
  animation: drip 1.7s var(--ease) infinite;
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.55rem;
  overflow: hidden;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition:
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(-110%);
  transition: transform 0.55s var(--ease);
}

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

.btn:hover::before {
  transform: translateX(110%);
}

.btn-primary {
  background: var(--gold);
  color: #17140f;
}

.btn-primary:hover {
  background: var(--gold-soft);
}

.btn-ghost {
  border-color: rgba(247, 243, 234, 0.45);
  color: var(--cream);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--cream);
  background: rgba(247, 243, 234, 0.08);
}

.btn-outline {
  border-color: rgba(22, 28, 30, 0.28);
  color: var(--ink);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--ink);
  background: rgba(22, 28, 30, 0.04);
}

/* Sections */
.section {
  padding: clamp(4.5rem, 11vh, 7.5rem) 0;
}

.section-head {
  max-width: 34rem;
  margin-bottom: clamp(2.2rem, 5vw, 3.2rem);
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-brand);
  font-size: clamp(2.15rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--slate);
}

.section-text {
  margin: 0;
  color: var(--stone);
  font-size: clamp(1.02rem, 1.8vw, 1.12rem);
  font-weight: 300;
  max-width: 34rem;
}

/* About */
.about {
  background:
    linear-gradient(180deg, rgba(243, 240, 234, 0.5), rgba(232, 228, 219, 0.75));
}

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about-visual {
  min-height: 320px;
  aspect-ratio: 4 / 5;
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Media reveal */
.media-reveal {
  position: relative;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.15s var(--ease);
  background: #d8d2c6;
}

.media-reveal.is-visible,
.service.is-visible .media-reveal {
  clip-path: inset(0 0 0 0);
}

.media-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.4s var(--ease), filter 0.45s var(--ease);
  filter: saturate(0.92) contrast(1.04);
  will-change: transform;
}

.media-reveal.is-visible img,
.service.is-visible .media-reveal img {
  transform: scale(1);
}

/* Services */
.services {
  background:
    radial-gradient(700px 280px at 80% 0%, rgba(162, 124, 54, 0.1), transparent 60%),
    linear-gradient(180deg, #ebe6dc, #f1ede5);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.4rem);
}

.service {
  position: relative;
  display: grid;
  gap: 1rem;
  transition: transform 0.45s var(--ease);
}

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

.service-index {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-brand);
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.service-media {
  aspect-ratio: 5 / 4;
}

.service:hover .service-media img {
  transform: scale(1.07);
  filter: saturate(1.02) contrast(1.05);
}

.service-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.28rem;
  font-weight: 600;
  transition: color 0.3s var(--ease);
}

.service:hover .service-body h3 {
  color: var(--gold-deep);
}

.service-body p {
  margin: 0;
  color: var(--stone);
  font-weight: 300;
  font-size: 0.98rem;
}

/* Craft */
.craft {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  align-items: stretch;
  max-width: none;
  padding: 0;
  background: var(--slate);
  color: var(--cream);
}

.craft-visual {
  min-height: 520px;
}

.craft-visual img {
  min-height: 520px;
}

.craft-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(162, 124, 54, 0.2), transparent 60%),
    var(--slate);
}

.craft .eyebrow {
  color: var(--gold-soft);
}

.craft .section-title {
  color: var(--cream);
}

.craft .section-text {
  color: rgba(247, 243, 234, 0.78);
}

.craft-points {
  margin-top: 1.8rem;
  display: grid;
  gap: 0.15rem;
}

.craft-points li {
  position: relative;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(247, 243, 234, 0.12);
  font-weight: 400;
}

.craft-points li::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--gold-soft);
  transition: width 0.55s var(--ease);
}

.craft-points li.is-visible::after {
  width: 38%;
}

.craft-points li:last-child {
  border-bottom: 0;
}

.craft-points li:last-child::after {
  display: none;
}

/* Gallery */
.gallery {
  background:
    linear-gradient(180deg, #e9e4da, #f2eee6 55%, #ebe6dc);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(170px, 21vw);
  gap: 0.7rem;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  grid-column: span 4;
  transition: transform 0.45s var(--ease);
}

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

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.03);
}

.gallery-item.tall {
  grid-column: span 4;
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 8;
}

/* Contact */
.contact {
  background:
    radial-gradient(620px 280px at 20% 100%, rgba(162, 124, 54, 0.14), transparent 65%),
    linear-gradient(180deg, #f0ece3, #e7e1d5);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 1.15rem;
  padding: 0.4rem 0;
}

.contact-list li {
  display: grid;
  grid-template-columns: 0.7rem 1fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.contact-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-mark {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.45rem;
  background: var(--gold);
  transform: scale(0);
  transition: transform 0.45s var(--ease);
}

.contact-list li.is-visible .contact-mark {
  transform: scale(1);
  animation: markPop 0.55s var(--ease) both;
}

.contact-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact-list a,
.contact-list address {
  margin: 0;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.55;
  word-break: break-word;
}

.contact-list a:hover {
  color: var(--gold-deep);
}

.contact-actions {
  margin-top: 1.8rem;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2.6rem;
  text-align: center;
  color: var(--stone);
  background: #e4dfd4;
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 38rem;
}

.footer-logo {
  width: 3.4rem;
  height: auto;
  margin: 0 auto 0.9rem;
  object-fit: contain;
}

.footer-brand {
  margin: 0 0 0.4rem;
  font-family: var(--font-brand);
  font-size: 1.65rem;
  color: var(--slate);
}

.footer-tagline {
  margin: 0;
  font-weight: 300;
}

.footer-meta {
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.75rem;
  font-size: 0.95rem;
}

.footer-meta a:hover {
  color: var(--gold-deep);
}

.footer-copy {
  margin: 1.1rem 0 0;
  font-size: 0.88rem;
  opacity: 0.85;
}

/* Motion */
.reveal {
  opacity: 0;
  filter: blur(5px);
  transition:
    opacity 0.95s var(--ease),
    transform 0.95s var(--ease),
    filter 0.95s var(--ease);
}

.reveal-up {
  transform: translateY(30px);
}

.reveal-scale {
  transform: scale(0.9) translateY(14px);
}

.reveal-right {
  transform: translateX(-22px);
}

html[dir="rtl"] .reveal-right {
  transform: translateX(22px);
}

.reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.22s; }
.delay-3 { transition-delay: 0.34s; }
.delay-4 { transition-delay: 0.46s; }

.lang-fade {
  animation: langFade 0.45s var(--ease);
}

@keyframes kenburns {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.16) translate3d(0, -2%, 0); }
}

@keyframes drip {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(12px); opacity: 0; }
}

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

@keyframes logoPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes veilSettle {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

@keyframes markPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes langFade {
  from { opacity: 0.55; filter: blur(2px); }
  to { opacity: 1; filter: blur(0); }
}

/* Responsive */
@media (max-width: 980px) {
  .about-grid,
  .craft,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .about-visual {
    aspect-ratio: 16 / 11;
    min-height: 0;
  }

  .craft-visual,
  .craft-visual img {
    min-height: 320px;
  }

  .gallery-grid {
    grid-auto-rows: minmax(140px, 28vw);
  }

  .gallery-item,
  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: span 6;
    grid-row: span 1;
  }

  .gallery-item.tall {
    grid-row: span 2;
  }
}

@media (max-width: 900px) {
  .nav {
    margin-inline-end: 0.6rem;
    gap: 0.85rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 40;
    margin: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.35rem;
    background:
      radial-gradient(520px 280px at 80% 10%, rgba(162, 124, 54, 0.14), transparent 60%),
      var(--paper);
    color: var(--ink);
    font-size: 1.3rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav a {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }

  .nav.is-open a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav.is-open a:nth-child(1) { transition-delay: 0.05s; }
  .nav.is-open a:nth-child(2) { transition-delay: 0.1s; }
  .nav.is-open a:nth-child(3) { transition-delay: 0.15s; }
  .nav.is-open a:nth-child(4) { transition-delay: 0.2s; }
  .nav.is-open a:nth-child(5) { transition-delay: 0.25s; }

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

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 42vw;
    gap: 0.5rem;
  }

  .gallery-item,
  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: span 1;
  }

  .gallery-item.tall {
    grid-row: span 2;
  }

  .hero-content {
    padding-bottom: 4.2rem;
  }

  .brand {
    font-size: clamp(2.6rem, 13vw, 3.6rem);
  }

  .scroll-hint {
    display: none;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-actions .btn {
    width: 100%;
  }

  .section-head {
    text-align: start;
  }
}

@media (max-width: 420px) {
  .wrap {
    width: min(100% - 1.6rem, var(--wrap));
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 58vw;
  }

  .gallery-item.tall {
    grid-row: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-image,
  .hero-logo,
  .hero .hero-media,
  .hero .hero-veil,
  .scroll-hint span,
  .page-loader img {
    animation: none !important;
  }

  .page-loader {
    display: none;
  }

  .reveal,
  .media-reveal,
  .media-reveal img,
  .service,
  .gallery-item,
  .contact-mark {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }

  .btn:hover,
  .service:hover,
  .gallery-item:hover {
    transform: none;
  }

  .btn::before {
    display: none;
  }
}
