/* ============================================================
   MELKART ADVISORS — Global stylesheet
   Branding system: Alt2 (navy / gold / cream)
   Fonts: Cormorant Garamond (display) → Georgia (headings)
   → Inter (body)
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Palette */
  --navy:         #0d1b2e;
  --navy-soft:    #1c2c45;
  --navy-deep:    #08111e;
  --gold:         #b8975a;
  --gold-bright:  #c9a557;
  --gold-soft:    #d4b97a;
  --cream:        #f9f7f1;
  --cream-deep:   #f0ede6;
  --rule:         #d9d2c2;
  --ink:          #2d3e5b;
  --ink-soft:     #4a5a73;
  --muted:        #6b7891;
  --white:        #ffffff;

  /* Typography */
  --f-display: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --f-head:    'Georgia', 'Times New Roman', serif;
  --f-body:    'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --container-max: 1240px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--gold); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-bright); }

/* ---------- Containers ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
}

/* ---------- Typography ---------- */
.label {
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.label-light { color: var(--gold-soft); }

h1, .h1 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

h1 em, .h1 em { font-style: italic; color: var(--gold); font-weight: 500; }

h2, .h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

h2 em, .h2 em { font-style: italic; color: var(--gold); font-weight: 500; }

h3, .h3 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: 0.6rem;
  letter-spacing: 0.005em;
}

p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

p.lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink);
  font-weight: 400;
}

p:last-child { margin-bottom: 0; }

.accent-bar {
  width: 56px;
  height: 2px;
  background: var(--gold);
  margin: 1.5rem 0 2rem;
}

.accent-bar-light { background: var(--gold-soft); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem var(--container-pad);
  background: rgba(249, 247, 241, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav.scrolled {
  background: rgba(249, 247, 241, 0.97);
  border-bottom-color: var(--rule);
}

/* Nav variant for dark hero (homepage) */
.nav.on-dark {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav.on-dark .nav-logo,
.nav.on-dark .nav-links a { color: var(--cream); }

.nav.on-dark .nav-logo strong { color: var(--white); }

.nav.on-dark.scrolled {
  background: rgba(13, 27, 46, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom-color: rgba(255,255,255,0.08);
}

.nav-logo {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.005em;
  line-height: 1;
}

.nav-logo strong { font-weight: 700; color: var(--navy); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.4rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--f-body);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: 0.4rem 0;
  transition: color .2s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 5px;
  flex-direction: column;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--navy);
}
.nav.on-dark .nav-toggle span { background: var(--cream); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  color: var(--cream);
  overflow: hidden;
  padding: 8rem 0 6rem;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8,17,30,0.55) 0%, rgba(13,27,46,0.78) 100%),
    linear-gradient(90deg, rgba(13,27,46,0.55) 0%, rgba(13,27,46,0.30) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 880px;
}

.hero h1 { color: var(--cream); }
.hero h1 em { color: var(--gold-soft); }
.hero p.lead {
  color: rgba(249, 247, 241, 0.82);
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  max-width: 640px;
  margin-top: 1.25rem;
}
.hero .label { color: var(--gold-soft); }
.hero .accent-bar { background: var(--gold); }

/* Inner hero (sub-pages) */
.hero-inner {
  background: var(--navy);
  color: var(--cream);
  padding: 10rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 20% 30%, rgba(184,151,90,0.10) 0%, transparent 60%),
    radial-gradient(40% 60% at 90% 90%, rgba(184,151,90,0.06) 0%, transparent 70%);
  z-index: 0;
}

.hero-inner .container { position: relative; z-index: 1; }
.hero-inner h1 { color: var(--cream); font-size: clamp(2rem, 4vw, 3rem); }
.hero-inner .label { color: var(--gold-soft); }
.hero-inner p { color: rgba(249, 247, 241, 0.78); max-width: 680px; }

/* ---------- Sections ---------- */
section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-alt { background: var(--cream-deep); }
.section-dark { background: var(--navy); color: var(--cream); }
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark p { color: rgba(249, 247, 241, 0.78); }
.section-dark .accent-bar { background: var(--gold-soft); }
.section-dark .label { color: var(--gold-soft); }

/* ---------- Two-column block (positioning) ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.two-col-narrow {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* ---------- Sector cards ---------- */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.sector {
  padding: 2rem 1.75rem;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.sector:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(13, 27, 46, 0.06);
  border-top-color: var(--gold-bright);
}

.sector-num {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.sector h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.sector p {
  font-size: 0.92rem;
  color: var(--muted);
}

.section-alt .sector { background: var(--white); }

/* ---------- Quote / Credential ---------- */
.quote-block {
  background: var(--navy);
  color: var(--cream);
  padding: clamp(2.5rem, 5vw, 4rem);
  position: relative;
}

.quote-block::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-family: var(--f-display);
  font-size: 6rem;
  color: var(--gold);
  opacity: 0.35;
  line-height: 1;
}

.quote-block blockquote {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.45;
  color: var(--cream);
  max-width: 760px;
  margin: 0 auto;
  padding-left: 0;
  position: relative;
  z-index: 1;
}

.quote-attr {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-family: var(--f-body);
  font-weight: 500;
  font-style: normal;
}

/* ---------- Team grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.team-card {
  text-align: left;
}

.team-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--navy-soft) 0%, var(--navy) 100%);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.team-photo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--gold);
}

.team-initials {
  font-family: var(--f-display);
  font-size: 3rem;
  font-weight: 500;
  color: var(--gold-soft);
  letter-spacing: 0.05em;
}

.team-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.team-role {
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.team-bio {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.team-cred {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  font-style: italic;
  border-top: 1px solid var(--rule);
  padding-top: 0.85rem;
  margin-bottom: 0.85rem;
}

.team-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-weight: 500;
  transition: color .2s ease;
}

.team-linkedin:hover { color: var(--gold); }

.team-linkedin svg { width: 14px; height: 14px; }

/* ---------- Stats row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat-num {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-num em { font-style: italic; color: var(--gold); font-weight: 500; }

.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-info-block {
  margin-bottom: 1.75rem;
}

.contact-info-block .label-small {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: block;
}

.contact-info-block p,
.contact-info-block a {
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 400;
  font-family: var(--f-body);
}

.contact-form {
  background: var(--cream-deep);
  padding: 2.5rem;
  border-top: 2px solid var(--gold);
}

.form-row { margin-bottom: 1.25rem; }

.form-row label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--f-body);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0;
  transition: border-color .2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-row textarea { resize: vertical; min-height: 120px; }

.btn {
  display: inline-block;
  padding: 0.95rem 2.4rem;
  font-family: var(--f-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--navy);
  border: 1px solid var(--navy);
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}

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

.btn-outline {
  background: transparent;
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--cream); }

/* ---------- Footer ---------- */
footer {
  background: var(--navy-deep);
  color: rgba(249, 247, 241, 0.6);
  padding: 3.5rem 0 2rem;
  font-size: 0.88rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

footer .foot-logo {
  font-family: var(--f-display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.005em;
  margin-bottom: 0.5rem;
}

footer .foot-logo strong { font-weight: 700; }

footer .foot-tagline {
  font-size: 0.85rem;
  color: rgba(249, 247, 241, 0.55);
  font-style: italic;
  font-family: var(--f-display);
}

footer .foot-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

footer .foot-links a {
  color: rgba(249, 247, 241, 0.6);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

footer .foot-links a:hover { color: var(--gold); }

footer .foot-bottom {
  width: 100%;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  color: rgba(249, 247, 241, 0.4);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ---------- Subtle reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Safety: if JS is disabled or fails, content stays visible */
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .two-col,
  .two-col-narrow,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .sectors-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats-row { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .stat-num { font-size: 2.2rem; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 1.5rem var(--container-pad);
    gap: 1.2rem;
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.open { display: flex; }
  .nav.on-dark .nav-links {
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-toggle { display: flex; }

  .hero { min-height: 90vh; padding: 7rem 0 5rem; }
  .hero-inner { padding: 8rem 0 4rem; }

  .contact-form { padding: 1.75rem; }
}
