/* BPH SYSTEMS — shared type, header, mobile menu and footer (used by every page). Uses variables from hero.css. */

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

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-block-end: 28px;
}
.sec-title {
  font-size: clamp(30px, 3.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 300;
  color: rgba(233, 237, 243, 0.78);
}
.sec-title strong { display: block; font-weight: 600; color: var(--fg); }
.sec-title span { display: block; }
.sec-title--xl { font-size: clamp(40px, 5.4vw, 92px); line-height: 1.02; letter-spacing: -0.03em; }
.lead {
  margin-block-start: 30px;
  max-width: 46ch;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.6;
  color: var(--muted);
}
.acc { color: var(--accent); font-weight: 500; }
.p { color: rgba(233, 237, 243, 0.9); }

/* reveal on scroll (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }



/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.btn--ghost { color: var(--fg); border: 1px solid rgba(255, 255, 255, 0.18); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.45); }
.btn--accent { color: #120c05; background: var(--accent); border: 1px solid var(--accent); padding: 14px 26px; font-size: 15px; }
.btn--accent:hover { background: #f6c78a; }
.btn:focus-visible, .nav__list a:focus-visible, .lang__btn:focus-visible, .burger:focus-visible,
.footer__col a:focus-visible, .footer__legal a:focus-visible, .footer__mail:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: clamp(16px, 2.4vw, 30px) var(--pad-x);
  opacity: 0;
  animation: fade 1.8s 0.6s var(--ease) forwards;
  transition: transform 0.5s var(--ease), background 0.4s ease, padding 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-block-end: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(4, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-block-end-color: rgba(255, 255, 255, 0.06);
  padding-block: 14px;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.menu-open { background: transparent; border-color: transparent; backdrop-filter: none; transform: none; }

.nav { flex: 1; display: flex; justify-content: center; }
.nav__list { list-style: none; display: flex; gap: clamp(18px, 2.6vw, 40px); }
.nav__list a {
  position: relative;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}
.nav__list a:hover, .nav__list a.is-active { color: var(--fg); }
.nav__list a::after {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  bottom: -9px;
  width: 4px; height: 4px;
  margin-inline-start: -2px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s, transform 0.3s;
}
.nav__list a.is-active::after { opacity: 1; transform: none; }

.site-header__actions { display: flex; align-items: center; gap: 14px; }

/* language */
.lang { position: relative; }
.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.3s;
}
.lang__btn:hover, .lang__btn[aria-expanded="true"] { color: var(--fg); }
.lang__menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  padding: 6px;
  list-style: none;
  background: rgba(10, 13, 19, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.lang__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  text-align: start;
}
.lang__item:hover, .lang__item:focus-visible { background: rgba(255, 255, 255, 0.05); color: #fff; outline: none; }
.lang__item[aria-current="true"] { color: #fff; }
.lang__item[aria-current="true"] .lang__c { color: var(--accent); }
.lang__c { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--faint); }
.lang__item[lang="fa"], .lang__item[lang="ar"], .mobile-menu__lang[lang="fa"], .mobile-menu__lang[lang="ar"] { font-family: var(--font-fa); }

/* burger */
.burger {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.burger span {
  position: absolute;
  inset-inline-start: 10px;
  width: 20px; height: 1.5px;
  background: var(--fg);
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { top: 19.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19.5px; transform: rotate(-45deg); }

/* ---------- mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 110px var(--pad-x) 40px;
  background: rgba(4, 6, 10, 0.97);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu__list { list-style: none; display: grid; gap: 6px; }
.mobile-menu__list a {
  display: block;
  padding-block: 8px;
  font-size: 34px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.mobile-menu.is-open .mobile-menu__list a { opacity: 1; transform: none; }
.mobile-menu.is-open li:nth-child(2) a { transition-delay: 0.04s; }
.mobile-menu.is-open li:nth-child(3) a { transition-delay: 0.08s; }
.mobile-menu.is-open li:nth-child(4) a { transition-delay: 0.12s; }
.mobile-menu.is-open li:nth-child(5) a { transition-delay: 0.16s; }
.mobile-menu.is-open li:nth-child(6) a { transition-delay: 0.2s; }
.mobile-menu__langs { display: flex; flex-wrap: wrap; gap: 8px; }
.mobile-menu__lang {
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
}
.mobile-menu__lang .lang__c { display: none; }
.mobile-menu__lang[aria-current="true"] { color: #fff; border-color: rgba(242, 184, 112, 0.6); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  padding: clamp(110px, 16vh, 200px) var(--pad-x) 36px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(242, 184, 112, 0.08), transparent 70%),
    var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.footer__cta { max-width: 900px; }
/* Persian and Arabic letters join, so no letter-spacing or uppercase tricks */
.site-footer:lang(fa) .eyebrow, .site-footer:lang(ar) .eyebrow { letter-spacing: 0; font-family: var(--font-fa); font-size: 14px; }
.site-footer:lang(fa) .footer__title, .site-footer:lang(ar) .footer__title { letter-spacing: 0; line-height: 1.25; }
.footer__title {
  font-size: clamp(40px, 5.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.footer__lead { margin-block-start: 26px; max-width: 48ch; font-size: clamp(16px, 1.25vw, 20px); line-height: 1.6; color: var(--muted); }
.footer__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-block-start: 40px; }
.footer__mail { font-size: 16px; color: var(--fg); text-decoration: none; border-block-end: 1px solid rgba(255, 255, 255, 0.25); padding-block-end: 2px; transition: border-color 0.3s; }
.footer__mail:hover { border-color: var(--accent); }

.footer__cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  margin-block-start: clamp(90px, 14vh, 160px);
  padding-block-start: 40px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
}
.footer__col h3 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
  margin-block-end: 20px;
}
.site-footer:lang(fa) .footer__col h3, .site-footer:lang(ar) .footer__col h3 { font-family: var(--font-fa); letter-spacing: 0; font-size: 13px; }
.footer__col ul { list-style: none; display: grid; gap: 12px; }
.footer__col a { font-size: 15px; color: var(--muted); text-decoration: none; transition: color 0.3s; }
.footer__col a:hover { color: #fff; }

.footer__brand {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  margin-block-start: clamp(70px, 12vh, 140px);
  gap: 0.16em;
  font-size: clamp(44px, 13.6vw, 260px);
  white-space: nowrap;
  line-height: 0.82;
  letter-spacing: -0.04em;
  user-select: none;
  background: linear-gradient(to bottom, rgba(233, 237, 243, 0.16), rgba(233, 237, 243, 0.02) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer__brand-bph { font-weight: 700; }
.footer__brand-sys { font-weight: 200; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 28px;
  margin-block-start: 28px;
  padding-block-start: 22px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--faint);
}
.footer__legal { list-style: none; display: flex; gap: 22px; }
.footer__legal a { color: var(--faint); text-decoration: none; transition: color 0.3s; }
.footer__legal a:hover { color: #fff; }
.footer__slogan { font-family: var(--font); color: var(--muted); }
.footer__slogan span { color: var(--accent); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .nav, .site-header__cta { display: none; }
  .burger { display: block; }
  .site-header { justify-content: space-between; }
  .lang__btn { padding: 8px 6px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .footer__col:first-child { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .footer__cols { grid-template-columns: minmax(0, 1fr); }
  .lang { display: none; } /* languages are in the mobile menu */
}

/* ---------- Explore BPH Environment page ---------- */
.progress { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 70; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .progress span { transform-origin: right; }
.explore { animation: fade-in-page 0.9s ease both; }
@keyframes fade-in-page { from { opacity: 0; } }
