/* ============================================================
   APEX ADVISORY — GLOBAL STYLESHEET
   Brand: DM Serif Display (headings) + Lato (body)
   Colors: Teal #2A3B41 | Ember #B75209 | Ivory #FDFBE8
           Slate #212225 | Stone #455B4D | Mist #779E80
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Lato:wght@300;400;700&display=swap');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Lato', sans-serif; color: var(--slate); background: var(--white); overflow-x: hidden; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: 'Lato', sans-serif; }

/* ── CSS VARIABLES ── */
:root {
  /* Brand Colors */
  --teal:        #2A3B41;
  --teal-dark:   #1a2a30;
  --ember:       #B75209;
  --ember-dark:  #93400a;
  --ivory:       #FDFBE8;
  --ivory-dark:  #EDE8D8;
  --slate:       #212225;
  --stone:       #455B4D;
  --mist:        #779E80;
  --white:       #FFFFFF;

  /* Transparent variants */
  --teal-10:     rgba(42, 59, 65, 0.08);
  --teal-20:     rgba(42, 59, 65, 0.15);
  --ember-10:    rgba(183, 82, 9, 0.10);
  --ember-20:    rgba(183, 82, 9, 0.20);
  --white-10:    rgba(255, 255, 255, 0.10);
  --white-20:    rgba(255, 255, 255, 0.20);

  /* Typography */
  --font-serif:  'DM Serif Display', serif;
  --font-sans:   'Lato', sans-serif;

  /* Spacing */
  --section-py:  6rem;
  --container:   1200px;
  --gap:         1.5rem;

  /* Borders */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(42,59,65,0.08);
  --shadow-md:   0 8px 24px rgba(42,59,65,0.10);
  --shadow-lg:   0 16px 48px rgba(42,59,65,0.14);

  /* Transitions */
  --transition:  0.25s ease;
  --transition-slow: 0.4s ease;

  /* Nav */
  --nav-height:  72px;
  --topbar-height: 40px;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 { font-family: var(--font-serif); font-weight: 400; line-height: 1.12; color: var(--teal); }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.1rem; }
p  { font-weight: 300; color: #3a3a35; line-height: 1.78; }
.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.85rem;
}
.text-white  { color: var(--white); }
.text-teal   { color: var(--teal); }
.text-ember  { color: var(--ember); }
.text-muted  { color: #6b6b60; }
.text-center { text-align: center; }

/* ── LAYOUT ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2.5rem;
}
.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
section { padding: var(--section-py) 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary   { background: var(--ember); color: var(--white); }
.btn-primary:hover { background: var(--ember-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(183,82,9,0.3); }
.btn-secondary { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-secondary:hover { background: var(--teal); color: var(--white); }
.btn-white     { background: var(--white); color: var(--teal); }
.btn-white:hover { background: var(--ivory); transform: translateY(-1px); }
.btn-ghost     { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.45); }
.btn-ghost:hover { background: var(--white-10); border-color: var(--white); }
.btn-teal      { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2.2rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 48px; height: 48px;
  background: var(--teal-10);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
}
.card h4 { color: var(--teal); margin-bottom: 0.5rem; }
.card p  { font-size: 0.875rem; }
.card-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.82rem; font-weight: 700; color: var(--ember);
  margin-top: 1rem; transition: gap var(--transition);
}
.card-link::after { content: '→'; }
.card-link:hover  { gap: 0.6rem; }

/* ── TAGS / CHIPS ── */
.tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--teal-10);
  color: var(--teal);
}
.tag-ember { background: var(--ember-10); color: var(--ember); }
.tag-stone { background: rgba(69,91,77,0.1); color: var(--stone); }

/* ── FORMS ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 0.4rem;
}
.form-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 0.875rem;
  color: var(--slate); background: var(--white);
  outline: none; transition: border-color var(--transition);
}
.form-field:focus { border-color: var(--ember); }
.form-field.textarea { resize: vertical; min-height: 120px; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232A3B41' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Dark form inputs (for dark backgrounds) */
.form-field-dark {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: var(--white);
}
.form-field-dark::placeholder { color: rgba(255,255,255,0.4); }
.form-field-dark:focus { border-color: var(--ember); }
.form-select-dark {
  background-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(255,255,255,0.2);
}
.form-select-dark option { color: var(--slate); background: var(--white); }

/* ── SECTION HEADERS ── */
.section-header { margin-bottom: 3.5rem; }
.section-header h2 { margin-bottom: 0.85rem; }
.section-header p  { max-width: 600px; }
.section-header.centered { text-align: center; }
.section-header.centered p { margin: 0 auto; }

/* ── DIVIDERS ── */
.divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 0;
}

/* ── PAGE HERO (shared across subpages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 60%, var(--slate) 100%);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); max-width: 700px; }
.page-hero .hero-sub {
  color: rgba(255,255,255,0.68);
  font-size: 1.05rem; font-weight: 300;
  max-width: 560px; line-height: 1.8;
  margin: 1rem 0 2rem;
}
.breadcrumb {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}
.breadcrumb span { color: rgba(255,255,255,0.25); margin: 0 0.4rem; }

/* ── TOPBAR ── */
.topbar {
  background: var(--slate);
  height: var(--topbar-height);
  display: flex; align-items: center;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar-links { display: flex; gap: 1.5rem; }
.topbar a {
  font-size: 0.73rem; color: rgba(255,255,255,0.55);
  font-weight: 300; transition: color var(--transition);
}
.topbar a:hover { color: var(--white); }
.topbar-login {
  font-size: 0.73rem; color: rgba(255,255,255,0.7);
  font-weight: 700; letter-spacing: 0.04em;
}
.topbar-login:hover { color: var(--ember); }

/* ── NAVIGATION ── */
nav {
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 0.2rem; }
.nav-links a {
  font-size: 0.875rem; font-weight: 400;
  color: var(--slate); padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--ember); }
.nav-links a.active { color: var(--teal); font-weight: 700; }
.nav-links a.active::after {
  content: '';
  position: absolute; bottom: 0; left: 0.9rem; right: 0.9rem;
  height: 2px; background: var(--ember); border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-login {
  font-size: 0.8rem; font-weight: 700;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}
.nav-login:hover { background: var(--teal); color: var(--white); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column;
  gap: 5px; padding: 0.5rem;
  background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--slate); border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile Nav Overlay */
.mobile-nav {
  display: none; position: fixed; inset: 0;
  background: var(--teal); z-index: 2000;
  flex-direction: column; align-items: center;
  justify-content: center; gap: 2rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-serif); font-size: 2rem;
  color: rgba(255,255,255,0.85); transition: color var(--transition);
}
.mobile-nav a:hover { color: var(--ember); }
.mobile-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none;
  color: var(--white); font-size: 1.8rem;
}

/* ── CTA BAND ── */
.cta-band { background: var(--teal); padding: 5rem 0; }
.cta-band-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.cta-band h2 { color: var(--white); }
.cta-band > .cta-band-inner > div > p { color: rgba(255,255,255,0.65); margin-top: 0.75rem; }
.cta-form { display: flex; flex-direction: column; gap: 0.85rem; }
.cta-form-row { display: flex; gap: 0.75rem; }

/* ── PARTNERS STRIP ── */
.partners-strip {
  background: var(--ivory);
  padding: 3rem 0;
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.partners-label {
  text-align: center;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--mist); margin-bottom: 1.75rem;
}
.partners-logos {
  display: flex; justify-content: center;
  align-items: center; flex-wrap: wrap; gap: 2.5rem;
}
.partner-name {
  font-family: var(--font-serif);
  font-size: 0.9rem; color: var(--mist);
  opacity: 0.6; font-style: italic;
  transition: opacity var(--transition);
}
.partner-name:hover { opacity: 1; }

/* ── SUBSCRIBE BAND ── */
.subscribe-band { background: var(--teal); padding: 5rem 0; }
.subscribe-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.subscribe-inner h2 { color: var(--white); }
.subscribe-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.subscribe-note { font-size: 0.72rem; color: rgba(255,255,255,0.35); margin-top: 0.6rem; }

/* ── EVENT CARDS ── */
.event-feature {
  background: var(--teal); color: var(--white);
  border-radius: var(--radius-lg); padding: 3rem;
  position: relative; overflow: hidden;
  height: 100%;
}
.event-feature::after {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 250px; height: 250px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.event-feature .eyebrow { color: rgba(183,82,9,0.9); }
.event-feature h3 { color: var(--white); font-size: 1.6rem; margin-bottom: 1rem; }
.event-feature p { color: rgba(255,255,255,0.68); font-size: 0.9rem; line-height: 1.75; margin-bottom: 1.5rem; }
.event-feature-stone { background: var(--stone); }
.event-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.event-tag {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
}

/* ── FOOTER ── */
footer { background: var(--slate); padding: 4.5rem 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3.5rem;
}
.footer-brand p {
  color: rgba(255,255,255,0.45); font-size: 0.875rem;
  margin-top: 1rem; max-width: 280px;
  line-height: 1.7; font-weight: 300;
}
.footer-logo { height: 42px; width: auto; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.social-link {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.45); font-size: 0.85rem;
  transition: all var(--transition);
}
.social-link:hover { background: var(--ember); border-color: var(--ember); color: var(--white); }
.footer-col h5 {
  font-family: var(--font-sans);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a {
  font-size: 0.875rem; color: rgba(255,255,255,0.55);
  font-weight: 300; transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.3); font-weight: 300; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { font-size: 0.78rem; color: rgba(255,255,255,0.35); font-weight: 300; transition: color var(--transition); }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.75); }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .nav-links, .nav-login, .nav-cta .btn { display: none; }
  .hamburger { display: flex; }
  .topbar .topbar-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band-inner, .subscribe-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 768px) {
  :root { --section-py: 4rem; }
  section { padding: var(--section-py) 0; }
  .container, .container-narrow { padding: 0 1.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .subscribe-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cta-form-row { flex-direction: column; }
}
@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
}
