/* ==========================================================================
   MAGE | MERIDIAN AUREON GROUP ENTERPRISE
   style.css  -  tokens, reset, typography, layout, header, hero, footer
   Load order: style.css -> components.css -> responsive.css
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS  (change brand colours and fonts here)
   ========================================================================== */
:root {
  /* Brand colours */
  --black: #080808;
  --charcoal: #111111;
  --dark: #151515;
  --white: #ffffff;
  --ivory: #f5f1e8;
  --cream: #ece5d8;
  --gold: #c89b3c;
  --gold-light: #d9b866;
  --gold-ink: #8a6516;          /* darker gold used for small text on light backgrounds (contrast) */
  --grey: #777777;
  --muted: #5e5a52;             /* secondary text on light backgrounds */
  --muted-on-dark: rgba(245, 241, 232, 0.72);
  --light-grey: #d8d5cf;
  --border: rgba(255, 255, 255, 0.15);
  --border-dark: rgba(8, 8, 8, 0.14);

  /* Typography */
  --font-heading: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;   /* headings, navigation, buttons, labels */
  --font-body: 'Inter', 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;       /* reading text, forms */

  /* Layout */
  --container-width: 1400px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-padding: clamp(88px, 11vw, 140px);
  --frame: 20px;                /* page margin around the framed hero */
  --radius: 14px;
  --radius-lg: 28px;
  --header-h: 88px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--black);
  background: var(--white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img, svg, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
p { margin: 0 0 1.25em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }

/* Interface text (navigation, buttons, labels, links) uses the heading font, Manrope; paragraphs keep Inter */
.nav-link, .btn, .link-arrow, .section-label, .chip, .scroll-cue, .breadcrumb, .field label, .stat-label, .insight-meta,
.leader-role, .portfolio-category, .contact-list dt, .footer-pillars, .footer-col h3, .mega-col a, .mobile-menu .mm-sub a,
.biz-front p, .biz-detail dt, .feature-points h3, .skip-link { font-family: var(--font-heading); }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--black); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 300;
  background: var(--gold); color: var(--black); padding: 12px 20px; border-radius: 999px; font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ==========================================================================
   3. LAYOUT HELPERS
   ========================================================================== */
.container { width: 100%; max-width: var(--container-width); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-padding); }
.section--white { background: var(--white); color: var(--black); }
.section--ivory { background: var(--ivory); color: var(--black); }
.section--dark { background: var(--black); color: var(--ivory); }
.section--charcoal { background: var(--charcoal); color: var(--ivory); }

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */
.section-label {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 0 28px;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-ink);
}
.section-label::before { content: ''; width: 36px; height: 1px; background: currentColor; }
.section--dark .section-label, .section--charcoal .section-label, .hero-frame .section-label, .feature .section-label { color: var(--gold); }

.section-title {
  font-size: clamp(1.85rem, 3.7vw, 3.5rem); line-height: 1.1; font-weight: 500;
  text-transform: uppercase; letter-spacing: -0.01em; overflow-wrap: break-word; text-wrap: balance;
}
.section-title .tone { color: var(--gold-ink); }
.section--dark .section-title .tone, .section--charcoal .section-title .tone, .hero-frame .tone, .feature .section-title .tone { color: var(--gold-light); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.75; color: var(--muted); max-width: 60ch; }
.section--dark .lead, .section--charcoal .lead { color: var(--muted-on-dark); }

/* ==========================================================================
   5. HEADER & NAVIGATION  (transparent over hero, solid dark after scroll)
   ========================================================================== */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 28px calc(var(--frame) + clamp(24px, 4.6vw, 72px));
  transition: padding 0.5s var(--ease);
}
.site-header.is-scrolled, .site-header.mega-open { background: rgba(8, 8, 8, 0.96); box-shadow: 0 1px 0 var(--border); backdrop-filter: blur(10px); }
.site-header.is-scrolled .header-inner { padding-block: 12px; }
.site-header.is-scrolled .logo-plate { padding: 9px 15px; }

/* Logo - the original file is never edited. The plate and crop below are CSS only.
   .logo-crop trims the empty transparent margin around the artwork (1381 x 466 visible area of the 1619 x 971 file).
   .logo-plate gives the black wordmark a light surface so it stays legible on dark sections. */
.brand { justify-self: start; display: inline-flex; }
.logo-plate { display: inline-flex; background: var(--ivory); padding: 12px 18px; border-radius: 10px; }
.logo-crop { position: relative; display: block; width: var(--logo-w, 150px); aspect-ratio: 1381 / 466; overflow: hidden; }
.logo-crop img { position: absolute; width: 117.23%; max-width: none; left: -9.05%; top: -53%; height: auto; }

.primary-nav { justify-self: center; }
.nav-pill {
  display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--white); transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.nav-link:hover, .nav-link[aria-expanded='true'] { background: rgba(255, 255, 255, 0.14); }
.nav-link[aria-current='page'] { background: var(--white); color: var(--black); }
.nav-link .chev { width: 10px; height: 10px; transition: transform 0.35s var(--ease); }
.nav-link[aria-expanded='true'] .chev { transform: rotate(180deg); }
.header-cta { justify-self: end; }

/* Mega menu (opens from "Businesses") */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--black); border-top: 1px solid var(--border); padding: 40px 0 56px; animation: megaIn 0.45s var(--ease); }
.mega[hidden] { display: none; }
.mega-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 44px; }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.mega-col h3 { font-size: 1.15rem; margin-bottom: 22px; color: var(--ivory); }
.mega-col li + li { margin-top: 4px; }
.mega-col a { display: block; padding: 8px 0; color: var(--muted-on-dark); font-size: 0.95rem; transition: color 0.3s, transform 0.3s var(--ease); }
.mega-col a:hover, .mega-col a:focus-visible { color: var(--gold-light); transform: translateX(6px); }
.mega-close { width: 48px; height: 48px; border-radius: 50%; color: var(--ivory); border: 1px solid var(--border); display: grid; place-items: center; transition: border-color 0.3s, color 0.3s; }
.mega-close:hover { border-color: var(--gold); color: var(--gold-light); }
@keyframes megaIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Mobile toggle + full-screen menu */
.menu-toggle { display: none; justify-self: end; width: 52px; height: 52px; border-radius: 50%; background: var(--white); position: relative; }
.menu-toggle span { position: absolute; left: 16px; right: 16px; height: 1.5px; background: var(--black); transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.menu-toggle span:nth-child(1) { top: 20px; }
.menu-toggle span:nth-child(2) { top: 30px; }
.menu-toggle[aria-expanded='true'] span:nth-child(1) { top: 25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:nth-child(2) { top: 25px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--black); color: var(--ivory);
  padding: 120px var(--gutter) 40px; overflow-y: auto; visibility: hidden; opacity: 0;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.mobile-menu.is-open { visibility: visible; opacity: 1; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu a, .mobile-menu .mm-trigger {
  display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 20px 0; min-height: 56px;
  font-family: var(--font-heading); font-weight: 500; letter-spacing: -0.015em; font-size: clamp(1.5rem, 6.5vw, 2.1rem); text-transform: uppercase; text-align: left;
}
.mm-trigger .chev { width: 18px; height: 18px; flex: none; transition: transform 0.35s var(--ease); }
.mm-trigger[aria-expanded='true'] .chev { transform: rotate(180deg); }
.mm-sub { display: none; padding: 0 0 18px; }
.mm-sub.is-open { display: block; }
.mobile-menu .mm-sub a { font-weight: 500; letter-spacing: 0; font-size: 1rem; text-transform: none; padding: 12px 0 12px 16px; min-height: 48px; color: var(--muted-on-dark); border: 0; }
.mobile-menu .mm-foot { margin-top: 36px; color: var(--muted-on-dark); font-size: 0.95rem; }
.mobile-menu .mm-foot a { display: inline; font: inherit; padding: 0; text-transform: none; color: var(--gold-light); }

/* ==========================================================================
   6. FRAMED HERO  (home + inner page headers)
   ========================================================================== */
.hero-frame {
  position: relative; isolation: isolate; overflow: hidden; color: var(--white);
  margin: var(--frame); border-radius: var(--radius-lg); background: var(--charcoal);
  min-height: calc(100vh - (var(--frame) * 2)); min-height: calc(100svh - (var(--frame) * 2));
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.1) 38%, rgba(8,8,8,0.72) 100%), linear-gradient(90deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0) 65%); }
.hero-content { padding: clamp(120px, 14vh, 180px) clamp(28px, 4.6vw, 72px) clamp(96px, 12vh, 130px); max-width: 1500px; }
.hero-title { font-size: clamp(2rem, 4.3vw, 4.8rem); line-height: 1.07; font-weight: 500; text-transform: uppercase; letter-spacing: -0.012em; overflow-wrap: break-word; text-wrap: balance; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-lead { margin: 28px 0 40px; max-width: 58ch; font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.75; color: rgba(255,255,255,0.86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stat {
  position: absolute; right: clamp(28px, 4.6vw, 72px); bottom: 130px; width: 290px; padding: 28px 30px;
  border-radius: var(--radius); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.hero-stat strong { display: block; font-family: var(--font-heading); font-weight: 500; letter-spacing: -0.03em; font-size: 3.2rem; line-height: 1; margin-bottom: 10px; }
.hero-stat span { font-size: 0.95rem; line-height: 1.5; color: rgba(255,255,255,0.82); }
.scroll-cue { position: absolute; right: clamp(28px, 4.6vw, 72px); bottom: 38px; display: inline-flex; align-items: center; gap: 12px; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.9); }
.scroll-cue svg { width: 14px; height: 14px; animation: cueBob 2.4s ease-in-out infinite; }
@keyframes cueBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Inner pages */
/* Inner-page heroes use the same full-window height as the home hero (.hero-frame above) */
.breadcrumb { position: absolute; top: 150px; left: clamp(28px, 4.6vw, 72px); display: flex; align-items: center; gap: 14px; font-size: 0.95rem; color: rgba(255,255,255,0.85); }
.breadcrumb li + li::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 14px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.breadcrumb a:hover { color: var(--gold-light); }
.page-hero .hero-title { font-size: clamp(2.2rem, 5.2vw, 5.4rem); margin-bottom: 20px; }
.page-hero .hero-lead { margin: 0; }

/* ==========================================================================
   7. FOOTER  (black, large logo)
   ========================================================================== */
.site-footer { background: var(--black); color: var(--ivory); padding: clamp(72px, 9vw, 120px) 0 36px; }
.footer-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 96px); padding-bottom: 72px; border-bottom: 1px solid var(--border); }
.footer-brand .logo-crop { --logo-w: clamp(240px, 26vw, 380px); }
.footer-brand .logo-plate { padding: 18px 28px; border-radius: 14px; }
.footer-company { margin: 36px 0 18px; font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-pillars { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h3 { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 22px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a, .footer-col p { color: var(--muted-on-dark); font-size: 0.95rem; transition: color 0.3s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 32px; font-size: 0.85rem; color: rgba(245,241,232,0.55); }
