/* A&G Legacy - Shared Stylesheet - aglegacy.com */

/* -- Design Tokens -- */
:root {
  --bg: #0f1218;
  --bg-card: #161b22;
  --bg-elevated: #1c2129;
  --bg-light: #F5F1EC;
  --white: #FFFFFF;
  --gold: #C2A46F;
  --gold-glow: rgba(194,164,111,.12);
  --gold-bright: #d4b87a;
  --text: rgba(255,255,255,.85);
  --text-dim: rgba(255,255,255,.45);
  --text-muted: rgba(255,255,255,.25);
  --border: rgba(255,255,255,.06);
  --charcoal: #2c3e50;
  --heading: 'Cormorant Garamond', Georgia, serif;
  --body: 'Lato', 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* -- Reset -- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased }
body {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit }

/* -- Typography -- */
h1, h2, h3, h4 { font-family: var(--heading); font-weight: 400; line-height: 1.1; color: var(--white) }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem) }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem) }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem) }
p  { font-size: 1rem; color: var(--text-dim); max-width: 640px; line-height: 1.8 }

/* -- Utility Classes -- */
.label {
  font-family: var(--body); font-size: .65rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease) }
.reveal.v { opacity: 1; transform: none }
.d1 { transition-delay: .1s }
.d2 { transition-delay: .2s }
.d3 { transition-delay: .3s }
.d4 { transition-delay: .4s }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 3rem) }
@media (max-width: 480px) {
  .wrap { padding: 0 1.25rem }
}

/* Full-bleed sections — background extends edge-to-edge, no horizontal overflow */
.full-bleed {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
.full-bleed > .wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
}

/* Stagger animations for grids */
.stagger > *:nth-child(1) { transition-delay: 0s }
.stagger > *:nth-child(2) { transition-delay: .1s }
.stagger > *:nth-child(3) { transition-delay: .2s }
.stagger > *:nth-child(4) { transition-delay: .25s }
.stagger > *:nth-child(5) { transition-delay: .3s }
.stagger > *:nth-child(6) { transition-delay: .35s }

/* -- Buttons -- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 2rem; font-family: var(--body); font-size: .72rem;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  border: none; cursor: pointer; border-radius: 2px;
  transition: all .35s var(--ease);
}
.btn-gold { background: var(--gold); color: var(--bg) }
.btn-gold:hover {
  background: var(--gold-bright); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(194,164,111,.3);
}
.btn-ghost { background: none; color: var(--text-dim); border: 1px solid var(--border) }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold) }
.btn svg { width: 13px; height: 13px; transition: transform .3s }
.btn:hover svg { transform: translateX(3px) }
.risk-rev { font-size: .7rem; color: var(--text-muted); margin-top: .6rem; letter-spacing: .02em }
.risk-rev span { color: var(--text-dim) }

/* -- Navigation -- */
#n {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.1rem 0; transition: all .4s var(--ease);
}
#n.s {
  padding: .6rem 0; background: rgba(15,18,24,.95);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.ni {
  max-width: 1140px; margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-family: var(--heading); font-size: 1.4rem; font-weight: 600; color: var(--white) }
.logo b { color: var(--gold) }
.nl { display: flex; align-items: center; gap: 2rem; list-style: none }
.nl a {
  font-size: .72rem; font-weight: 400; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-dim); transition: color .3s;
}
.nl a:hover, .nl a.active { color: var(--white) }
.nc {
  padding: .55rem 1.4rem !important; background: var(--gold);
  color: var(--bg) !important; font-weight: 700 !important;
  border-radius: 2px; transition: all .3s var(--ease);
}
.nc:hover { background: var(--gold-bright) }

/* Language toggle */
.lang-toggle{display:flex;border:1px solid var(--border);border-radius:20px;overflow:hidden;margin-left:-.5rem}
.lang-toggle a{padding:.3rem .65rem;font-size:.58rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);transition:all .3s var(--ease);line-height:1}
.lang-toggle a:hover{color:var(--white)}
.lang-toggle a.active{background:var(--gold);color:var(--bg)}
.lang-toggle a.active:hover{background:var(--gold-bright)}

/* Hamburger menu */
.hm {
  display: none; background: none; border: none; cursor: pointer;
  padding: 4px; flex-direction: column; gap: 5px;
}
.hm span { width: 20px; height: 1.5px; background: var(--white) }

/* Mobile click-to-call */
.mobile-call {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); border: none; cursor: pointer;
  margin-right: .5rem; flex-shrink: 0;
}
.mobile-call svg { width: 16px; height: 16px; stroke: var(--bg); stroke-width: 2; fill: none }

@media (max-width: 768px) {
  .nl { display: none }
  .hm { display: flex }
  .mobile-call { display: flex }
  .nl.open {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--bg);
    padding: 1.5rem 2rem; gap: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nl.open .mobile-call-link {
    display: flex; align-items: center; gap: .5rem;
    color: var(--gold); font-size: .72rem; font-weight: 700;
    letter-spacing: .07em; text-transform: uppercase;
    padding: .5rem 0; border-top: 1px solid var(--border); margin-top: .5rem;
  }
}

/* -- Footer -- */
footer {
  background: var(--bg); padding: 3.5rem 0 1.5rem;
  border-top: 1px solid var(--border);
}
.fgrid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem }
@media (max-width: 768px) { .fgrid { grid-template-columns: 1fr 1fr } }
@media (max-width: 480px) { .fgrid { grid-template-columns: 1fr } }
.f-logo { font-family: var(--heading); font-size: 1.2rem; margin-bottom: .7rem; color: var(--white) }
.f-logo b { color: var(--gold) }
.f-desc { font-size: .78rem; color: var(--text-muted); line-height: 1.7; max-width: 260px }
.fcol h4 {
  font-family: var(--body); font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: .8rem;
}
.fl { list-style: none; display: flex; flex-direction: column; gap: .4rem }
.fl a { font-size: .78rem; color: var(--text-dim); transition: color .3s }
.fl a:hover { color: var(--gold) }
.fb {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
}
.fc { font-size: .68rem; color: var(--text-muted) }
.ft { font-family: var(--heading); font-size: .78rem; font-style: italic; color: rgba(255,255,255,.08) }
.f-legal { display: flex; gap: 1rem }
.f-legal a { font-size: .68rem; color: var(--text-muted); transition: color .3s }
.f-legal a:hover { color: var(--gold) }

/* -- Page Header (inner pages) -- */
.page-header {
  padding: clamp(8rem, 14vw, 10rem) 0 clamp(3rem, 6vw, 4rem);
  border-bottom: 1px solid var(--border);
}
.page-header .label { margin-bottom: .6rem; display: block }
.page-header h1 { margin-bottom: .6rem }
.page-header p { margin-top: .4rem }

/* -- Page Hero (inner pages) -- */
.page-hero {
  padding: 10rem 0 4rem; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: 10%; right: -8%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(194,164,111,.05) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .label { margin-bottom: 1rem; display: block }
.page-hero h1 { margin-bottom: 1rem }
.page-hero h1 em { font-style: italic; color: var(--gold) }
.page-hero p { max-width: 600px }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: .5rem; margin-bottom: 2rem; font-size: .7rem; color: var(--text-muted) }
.breadcrumb a { color: var(--text-muted); transition: color .3s }
.breadcrumb a:hover { color: var(--gold) }
.breadcrumb svg { width: 10px; height: 10px; stroke: var(--text-muted); stroke-width: 2; fill: none }

/* -- AEO Section -- */
.aeo {
  padding: clamp(5rem, 10vw, 8rem) 0;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.aeo-wm {
  position: absolute; top: 50%; right: -5%;
  transform: translateY(-50%);
  font-family: var(--heading); font-size: clamp(8rem, 14vw, 14rem);
  font-weight: 700; color: rgba(255,255,255,.012);
  line-height: .8; pointer-events: none; user-select: none; white-space: nowrap;
}
.aeo-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}
.aeo-header .label {
  display: block;
  margin-bottom: .6rem;
}
.aeo-header h2 {
  margin-bottom: 1rem;
}
.aeo-header p {
  max-width: none;
  margin: 0 auto;
}
.aeo-header strong {
  color: var(--white);
}
.aeo-stats {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}
.aeo-stat {
  text-align: center;
  min-width: 100px;
}
.aeo-stat-val {
  font-family: var(--heading);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}
.aeo-stat-line {
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: .3;
  margin: .8rem auto;
}
.aeo-stat-label {
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.aeo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .aeo-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .aeo-grid { grid-template-columns: 1fr; }
}
.aeo-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  transition: all .4s var(--ease);
}
.aeo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.aeo-card:hover {
  border-color: rgba(194,164,111,.12);
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(0,0,0,.25);
}
.aeo-card:hover::before {
  transform: scaleX(1);
}
.aeo-card-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  transition: background .35s var(--ease);
}
.aeo-card:hover .aeo-card-icon {
  background: var(--gold);
}
.aeo-card-icon svg {
  width: 18px; height: 18px;
  min-width: 18px; min-height: 18px;
  max-width: 18px; max-height: 18px;
  stroke: var(--gold);
  transition: stroke .35s;
}
.aeo-card:hover .aeo-card-icon svg {
  stroke: var(--bg);
}
.aeo-card h4 {
  font-family: var(--body);
  font-size: .85rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .4rem;
  letter-spacing: .02em;
}
.aeo-card p {
  font-size: .82rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: none;
}
.aeo-link {
  color: var(--text-dim);
  transition: color .3s;
}
.aeo-link:hover {
  color: var(--gold);
}

/* -- Team LinkedIn -- */
.team-linkedin {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.2rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color .3s;
}
.team-linkedin svg {
  transition: transform .3s;
}
.team-linkedin:hover {
  color: var(--gold);
}
.team-linkedin:hover svg {
  transform: translateY(-2px);
}

/* -- Chat Widget -- */
.chb {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--gold); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(194,164,111,.35);
  z-index: 99; transition: all .3s var(--ease);
}
.chb:hover { transform: scale(1.05) }
.chb svg { width: 20px; height: 20px; stroke: var(--bg); stroke-width: 1.5; fill: none }
.chw {
  position: fixed; bottom: 5rem; right: 1.5rem;
  width: 340px; max-height: 430px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 16px 50px rgba(0,0,0,.4); z-index: 98; overflow: hidden;
  transform: scale(.92) translateY(12px); opacity: 0;
  pointer-events: none; transition: all .3s var(--ease);
}
.chw.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all }
.chh { background: var(--bg); padding: .9rem 1rem; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--border) }
.cha { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--heading); font-size: .65rem; color: var(--bg) }
.chh h4 { font-family: var(--body); font-size: .78rem; font-weight: 700; color: var(--white) }
.chh span { font-size: .6rem; color: var(--text-muted) }
.chd { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #34d399 }
.cms { padding: 1rem; display: flex; flex-direction: column; gap: .6rem; max-height: 260px; overflow-y: auto }
.cm { padding: .6rem .9rem; border-radius: 8px; font-size: .82rem; line-height: 1.5; max-width: 85% }
.cm.b { background: var(--bg-elevated); color: var(--text); border-bottom-left-radius: 2px }
.cm.u { background: var(--gold); color: var(--bg); align-self: flex-end; border-bottom-right-radius: 2px }
.cqr { padding: .4rem 1rem .8rem; display: flex; gap: .4rem; flex-wrap: wrap }
.cq { background: none; border: 1px solid var(--border); color: var(--text-dim); font-family: var(--body); font-size: .68rem; padding: .3rem .7rem; border-radius: 20px; cursor: pointer; transition: all .3s }
.cq:hover { border-color: var(--gold); color: var(--gold) }
.cin { display: flex; border-top: 1px solid var(--border); padding: .5rem .8rem; gap: .5rem; align-items: center }
.cin input { flex: 1; background: none; border: none; color: var(--white); font-family: var(--body); font-size: .82rem; outline: none }
.cin button { background: none; border: none; cursor: pointer; padding: 4px }
.cin button svg { width: 16px; height: 16px; stroke: var(--gold); stroke-width: 1.5; fill: none }

/* ══════════════════════════════════════════════
   MOBILE FIXES
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Prevent horizontal overflow globally */
  html, body { overflow-x: hidden; max-width: 100vw }

  /* Chat widget — raise above sticky CTA */
  .chb { bottom: 4.5rem; width: 44px; height: 44px }
  .chb svg { width: 18px; height: 18px }
  .chw { bottom: 7rem; right: .5rem; left: .5rem; width: auto }

  /* Page hero — less top padding */
  .page-hero { padding: 7rem 0 3rem }

  /* Typography — slightly smaller on mobile */
  h1 { font-size: clamp(2rem, 8vw, 3rem) }
  h2 { font-size: clamp(1.7rem, 6vw, 2.5rem) }

  /* Buttons — full width on small screens */
  .hero-btns { flex-direction: column }
  .hero-btns .btn { width: 100%; justify-content: center }
}

@media (max-width: 480px) {
  /* Tighter wrap padding */
  .wrap { padding: 0 1.25rem !important }

  /* AEO section */
  .aeo-stats { display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.5rem; width: 100% }
  .aeo-stat { min-width: auto }
  .aeo-stat-val { font-size: 1.6rem }
  .aeo-header { margin-bottom: 2rem }
  .aeo-card { padding: 1.25rem }

  /* Footer — clear sticky CTA */
  footer { padding: 2.5rem 0 5rem }
  .fb { flex-direction: column; align-items: center; text-align: center }

  /* Team cards */
  .team-linkedin { margin-top: .8rem }
}
