@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@100..900&display=swap');

:root {
  --bg: #08111b;
  --bg-soft: #0f1d2e;
  --text: #f2f3ef;
  --text-dim: #bac1c9;
  --accent: #d3a866;
  --accent-soft: rgba(211, 168, 102, 0.2);
  --card: rgba(13, 26, 39, 0.82);
  --border: rgba(255, 255, 255, 0.12);
}

.theme-light {
  --bg: #f3efe5;
  --bg-soft: #e8dfd0;
  --text: #1e2a35;
  --text-dim: #4d5b67;
  --accent: #8f5e30;
  --accent-soft: rgba(143, 94, 48, 0.16);
  --card: rgba(255, 255, 255, 0.76);
  --border: rgba(30, 42, 53, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans Arabic', sans-serif;
  background: radial-gradient(1200px 600px at 90% -20%, rgba(211, 168, 102, 0.15), transparent 60%),
    radial-gradient(1000px 420px at -20% 12%, rgba(87, 146, 117, 0.16), transparent 62%),
    var(--bg);
  color: var(--text);
}

#heritage-root {
  min-height: 100vh;
}

.topbar {
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: transparent;
  border-bottom: none;
}

.brand {
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.nav-link,
.icon-btn,
.hero-btn,
.chip,
.doc-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.nav-link {
  font-size: 0.88rem;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn.theme-toggle,
.icon-btn.lang-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
  opacity: 0;
  animation: fadeInDown 0.8s ease-out 0.2s forwards;
}

.icon-btn.theme-toggle:hover,
.icon-btn.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text);
  transform: translateY(-2px);
}

.icon-btn.theme-toggle::before {
  content: '';
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z' /%3E%3C/svg%3E") no-repeat center/contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z' /%3E%3C/svg%3E") no-repeat center/contain;
}

.theme-light .icon-btn.theme-toggle::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z' /%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z' /%3E%3C/svg%3E");
}

.hero {
  position: relative;
  height: 100vh;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100px 100px;
  pointer-events: none;
  z-index: 1;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  font-weight: 700;
  opacity: 0;
  animation: fadeInDown 0.8s ease-out forwards;
}

.hamburger-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 60;
  transition: transform 0.2s ease;
  opacity: 0;
  animation: fadeInDown 0.8s ease-out 0.2s forwards;
}

.hero-banner {
  position: absolute;
  bottom: 40px;
  right: 8%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 4px solid #ffd700;
  color: #fff;
  padding: 24px 32px;
  max-width: 320px;
  z-index: 10;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease-out 1s forwards;
}

[dir="rtl"] .hero-banner {
  right: auto;
  left: 8%;
  border-left: none;
  border-right: 4px solid #ffd700;
}

.hero-banner-title {
  font-size: 1.25rem;
  font-weight: 300;
  text-transform: uppercase;
  margin: 0 0 8px;
  letter-spacing: 1px;
  line-height: 1.4;
}

.hero-banner-line {
  width: 40px;
  height: 2px;
  background: #ffd700;
  margin-top: 12px;
  transition: width 0.3s ease;
}

.hero-banner:hover .hero-banner-line {
  width: 100%;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  padding: 40px;
  background: linear-gradient(180deg, rgba(8, 17, 27, 0.3), rgba(8, 17, 27, 0.5));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Spreads content top/bottom */
  align-items: center;
  text-align: center;
}

.hero-text-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  position: relative;
}

.hero-kicker {
  color: var(--text-dim);
  max-width: 750px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.85rem;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease-out 0.4s forwards;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-kicker::before,
.hero-kicker::after {
  content: '';
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.hero-title {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  max-width: 1000px;
  line-height: 1.05;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease-out 0.6s forwards;
  font-weight: 800;
  letter-spacing: -1px;
}

/* Glass CTA Banner */
.hero-banner-cta {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 24px 60px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.8s ease-out 1s forwards;
  position: relative;
  overflow: hidden;
}

.hero-banner-cta:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(25px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-banner-title {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-banner-line {
  width: 40px;
  height: 2px;
  background: #ffd700;
  transition: width 0.4s ease;
}

.hero-banner-cta:hover .hero-banner-line {
  width: 100%;
}

.section {
  padding: 46px 20px;
  position: relative;
}

.section-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-soft {
  background: linear-gradient(0deg, transparent, var(--accent-soft), transparent);
}

.section-head {
  margin-bottom: 20px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.8vw, 2.1rem);
}

.section-subtitle,
.founder-bio,
.founder-headline {
  color: var(--text-dim);
  max-width: 900px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.chip-active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.projects-grid,
.services-grid,
.insights-grid,
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.project-card,
.service-card,
.insight-card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.project-media-wrap {
  position: relative;
}

.project-media {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.project-status {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
}

.project-content,
.service-card,
.insight-card {
  padding: 14px;
}

.project-card,
.service-card,
.insight-card,
.home-brief-card,
.contact-card,
.philosophy-card {
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.project-card:hover,
.service-card:hover,
.insight-card:hover,
.home-brief-card:hover,
.contact-card:hover,
.philosophy-card:hover {
  transform: translateY(-3px);
  border-color: rgba(211, 168, 102, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.project-title,
.service-title,
.insight-title,
.modal-title {
  margin: 0 0 8px;
}

.project-summary,
.insight-text,
.modal-text,
.service-list {
  color: var(--text-dim);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-top: 10px;
  color: var(--text-dim);
}

.service-price {
  color: var(--accent);
  font-weight: 700;
  margin: 6px 0 10px;
}

.service-list {
  margin: 0;
  padding-inline-start: 20px;
}

.service-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.service-index {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.9;
}

.contact-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-gallery-img {
  grid-column: span 6;
  width: 100%;
  border-radius: 12px;
  height: 150px;
  object-fit: cover;
}

.modal-docs {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.home-brief-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.home-brief-card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.home-brief-title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.home-brief-text {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.home-feature-card {
  grid-column: span 12;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.home-feature-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.home-feature-content {
  padding: 9px 10px 10px;
}

.home-feature-title {
  margin: 0 0 4px;
  font-size: 0.92rem;
}

.home-feature-summary {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

.mini-link {
  border: none;
  background: transparent;
  color: var(--accent);
  padding: 0;
  cursor: pointer;
  font-weight: 700;
}

.philosophy-layout,
.contact-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.philosophy-card,
.contact-card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.philosophy-title,
.contact-title {
  margin: 0 0 10px;
  font-size: 1.06rem;
}

.quote-card {
  position: relative;
  overflow: hidden;
}

.quote-mark {
  position: absolute;
  top: -14px;
  inset-inline-end: 10px;
  margin: 0;
  font-size: 5rem;
  line-height: 1;
  color: rgba(211, 168, 102, 0.22);
}

.quote-text {
  margin: 6px 0 12px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 90%;
}

.quote-author {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.contact-steps {
  margin: 0;
  padding-inline-start: 18px;
  color: var(--text-dim);
  line-height: 1.8;
}

@media (min-width: 820px) {
  .section {
    padding: 58px 42px;
  }

  .project-card,
  .service-card,
  .insight-card {
    grid-column: span 4;
  }

  .project-media {
    height: 190px;
  }

  .home-brief-card {
    grid-column: span 4;
  }

  .metric-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-feature-card {
    grid-column: span 6;
  }

  .philosophy-card,
  .contact-card {
    grid-column: span 6;
  }
}

/* Menu & Hamburger Styles */
.hamburger-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 60;
  transition: transform 0.2s ease;
}

.hamburger-btn:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.bar {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 17, 27, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.menu-overlay.open .menu-content {
  transform: translateY(0);
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.menu-nav .nav-link {
  font-size: 1.5rem;
  background: transparent;
  border: none;
  padding: 10px 20px;
  color: var(--text);
  font-weight: 700;
  transition: color 0.2s;
}

.menu-nav .nav-link:hover {
  color: var(--accent);
}

.menu-controls {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  /* Default LTR */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  z-index: 1000;
}

[dir="rtl"] .menu-close {
  right: auto;
  left: 24px;
}
