/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --color-primary: #0d457f;
  --color-dark: #062240;
  --color-white: #ffffff;
  --color-offwhite: #fafafa;
  --color-gray: #4c4c4c;
  --color-medium-gray: #a4a4a4;
  --color-border: #cbd3dc;

  --font-heading: 'Cairo', sans-serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-accent: Georgia, 'Times New Roman', serif;

  --site-width: 980px;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

  .hero-bg-img {
    transform: none !important;
    will-change: auto;
  }
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-gray);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

.container {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================
   Typography
   =========================== */
.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 32px;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 50px;
  line-height: 1.3;
}

/* ===========================
   Header
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-inner {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 130px;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  height: 105px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-toggle,
.nav-backdrop {
  display: none;
}

.nav-list {
  display: flex;
  gap: 5px;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-gray);
  padding: 8px 16px;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.btn-contact {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 8px 24px;
  transition: background 0.2s, color 0.2s;
}

.btn-contact:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

body.menu-open {
  overflow: hidden;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -64px 0 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.hero-decoration {
  position: absolute;
  left: 50%;
  top: 48.5%;
  transform: translate(-50%, -50%);
  width: 840px;
  height: 430px;
  z-index: 1;
  pointer-events: none;
}

.hero-decoration svg {
  filter: drop-shadow(3px 3px 4px rgba(0, 0, 0, 0.4));
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 660px;
  padding: 60px 20px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 34px;
  color: var(--color-white);
  line-height: 1.2;
  margin-bottom: 30px;
}

.hero-cta {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 40px;
  color: var(--color-white);
  line-height: 1.2;
}

/* ===========================
   People Section
   =========================== */
.people-section {
  background: var(--color-white);
  padding: 80px 0;
}

.how-we-work .section-title,
.people-section .section-title {
  font-size: 36px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 160px));
  column-gap: 30px;
  row-gap: 36px;
  justify-content: center;
  align-items: start;
}

.team-member {
  text-align: center;
  width: 100%;
  max-width: 160px;
  transition: transform 0.2s ease;
}

.team-member[data-bio] {
  cursor: pointer;
}

.team-member[data-bio]:hover {
  transform: translateY(-4px);
}

.team-member[data-bio]:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 6px;
  border-radius: 12px;
}

.team-photo {
  width: 150px;
  height: 150px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
}

.team-photo-link {
  display: inline-block;
  border-radius: 50%;
}

.team-photo-link:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 6px;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.member-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-primary);
  margin-bottom: 4px;
  line-height: 1.3;
  min-height: 2.6em;
}

.member-role {
  font-size: 13px;
  color: var(--color-medium-gray);
  line-height: 1.4;
}

/* ===========================
   How We Work Section
   =========================== */
.how-we-work {
  background: var(--color-offwhite);
  padding: 80px 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.work-item {
  text-align: center;
}

.work-icon {
  width: 80px;
  height: 90px;
  margin: 0 auto 25px;
}

.work-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.work-question {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  color: var(--color-primary);
  margin-bottom: 15px;
  line-height: 1.3;
}

.work-answer {
  font-size: 14px;
  color: var(--color-gray);
  line-height: 1.6;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 50px 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-info {
  flex: 1;
}

.footer-copyright {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.8;
  margin-bottom: 15px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-contact {
  flex-shrink: 0;
}

.footer-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 15px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.contact-item a {
  transition: opacity 0.2s;
}

.contact-item a:hover {
  opacity: 0.8;
}

.contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact-icon path {
  fill: var(--color-white);
}

/* ===========================
   Policy Pages
   =========================== */
.policy-page {
  background: var(--color-offwhite);
  padding: 72px 0 96px;
}

.policy-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.policy-card {
  background: var(--color-white);
  padding: 56px 64px;
  border: 1px solid rgba(13, 69, 127, 0.08);
  box-shadow: 0 16px 40px rgba(6, 34, 64, 0.08);
}

.policy-title {
  font-family: var(--font-heading);
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-dark);
  text-align: center;
  margin-bottom: 18px;
}

.policy-divider {
  width: 56px;
  height: 3px;
  background: var(--color-dark);
  margin: 0 auto 40px;
}

.policy-content {
  color: var(--color-gray);
  font-size: 16px;
  line-height: 1.7;
}

.policy-content h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-dark);
  margin: 32px 0 10px;
}

.policy-content h2:first-child {
  margin-top: 0;
}

.policy-content p + p,
.policy-content p + ul,
.policy-content ul + p {
  margin-top: 14px;
}

.policy-content ul {
  list-style: disc;
  padding-left: 24px;
}

.policy-content li + li {
  margin-top: 8px;
}

.policy-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.policy-content ul ul {
  margin-top: 8px;
}

.policy-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 15px;
}

.policy-content th,
.policy-content td {
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.policy-content th {
  font-weight: 600;
  color: var(--color-dark);
  background: var(--color-offwhite);
}

/* ===========================
   Bio Modal
   =========================== */
.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.bio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 34, 64, 0.72);
}

.bio-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--color-white);
  color: var(--color-gray);
  padding: 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.bio-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.bio-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  padding-right: 32px;
}

.bio-modal-photo {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
}

.bio-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-modal-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
}

#bio-modal-name {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.1;
  color: var(--color-primary);
  margin-bottom: 8px;
}

#bio-modal-role {
  font-size: 16px;
  color: var(--color-medium-gray);
}

.bio-modal-body {
  font-size: 16px;
  line-height: 1.7;
}

.bio-modal-body p + p {
  margin-top: 16px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 979px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero-cta {
    font-size: 32px;
  }

  .hero {
    min-height: 550px;
  }

  .hero-decoration {
    width: 700px;
    height: 370px;
    top: 48.5%;
  }

  .hero-content {
    max-width: 600px;
  }

  .team-grid {
    grid-template-columns: repeat(4, minmax(0, 140px));
    column-gap: 24px;
    row-gap: 30px;
  }

  .team-member {
    max-width: 140px;
  }

  .team-photo {
    width: 130px;
    height: 130px;
  }

  .work-grid {
    gap: 30px;
  }

}

@media (max-width: 767px) {
  .header-inner {
    height: 100px;
    position: relative;
  }

  .logo {
    height: 78px;
  }

  .nav-toggle {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    z-index: 102;
  }

  .nav-toggle span {
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .site-header.is-menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .site-header.is-menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .main-nav {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px 20px 28px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(13, 69, 127, 0.12);
    box-shadow: 0 22px 36px rgba(6, 34, 64, 0.14);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 101;
  }

  .site-header.is-menu-open .main-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 8px;
  }

  .nav-link {
    display: block;
    font-size: 18px;
    padding: 10px 0;
  }

  .btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    font-size: 13px;
    padding: 10px 18px;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 100px 0 0;
    border: 0;
    background: rgba(6, 34, 64, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
  }

  .site-header.is-menu-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .hero {
    min-height: 520px;
  }

  .hero h1 {
    font-size: 27px;
    line-height: 1.18;
  }

  .hero-cta {
    font-size: 26px;
  }

  .hero-decoration {
    width: 400px;
    height: 300px;
    left: 50%;
    top: 46.5%;
  }

  .hero-content {
    max-width: 360px;
    padding: 80px 24px 64px;
  }

  .section-title {
    font-size: 26px;
    margin-bottom: 35px;
  }

  .how-we-work .section-title,
  .people-section .section-title {
    font-size: 30px;
  }

  .people-section,
  .how-we-work {
    padding: 50px 0;
  }

  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 120px));
    column-gap: 20px;
    row-gap: 28px;
  }

  .team-member {
    max-width: 120px;
  }

  .team-photo {
    width: 110px;
    height: 110px;
  }

  .member-name {
    font-size: 13px;
  }

  .member-role {
    font-size: 12px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 500px;
    margin: 0 auto;
  }

  .footer-grid {
    flex-direction: column;
    gap: 30px;
  }

  .footer-links {
    gap: 15px;
  }

  .policy-card {
    padding: 40px 32px;
  }

  .policy-title {
    font-size: 40px;
  }

  .bio-modal-dialog {
    padding: 28px 24px;
  }

  .bio-modal-header {
    gap: 18px;
  }

  .bio-modal-photo {
    width: 110px;
    height: 110px;
  }

  .bio-modal-heading {
    min-height: 110px;
  }

  #bio-modal-name {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 88px;
  }

  .logo {
    height: 64px;
  }

  .main-nav {
    top: 88px;
    padding: 20px 18px 24px;
  }

  .nav-backdrop {
    inset: 88px 0 0;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero-cta {
    font-size: 23px;
  }

  .hero {
    min-height: 470px;
  }

  .hero-decoration {
    width: 290px;
    height: 240px;
    top: 44.5%;
  }

  .hero-content {
    max-width: 300px;
    padding: 64px 18px 48px;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 100px));
    justify-content: center;
    column-gap: 18px;
    row-gap: 24px;
  }

  .team-member {
    max-width: 100px;
  }

  .team-photo {
    width: 90px;
    height: 90px;
  }

  .section-title {
    font-size: 22px;
  }

  .how-we-work .section-title,
  .people-section .section-title {
    font-size: 26px;
  }

  .work-question {
    font-size: 20px;
  }

  .policy-page {
    padding: 48px 0 64px;
  }

  .policy-card {
    padding: 30px 20px;
  }

  .policy-title {
    font-size: 32px;
  }

  .bio-modal {
    padding: 16px;
  }

  .bio-modal-dialog {
    padding: 24px 18px;
  }

  .bio-modal-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-right: 0;
  }

  .bio-modal-heading {
    min-height: 0;
    align-items: center;
  }
}
