/* ============================================================================
   WESTO ARCHITECTURE & PROJECT EXECUTION — CINEMATIC STYLESHEET
   Pure custom CSS: No Tailwind runtime dependency, Local Typography & Assets
   ============================================================================ */

/* 1. Local Typography */
@font-face {
  font-family: 'El Messiri';
  src: url('../fonts/ElMessiri-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'El Messiri';
  src: url('../fonts/ElMessiri-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'El Messiri';
  src: url('../fonts/ElMessiri-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'El Messiri';
  src: url('../fonts/ElMessiri-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tajawal';
  src: url('../fonts/tajawal-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('../fonts/tajawal-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('../fonts/tajawal-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('../fonts/tajawal-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 2. Theme Tokens & Global Reset */
:root {
  --bg-dark: #11120f;
  --bg-surface: #171814;
  --bg-card: #1c1d18;
  --bg-card-hover: #242520;
  --ivory: #f4f0e8;
  --ivory-muted: rgba(244, 240, 232, 0.76);
  --ivory-faint: rgba(244, 240, 232, 0.42);
  --stone: #d5c4ab;
  --stone-soft: #c4b197;
  --olive: #9b9a7a;
  --olive-muted: rgba(155, 154, 122, 0.22);
  --bronze: #b28a5a;
  --bronze-bright: #cb9e68;
  --bronze-glow: rgba(178, 138, 90, 0.25);
  --line: rgba(213, 196, 171, 0.16);
  --line-strong: rgba(213, 196, 171, 0.28);
  --line-soft: rgba(213, 196, 171, 0.08);
  --maxw: 1320px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: auto;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-dark);
  color: var(--ivory);
  font-family: "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.8;
  overflow-x: hidden;
  direction: rtl;
}

::selection {
  background: var(--bronze);
  color: var(--bg-dark);
}

h1, h2, h3, h4, .font-heading {
  font-family: "El Messiri", serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ivory);
}

p {
  color: var(--ivory-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

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

/* Accessibility: Skip Link & Focus */
.skip-link {
  position: fixed;
  top: -100px;
  right: 20px;
  z-index: 1000;
  padding: 12px 24px;
  background: var(--bronze);
  color: var(--bg-dark);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.25s var(--ease);
}
.skip-link:focus {
  top: 20px;
  outline: 2px solid var(--ivory);
}

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

/* Fixed Atmospheric Background Layers */
#ambient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--bg-dark);
  transition: background-color 1.2s var(--ease);
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(130% 110% at 50% 40%, transparent 40%, rgba(10, 11, 9, 0.75) 100%);
}

#grain {
  position: fixed;
  inset: -50%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.028;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  z-index: 80;
  transform-origin: right;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--bronze), var(--stone), var(--bronze-bright));
}

/* Layout Helpers */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 64px);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Tajawal", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--bronze-bright);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--bronze);
}

.gold-gradient-text {
  background: linear-gradient(135deg, var(--ivory) 0%, var(--stone) 50%, var(--bronze-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 34px;
  font-family: "Tajawal", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--bronze-bright), var(--bronze));
  color: #0b0c09;
  box-shadow: 0 10px 30px -8px rgba(178, 138, 90, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -6px rgba(203, 158, 104, 0.55);
}
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ivory);
  background: rgba(244, 240, 232, 0.04);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(244, 240, 232, 0.12);
  border-color: var(--bronze-bright);
  color: var(--bronze-bright);
  transform: translateY(-2px);
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 2.2vw, 24px) clamp(20px, 4.5vw, 64px);
  will-change: transform;
  transition: transform 0.45s var(--ease), background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
header.hidden {
  transform: translateY(-115%);
}
header.solid {
  background: rgba(17, 18, 15, 0.82);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line-soft);
  padding-top: clamp(10px, 1.4vw, 16px);
  padding-bottom: clamp(10px, 1.4vw, 16px);
}

svg {
  overflow: hidden;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-svg {
  display: block;
  width: 56px;
  height: 34px;
  max-width: 56px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-text {
  font-family: "El Messiri", serif;
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ivory);
  white-space: nowrap;
}

header nav.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
}
header nav.desktop-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ivory-muted);
  position: relative;
  padding: 6px 0;
}
header nav.desktop-nav a:hover {
  color: var(--ivory);
}
header nav.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--bronze-bright);
  transition: width 0.3s var(--ease);
}
header nav.desktop-nav a:hover::after {
  width: 100%;
}

.header-cta-btn {
  border: 1px solid var(--bronze);
  border-radius: 999px;
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bronze-bright) !important;
  background: rgba(178, 138, 90, 0.08);
}
.header-cta-btn:hover {
  background: var(--bronze);
  color: #0b0c09 !important;
}
.header-cta-btn::after {
  display: none !important;
}

/* Mobile Hamburger Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: var(--radius-sm);
  z-index: 75;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ivory);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-panel {
  position: fixed;
  inset: 0;
  background: rgba(17, 18, 15, 0.98);
  backdrop-filter: blur(24px);
  z-index: 69;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.mobile-nav-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-nav-panel a {
  font-family: "El Messiri", serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ivory);
}
.mobile-nav-panel a:hover {
  color: var(--bronze-bright);
}

@media (max-width: 860px) {
  header nav.desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
}

/* ============================================================================
   1. HERO SECTION (Cinematic Editorial Entrance)
   ============================================================================ */
#hero {
  position: relative;
  min-height: 120vh;
}
#hero .stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: clamp(60px, 8vh, 100px);
  perspective: 1200px;
}

#hero .hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  width: 100%;
  position: relative;
  z-index: 2;
}

#hero .hero-content {
  text-align: right;
  will-change: transform, opacity;
}

#hero h1 {
  font-size: clamp(40px, 6.2vw, 84px);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

#hero .hero-lead {
  font-size: clamp(16px, 1.8vw, 21px);
  color: var(--ivory-muted);
  max-width: 48ch;
  line-height: 1.75;
  margin-bottom: 36px;
}

#hero .hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

#hero .hero-visual-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

#hero .hero-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(280px, 42vw, 560px);
  height: clamp(280px, 42vw, 560px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  transform: translate3d(calc(-50% + var(--px, 0px)), calc(-50% + var(--py, 0px)), 0);
  background: radial-gradient(circle, rgba(203, 158, 104, 0.28) 0%, rgba(155, 154, 122, 0.12) 45%, transparent 70%);
  filter: blur(28px);
  opacity: 0.8;
  will-change: transform, opacity;
  animation: auraFloat 8s ease-in-out infinite alternate;
}
@keyframes auraFloat {
  0% { transform: translate3d(calc(-50% + var(--px, 0px)), calc(-50% + var(--py, 0px)), 0) scale(0.96); }
  100% { transform: translate3d(calc(-50% + var(--px, 0px)), calc(-50% + var(--py, 0px)), 0) scale(1.05); }
}

#hero .media-float {
  position: relative;
  z-index: 2;
  animation: floatSubtle 7s var(--ease) infinite alternate;
}
@keyframes floatSubtle {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

#hero .media-tilt {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform 0.2s ease-out;
}

#hero .hero-cutout {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(320px, 46vh, 560px);
  object-fit: contain;
  /* NO mix-blend trick on animated cutout as instructed */
  filter: drop-shadow(0 32px 48px rgba(0, 0, 0, 0.65));
}

#hero .specular-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  -webkit-mask: url('../images/hero-maquette.webp') center/contain no-repeat;
  mask: url('../images/hero-maquette.webp') center/contain no-repeat;
  background: linear-gradient(115deg, transparent 40%, rgba(244, 240, 232, 0.45) 50%, transparent 60%);
  background-size: 280% 280%;
  animation: sheenPass 8s ease-in-out 1.5s infinite;
}
@keyframes sheenPass {
  0%, 15% { background-position: 150% 0; opacity: 0; }
  22% { opacity: 0.85; }
  45%, 100% { background-position: -50% 0; opacity: 0; }
}

/* Scroll Cue */
.scrollcue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ivory-faint);
  font-size: 12px;
  letter-spacing: 0.12em;
  font-family: "Tajawal", sans-serif;
  text-transform: uppercase;
  pointer-events: none;
}
.scrollcue .cue-bar {
  width: 1px;
  height: 38px;
  background: linear-gradient(var(--bronze), transparent);
  animation: cueBounce 2.4s var(--ease) infinite;
}
@keyframes cueBounce {
  0% { transform: scaleY(0.2); opacity: 0.2; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.2); opacity: 0.2; transform-origin: bottom; }
}

/* Mobile & Tablet Hero Adaptations */
@media (max-width: 960px) {
  #hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }
  #hero .stage {
    position: relative;
    height: auto;
    min-height: auto;
    padding-top: 0;
  }
  #hero .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  #hero .hero-content {
    text-align: center;
    order: 1;
  }
  #hero .hero-lead {
    margin-inline: auto;
  }
  #hero .hero-cutout {
    height: clamp(240px, 36vh, 380px);
  }
  .scrollcue {
    display: none;
  }
}

@media (max-width: 680px) {
  .wrap {
    padding-inline: 18px;
  }
  header {
    padding: 12px 18px;
  }
  .brand-logo-svg {
    width: 44px;
    height: 27px;
    max-width: 44px;
  }
  .brand-text {
    font-size: 19px;
  }
  #hero h1 {
    font-size: clamp(32px, 8.6vw, 46px);
  }
  #hero .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
  }
  #hero .hero-actions .btn {
    width: 100%;
  }
}

/* ============================================================================
   2. EDITORIAL SECTION (Statement & Design Pillars)
   ============================================================================ */
#editorial {
  padding: clamp(90px, 14vh, 160px) 0;
  position: relative;
  background: var(--bg-surface);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.editorial-header {
  max-width: 860px;
  margin-bottom: clamp(48px, 8vh, 80px);
}
.editorial-quote {
  font-family: "El Messiri", serif;
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.35;
  color: var(--ivory);
  margin-bottom: 24px;
}
.editorial-desc {
  font-size: clamp(17px, 1.9vw, 22px);
  color: var(--stone);
  line-height: 1.8;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  position: relative;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.pillar-card:hover {
  transform: translateY(-6px);
  border-color: var(--bronze);
  background-color: var(--bg-card-hover);
}
.pillar-num {
  font-family: "El Messiri", serif;
  font-size: 16px;
  color: var(--bronze-bright);
  margin-bottom: 16px;
  display: block;
}
.pillar-title {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--ivory);
}
.pillar-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ivory-muted);
}

@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 580px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   3. FILM SECTION (Scroll Canvas Frame-Sequence)
   ============================================================================ */
#film {
  position: relative;
  min-height: 80vh;
  height: auto;
  padding: 80px 0;
}
#film .stage {
  position: relative;
  height: 70vh;
  min-height: 480px;
  overflow: hidden;
  background-color: var(--bg-dark);
}

#film canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}

#film .film-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#film .film-disclaimer-badge {
  position: absolute;
  top: clamp(20px, 4vh, 40px);
  left: clamp(20px, 4vw, 48px);
  z-index: 6;
  font-family: "Tajawal", sans-serif;
  font-size: 13px;
  color: var(--stone);
  background: rgba(17, 18, 15, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

#film .film-caps-container {
  position: relative;
  right: auto;
  bottom: auto;
  margin: 32px auto 0;
  width: min(90vw, 560px);
  pointer-events: auto;
  text-align: right;
}
#film .film-cap {
  position: relative;
  right: auto;
  bottom: auto;
  opacity: 1;
  transform: none;
  background: rgba(17, 18, 15, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  padding: 22px 28px;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
}
#film .film-cap-step {
  font-family: "Tajawal", sans-serif;
  font-size: 13px;
  color: var(--bronze-bright);
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
#film .film-cap-title {
  font-family: "El Messiri", serif;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.3;
  color: var(--ivory);
  margin-bottom: 8px;
}
#film .film-cap-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ivory-muted);
}

#film .film-loader {
  position: absolute;
  right: clamp(20px, 4vw, 48px);
  bottom: clamp(20px, 4vh, 40px);
  z-index: 6;
  font-family: "Tajawal", sans-serif;
  font-size: 13px;
  color: var(--bronze-bright);
  background: rgba(17, 18, 15, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: opacity 0.5s var(--ease);
}

/* Scroll-driven Pin Animation: Only active when GSAP and motion are available */
html.has-motion #film {
  height: 550vh;
  padding: 0;
}
html.has-motion #film .stage {
  position: sticky;
  top: 0;
  height: 100svh;
}
html.has-motion #film canvas {
  display: block;
}
html.has-motion #film .film-fallback {
  display: none;
}
html.has-motion #film .film-caps-container {
  position: absolute;
  right: clamp(24px, 6vw, 96px);
  bottom: clamp(60px, 12vh, 120px);
  margin: 0;
  width: min(84vw, 480px);
  pointer-events: none;
}
html.has-motion #film .film-cap {
  position: absolute;
  right: 0;
  bottom: 0;
  opacity: 0;
  transform: translateY(16px);
  margin-bottom: 0;
}

/* ============================================================================
   4. DESIGN DIRECTIONS (Interactive Gallery)
   ============================================================================ */
#directions {
  padding: clamp(90px, 14vh, 160px) 0;
  position: relative;
  background: var(--bg-dark);
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.gallery-head-text {
  max-width: 640px;
}
.gallery-disclaimer {
  display: inline-block;
  background: rgba(155, 154, 122, 0.12);
  border: 1px solid var(--olive);
  color: var(--stone);
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 999px;
  margin-top: 14px;
}

.gallery-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  color: var(--ivory-muted);
  transition: all 0.3s var(--ease);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--bronze);
  color: #0b0c09;
  border-color: var(--bronze);
}

.direction-stage {
  position: relative;
  margin-top: 24px;
}
.direction-card {
  display: none;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: clamp(24px, 3vw, 44px);
}
.direction-card.active {
  display: grid;
  animation: fadeIn 0.6s var(--ease);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.direction-visual {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  aspect-ratio: 16 / 10;
}
.direction-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), opacity 0.5s var(--ease);
}
.direction-visual:hover img {
  transform: scale(1.03);
}

.blueprint-toggle-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 5;
  background: rgba(17, 18, 15, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--bronze);
  color: var(--ivory);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s var(--ease);
}
.blueprint-toggle-btn:hover {
  background: var(--bronze);
  color: #0b0c09;
}

.direction-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.direction-info h3 {
  font-size: clamp(26px, 3.2vw, 42px);
  color: var(--ivory);
}
.direction-info p {
  font-size: 16px;
  line-height: 1.75;
}

.direction-specs {
  list-style: none;
  border-top: 1px solid var(--line-soft);
  margin-top: 10px;
}
.direction-specs li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.direction-specs .k {
  color: var(--stone);
  font-weight: 500;
}
.direction-specs .v {
  color: var(--ivory-muted);
}

@media (max-width: 960px) {
  .direction-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ============================================================================
   5. SERVICES SECTION (Accordion)
   ============================================================================ */
#services {
  padding: clamp(90px, 14vh, 160px) 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.services-accordion {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.accordion-item.open {
  border-color: var(--bronze);
  background: var(--bg-card-hover);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 3vw, 32px);
  text-align: right;
  font-size: clamp(20px, 2.4vw, 28px);
  font-family: "El Messiri", serif;
  color: var(--ivory);
}
.accordion-trigger-info {
  display: flex;
  align-items: center;
  gap: 20px;
}
.accordion-idx {
  font-size: 18px;
  color: var(--bronze-bright);
}
.accordion-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--bronze-bright);
  transition: transform 0.3s var(--ease);
}
.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
  padding: 0 clamp(20px, 3vw, 32px);
}
.accordion-item.open .accordion-panel {
  padding-bottom: clamp(20px, 3vw, 32px);
}
.accordion-content-inner {
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--ivory-muted);
  font-size: 16px;
  line-height: 1.8;
}

/* ============================================================================
   6. PROCESS SECTION (The 4 Distinct Steps)
   ============================================================================ */
#process {
  padding: clamp(90px, 14vh, 160px) 0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 54px;
}

.process-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 36px 26px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.process-card:hover {
  transform: translateY(-6px);
  border-color: var(--bronze-bright);
}
.process-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bronze), transparent);
  opacity: 0.6;
}
.process-step-header {
  margin-bottom: 20px;
}
.process-number {
  font-family: "El Messiri", serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--bronze-bright);
  display: block;
  margin-bottom: 8px;
}
.process-card h3 {
  font-size: 22px;
  color: var(--ivory);
}
.process-card p {
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 580px) {
  .process-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   7. CINEMATIC CTA & VIDEO REVEAL
   ============================================================================ */
#cta {
  position: relative;
  min-height: 80vh;
  height: auto;
  padding: 100px 0;
}
#cta .stage {
  position: relative;
  height: 60vh;
  min-height: 420px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-dark);
}

#cta video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.8s var(--ease);
  display: none;
}
#cta .cta-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.8s var(--ease);
}

#cta .cta-dim {
  position: absolute;
  inset: 0;
  opacity: 0.85;
  backdrop-filter: blur(4px);
  background: radial-gradient(120% 100% at 50% 50%, rgba(17, 18, 15, 0.7) 0%, rgba(17, 18, 15, 0.95) 100%);
  pointer-events: none;
}

#cta .cta-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 780px;
  padding: 0 24px;
  opacity: 1;
  transform: none;
}

html.has-motion #cta {
  height: 220vh;
  padding: 0;
}
html.has-motion #cta .stage {
  position: sticky;
  top: 0;
  height: 100svh;
}
html.has-motion #cta video {
  display: block;
}
html.has-motion #cta .cta-dim {
  opacity: 0;
}
html.has-motion #cta .cta-content {
  opacity: 0;
  transform: translateY(28px);
}
#cta h2 {
  font-size: clamp(38px, 6.4vw, 76px);
  margin-bottom: 20px;
  line-height: 1.15;
}
#cta p {
  font-size: clamp(17px, 2vw, 22px);
  color: var(--stone);
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ============================================================================
   8. PROJECT INQUIRY ENGINE (Interactive Form & Summary Generator)
   ============================================================================ */
#inquiry {
  padding: clamp(90px, 14vh, 160px) 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--line-soft);
  position: relative;
}

.inquiry-wrapper {
  max-width: 820px;
  margin-inline: auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4.5vw, 60px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

.inquiry-notice {
  background: rgba(178, 138, 90, 0.1);
  border: 1px solid var(--bronze);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 14px;
  color: var(--stone);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.inquiry-notice svg {
  flex-shrink: 0;
  color: var(--bronze-bright);
}

.inquiry-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.form-group-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}
.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ivory);
}
.form-group label .req {
  color: var(--bronze-bright);
  margin-inline-start: 4px;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  color: var(--ivory);
  font-family: "Tajawal", sans-serif;
  font-size: 15px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--bronze-bright);
  box-shadow: 0 0 0 3px rgba(178, 138, 90, 0.2);
}
.form-input.is-invalid, .form-select.is-invalid, .form-textarea.is-invalid {
  border-color: #d9534f;
}
.field-error {
  font-size: 12px;
  color: #ff7b72;
  display: none;
}
.field-error.show {
  display: block;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit-row {
  grid-column: 1 / -1;
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* Generated Summary Card */
.summary-container {
  display: none;
  margin-top: 32px;
  border: 1px solid var(--bronze);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 32px;
  animation: fadeIn 0.5s var(--ease);
}
.summary-container.show {
  display: block;
}
.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.summary-head h3 {
  font-size: 22px;
  color: var(--bronze-bright);
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.summary-item {
  font-size: 14px;
}
.summary-item .k {
  color: var(--stone);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}
.summary-item .v {
  color: var(--ivory);
  font-weight: 600;
}
.summary-item-full {
  grid-column: 1 / -1;
}
.summary-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

@media (max-width: 680px) {
  .inquiry-form {
    grid-template-columns: 1fr;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   9. FOOTER
   ============================================================================ */
footer {
  padding: clamp(60px, 10vh, 100px) 0 40px;
  background: #0b0c09;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
footer .footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
footer .footer-logo-svg {
  display: block;
  width: 66px;
  height: 40px;
  max-width: 66px;
  overflow: hidden;
  margin: 0 auto;
}
footer .footer-tagline {
  color: var(--stone);
  font-size: 15px;
}
footer .footer-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
footer .footer-nav a {
  font-size: 14px;
  color: var(--ivory-muted);
}
footer .footer-nav a:hover {
  color: var(--bronze-bright);
}
footer .footer-disclaimer {
  font-size: 13px;
  color: var(--ivory-faint);
  max-width: 600px;
  margin: 0 auto 16px;
  line-height: 1.6;
}
footer .footer-cr {
  font-size: 12px;
  color: var(--ivory-faint);
}

/* ============================================================================
   10. REDUCED MOTION ACCESSIBILITY (Zero 400vh Void, Honest Fallbacks)
   ============================================================================ */
@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;
  }
  #hero {
    min-height: auto;
  }
  #hero .stage {
    position: relative;
    height: auto;
    padding: 120px 0 60px;
  }
  #hero .hero-aura {
    opacity: 0.5;
    animation: none;
  }
  #hero .specular-sheen {
    display: none;
  }
  #film {
    height: auto;
    padding: 80px 0;
  }
  #film .stage {
    position: relative;
    height: 70vh;
  }
  #film canvas {
    display: none;
  }
  #film .film-fallback {
    display: block;
  }
  #film .film-cap {
    position: relative;
    opacity: 1;
    transform: none;
    margin-bottom: 12px;
  }
  #film .film-caps-container {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 30px auto 0;
    pointer-events: auto;
  }
  #cta {
    height: auto;
    padding: 100px 0;
  }
  #cta .stage {
    position: relative;
    height: 60vh;
  }
  #cta .cta-dim {
    opacity: 0.9;
  }
  #cta .cta-content {
    opacity: 1;
    transform: none;
  }
  .scrollcue {
    display: none;
  }
}

/* ============================================================================
   11. AMBIENT WARMTH & ASSET FALLBACK HOSTS
   ============================================================================ */
.ambient-glow {
  position: fixed;
  inset: -15vh -15vw;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 50% 30%, rgba(178, 138, 90, 0.08) 0%, rgba(155, 154, 122, 0.03) 45%, transparent 70%);
  opacity: 0.18;
  transition: opacity 0.6s var(--ease);
  will-change: transform, opacity;
}

.fallback-host.is-missing {
  background: radial-gradient(circle at center, #24221c 0%, #151612 100%) !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 240px !important;
}
.fallback-host.is-missing img,
.fallback-host.is-missing canvas {
  display: none !important;
}
.fallback-host.is-missing::after {
  content: attr(data-fallback-text);
  color: var(--stone);
  font-family: "Tajawal", sans-serif;
  font-size: 14px;
  padding: 16px;
  text-align: center;
  border: 1px dashed rgba(213, 196, 171, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(17, 18, 15, 0.65);
  max-width: 80%;
  margin: auto;
}

/* A static film is a complete editorial section, with no clipped caption stack. */
html:not(.has-motion) #film,
html.has-motion #film.film-static { height: auto; min-height: 0; padding: 70px 0; }
html:not(.has-motion) #film .stage,
html.has-motion #film.film-static .stage { position: relative; height: auto; min-height: 0; overflow: visible; display: flex; flex-direction: column; }
html:not(.has-motion) #film .film-fallback,
html.has-motion #film.film-static .film-fallback { position: relative; display: block; height: clamp(230px, 45vw, 650px); flex: none; }
html:not(.has-motion) #film .film-disclaimer-badge,
html.has-motion #film.film-static .film-disclaimer-badge { position: relative; inset: auto; align-self: center; max-width: 90%; margin: 16px auto 0; border-radius: 8px; }
html:not(.has-motion) #film .film-caps-container,
html.has-motion #film.film-static .film-caps-container { position: relative; inset: auto; margin: 24px auto 0; width: min(90vw, 900px); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
html:not(.has-motion) #film .film-cap,
html.has-motion #film.film-static .film-cap { position: relative; inset: auto; opacity: 1 !important; transform: none !important; margin: 0; }
html.has-motion #film.film-static canvas,
html:not(.has-motion) #film .film-loader,
html.has-motion #film.film-static .film-loader { display: none !important; }
html.has-js .js-required-notice { display: none; }
html:not(.has-js) .accordion-panel { max-height: none; overflow: visible; }
html:not(.has-js) .direction-card { display: grid !important; margin-bottom: 24px; }
html:not(.has-js) .menu-toggle,
html:not(.has-js) .gallery-filters,
html:not(.has-js) .blueprint-toggle-btn { display: none; }
html:not(.has-motion) #hero .media-float,
html:not(.has-motion) #hero .hero-aura,
html:not(.has-motion) #hero .specular-sheen { animation: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media(max-width:680px){
 html:not(.has-motion) #film .film-caps-container,
 html.has-motion #film.film-static .film-caps-container { grid-template-columns: 1fr; }
 #film .film-disclaimer-badge { max-width: calc(100% - 48px); line-height: 1.5; border-radius: 8px; }
}
