/* ============================================
   MFAEN Management Consultancy FZE
   Institutional design — restrained, typography-led
   ============================================ */

:root {
  --navy: #1c3d2c;          /* deep green — primary */
  --navy-light: #2a523c;
  --navy-deep: #142c20;
  --gold: #7d4a52;          /* burgundy — fine accent only */
  --gold-light: #b08a90;
  --cream: #f7f7f4;         /* quiet off-white */
  --white: #ffffff;
  --ink: #23282e;
  --muted: #5f6670;
  --line: #e3e3dc;
  --radius: 2px;
  --shadow: 0 1px 2px rgba(28, 61, 44, 0.05);
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  font-size: 16.5px;
}

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

.container {
  width: min(1120px, 90%);
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}

.site-header.scrolled { box-shadow: 0 1px 12px rgba(28, 61, 44, 0.07); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-mark { width: 38px; height: 38px; }

.brand-mark img { width: 38px; height: 38px; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.site-footer .brand-sub { color: var(--gold-light); }

.main-nav > ul {
  display: flex;
  gap: 2.4rem;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: 5px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--navy);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--navy);
  color: var(--white);
  text-align: left;
  padding: 7rem 0 7.5rem;
}

.hero .eyebrow {
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(176, 138, 144, 0.45);
  display: inline-block;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin: 0 0 1.6rem;
}

.hero p {
  max-width: 62ch;
  margin: 0 0 2.6rem;
  color: #ccd6cd;
  font-size: 1.08rem;
  font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-gold {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn-gold:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.06); }

.btn-outline {
  border-color: transparent;
  color: var(--gold-light);
  background: transparent;
  margin-left: 1.2rem;
}

.btn-outline:hover { color: var(--white); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-navy:hover { background: var(--navy-deep); border-color: var(--navy-deep); }

/* ---------- Sections ---------- */
section { padding: 5.5rem 0; }

.section-head {
  text-align: left;
  max-width: 720px;
  margin: 0 0 3.4rem;
}

/* when the heading block IS the section container, keep it centered on the page */
.container.section-head {
  margin-left: auto;
  margin-right: auto;
  max-width: min(1120px, 90%);
}

.container.section-head h2,
.container.section-head p { max-width: 720px; }

.section-head .eyebrow,
.split .eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
}

.section-head h2,
.split h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-head p { color: var(--muted); }

.bg-cream { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Intro split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  align-items: center;
}

.split p { color: var(--muted); margin-bottom: 1rem; }

.figure {
  border-radius: var(--radius);
  min-height: 380px;
  background: var(--navy-light);
  position: relative;
  overflow: hidden;
}

.figure::after {
  content: attr(data-label);
  position: absolute;
  bottom: 1.1rem;
  left: 1.3rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.stats {
  display: flex;
  gap: 0;
  margin-top: 2.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.stat { padding-right: 2.2rem; margin-right: 2.2rem; border-right: 1px solid var(--line); }

.stat:last-child { border-right: none; padding-right: 0; margin-right: 0; }

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--navy);
}

.stat span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  box-shadow: none;
  transition: border-color 0.3s;
}

.card:hover { border-color: var(--navy); transform: none; box-shadow: none; }

/* icon glyph → short accent rule */
.card .icon {
  width: 30px;
  height: 2px;
  border-radius: 0;
  background: var(--gold);
  font-size: 0;
  margin-bottom: 1.4rem;
  display: block;
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.card p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Quick action cards ---------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.action-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.3s;
}

.action-card:hover { border-color: var(--navy); transform: none; background: var(--white); }

.action-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.55rem;
  font-size: 1.15rem;
}

.action-card p { color: var(--muted); font-size: 0.93rem; margin-bottom: 1.2rem; }

.action-card .arrow {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}

/* ---------- Page banner (inner pages) ---------- */
.page-banner {
  background: var(--navy);
  color: var(--white);
  text-align: left;
  padding: 4.5rem 0;
}

.page-banner h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -0.01em;
}

.page-banner p { color: #ccd6cd; max-width: 60ch; margin: 0.9rem 0 0; }

/* ---------- Services list page ---------- */
.service-rows { display: grid; gap: 0; border-top: 1px solid var(--line); }

.service-row {
  display: flex;
  gap: 2.2rem;
  align-items: flex-start;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 2.1rem 0.5rem;
  box-shadow: none;
  transition: background 0.25s;
}

.service-row:hover { background: var(--cream); }

.service-row .num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold);
  font-weight: 600;
  line-height: 1;
  padding-top: 0.45rem;
  letter-spacing: 0.08em;
  min-width: 2.2rem;
}

.service-row h3 {
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  margin-bottom: 0.4rem;
}

.service-row p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Sector cards ---------- */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.sector-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 120px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1.1rem 1.2rem;
  color: var(--navy);
  background: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  transition: border-color 0.3s;
}

.sector-card::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 1.2rem;
  width: 26px;
  height: 2px;
  background: var(--gold);
}

.sector-card:nth-child(odd) { background: var(--white); }

.sector-card:hover { border-color: var(--navy); transform: none; }

/* Illustrated sector tiles */
.sector-card.sector-photo {
  min-height: 190px;
  color: var(--white);
  border-color: var(--navy-deep);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  letter-spacing: 0.04em;
  transition: filter 0.3s, border-color 0.3s;
}

.sector-card.sector-photo::before { background: var(--gold-light); }

.sector-card.sector-photo:hover { filter: brightness(1.12); border-color: var(--navy-deep); }

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: flex-start;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.6rem;
  box-shadow: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }

.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-weight: 600;
  font-size: 0.74rem;
  color: var(--ink);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.form-note { font-size: 0.82rem; color: var(--muted); margin-top: 1.1rem; }

.form-success {
  display: none;
  background: var(--cream);
  border: 1px solid var(--navy);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1.2rem;
  font-size: 0.95rem;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
}

.info-block {
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 1.1rem 0 0.4rem;
  margin-bottom: 1rem;
  background: transparent;
}

.info-block strong {
  color: var(--gold);
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
}

.info-block p { color: var(--muted); font-size: 0.96rem; }

.info-block a { color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #a9b8ac;
  padding: 4.5rem 0 0;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr 1.1fr;
  gap: 3rem;
  padding-bottom: 3.2rem;
}

.site-footer h4 {
  font-family: var(--font-body);
  color: #e8ece8;
  margin-bottom: 1.2rem;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
}

.site-footer ul { list-style: none; }

.site-footer li { margin-bottom: 0.6rem; }

.site-footer a { color: #a9b8ac; text-decoration: none; transition: color 0.2s; }

.site-footer a:hover { color: var(--white); }

.footer-brand .brand-name { color: var(--white); }

.footer-brand p { margin-top: 1rem; color: #7e917f; font-size: 0.9rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.4rem 0;
  text-align: left;
  color: #6c7f6e;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

/* ---------- Nav dropdown ---------- */
.main-nav li { position: relative; }

.has-dropdown > a .caret {
  display: inline-block;
  margin-left: 0.3rem;
  font-size: 0.6rem;
  vertical-align: middle;
  color: var(--muted);
}

.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 2px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(28, 61, 44, 0.1);
  min-width: 300px;
  padding: 0.55rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 200;
}

/* invisible hover bridge across the gap */
.dropdown::after {
  content: "";
  position: absolute;
  top: -13px;
  left: 0;
  right: 0;
  height: 13px;
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown li { border: none; margin: 0; }

.dropdown a {
  display: block;
  padding: 0.55rem 1.4rem;
  border-bottom: none;
  border-left: 2px solid transparent;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--ink);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.dropdown a:hover {
  background: var(--cream);
  color: var(--navy);
  border-bottom: none;
  border-left-color: var(--gold);
}

/* ---------- Scroll-reveal (subtle) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible { opacity: 1; transform: none; }

.reveal:nth-child(2) { transition-delay: 0.06s; }
.reveal:nth-child(3) { transition-delay: 0.12s; }
.reveal:nth-child(4) { transition-delay: 0.18s; }
.reveal:nth-child(5) { transition-delay: 0.08s; }
.reveal:nth-child(6) { transition-delay: 0.14s; }
.reveal:nth-child(7) { transition-delay: 0.2s; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(28, 61, 44, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, border-color 0.2s;
  z-index: 300;
}

.back-to-top.show { opacity: 1; visibility: visible; }

.back-to-top:hover { border-color: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .split, .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .figure { min-height: 240px; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .main-nav.open { display: block; }

  .main-nav > ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }

  .main-nav li { border-top: 1px solid var(--line); }

  .main-nav a {
    display: block;
    padding: 0.9rem 6%;
    border-bottom: none;
  }

  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--navy);
    border-radius: 0;
    margin: 0 6% 0.6rem;
    padding: 0.3rem 0;
    background: var(--cream);
  }

  .dropdown::after { display: none; }

  .has-dropdown.open > .dropdown { display: block; }

  .dropdown a { padding: 0.7rem 1.2rem; }

  .service-row { gap: 1.2rem; padding: 1.7rem 0.2rem; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { flex-wrap: wrap; }
  .stat { border-right: none; padding-right: 0; margin-right: 1.6rem; margin-bottom: 0.8rem; }
  .btn-outline { margin-left: 0; margin-top: 0.9rem; display: inline-block; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
