/* ============================================================
   Power Management Co. — PREMIUM DIRECTION PROTOTYPE
   Throwaway concept. Not linked from the real site.
   Delete with:  rm -rf _prototype
   Vanilla CSS. Dark theme locked. Brand: navy + gold + teal.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* surfaces (deep navy, cinematic) */
  --bg:        #0a1118;
  --bg-2:      #0d1822;
  --surface:   #122130;
  --surface-2: #17293a;

  /* brand */
  --gold:      #c8ad6f;
  --gold-soft: #e6cd92;
  --gold-deep: #a98f4f;
  --teal:      #2f9bb8;
  --teal-soft: #57bcd6;
  --green:     #3db88a;

  /* ink */
  --ink:    #eee5d0;
  --muted:  #9db3c1;
  --faint:  #5f7989;
  --line:   rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.04);

  /* glows */
  --gold-glow: rgba(200,173,111,.14);
  --teal-glow: rgba(47,155,184,.14);

  /* type */
  --display: "Geist", "DM Sans", system-ui, sans-serif;
  --body:    "DM Sans", system-ui, sans-serif;
  --ar:      "Cairo", system-ui, sans-serif;

  /* motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.30, 1);
  --ease-emil:   cubic-bezier(0.23, 1, 0.32, 1);
  --ease-inout:  cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press:   140ms;
  --dur-ui:      240ms;

  /* layout */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* z-scale */
  --z-grid: 0;
  --z-content: 2;
  --z-nav: 50;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[dir="rtl"] body { font-family: var(--ar); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* bilingual visibility */
.en { display: block; } .ar { display: none; }
html[dir="rtl"] .en { display: none; } html[dir="rtl"] .ar { display: block; }
.en-i { display: inline; } .ar-i { display: none; }
html[dir="rtl"] .en-i { display: none; } html[dir="rtl"] .ar-i { display: inline; }

/* ---------- Type scale ---------- */
.kicker {
  font-family: var(--display);
  font-size: .76rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: .6rem;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--gold); opacity: .7; }
html[dir="rtl"] .kicker { flex-direction: row-reverse; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.18; }

.display { font-size: clamp(2.6rem, 6.2vw, 5.4rem); }
.h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.lead { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 60ch; text-wrap: pretty; }

/* ---------- Buttons (high-end) ---------- */
.btn {
  --b: var(--gold);
  position: relative; display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-size: .95rem; font-weight: 600;
  padding: .92rem 1.7rem; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; isolation: isolate;
  transition: transform var(--dur-press) var(--ease-emil), box-shadow var(--dur-ui) var(--ease-out), background-color var(--dur-ui) var(--ease-out);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform var(--dur-ui) var(--ease-out); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1a130a;
  box-shadow: 0 8px 30px rgba(200,173,111,.22), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:hover { box-shadow: 0 14px 44px rgba(200,173,111,.38), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-primary:hover svg { transform: translateX(3px); }
html[dir="rtl"] .btn-primary:hover svg { transform: translateX(-3px); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost {
  background: rgba(255,255,255,.03); color: var(--ink);
  border-color: var(--line); backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-ghost:active { transform: scale(0.97); }

:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; border-radius: 8px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  background: rgba(10,17,24,.55); backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-2);
  transition: background var(--dur-ui) var(--ease-out), border-color var(--dur-ui) var(--ease-out);
}
.nav.scrolled { background: rgba(10,17,24,.9); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-mark { width: 38px; height: 38px; }
.brand-text { font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: -.01em; }
.brand-sub { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .9rem; color: var(--muted); position: relative; transition: color var(--dur-ui) var(--ease-out); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-ui) var(--ease-out); }
html[dir="rtl"] .nav-links a::after { transform-origin: right; }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.lang { font-family: var(--display); font-size: .82rem; font-weight: 600; color: var(--muted); background: none; border: 1px solid var(--line); padding: .4rem .8rem; border-radius: 8px; cursor: pointer; transition: all var(--dur-ui) var(--ease-out); }
.lang:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: center; overflow: hidden; }
#grid-canvas { position: absolute; inset: 0; z-index: var(--z-grid); width: 100%; height: 100%; }
.hero::after { /* cinematic vignette + bottom fade */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 78% 35%, transparent 30%, rgba(10,17,24,.4) 100%),
    linear-gradient(180deg, rgba(10,17,24,.35) 0%, transparent 22%, transparent 60%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: var(--z-content); width: 100%; padding-top: 72px; }
.hero-brandstrip { display: inline-flex; align-items: center; gap: .7rem; padding: .45rem .95rem; border: 1px solid var(--gold-glow); background: rgba(200,173,111,.06); border-radius: 100px; margin-bottom: 1.6rem; font-size: .82rem; color: var(--gold-soft); }
.hero-brandstrip img { height: 18px; width: auto; opacity: .95; }
.hero h1 { max-width: 16ch; margin-bottom: 1.3rem; }
.hero h1 .accent { color: var(--gold); }
.hero .lead { margin-bottom: 2.2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
html[dir="rtl"] .hero-cta { flex-direction: row-reverse; justify-content: flex-end; }

/* scroll hint (no text label, just a motion cue line) */
.scroll-cue { position: absolute; bottom: 1.6rem; inset-inline-start: var(--gutter); z-index: var(--z-content); width: 1px; height: 54px; background: linear-gradient(var(--gold), transparent); opacity: .6; overflow: hidden; }
.scroll-cue::after { content: ""; position: absolute; top: -40%; left: 0; width: 100%; height: 40%; background: var(--gold-soft); animation: cue 2.4s var(--ease-inout) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%,100% { transform: translateY(360%); } }

/* ---------- Section frame ---------- */
section { position: relative; }
.band { padding-block: clamp(5rem, 11vw, 9rem); }
.section-head { max-width: 64ch; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head .h2 { margin-top: 1rem; }

/* ---------- EPC storytelling (pinned scrub) ---------- */
.epc { background: var(--bg-2); }
.epc-track { position: relative; }
.epc-line { position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: 50%; height: 2px; background: var(--line); overflow: hidden; }
.epc-line .charge { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--teal), var(--gold)); box-shadow: 0 0 18px var(--gold-glow); }
html[dir="rtl"] .epc-line .charge { transform-origin: right; }
.epc-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 3vw, 2.5rem); position: relative; }
.epc-stage { padding: 2rem 0; }
.epc-node { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--gold); margin-bottom: 1.4rem; transition: transform var(--dur-ui) var(--ease-out), border-color var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out); }
.epc-stage.lit .epc-node { border-color: var(--gold); box-shadow: 0 0 30px var(--gold-glow); transform: translateY(-4px); }
.epc-stage h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.epc-stage p { color: var(--muted); font-size: .92rem; max-width: 28ch; }
.epc-step { font-family: var(--display); font-size: .78rem; color: var(--faint); letter-spacing: .12em; margin-bottom: .9rem; }

/* ---------- Capabilities (asymmetric split, hairline rows) ---------- */
.cap-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.cap-sticky { position: sticky; top: 110px; }
.cap-rows { display: flex; flex-direction: column; }
.cap-row { display: grid; grid-template-columns: 56px 1fr; gap: 1.3rem; padding: 1.7rem 0; border-top: 1px solid var(--line); align-items: start; }
.cap-row:last-child { border-bottom: 1px solid var(--line); }
.cap-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--gold); transition: transform var(--dur-ui) var(--ease-out), color var(--dur-ui) var(--ease-out); }
.cap-row:hover .cap-ico { transform: translateY(-3px); color: var(--gold-soft); }
.cap-row h3 { font-size: 1.22rem; margin-bottom: .35rem; }
.cap-row p { color: var(--muted); font-size: .92rem; max-width: 46ch; }
html[dir="rtl"] .cap-row { grid-template-columns: 1fr 56px; }
html[dir="rtl"] .cap-row .cap-ico { order: 2; }

/* ---------- Product spotlight (image + text split) ---------- */
.spot { background: var(--bg-2); }
.spot-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.spot-stage { position: relative; border-radius: 20px; overflow: hidden; background: radial-gradient(120% 120% at 30% 20%, #1c3a2e, #0c1a16 70%); border: 1px solid var(--line); aspect-ratio: 4/3; display: grid; place-items: center; }
.spot-stage img { width: 86%; filter: drop-shadow(0 30px 50px rgba(0,0,0,.5)); transition: transform 1.2s var(--ease-out); will-change: transform; }
.spot-glow { position: absolute; inset: 0; background: radial-gradient(40% 40% at 50% 45%, var(--gold-glow), transparent 70%); mix-blend-mode: screen; pointer-events: none; }
.spot-specs { display: flex; gap: 2.2rem; flex-wrap: wrap; margin: 1.8rem 0 2.1rem; }
html[dir="rtl"] .spot-specs { flex-direction: row-reverse; justify-content: flex-end; }
.spot-spec b { font-family: var(--display); font-size: 1.5rem; color: var(--gold); display: block; line-height: 1; }
.spot-spec span { font-size: .78rem; color: var(--faint); }

/* ---------- Stats (inline metrics, no cards) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem,3vw,2rem); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: clamp(1.6rem,4vw,2.4rem) 0; }
.stat b { font-family: var(--display); font-weight: 600; font-size: clamp(2.4rem,5vw,3.6rem); color: var(--ink); display: block; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat b .u { color: var(--gold); }
/* only the direct-child label span (.en/.ar) gets spacing; the .u suffix stays inline */
.stat > span { margin-top: .6rem; color: var(--muted); font-size: .88rem; }

/* ---------- Closing CTA ---------- */
.cta { position: relative; text-align: center; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 90% at 50% 0%, var(--gold-glow), transparent 60%); pointer-events: none; }
.cta .h2 { margin: 0 auto 1.1rem; max-width: 18ch; }
.cta .lead { margin: 0 auto 2.2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 2.4rem; color: var(--faint); font-size: .84rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-list { list-style: none; margin-top: 2rem; display: grid; gap: 1rem; }
.about-list li { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .96rem; }
.about-list li svg { color: var(--gold); flex-shrink: 0; }
html[dir="rtl"] .about-list li { flex-direction: row-reverse; }
.about-panel { background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; box-shadow: 0 0 60px var(--gold-glow); }
.panel-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }
.panel-logo { background: #fff; border-radius: 12px; padding: 1.3rem; display: grid; place-items: center; margin-bottom: 1rem; }
.panel-logo img { max-height: 56px; width: auto; }
.panel-cert { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; color: var(--green); background: rgba(61,184,138,.1); border: 1px solid rgba(61,184,138,.28); padding: .4rem .9rem; border-radius: 100px; }
.panel-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.panel-meta b { font-family: var(--display); font-size: .96rem; }
.panel-meta b.en { display: block; } .panel-meta b.ar { display: none; }
html[dir="rtl"] .panel-meta b.en { display: none; } html[dir="rtl"] .panel-meta b.ar { display: block; }
/* labels use .en/.ar (block by default) so language hiding is never overridden */
.panel-meta > div > span { font-size: .76rem; color: var(--faint); }

/* ---------- Equipment catalog ---------- */
.cat-head { margin-top: clamp(3rem, 7vw, 5rem); padding-top: 2.4rem; border-top: 1px solid var(--line); margin-bottom: 2rem; }
.cat-title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--muted); font-weight: 500; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.cat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out), border-color var(--dur-ui) var(--ease-out); }
.cat-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 22px 48px rgba(0,0,0,.4), 0 0 30px var(--gold-glow); }
.cat-img { position: relative; aspect-ratio: 5/4; overflow: hidden; background: radial-gradient(120% 120% at 30% 20%, #16242f, #0c151d); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.cat-img.light { background: linear-gradient(160deg, #fff, #e7edf1); }
.cat-img img { width: 100%; height: 100%; object-fit: contain; padding: 1.3rem; transition: transform .6s var(--ease-out); }
.cat-card:hover .cat-img img { transform: scale(1.07); }
.cat-img::after { content: ""; position: absolute; inset: 0; left: -60%; width: 55%; background: linear-gradient(105deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-18deg); opacity: 0; }
.cat-card:hover .cat-img::after { opacity: 1; animation: sheen 1s var(--ease-out); }
@keyframes sheen { 0% { left: -60%; } 100% { left: 130%; } }
.cat-body { padding: 1.3rem; }
.cat-brand { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.cat-body h4 { font-family: var(--display); font-size: 1.02rem; margin: .5rem 0 .35rem; }
.cat-body p { font-size: .84rem; color: var(--faint); }

/* ---------- Products (mirrors the live cards, with motion) ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }
.prod-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: inherit; cursor: pointer; transition: transform var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out), border-color var(--dur-ui) var(--ease-out); }
.prod-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 24px 50px rgba(0,0,0,.42), 0 0 30px var(--gold-glow); }
.prod-img { position: relative; height: 190px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.prod-img.light { background: #fff; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.prod-img.contain img { object-fit: contain; padding: 1.1rem; }
.prod-card:hover .prod-img img { transform: scale(1.06); }
.prod-img::after { content: ""; position: absolute; inset: 0; left: -60%; width: 55%; background: linear-gradient(105deg, transparent, rgba(255,255,255,.32), transparent); transform: skewX(-18deg); opacity: 0; pointer-events: none; }
.prod-card:hover .prod-img::after { opacity: 1; animation: sheen 1s var(--ease-out); }
.prod-body { padding: 1.3rem; }
.prod-brand img { height: 20px; width: auto; vertical-align: middle; }
.prod-name { font-family: var(--display); font-size: 1rem; font-weight: 600; margin: .65rem 0 .4rem; transition: color var(--dur-ui) var(--ease-out); }
.prod-card:hover .prod-name { color: var(--gold-soft); }
.prod-desc { font-size: .83rem; color: var(--faint); line-height: 1.55; }
.prod-link { margin-top: .9rem; font-family: var(--display); font-size: .82rem; font-weight: 600; color: var(--gold); display: inline-flex; align-items: center; gap: .4rem; transition: gap var(--dur-ui) var(--ease-out); }
/* language control must out-specify the inline-flex above */
.prod-link.ar { display: none; }
html[dir="rtl"] .prod-link.en { display: none; }
html[dir="rtl"] .prod-link.ar { display: inline-flex; }
.prod-card:hover .prod-link { gap: .75rem; }

/* ---------- Projects (bento) ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.proj-card { position: relative; background: var(--g, var(--surface)); border: 1px solid var(--line); border-radius: 18px; padding: 1.8rem; min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; transition: transform var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out), border-color var(--dur-ui) var(--ease-out); }
.proj-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(8,13,18,.55)); }
.proj-card > * { position: relative; }
.proj-card.big { grid-column: span 2; min-height: 300px; }
.proj-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.proj-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
html[dir="rtl"] .proj-meta { flex-direction: row-reverse; }
.proj-cat { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-soft); }
.proj-loc { font-size: .78rem; color: var(--muted); }
.proj-card h3 { font-size: 1.15rem; line-height: 1.2; }
.proj-card.big h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); max-width: 22ch; }
.proj-card p { color: var(--muted); font-size: .9rem; margin-top: .6rem; max-width: 46ch; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-2); }
.contact-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-info { list-style: none; margin-top: 2rem; }
.contact-info li { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.contact-info li:last-child { border-bottom: 1px solid var(--line); }
.ci-label { color: var(--faint); font-size: .8rem; }
html[dir="rtl"] .contact-info li { grid-template-columns: 1fr 110px; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.6rem, 4vw, 2.4rem); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.1rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: .8rem 1rem; outline: none; width: 100%;
  transition: border-color var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.field select { cursor: pointer; }
.field select option { background: var(--surface); color: var(--ink); }
.form-submit { width: 100%; justify-content: center; margin-top: .4rem; }
.form-submit.sent { background: linear-gradient(135deg, #5fd6a6, var(--green)); }
.form-success { margin-top: 1rem; color: var(--green); font-size: .92rem; font-weight: 600; text-align: center; }

/* ---------- Reveal (enhances an already-visible default; JS adds hidden state only when motion allowed) ---------- */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(26px); }

/* ---------- New-section responsive ---------- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .proj-grid { grid-template-columns: 1fr; }
  .proj-card.big { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .panel-meta { grid-template-columns: 1fr; }
}

/* ---------- Prototype ribbon ---------- */
.proto-flag { position: fixed; z-index: 80; bottom: 14px; inset-inline-end: 14px; font-family: var(--display); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bg); background: var(--gold); padding: .4rem .8rem; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }

/* ---------- Responsive / mobile direction ---------- */
@media (max-width: 1024px) {
  .cap-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .cap-sticky { position: static; }
  .spot-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-right .btn-primary { display: none; } /* hero carries the primary CTA */
  .brand-text { white-space: nowrap; }
  .brand-sub { display: none; }
  .epc-stages { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .epc-line { display: none; }
  .hero h1 { max-width: 100%; }
  .display { font-size: clamp(2.4rem, 9vw, 3.4rem); }
  .hero .lead { font-size: 1rem; }
}
@media (max-width: 540px) {
  .epc-stages { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .btn { width: 100%; justify-content: center; }
  .hero-cta { width: 100%; }
}

/* ---------- Reduced motion: kill ambient/scroll motion, keep content visible ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue::after, .spot-stage img { animation: none !important; transition: none !important; }
  .reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
  * { scroll-behavior: auto !important; }
}

/* =====================================================
   PROJECT MODALS + PHOTO GALLERY
   ===================================================== */
.proj-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1.25rem; background: transparent;
  border: 1px solid rgba(200,173,111,.3); color: var(--gold);
  padding: .48rem 1.1rem; border-radius: 6px; font-size: .82rem;
  font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .2s, border-color .2s; letter-spacing: .01em;
}
.proj-btn:hover { background: rgba(200,173,111,.1); border-color: var(--gold); }

.proj-modal {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .28s cubic-bezier(.16,1,.3,1);
}
.proj-modal.is-open { opacity: 1; pointer-events: all; }

.modal-bg {
  position: absolute; inset: 0;
  background: rgba(4,8,14,.84); backdrop-filter: blur(6px); cursor: pointer;
}

.modal-panel {
  position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; width: 100%; max-width: 960px; max-height: 90vh;
  overflow-y: auto; display: flex; flex-direction: column;
  transform: translateY(24px) scale(.98);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.proj-modal.is-open .modal-panel { transform: none; }

.modal-x {
  position: sticky; top: 1rem; float: right; margin: 1rem 1rem 0 0; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color .2s;
}
.modal-x:hover { border-color: var(--gold); }

.modal-head { padding: 2rem 2rem 1.5rem; border-bottom: 1px solid var(--line); clear: right; }
.modal-head h2 { font-size: clamp(1.2rem,2.5vw,1.65rem); margin-top: .6rem; margin-bottom: 0; }

.modal-body { padding: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media(max-width:640px) { .modal-body { grid-template-columns: 1fr; padding: 1.25rem; gap: 1.5rem; } }

.modal-col > p { font-size: .88rem; color: var(--muted); line-height: 1.75; }

.m-specs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.5rem; }
.m-spec { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem; }
.m-spec b { display: block; font-size: 1rem; font-weight: 700; color: var(--gold); line-height: 1.2; }
.m-spec span { display: block; font-size: .72rem; color: var(--muted); margin-top: .25rem; }

.modal-gal-title { font-size: .88rem; font-weight: 700; margin-bottom: .75rem; }

.gal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; }
@media(max-width:480px) { .gal-grid { grid-template-columns: repeat(2,1fr); } }

.gal-item {
  aspect-ratio: 4/3; border-radius: 8px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line);
  position: relative; cursor: pointer;
}
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gal-item:hover img { transform: scale(1.06); }
.gal-ph { display: none; }
.gal-item.no-photo { cursor: default; }
.gal-item.no-photo img { display: none; }
.gal-item.no-photo .gal-ph {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; gap: .35rem; color: var(--muted);
}
.gal-item.no-photo .gal-ph::before { content: '📷'; font-size: 1.4rem; opacity: .35; }
.gal-ph span { font-size: .62rem; opacity: .55; text-align: center; word-break: break-all; padding: 0 .25rem; }

.gal-note { margin-top: .75rem; font-size: .73rem; color: var(--muted); line-height: 1.5; }
.gal-note code { color: var(--gold-soft); }

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s; cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; cursor: default; }
.lb-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lb-close:hover { background: rgba(255,255,255,.22); }

/* modal spec bilingual fix — override display:block set by .m-spec b/span */
.m-spec b.ar, .m-spec span.ar { display: none; }
html[dir="rtl"] .m-spec b.en, html[dir="rtl"] .m-spec span.en { display: none; }
html[dir="rtl"] .m-spec b.ar, html[dir="rtl"] .m-spec span.ar { display: block; }
.modal-gal-title.ar { display: none; }
html[dir="rtl"] .modal-gal-title.en { display: none; }
html[dir="rtl"] .modal-gal-title.ar { display: block; }

/* project card cover photos (graceful fallback to gradient if missing) */
.proj-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.proj-card > img.proj-cover { z-index: 0; }
.proj-card::before { z-index: 1; background: linear-gradient(180deg, rgba(8,13,18,.45), rgba(8,13,18,.25) 38%, rgba(8,13,18,.88)); }
.proj-card > *:not(.proj-cover) { position: relative; z-index: 2; }
