:root {
  --bg: #050915;
  --bg-soft: #09101d;
  --gold: #caa55b;
  --gold-light: #ead8ad;
  --gold-dark: #9e7835;
  --text: #f0dfba;
  --muted: rgba(231, 210, 164, .76);
  --line: rgba(202, 165, 91, .34);
  --glass: rgba(10, 16, 29, .64);
  --glass-line: rgba(226, 199, 139, .24);
  --shadow: 0 28px 90px rgba(0, 0, 0, .56);
  --header-height: 88px;
  --section-padding: clamp(72px, 8vw, 126px);
  color-scheme: dark;
  font-family: "Manrope", "Montserrat", "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

html[lang="ar"],
html[lang="ar"] body,
body.is-arabic {
  font-family: "Cairo", Tahoma, Arial, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

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

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

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.site-smoke {
  display: none;
}

.section-dark {
  position: relative;
  isolation: isolate;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 9, 21, .96), rgba(4, 8, 18, .92));
}

.section-dark:not(.hero)::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  background: url("../images/smoke-extra-sections.jpg") center / cover no-repeat;
  opacity: .34;
  mix-blend-mode: screen;
  animation: sectionSmoke 24s ease-in-out infinite alternate;
}

.section-dark:not(.hero)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 24%, rgba(202, 165, 91, .18), transparent 26%),
    radial-gradient(circle at 84% 68%, rgba(202, 165, 91, .10), transparent 24%),
    linear-gradient(135deg, rgba(9, 14, 28, .18), rgba(5, 9, 21, .12));
  opacity: .88;
  animation: sectionGlowFloat 18s ease-in-out infinite alternate;
}

@keyframes sectionSmoke {
  0% {
    transform: translate3d(-3%, -1%, 0) scale(1.06);
    background-position: 44% 54%;
  }
  50% {
    transform: translate3d(1%, .5%, 0) scale(1.09);
    background-position: 50% 50%;
  }
  100% {
    transform: translate3d(3%, 1%, 0) scale(1.08);
    background-position: 57% 46%;
  }
}

@keyframes sectionGlowFloat {
  from {
    transform: translate3d(-1.5%, 0, 0) scale(1);
    opacity: .72;
  }
  to {
    transform: translate3d(1.5%, 0, 0) scale(1.03);
    opacity: .98;
  }
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 8px clamp(20px, 4.5vw, 82px);
  color: var(--gold);
  background: linear-gradient(180deg, rgba(4, 7, 13, .88), rgba(4, 7, 13, .48));
  border-bottom: 1px solid rgba(202, 165, 91, .18);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  width: clamp(74px, 6vw, 102px);
  min-width: 72px;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .5));
}

.brand-logo {
  width: 100%;
  max-height: 76px;
  object-fit: contain;
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 44px);
  min-height: 50px;
  padding: 0 clamp(22px, 3.2vw, 42px);
  border: 1px solid rgba(202, 165, 91, .3);
  background: rgba(195, 158, 89, .025);
}

.nav-links a {
  position: relative;
  padding: 7px 2px 11px;
  font-size: clamp(15px, 1.2vw, 21px);
  font-weight: 600;
  opacity: .82;
  transition: opacity .22s ease, transform .22s ease, color .22s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -9px;
  left: 8%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
  box-shadow: 0 0 16px rgba(202, 165, 91, .46);
  opacity: 0;
  transform: scaleX(.72);
  transition: opacity .22s ease, transform .22s ease;
}

.nav-links a:hover {
  opacity: 1;
  transform: translateY(-2px);
  color: var(--gold-light);
}

.nav-links a.is-active {
  opacity: 1;
  color: var(--gold-light);
}

.nav-links a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
  animation: navGlow 3.8s ease-in-out infinite;
}

@keyframes navGlow {
  0%, 100% {
    opacity: .62;
    transform: scaleX(.72);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

.lang-button,
.contact-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  color: var(--gold);
  border: 1px solid rgba(202, 165, 91, .6);
  border-radius: 10px;
  background: rgba(195, 158, 89, .05);
  cursor: pointer;
  font-size: clamp(15px, 1.2vw, 20px);
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}

.lang-button:hover,
.contact-button:hover {
  transform: translateY(-2px);
  background: rgba(202, 165, 91, .12);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .28);
}

.contact-button {
  min-width: 148px;
}

.menu-button {
  display: none;
  width: 44px;
  height: 38px;
  padding: 3px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 8px 0;
  background: var(--gold);
  transition: transform .2s ease, opacity .2s ease;
}

.hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-height) + 54px) clamp(24px, 8vw, 136px) 84px;
  background: #04070d;
}

.hero-video,
.video-cta video {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video {
  transform-origin: center;
  animation: heroVideoDrift 18s ease-in-out infinite alternate;
}

.video-cta video {
  transform-origin: center;
  animation: ctaVideoDrift 22s ease-in-out infinite alternate;
}

@keyframes heroVideoDrift {
  from {
    transform: scale(1.01) translate3d(-.35%, -.18%, 0);
    filter: brightness(1.12) saturate(1.04) contrast(1.02);
  }
  to {
    transform: scale(1.035) translate3d(.38%, .22%, 0);
    filter: brightness(1.18) saturate(1.07) contrast(1.04);
  }
}

@keyframes ctaVideoDrift {
  from {
    transform: scale(1.02) translate3d(-.4%, 0, 0);
  }
  to {
    transform: scale(1.05) translate3d(.5%, 0, 0);
  }
}

.veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 7, 13, .58) 0%, rgba(4, 7, 13, .31) 50%, rgba(4, 7, 13, .08) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .03), rgba(0, 0, 0, .2));
}

.veil.stronger {
  background: linear-gradient(180deg, rgba(0, 0, 0, .48), rgba(0, 0, 0, .66));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(920px, 82vw);
  max-width: 100%;
}

.hero-content.hero-enter {
  animation: heroEnter 1.35s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: translate3d(-72px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

html[dir="rtl"] .hero-content.hero-enter {
  animation-name: heroEnterRtl;
}

@keyframes heroEnterRtl {
  from {
    opacity: 0;
    transform: translate3d(72px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

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

h1 {
  max-width: 880px;
  margin-bottom: 20px;
  color: var(--gold);
  font-size: clamp(36px, 4.2vw, 70px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-shadow: 0 18px 55px rgba(0, 0, 0, .48);
}

.hero-subtitle {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--gold-light);
  font-size: clamp(17px, 1.55vw, 26px);
  line-height: 1.42;
  text-shadow: 0 12px 36px rgba(0, 0, 0, .44);
}

html[dir="rtl"] .hero-content {
  margin-left: auto;
  text-align: right;
}

html[dir="rtl"] h1 {
  letter-spacing: 0;
  line-height: 1.3;
}

html[dir="rtl"] h1,
html[dir="rtl"] .origin-copy h2,
html[dir="rtl"] .section-heading h2,
html[dir="rtl"] .process-title,
html[dir="rtl"] .contact-card h2,
html[dir="rtl"] .cta-content h2,
html[dir="rtl"] .footer-inner h2 {
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  font-weight: 800;
}

html[dir="rtl"] .hero-subtitle,
html[dir="rtl"] .origin-copy p:last-child,
html[dir="rtl"] .section-heading > p:last-child,
html[dir="rtl"] .card-copy p,
html[dir="rtl"] .card-hover-copy p,
html[dir="rtl"] .process-label,
html[dir="rtl"] .modal-intro > p:last-child,
html[dir="rtl"] .footer-inner > p,
html[dir="rtl"] .footer-meta > * {
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  line-height: 1.9;
}

html[dir="rtl"] .hero-subtitle {
  font-size: clamp(18px, 1.7vw, 28px);
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .44em;
  text-transform: uppercase;
}

html[dir="rtl"] .eyebrow {
  letter-spacing: .12em;
}

html[dir="rtl"] .nav-links {
  direction: rtl;
}

.origin {
  min-height: 82vh;
  display: grid;
  grid-template-columns: minmax(340px, 44%) minmax(0, 56%);
  direction: ltr;
  overflow: hidden;
  border-top: 1px solid rgba(202, 165, 91, .34);
  border-bottom: 1px solid rgba(202, 165, 91, .34);
}

.origin-image {
  min-height: 690px;
}

.origin-image img {
  width: 100%;
  height: 100%;
  min-height: 690px;
  object-fit: cover;
  object-position: center;
}

.origin-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(60px, 8vw, 132px) clamp(32px, 7vw, 96px);
  direction: ltr;
  background: linear-gradient(90deg, rgba(5, 9, 21, .68), rgba(5, 9, 21, .36));
}

.origin-copy h2,
.section-heading h2,
.process-title,
.contact-card h2 {
  margin-bottom: 28px;
  color: var(--gold);
  font-size: clamp(40px, 4.6vw, 74px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .04em;
}

.origin-copy p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(21px, 2.25vw, 34px);
  line-height: 1.48;
}

html[dir="rtl"] .origin-copy {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .origin-copy h2,
html[dir="rtl"] .section-heading h2,
html[dir="rtl"] .process-title,
html[dir="rtl"] .contact-card h2 {
  letter-spacing: 0;
  line-height: 1.32;
}

.cards-section {
  overflow: hidden;
  padding: var(--section-padding) clamp(22px, 5.6vw, 80px);
}

.section-heading {
  max-width: 850px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 16px;
}

.section-heading > p:last-child {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 24px);
  line-height: 1.55;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.6vw, 46px);
  direction: ltr;
}

.glass-card {
  --rx: 0deg;
  --ry: 0deg;
  --scale: 1;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  border-bottom-color: rgba(234, 216, 173, .7);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(202, 165, 91, .12), rgba(10, 16, 29, .5));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(140%);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--scale));
  transform-style: preserve-3d;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
  will-change: transform;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(300px circle at var(--mx, 50%) var(--my, 18%), rgba(202, 165, 91, .28), transparent 43%),
    linear-gradient(135deg, rgba(202, 165, 91, .16), transparent 34%, rgba(202, 165, 91, .07));
  transition: opacity .24s ease;
}

.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 28%, rgba(234, 216, 173, .18), transparent 62%);
  transform: translateX(-135%) skewX(-10deg);
  transition: transform .72s cubic-bezier(.2, .7, .2, 1);
}

.glass-card:hover {
  --scale: 1.012;
  border-color: rgba(234, 216, 173, .62);
  box-shadow: 0 36px 110px rgba(0, 0, 0, .68), 0 0 46px rgba(202, 165, 91, .12);
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card:hover::after {
  transform: translateX(135%) skewX(-10deg);
}

.card-media {
  position: relative;
  height: 330px;
  overflow: hidden;
  background: #070b13;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .48s ease, filter .48s ease;
}

.card-hover-copy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: var(--gold-light);
  opacity: 0;
  background: linear-gradient(180deg, rgba(4, 7, 13, .08), rgba(4, 7, 13, .86));
  transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease;
}

.card-hover-copy h3 {
  margin-bottom: 9px;
  color: var(--gold-light);
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1.15;
}

.card-hover-copy p {
  margin-bottom: 0;
  color: rgba(248, 233, 199, .94);
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.55;
}

.card-copy {
  position: relative;
  z-index: 6;
  min-height: 148px;
  padding: 24px 24px 28px;
  direction: ltr;
}

.card-copy h3 {
  margin-bottom: 9px;
  color: var(--gold);
  font-size: clamp(21px, 1.75vw, 29px);
  line-height: 1.16;
}

.card-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.5;
}

html[dir="rtl"] .card-copy,
html[dir="rtl"] .card-hover-copy {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .card-copy h3,
html[dir="rtl"] .card-hover-copy h3 {
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
  .glass-card:hover .card-media img {
    filter: blur(4px) brightness(.46) saturate(.86);
    transform: scale(1.08);
  }

  .glass-card:hover .card-hover-copy {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-section {
  padding-top: clamp(68px, 7vw, 102px);
}

.details-grid .card-media {
  height: 250px;
}

.details-grid .card-copy {
  min-height: 130px;
  padding: 20px 20px 24px;
}

.details-grid .card-copy h3 {
  font-size: clamp(20px, 1.55vw, 27px);
}

.details-grid .card-copy p {
  font-size: clamp(12px, .95vw, 15px);
}

.process-section {
  overflow: hidden;
  padding: clamp(60px, 7vw, 100px) clamp(22px, 5.6vw, 80px) clamp(82px, 8vw, 120px);
  border-top: 1px solid rgba(202, 165, 91, .18);
  border-bottom: 1px solid rgba(202, 165, 91, .18);
}

.process-title {
  margin-bottom: 58px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 43px);
  font-weight: 400;
  letter-spacing: .42em;
  text-transform: uppercase;
}

html[dir="rtl"] .process-title {
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.process-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  direction: ltr;
  padding-top: 4px;
}

.process-line::before {
  content: "";
  position: absolute;
  top: 35px;
  left: 6%;
  right: 6%;
  height: 2px;
  pointer-events: none;
  background: rgba(202, 165, 91, .36);
}

.process-sweep {
  position: absolute;
  top: 35px;
  left: 6%;
  width: 18%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), transparent);
  filter: drop-shadow(0 0 10px rgba(202, 165, 91, .72));
  animation: processSweep 4.4s ease-in-out infinite;
}

.process-sweep::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--gold-light);
  border-right: 2px solid var(--gold-light);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 12px rgba(202, 165, 91, .58);
}

@keyframes processSweep {
  0% {
    opacity: 0;
    transform: translateX(-18%);
  }
  12%, 88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(465%);
  }
}

.process-step {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--gold);
  text-align: center;
  transition-delay: var(--step-delay, 0ms) !important;
}

html[dir="rtl"] .process-step {
  direction: rtl;
}

.process-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(202, 165, 91, .48);
  border-radius: 50%;
  background: rgba(5, 9, 21, .92);
  box-shadow: 0 0 0 7px rgba(5, 9, 21, .88), 0 12px 32px rgba(0, 0, 0, .32);
}

.process-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.process-number {
  margin-top: 7px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
}

.process-label {
  max-width: 130px;
  min-height: 40px;
  color: var(--muted);
  font-size: clamp(11px, .9vw, 14px);
  line-height: 1.4;
}

.video-cta {
  min-height: 62vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 90px 24px;
  background:
    radial-gradient(circle at 50% 50%, rgba(202, 165, 91, .10), transparent 36%),
    linear-gradient(180deg, rgba(5, 9, 21, .96), rgba(5, 9, 21, .92));
}

.section-smoke-stage {
  position: absolute;
  inset: -8%;
  z-index: -2;
  pointer-events: none;
  background: url("../images/smoke-extra-sections.jpg") center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: .40;
  animation: sectionSmoke 22s ease-in-out infinite alternate;
}

.cta-content {
  position: relative;
  z-index: 2;
  width: min(980px, 92vw);
  text-align: center;
}

.cta-content h2 {
  max-width: 900px;
  margin: 0 auto 30px;
  color: var(--gold-light);
  font-size: clamp(34px, 4.4vw, 70px);
  line-height: 1.15;
  text-shadow: 0 18px 54px rgba(0, 0, 0, .66);
}

html[dir="rtl"] .cta-content h2 {
  line-height: 1.4;
}

.gold-cta {
  min-width: min(360px, 80vw);
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  color: var(--gold-light);
  border: 1px solid rgba(202, 165, 91, .72);
  border-radius: 13px;
  background: linear-gradient(90deg, rgba(202, 165, 91, .2), rgba(202, 165, 91, .56), rgba(202, 165, 91, .2));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .34), 0 0 22px rgba(202, 165, 91, .12);
  backdrop-filter: blur(7px);
  cursor: pointer;
  font-weight: 700;
  transition: transform .22s ease, filter .22s ease, box-shadow .22s ease;
}

.gold-cta:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 26px 64px rgba(0, 0, 0, .4), 0 0 30px rgba(202, 165, 91, .2);
}

.gold-cta:disabled {
  cursor: wait;
  opacity: .62;
  transform: none;
}

.footer {
  overflow: hidden;
  padding: 76px 24px 34px;
  border-top: 1px solid rgba(202, 165, 91, .3);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.footer-inner h2 {
  margin-bottom: 11px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
}

html[dir="rtl"] .footer-inner h2 {
  margin-bottom: 30px;
  color: var(--muted);
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
}

.footer-inner > p {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 21px);
}

.footer-inner > p:empty {
  display: none;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 0;
  padding: 18px 0;
  border-top: 1px solid rgba(202, 165, 91, .28);
  border-bottom: 1px solid rgba(202, 165, 91, .28);
  color: var(--muted);
}

.footer-meta > * {
  padding: 0 22px;
  font-size: clamp(13px, 1.1vw, 16px);
}

.footer-meta > * + * {
  border-inline-start: 1px solid rgba(202, 165, 91, .28);
}

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

.socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 27px 0 22px;
}

.socials a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(202, 165, 91, .48);
  border-radius: 50%;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.socials a:hover {
  transform: translateY(-3px);
  border-color: var(--gold-light);
  background: rgba(202, 165, 91, .11);
}

.socials svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer small {
  color: rgba(231, 210, 164, .56);
  font-size: 12px;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s ease;
}

.project-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 3, 8, .76);
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: calc(100svh - 44px);
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 4vw, 54px);
  padding: clamp(34px, 5vw, 62px);
  border: 1px solid rgba(202, 165, 91, .42);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(15, 22, 37, .96), rgba(5, 9, 21, .96)),
    url("../images/smoke-bg.jpg") center / cover;
  box-shadow: 0 40px 140px rgba(0, 0, 0, .72);
  transform: translateY(20px) scale(.98);
  transition: transform .25s ease;
}

.project-modal.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(202, 165, 91, .36);
  border-radius: 50%;
  background: rgba(5, 9, 21, .72);
  color: var(--gold-light);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

html[dir="rtl"] .modal-close {
  right: auto;
  left: 18px;
}

.modal-intro {
  align-self: center;
}

.modal-intro h2 {
  margin-bottom: 18px;
  font-size: clamp(36px, 4.2vw, 62px);
}

.modal-intro > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

html[dir="rtl"] .modal-card,
html[dir="rtl"] .modal-intro {
  direction: rtl;
  text-align: right;
}

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

form label {
  display: grid;
  gap: 8px;
  color: var(--gold-light);
  font-size: 14px;
}

form label.wide,
.form-submit,
.form-status {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(202, 165, 91, .3);
  border-radius: 11px;
  background: rgba(3, 7, 14, .68);
  color: #f4e5c6;
  padding: 13px 14px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

input:focus,
textarea:focus {
  border-color: rgba(234, 216, 173, .72);
  background: rgba(3, 7, 14, .86);
  box-shadow: 0 0 0 3px rgba(202, 165, 91, .1);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 130px;
}

.form-submit {
  min-width: 0;
  width: 100%;
  margin-top: 4px;
}

.form-status {
  min-height: 23px;
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.form-status.is-sending {
  color: var(--gold-light);
}

.form-status.is-success {
  color: #9ee7b0;
}

.form-status.is-error {
  color: #ffb1b1;
}

.reveal-left,
.reveal-right,
.reveal-up {
  opacity: 0;
  transition: opacity .75s ease, transform .75s cubic-bezier(.2, .7, .2, 1);
}

.reveal-left {
  transform: translate3d(-46px, 0, 0);
}

.reveal-right {
  transform: translate3d(46px, 0, 0);
}

.reveal-up {
  transform: translate3d(0, 36px, 0);
}

.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-up.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.delay-1 {
  transition-delay: 120ms;
}

@media (max-width: 1180px) {
  .nav-shell {
    gap: 13px;
  }

  .nav-links {
    gap: 22px;
    padding-inline: 24px;
  }

  .contact-button {
    min-width: auto;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #services .glass-card:last-child {
    grid-column: 1 / -1;
    width: min(560px, 100%);
    justify-self: center;
  }
}

@media (max-width: 980px) {
  .origin {
    grid-template-columns: 1fr;
  }

  .origin-image,
  .origin-image img {
    min-height: 520px;
    max-height: 650px;
  }

  .origin-copy {
    padding: 66px 28px;
  }

  .process-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px 18px;
  }

  .process-line::before,
  .process-sweep {
    display: none;
  }

  .modal-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 72px;
  }

  .site-header {
    padding-inline: 18px;
  }

  .brand {
    width: 76px;
    min-width: 68px;
  }

  .brand-logo {
    max-height: 66px;
  }

  .menu-button {
    display: block;
  }

  body.menu-open .menu-button span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  body.menu-open .menu-button span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .menu-button span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  .nav-shell {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 14px;
    left: 14px;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(202, 165, 91, .34);
    border-radius: 20px;
    background: rgba(5, 8, 16, .94);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-16px);
    transition: opacity .22s ease, transform .22s ease;
  }

  body.menu-open .nav-shell {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links {
    display: grid;
    justify-items: stretch;
    gap: 7px;
    padding: 0;
    border: 0;
  }

  .nav-links a,
  .lang-button,
  .contact-button {
    min-height: 47px;
    justify-content: center;
    font-size: 18px;
  }

  .nav-links a:first-child::after {
    display: none;
  }

  .hero {
    min-height: 92svh;
    padding-inline: 22px;
  }

  .hero-content {
    width: 100%;
  }

  h1 {
    font-size: clamp(31px, 9vw, 48px);
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .origin-image,
  .origin-image img {
    min-height: 390px;
  }

  .origin-copy h2,
  .section-heading h2,
  .contact-card h2 {
    font-size: clamp(34px, 9vw, 48px);
  }

  .origin-copy p:last-child {
    font-size: 18px;
  }

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

  #services .glass-card:last-child {
    grid-column: auto;
    width: 100%;
  }

  .card-media {
    height: 280px;
  }

  .details-grid .card-media {
    height: 270px;
  }

  .card-copy,
  .details-grid .card-copy {
    min-height: 0;
  }

  .process-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 16px;
  }

  .process-title {
    letter-spacing: .24em;
  }

  .video-cta {
    min-height: 58vh;
  }

  .cta-content h2 {
    font-size: clamp(31px, 8.5vw, 46px);
  }

  .footer-meta {
    display: grid;
    gap: 10px;
  }

  .footer-meta > * + * {
    border-inline-start: 0;
  }

  .project-modal {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100svh - 20px);
    gap: 24px;
    padding: 54px 20px 26px;
  }

  form {
    grid-template-columns: 1fr;
  }

  form label.wide,
  .form-submit,
  .form-status {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 86svh;
  }

  .origin-image,
  .origin-image img {
    min-height: 320px;
  }

  .cards-section {
    padding-inline: 16px;
  }

  .card-media,
  .details-grid .card-media {
    height: 245px;
  }

  .process-step {
    gap: 6px;
  }

  .process-icon {
    width: 62px;
    height: 62px;
  }

  .process-icon svg {
    width: 29px;
    height: 29px;
  }
}

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

  .reveal-left,
  .reveal-right,
  .reveal-up {
    opacity: 1;
    transform: none;
  }
}


.cta-image-section {
  background:
    linear-gradient(180deg, rgba(5, 9, 21, .52), rgba(5, 9, 21, .46));
}

.cta-image-stage {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: url("../images/cta-project.jpg") center center / cover no-repeat;
  transform-origin: center;
  animation: ctaImageDrift 20s ease-in-out infinite alternate;
}

.cta-image-section .veil.stronger {
  z-index: -1;
  background: linear-gradient(180deg, rgba(4, 7, 13, .26), rgba(4, 7, 13, .38));
}

.cta-image-section::before {
  opacity: .10;
}

.cta-image-section::after {
  opacity: .20;
}

.cta-image-section .cta-content h2 {
  text-shadow: 0 14px 32px rgba(0, 0, 0, .44);
}

@keyframes ctaImageDrift {
  from {
    transform: scale(1.01) translate3d(-.35%, 0, 0);
    filter: brightness(1.12) saturate(1.06) contrast(1.04);
  }
  to {
    transform: scale(1.04) translate3d(.45%, 0, 0);
    filter: brightness(1.18) saturate(1.1) contrast(1.06);
  }
}

/* =========================================================
   KEMET Origins v32 — responsive mobile/web application pass
   ========================================================= */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  overscroll-behavior-x: none;
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  height: calc(var(--header-height) + var(--safe-top));
  padding-top: calc(8px + var(--safe-top));
  padding-right: max(clamp(20px, 4.5vw, 82px), var(--safe-right));
  padding-left: max(clamp(20px, 4.5vw, 82px), var(--safe-left));
}

.hero {
  padding-top: calc(var(--header-height) + var(--safe-top) + 54px);
}

.hero-video,
.card-media img,
.origin-image img,
.cta-image-stage {
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.cards-grid {
  align-items: stretch;
}

.card-media,
.details-grid .card-media {
  height: auto;
  aspect-ratio: 4 / 3;
}

.card-media img {
  object-fit: contain;
  object-position: center;
  background: #070b13;
  filter: contrast(1.025) saturate(1.035);
}

.footer {
  padding-bottom: calc(34px + var(--safe-bottom));
}

.footer-meta {
  gap: 12px;
}

.footer-meta > * {
  padding: 0 18px;
}

.footer-meta > * + * {
  border-inline-start: 0;
}

.contact-item {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(202, 165, 91, .18);
  border-radius: 12px;
  background: rgba(5, 9, 21, .34);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.contact-item svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-meta a.contact-item:hover {
  color: var(--gold-light);
  border-color: rgba(234, 216, 173, .52);
  background: rgba(202, 165, 91, .09);
  transform: translateY(-2px);
}

.cards-grid:focus-visible {
  outline: 2px solid rgba(234, 216, 173, .72);
  outline-offset: 8px;
}

@media (max-width: 820px) {
  :root {
    --section-padding: 66px;
  }

  .site-header {
    padding-right: max(18px, var(--safe-right));
    padding-left: max(18px, var(--safe-left));
  }

  .nav-shell {
    top: calc(var(--header-height) + var(--safe-top) + 10px);
    right: max(14px, var(--safe-right));
    left: max(14px, var(--safe-left));
    max-height: calc(100svh - var(--header-height) - var(--safe-top) - 26px);
    overflow-y: auto;
  }

  .hero {
    min-height: 100svh;
    padding: calc(var(--header-height) + var(--safe-top) + 44px) max(22px, var(--safe-right)) calc(54px + var(--safe-bottom)) max(22px, var(--safe-left));
    align-items: end;
  }

  .hero-content {
    width: min(100%, 620px);
    padding: 22px 0;
  }

  .hero-content::before {
    content: "";
    position: absolute;
    inset: -26px -18px;
    z-index: -1;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(4, 7, 13, .04), rgba(4, 7, 13, .62));
    filter: blur(.1px);
  }

  .origin {
    min-height: 0;
    display: grid;
    gap: 0;
    padding: 18px 16px 64px;
    border-top-color: rgba(202, 165, 91, .22);
    border-bottom-color: rgba(202, 165, 91, .22);
  }

  .origin-image {
    min-height: 0;
    max-height: none;
    overflow: hidden;
    border: 1px solid rgba(202, 165, 91, .24);
    border-radius: 22px;
    background: rgba(3, 7, 14, .72);
    box-shadow: 0 24px 68px rgba(0, 0, 0, .46);
  }

  .origin-image img {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 713 / 786;
    object-fit: contain;
  }

  .origin-copy {
    padding: 44px 8px 0;
    background: none;
  }

  .origin-copy h2,
  .section-heading h2,
  .contact-card h2 {
    font-size: clamp(31px, 8.8vw, 46px);
  }

  .origin-copy p:last-child {
    font-size: 17px;
    line-height: 1.85;
  }

  .cards-section {
    overflow: visible;
    padding: 66px 0 58px;
  }

  .section-heading {
    max-width: 660px;
    margin-bottom: 27px;
    padding-inline: 22px;
  }

  .section-heading h2 {
    margin-bottom: 12px;
  }

  .section-heading > p:last-child {
    font-size: 16px;
    line-height: 1.75;
  }

  .cards-grid {
    width: 100%;
    display: grid;
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: min(80vw, 316px);
    align-items: stretch;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px max(22px, var(--safe-right)) 26px max(22px, var(--safe-left));
    scroll-padding-inline: max(22px, var(--safe-left));
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cards-grid::-webkit-scrollbar {
    display: none;
  }

  html[dir="rtl"] .cards-grid {
    direction: rtl;
  }

  #services .glass-card:last-child {
    grid-column: auto;
    width: auto;
    justify-self: auto;
  }

  .glass-card {
    width: 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    border-radius: 20px;
    box-shadow: 0 22px 58px rgba(0, 0, 0, .46);
    transform: none;
    will-change: auto;
  }

  .glass-card:hover {
    --scale: 1;
    transform: none;
  }

  .card-media,
  .details-grid .card-media {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .card-copy,
  .details-grid .card-copy {
    min-height: 145px;
    padding: 20px 20px 23px;
  }

  .card-copy h3,
  .details-grid .card-copy h3 {
    margin-bottom: 8px;
    font-size: clamp(20px, 5.5vw, 25px);
  }

  .card-copy p,
  .details-grid .card-copy p {
    font-size: 13px;
    line-height: 1.7;
  }

  .process-section {
    padding: 62px 18px 76px;
  }

  .process-title {
    margin-bottom: 40px;
  }

  .process-line {
    gap: 32px 14px;
  }

  .video-cta {
    min-height: 62svh;
    padding: 76px 22px calc(76px + var(--safe-bottom));
  }

  .cta-content {
    width: 100%;
  }

  .gold-cta {
    width: min(100%, 420px);
    min-width: 0;
    min-height: 58px;
  }

  .footer {
    padding: 66px 18px calc(28px + var(--safe-bottom));
  }

  .footer-inner {
    max-width: 560px;
  }

  .footer-inner h2 {
    font-size: clamp(29px, 8.5vw, 43px);
  }

  .footer-meta {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 0;
  }

  .footer-meta > * {
    width: 100%;
    padding: 0 14px;
    font-size: 14px;
  }

  .contact-item {
    min-height: 48px;
  }

  .socials {
    gap: 13px;
    margin-top: 25px;
  }

  .socials a {
    width: 48px;
    height: 48px;
  }

  .modal-card {
    padding-right: max(20px, var(--safe-right));
    padding-left: max(20px, var(--safe-left));
    padding-bottom: calc(26px + var(--safe-bottom));
  }
}

@media (max-width: 520px) {
  .brand {
    width: 72px;
  }

  .menu-button {
    width: 40px;
  }

  h1 {
    font-size: clamp(30px, 10vw, 43px);
    line-height: 1.2;
  }

  html[dir="rtl"] h1 {
    line-height: 1.42;
  }

  .hero-subtitle,
  html[dir="rtl"] .hero-subtitle {
    font-size: 16px;
    line-height: 1.8;
  }

  .origin {
    padding-inline: 12px;
  }

  .cards-grid {
    grid-auto-columns: min(82vw, 300px);
    gap: 14px;
    padding-right: max(18px, var(--safe-right));
    padding-left: max(18px, var(--safe-left));
    scroll-padding-inline: 18px;
  }

  .card-copy,
  .details-grid .card-copy {
    min-height: 138px;
    padding: 18px 18px 21px;
  }

  .process-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-meta > * {
    font-size: 13px;
  }
}

/* =========================================================
   KEMET Origins v33 — premium image gallery and clarity pass
   ========================================================= */
.gallery-shell {
  position: relative;
  width: 100%;
}

.card-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: inherit;
  background: #070b13;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
}

.card-image-button picture {
  display: block;
  width: 100%;
  height: 100%;
}

.card-image-button:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: -4px;
}

.card-image-button::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(234, 216, 173, .45);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 46%, rgba(248, 233, 199, .9) 46% 54%, transparent 54%) center / 13px 13px no-repeat,
    linear-gradient(transparent 46%, rgba(248, 233, 199, .9) 46% 54%, transparent 54%) center / 13px 13px no-repeat,
    rgba(5, 9, 21, .76);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .36);
  backdrop-filter: blur(8px);
  opacity: .9;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease, border-color .2s ease;
}

html[dir="rtl"] .card-image-button::after {
  right: auto;
  left: 14px;
}

.card-image-button:hover::after {
  opacity: 1;
  border-color: rgba(234, 216, 173, .82);
  transform: scale(1.06);
}

.card-media img,
.origin-image img {
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}

.card-media img {
  filter: none;
}

.gallery-mobile-controls {
  display: none;
}

.gallery-step,
.gallery-modal-nav,
.gallery-modal-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(202, 165, 91, .38);
  color: var(--gold-light);
  background: linear-gradient(145deg, rgba(202, 165, 91, .12), rgba(5, 9, 21, .82));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .34);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.gallery-step svg,
.gallery-modal-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-step:hover,
.gallery-modal-nav:hover,
.gallery-modal-close:hover {
  border-color: rgba(234, 216, 173, .75);
  background: rgba(202, 165, 91, .16);
  transform: translateY(-1px);
}

.gallery-step:disabled,
.gallery-modal-nav:disabled {
  opacity: .34;
  cursor: default;
  transform: none;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: max(18px, var(--safe-top)) max(18px, var(--safe-right)) max(18px, var(--safe-bottom)) max(18px, var(--safe-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility .24s ease;
}

.gallery-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 12, .92);
  backdrop-filter: blur(16px) saturate(115%);
}

.gallery-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 94vw);
  max-height: min(900px, 94svh);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 18px;
}

.gallery-modal-figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(202, 165, 91, .32);
  border-radius: 24px;
  background: rgba(5, 9, 21, .96);
  box-shadow: 0 38px 120px rgba(0, 0, 0, .72);
}

.gallery-modal-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(68svh, 720px);
  max-height: 72svh;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(202, 165, 91, .08), transparent 45%),
    #040811;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.gallery-modal-stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: calc(72svh - 36px);
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  transform: translateZ(0);
  transition: opacity .18s ease, transform .25s cubic-bezier(.2,.7,.2,1);
}

.gallery-modal-stage img.is-changing {
  opacity: .22;
  transform: scale(.985);
}

.gallery-modal-caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 21px 24px 23px;
  border-top: 1px solid rgba(202, 165, 91, .18);
  text-align: start;
}

.gallery-modal-caption h2 {
  margin: 0 0 6px;
  color: var(--gold-light);
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1.25;
}

.gallery-modal-caption p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.gallery-modal-count {
  flex: 0 0 auto;
  padding-top: 4px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.gallery-modal-nav {
  width: 54px;
  height: 54px;
  border-radius: 50%;
}

.gallery-modal-close {
  position: absolute;
  top: -12px;
  right: 64px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

html[dir="rtl"] .gallery-modal-close {
  right: auto;
  left: 64px;
}

body.gallery-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .gallery-mobile-controls {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 14px;
    width: min(100% - 36px, 430px);
    margin: 0 auto;
    padding-top: 1px;
  }

  .gallery-step {
    width: 44px;
    height: 44px;
    border-radius: 50%;
  }

  .gallery-status {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    color: rgba(234, 216, 173, .86);
  }

  .gallery-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .08em;
  }

  .gallery-count strong {
    color: var(--gold-light);
    font-size: 16px;
  }

  .gallery-dots {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .gallery-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(234, 216, 173, .28);
    cursor: pointer;
    transition: width .22s ease, background .22s ease, transform .22s ease;
  }

  .gallery-dot.is-active {
    width: 22px;
    background: var(--gold);
  }

  .cards-grid {
    grid-auto-columns: min(82vw, 324px);
    gap: 15px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
  }

  .glass-card {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .card-media,
  .details-grid .card-media {
    aspect-ratio: 4 / 3;
    background: #040811;
  }

  .card-media img,
  .details-grid .card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: none !important;
    transform: none !important;
  }

  .cards-grid .reveal-up,
  .cards-grid .reveal-up.is-visible {
    transform: none;
    transition: opacity .42s ease;
  }

  .card-image-button::after {
    width: 32px;
    height: 32px;
    right: 12px;
    bottom: 12px;
  }

  html[dir="rtl"] .card-image-button::after {
    right: auto;
    left: 12px;
  }

  html[dir="rtl"] .gallery-step-prev svg,
  html[dir="rtl"] .gallery-step-next svg,
  html[dir="rtl"] .gallery-modal-prev svg,
  html[dir="rtl"] .gallery-modal-next svg {
    transform: scaleX(-1);
  }

  .gallery-modal {
    padding: 0;
  }

  .gallery-modal-dialog {
    width: 100%;
    height: 100svh;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    background: #030711;
  }

  .gallery-modal-figure {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .gallery-modal-stage {
    min-height: 0;
    max-height: none;
    padding: calc(62px + var(--safe-top)) 12px 14px;
  }

  .gallery-modal-stage img {
    max-height: none;
  }

  .gallery-modal-caption {
    min-height: 126px;
    padding: 18px max(20px, var(--safe-right)) calc(18px + var(--safe-bottom)) max(20px, var(--safe-left));
    background: linear-gradient(180deg, rgba(5,9,21,.94), #050915);
  }

  .gallery-modal-caption h2 {
    font-size: 21px;
  }

  .gallery-modal-caption p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
  }

  .gallery-modal-count {
    font-size: 12px;
  }

  .gallery-modal-nav {
    position: relative;
    z-index: 4;
    grid-row: 2 / 3;
    width: 100%;
    height: calc(54px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(5, 9, 21, .98);
  }

  .gallery-modal-prev {
    grid-column: 1 / 2;
  }

  .gallery-modal-next {
    grid-column: 2 / 3;
    border-inline-start: 1px solid rgba(202, 165, 91, .22);
  }

  .gallery-modal-close {
    top: calc(12px + var(--safe-top));
    right: max(14px, var(--safe-right));
    width: 42px;
    height: 42px;
    border-color: rgba(234, 216, 173, .48);
    background: rgba(5, 9, 21, .78);
  }

  html[dir="rtl"] .gallery-modal-close {
    right: auto;
    left: max(14px, var(--safe-left));
  }
}

@media (max-width: 520px) {
  .cards-grid {
    grid-auto-columns: min(80vw, 300px);
  }

  .gallery-mobile-controls {
    width: min(100% - 28px, 390px);
  }
}

.card-image-button {
  height: 100%;
}

.card-hover-copy {
  pointer-events: none;
}

/* =========================================================
   KEMET Origins v34 — true-source images + responsive carousel
   ========================================================= */

/* Never blur, enlarge, or soften portfolio images. */
.card-hover-copy {
  display: none !important;
}

.card-media,
.details-grid .card-media {
  width: 100%;
  height: auto !important;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #050914;
}

.card-image-button,
.card-image-button img {
  width: 100%;
  height: 100%;
}

.card-image-button img,
.card-media img,
.details-grid .card-media img {
  display: block;
  object-fit: contain !important;
  object-position: center !important;
  background: #050914;
  filter: none !important;
  transform: none !important;
  image-rendering: auto;
  backface-visibility: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .glass-card:hover .card-media img,
  .glass-card:hover .card-image-button img {
    filter: none !important;
    transform: none !important;
  }
}

/* Both desktop and mobile behave as real horizontal galleries. */
.cards-section {
  overflow: hidden;
}

.gallery-shell {
  width: min(100%, 1600px);
  margin-inline: auto;
}

.cards-grid,
.details-grid {
  display: grid !important;
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 3);
  align-items: stretch;
  gap: 24px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 28px;
  scroll-padding-inline: 4px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cards-grid::-webkit-scrollbar,
.details-grid::-webkit-scrollbar {
  display: none;
}

.glass-card {
  width: 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transform: none !important;
  will-change: auto;
}

.glass-card:hover {
  --scale: 1;
  transform: none !important;
}

/* Controls are available on web and mobile. */
.gallery-mobile-controls {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 16px;
  width: min(100%, 520px);
  margin: 2px auto 0;
  padding-inline: 10px;
}

.gallery-step {
  width: 46px;
  height: 46px;
  border-radius: 50%;
}

.gallery-status {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(234, 216, 173, .86);
}

.gallery-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.gallery-count strong {
  color: var(--gold-light);
  font-size: 16px;
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(234, 216, 173, .28);
  cursor: pointer;
  transition: width .22s ease, background .22s ease;
}

.gallery-dot.is-active {
  width: 22px;
  background: var(--gold);
}

/* Desktop/tablet sizing. */
@media (max-width: 1100px) {
  .cards-grid,
  .details-grid {
    grid-auto-columns: calc((100% - 20px) / 2);
    gap: 20px;
  }
}

/* Mobile application layout: one full card, native swipe, no crop. */
@media (max-width: 820px) {
  .cards-section {
    overflow: hidden !important;
    padding: 64px 0 56px !important;
  }

  .gallery-shell {
    width: 100%;
  }

  .cards-grid,
  .details-grid {
    grid-auto-columns: min(84vw, 340px) !important;
    gap: 14px !important;
    padding: 4px max(18px, var(--safe-right)) 24px max(18px, var(--safe-left)) !important;
    scroll-padding-inline: max(18px, var(--safe-left));
  }

  html[dir="rtl"] .cards-grid,
  html[dir="rtl"] .details-grid {
    direction: rtl;
  }

  .glass-card {
    border-radius: 20px;
    box-shadow: 0 20px 52px rgba(0, 0, 0, .48);
  }

  .card-copy,
  .details-grid .card-copy {
    min-height: 132px !important;
    padding: 18px 18px 21px !important;
  }

  .card-copy h3,
  .details-grid .card-copy h3 {
    margin-bottom: 7px;
    font-size: clamp(20px, 5.4vw, 24px);
  }

  .card-copy p,
  .details-grid .card-copy p {
    font-size: 13px;
    line-height: 1.65;
  }

  .gallery-mobile-controls {
    width: min(100% - 28px, 420px);
  }
}

@media (max-width: 520px) {
  .cards-grid,
  .details-grid {
    grid-auto-columns: min(82vw, 310px) !important;
  }

  .gallery-mobile-controls {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 12px;
  }

  .gallery-step {
    width: 42px;
    height: 42px;
  }
}


/* =========================================================
   KEMET Origins v35 — supplied portfolio imagery + compact mobile cards
   ========================================================= */

.origin {
  min-height: 0;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
  align-items: center;
  gap: clamp(38px, 5vw, 88px);
  padding: clamp(78px, 8vw, 132px) clamp(26px, 6vw, 100px);
}

.origin-image {
  width: 100%;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid rgba(202, 165, 91, .32);
  border-radius: clamp(22px, 2vw, 32px);
  background: #050914;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .52);
}

.origin-image picture {
  display: block;
  width: 100%;
  height: 100%;
}

.origin-image img {
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #050914;
}

.origin-copy {
  padding: clamp(32px, 4vw, 68px) 0;
  background: none;
}

.card-image-button picture {
  display: block;
  width: 100%;
  height: 100%;
}

.card-media,
.details-grid .card-media {
  background:
    radial-gradient(circle at 50% 35%, rgba(202, 165, 91, .09), transparent 56%),
    #050914;
}

.card-image-button img,
.card-media img,
.details-grid .card-media img {
  background: transparent !important;
}

.cta-image-stage {
  background-image:
    linear-gradient(90deg, rgba(4, 7, 14, .18), rgba(4, 7, 14, .08)),
    url("../images/cta-project.jpg");
  background-position: center;
  background-size: cover;
}

@media (max-width: 980px) {
  .origin {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 70px max(22px, var(--safe-right)) 74px max(22px, var(--safe-left));
  }

  .origin-image {
    width: min(100%, 720px);
    justify-self: center;
  }

  .origin-copy {
    width: min(100%, 720px);
    justify-self: center;
    padding: 0 4px;
  }
}

@media (max-width: 820px) {
  .origin {
    gap: 30px;
    padding: 52px max(18px, var(--safe-right)) 62px max(18px, var(--safe-left));
  }

  .origin-image {
    width: min(88vw, 430px);
    border-radius: 20px;
    box-shadow: 0 20px 58px rgba(0, 0, 0, .48);
  }

  .origin-copy {
    padding: 0 6px;
    text-align: center;
  }

  .origin-copy p:last-child {
    margin-inline: auto;
  }

  .cards-grid,
  .details-grid {
    grid-auto-columns: min(78vw, 320px) !important;
    gap: 14px !important;
    padding-inline: max(18px, var(--safe-left)) !important;
  }

  .card-copy,
  .details-grid .card-copy {
    min-height: 116px !important;
    padding: 16px 17px 18px !important;
  }

  .card-copy h3,
  .details-grid .card-copy h3 {
    margin-bottom: 6px;
    font-size: clamp(18px, 5vw, 22px);
  }

  .card-copy p,
  .details-grid .card-copy p {
    font-size: 12.5px;
    line-height: 1.58;
  }

  .cta-image-stage {
    background-position: 54% center;
  }
}

@media (max-width: 520px) {
  .origin-image {
    width: min(90vw, 360px);
  }

  .cards-grid,
  .details-grid {
    grid-auto-columns: min(76vw, 290px) !important;
  }

  .gallery-mobile-controls {
    width: min(100% - 34px, 360px);
  }
}
