/* ============================================================
   GLOBAL / RESET
   ============================================================ */

html{
  overflow-y: scroll; /* prevent width jump between pages */
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
}


:root{
  --bg:#07070B;
  --bg2:#0B0B12;
  --text:#F4F3EE;
  --muted:#B9B6AD;
  --line:rgba(244,243,238,.12);
  --accent:#D7B56D;
  --accent3:#E1D3B2;
  --shadow:0 20px 80px rgba(0,0,0,.55);
}

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,var(--bg),var(--bg2));
}

a{ text-decoration:none; color:inherit; }

.container{
  max-width:1120px;
  margin:0 auto;
  padding:0 18px;
}

/* ============================================================
   FORM CONTROLS — dropdown contrast fix
   ============================================================ */

/* Fix OS-rendered dropdown list (white-on-white issue) */
select option{
  color:#111;
  background:#fff;
}

select optgroup{
  color:#111;
  background:#fff;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.nav{
  position:sticky;
  top:0;
  z-index:10;
  background:rgba(7,7,11,.85);
  border-bottom:1px solid var(--line);
}

.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}

.brand-title{ font-weight:800; }
.brand-sub{ font-size:12px; color:var(--muted); }

.aqs-logo{
  height:40px;
  width:auto;
  padding:6px 8px;
  border-radius:10px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
}

.nav-links{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  justify-content:center;
}

.nav-links a{
  font-size:14px;
  color:var(--muted);
}

.nav-links a:hover{ color:var(--text); }

/* Keep nav from collapsing awkwardly on narrower widths */
@media (max-width: 980px){
  .nav-inner{
    flex-wrap:wrap;
    justify-content:space-between;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  font-weight:700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn-primary{
  background:linear-gradient(135deg,var(--accent),var(--accent3));
  color:#16120A;
  border:none;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}

/* ============================================================
   CREDIBILITY STRIP
   ============================================================ */

.cred{
  padding: 10px 0 0;
}

.cred-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 980px){
  .cred-row{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .cred-row{ grid-template-columns: 1fr; }
}

.cred-item{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.cred-item b{
  color: var(--text);
  font-weight: 800;
}

.cred-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(215,181,109,.10);
}

/* ============================================================
   HERO BACKDROP (subtle premium graphic)
   ============================================================ */

.hero{
  position: relative;
  overflow: hidden;
}

.hero::before{
  content:"";
  position:absolute;
  inset:-40px -40px -40px -40px;
  background: url("img/hero-wave.svg") center/cover no-repeat;
  opacity: 0.55;
  pointer-events:none;
  z-index:0;
}

.hero > .container{
  position: relative;
  z-index:1;
}

/* ============================================================
   HERO
   ============================================================ */

.hero{ padding:60px 0 30px; }

.hero-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
  align-items:stretch;
}

@media(max-width:900px){
  .hero-grid{ grid-template-columns:1fr; }
}

.hero h1{
  font-size:42px;
  line-height:1.1;
  margin:0 0 12px;
}

.hero p{
  color:var(--muted);
  line-height:1.6;
}

.pill{
  display:inline-block;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  margin-bottom:12px;
}

.hr{
  height:1px;
  background:var(--line);
  margin:14px 0;
}

.notice{
  border:1px solid rgba(215,181,109,.25);
  background:rgba(215,181,109,.08);
  padding:12px;
  border-radius:14px;
}

/* ============================================================
   APPROACH ICONS
   ============================================================ */

.approach-icon{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #16120A;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* ============================================================
   CARD ICON + TITLE ROW
   ============================================================ */

.card-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.mini-ico{
  width:28px;
  height:28px;
  flex:0 0 28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
}

.mini-ico img{
  width:18px;
  height:18px;
  display:block;
}

/* Make h3 sit nicely beside the icon */
.card-head h3{
  margin:0;
  line-height:1.2;
}

/* ============================================================
   CARDS (NO HOVER LIFT ON HERO)
   ============================================================ */

.card{
  border:1px solid var(--line);
  border-radius:20px;
  padding:20px;
  background:rgba(255,255,255,.03);
  box-shadow:var(--shadow);
  transition: box-shadow .25s ease, border-color .25s ease; /* stable cards */
}

.card h3{ margin-top:0; }

/* ============================================================
   LISTS
   ============================================================ */

.list{
  margin:0;
  padding-left:18px;
  color:var(--text);
}

.list li{
  margin:8px 0;
  color:var(--muted);
  line-height:1.55;
}

.list li b{ color:var(--text); }

/* ============================================================
   HERO MEDIA
   ============================================================ */

.hero-media{
  border-radius:20px;
  overflow:hidden;
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
}

.hero-media img{
  width:100%;
  height:auto;
  display:block;
}

.hero-media-head{
  padding:16px 16px 10px;
  border-bottom:1px solid var(--line);
}

.hero-media-head h2{
  margin:0 0 8px;
  font-size:20px;
  letter-spacing:-0.2px;
}

.hero-media-head p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
  font-size:13.5px;
}

/* ============================================================
   APPROACH VISUAL STRIP
   ============================================================ */

.approach-visual{
  display:flex;
  justify-content:center;
  margin: 0 0 18px;
  opacity: .95;
}

.approach-visual img{
  width:100%;
  max-width: 760px;
  height:auto;
  display:block;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section{ padding:26px 0; }

.section h2{ margin:0 0 10px; }

.section p{
  margin:0 0 14px;
  color:var(--muted);
  line-height:1.6;
}

/* ============================================================
   SPLIT / GRIDS
   ============================================================ */

.split{
  display:grid;
  gap:14px;
}

.split-2x2{
  grid-template-columns:1fr 1fr;
}

@media(max-width:920px){
  .split-2x2{ grid-template-columns:1fr; }
}

.split-2x2 .card{ height:100%; }

/* ============================================================
   PIPELINE (01–04)
   ============================================================ */

.pipeline{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin-top:14px;
}

@media(max-width:920px){
  .pipeline{ grid-template-columns:1fr; }
}

.step{
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.03);
  padding:14px;
}

.step-top{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}

.step-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--accent3));
  color:#16120A;
  font-weight:800;
  font-size:12px;
}

.step-title{ font-weight:800; }

.step-desc{
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}

/* ============================================================
   PIPELINE DIAGRAM (HOME)
   ============================================================ */

.pipeline-hero{
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(255,255,255,.03);
  box-shadow:var(--shadow);
  overflow:hidden;
  margin-top:14px;
}

.pipeline-hero img{
  width:100%;
  height:auto;
  display:block;
}

/* ============================================================
   EA GRID / PRODUCT CARDS (HOVER LIFT ONLY HERE)
   ============================================================ */

.grid{
  display:grid;
  gap:14px;
}

.grid-3{
  grid-template-columns:repeat(3,1fr);
}

@media(max-width:1100px){
  .grid-3{ grid-template-columns:repeat(2,1fr); }
}

@media(max-width:680px){
  .grid-3{ grid-template-columns:1fr; }
}

.product{
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background: rgba(255,255,255,.028);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.product:hover{
  transform: translateY(-4px);
  border-color: rgba(215,181,109,.35);
  background: rgba(255,255,255,.04);
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
}

.product > a{
  display:block;
  line-height:0; /* prevents inline baseline gaps */
}

.product img{ display:block; }

.product .body{
  padding: 16px 16px 18px;
}

.product h3{
  margin:0 0 6px;
  font-size: 16.5px;
  letter-spacing: -0.2px;
}

.product p{
  font-size: 13.5px;
  color:var(--muted);
  margin:0;
  line-height: 1.55;
}

.ea-img{
  width:100%;
  height: 240px;                 /* slightly taller */
  object-fit: contain;
  background: radial-gradient(120% 120% at 50% 30%, rgba(255,255,255,.06), rgba(0,0,0,.42));
  border-bottom: 1px solid var(--line);
  padding: 16px;
  transition: transform .3s ease;
}

.product:hover .ea-img{
  transform: scale(1.03);
}

/* subtle CTA hint inside cards */
.product .body::after{
  content: "View details →";
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(215,181,109,.95);
  font-weight: 800;
  opacity: .9;
}

.product .body a:hover{ text-decoration:underline; }

/* ============================================================
   TELEGRAM
   ============================================================ */

.telegram-card{ padding:16px; }

.telegram-links{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

@media(max-width:920px){
  .telegram-links{ grid-template-columns:1fr; }
}

.tg-item{
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  border-radius:14px;
  padding:12px 14px;
}

.tg-label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

.tg-link{
  font-weight:800;
}

.tg-link:hover{ text-decoration:underline; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer{
  border-top:1px solid var(--line);
  padding:20px 0;
  margin-top:20px;
}

.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.footer-links{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}

.footer-links a{
  color:var(--muted);
  font-size:12.5px;
}

.footer-links a:hover{
  color:var(--text);
  text-decoration:underline;
}

.small{
  font-size:12.5px;
  color:var(--muted);
}

/* ABOUT: resize brand logo in hero panel */
.brand-panel-logo{
  width: min(220px, 65%);
  padding: 8px 10px;
}

.meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}

.badge{
  font-size:11px;
  color:var(--muted);
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  padding:6px 9px;
  border-radius:999px;
}

/* ============================================================
   INTRO SPLASH (INDEX ONLY)
   ============================================================ */

#aqs-splash{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg,var(--bg),var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#aqs-splash video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: aqsFadeOut 0.6s ease-out forwards;
  animation-delay: 2s; /* total ≈ 2.6s */
}

@keyframes aqsFadeOut{
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce){
  #aqs-splash{ display: none; }
}

/* ============================================================
   PERFORMANCE STRIP + REVEAL
   ============================================================ */

.perf-hero{
  margin: 14px 0 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);

  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  will-change: opacity, transform;
}

.perf-hero.is-visible{
  opacity: 1;
  transform: translateY(0);
}

.perf-hero img{
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */

.section-divider{
  display: flex;
  justify-content: center;
  margin: 32px 0;
  opacity: 0.95;
}

.section-divider img{
  width: 100%;
  max-width: 1120px;   /* matches .container */
  height: 40px;        /* matches SVG viewBox height */
  display: block;
}

/* ============================================================
   EA PAGES: premium hero backdrop
   ============================================================ */

/* Only apply to strategy pages (they already use body class="ea-page ...") */
body.ea-page .hero{
  position: relative;
  overflow: hidden;
}

/* Put the graphic behind the hero content */
body.ea-page .hero::before{
  content:"";
  position:absolute;
  inset:-60px -60px -60px -60px;

  /* IMPORTANT: styles.css is in assets/css, so images are ../img/... */
  background: url("../img/ea-hero-wave.svg") center/cover no-repeat;

  opacity: 0.55;              /* tune 0.35–0.65 */
  pointer-events:none;
  z-index:0;
}

body.ea-page .hero > .container{
  position: relative;
  z-index: 1;
}

/* Respect reduced motion preferences (not required, but good practice) */
@media (prefers-reduced-motion: reduce){
  body.ea-page .hero::before{ opacity: 0.35; }
}

/* ============================================================
   STRATEGY SNAPSHOT STRIP
   ============================================================ */

.snapshot{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:12px;
  padding:14px;
  border-radius:18px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
}

@media (max-width: 980px){
  .snapshot{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px){
  .snapshot{ grid-template-columns: 1fr; }
}

.snapshot-item{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(244,243,238,.10);
  background: rgba(0,0,0,.18);
}

.snapshot-k{
  font-size:11px;
  letter-spacing:.2px;
  color: var(--muted);
  margin-bottom:6px;
}

.snapshot-v{
  font-size:14.5px;
  font-weight:800;
  color: var(--text);
  line-height:1.25;
}

/* ============================================================
   HOW IT TRADES (Strategy pages)
   ============================================================ */

.how-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:14px;
  align-items:stretch;
}

@media(max-width: 920px){
  .how-grid{ grid-template-columns: 1fr; }
}

.how-diagram,
.how-card{
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px;
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
}

.how-diagram-title{
  font-weight:900;
  letter-spacing:-0.2px;
  margin-bottom:12px;
}

.flow{
  margin-top:6px;
}

.flow-node{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.flow-dot{
  width:12px;
  height:12px;
  border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  box-shadow: 0 0 0 5px rgba(215,181,109,.10);
  flex:0 0 auto;
  margin-top:4px;
}

.flow-text b{
  display:block;
  font-size:13.5px;
  color: var(--text);
}

.flow-text span{
  display:block;
  font-size:13px;
  color: var(--muted);
  margin-top:2px;
  line-height:1.45;
}

.flow-line{
  height:16px;
  margin:6px 0 6px 5px;
  border-left:2px solid rgba(244,243,238,.12);
}

.how-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}

.how-badge{
  font-size:11px;
  color: var(--muted);
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  padding:6px 9px;
  border-radius:999px;
}

.how-card .notice{
  margin-top:0;
}

/* ============================================================
   STRATEGIES PAGE ENHANCEMENTS ONLY
   (Scoped to avoid affecting other pages)
   ============================================================ */

/* ===========================
   HERO ENHANCEMENTS (Strategies ONLY)
   =========================== */

body.strategies .hero--institutional{
  position: relative;
  overflow: hidden;
}

/* subtle institutional background */
body.strategies .hero--institutional::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(700px 380px at 15% 15%, rgba(215,181,109,0.14), rgba(0,0,0,0) 60%),
    radial-gradient(760px 420px at 85% 35%, rgba(130,160,200,0.10), rgba(0,0,0,0) 60%);
  pointer-events:none;
}

body.strategies .hero-grid--enhanced{
  position: relative;
  z-index: 1;
}

body.strategies .hero-card{
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
}

body.strategies .hero-card--primary{ position: relative; }

body.strategies .hero-card--secondary{
  position: relative;
  border: 1px solid rgba(215,181,109,0.22);
}

/* Sophie™ kicker: italic + not uppercase, strategies page only */
body.strategies .hero-kicker{
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
}

body.strategies .hero-title{ margin-top: 0; }

/* IMPORTANT: avoid collision with the global .pipeline (01–04) component */
body.strategies .hero-card--primary .pipeline{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

body.strategies .hero-card--primary .pipeline-step{
  display:flex;
  align-items:center;
  gap: 8px;
  white-space: nowrap;
}

body.strategies .hero-card--primary .pipeline-step .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(215,181,109,0.65);
  background: rgba(215,181,109,0.18);
  box-shadow: 0 0 0 4px rgba(215,181,109,0.08);
}

body.strategies .hero-card--primary .pipeline-step .label{
  font-size: 12px;
  opacity: 0.9;
}

body.strategies .hero-card--primary .pipeline-line{
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(215,181,109,0.35), rgba(255,255,255,0.06));
  min-width: 22px;
}

/* credibility chips */
body.strategies .chip-row{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

body.strategies .chip{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  opacity: 0.95;
}

/* ===========================
   DOMAINS SECTION ENHANCEMENTS (Strategies ONLY)
   =========================== */

body.strategies .section--domains{ position: relative; }

body.strategies .section-head{
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

body.strategies .section-accent{
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(215,181,109,0.65), rgba(255,255,255,0.05));
  box-shadow: 0 0 0 6px rgba(215,181,109,0.06);
  margin-top: 6px;
}

body.strategies .callout{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

body.strategies .callout--research{
  margin: 18px 0;
  border: 1px solid rgba(215,181,109,0.22);
  background:
    radial-gradient(600px 240px at 10% 30%, rgba(215,181,109,0.10), rgba(0,0,0,0) 60%),
    rgba(255,255,255,0.02);
}

body.strategies .callout-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

body.strategies .callout-top h3{
  margin-top: 0;
  margin-bottom: 0;
}

body.strategies .callout-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

body.strategies .tag{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  opacity: 0.95;
}

/* domain grid tweaks */
body.strategies .split--domains .card{
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}

body.strategies .split--domains .meta{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================
   STRATEGIES: FORCE 2 DOMAIN CARDS PER ROW
   ============================================================ */

body.strategies .domains-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Mobile: 1 per row */
@media (max-width: 680px){
  body.strategies .domains-grid{
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   STRATEGIES: RESEARCH LOOP VISUAL
   ============================================================ */

body.strategies .research-loop{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(215,181,109,0.30);
  background: rgba(255,255,255,0.02);
  overflow-x: auto;
}

body.strategies .rl-step{
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--muted);
}

body.strategies .rl-step span{
  color: var(--text);
  font-weight: 700;
}

body.strategies .rl-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  box-shadow: 0 0 0 4px rgba(215,181,109,.12);
  flex: 0 0 auto;
}

body.strategies .rl-arrow{
  font-size: 14px;
  opacity: 0.6;
  margin: 0 2px;
}

body.strategies .rl-arrow.loop{
  font-size: 16px;
  opacity: 0.85;
}

/* ============================================================
   PERFORMANCE PAGE: HERO VISUAL STRIP
   ============================================================ */

body.performance .val-strip{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0 12px;
}

@media (max-width: 900px){
  body.performance .val-strip{ grid-template-columns: 1fr; }
}

body.performance .val-item{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(244,243,238,.12);
  background: rgba(255,255,255,.02);
}

body.performance .val-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  box-shadow: 0 0 0 4px rgba(215,181,109,.10);
  flex: 0 0 auto;
}

body.performance .val-k{
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

body.performance .val-v{
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

/* ============================================================
   PERFORMANCE PAGE: VALIDATION PIPELINE
   ============================================================ */

body.performance .val-pipeline{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(215,181,109,0.30);
  background: rgba(255,255,255,0.02);
  overflow-x: auto;
}

body.performance .vp-step{
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.performance .vp-step::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  box-shadow: 0 0 0 4px rgba(215,181,109,.10);
  display: inline-block;
}

body.performance .vp-line{
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(215,181,109,0.35), rgba(255,255,255,0.06));
}

/* ============================================================
   PERFORMANCE PAGE: Validation cycle graphic
   ============================================================ */

body.performance .perf-cycle{
  margin: 14px 0 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(244,243,238,.10);
  background: rgba(255,255,255,.02);
}

body.performance .perf-cycle svg{
  width: 100%;
  height: auto;
  display: block;
}

/* PERFORMANCE: SVG card spacing */
body.performance .perf-cycle-wrap{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(244,243,238,0.10);
}

body.performance .perf-cycle-img{
  width: 100%;
  max-width: 520px;
  display: block;
  margin: 0 auto;
}

/* ============================================================
   MOBILE (ALL PAGES)
   - Centre NAV like index (logo + title centred, links centred + wrapped)
   - Keep hero title shrinking (as you have it)
   - Keep Strategies/Performance overflow fixes
   - Prevent right-side overflow
   ============================================================ */

@media (max-width: 680px){

  /* Hard stop overflow (all pages) */
  html, body{ overflow-x: hidden; }

  /* Consistent container padding (all pages) */
  .container{
    padding-left: 14px;
    padding-right: 14px;
    max-width: 100%;
  }

  /* ===========================
     NAV (ALL PAGES) — centred like index
     =========================== */

  .nav-inner{
    flex-wrap: wrap;
    justify-content: center;     /* centre rows */
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  /* Brand row centred */
  .brand{
    width: 100%;
    justify-content: center;
    min-width: 0;
  }

  .brand > div{
    min-width: 0;
    max-width: 100%;
    text-align: center;
  }

  /* Compact logo */
  .aqs-logo{
    height: 34px;
    padding: 5px 7px;
    flex: 0 0 auto;
  }

  /* Keep AuroraQuantSystems on one line, auto-shrink */
  .brand-title{
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;  /* only on extremely narrow devices */
    font-size: clamp(13px, 4.0vw, 16px) !important;
    line-height: 1.1;
  }

  .brand-sub{
    font-size: 11.5px;
    line-height: 1.15;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* Links row centred + wrapped (no horizontal scrolling) */
  .nav-links{
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
  }

  /* ===========================
     HERO: titles shrink correctly (KEEP as-is)
     =========================== */

  body.about .hero h1,
  body.strategies .hero h1,
  body.performance .hero h1,
  body.contact .hero h1,
  body.home .hero h1,
  body.terms .hero h1,
  body.privacy .hero h1,
  body.disclaimer .hero h1{
    font-size: clamp(26px, 6.8vw, 40px) !important;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  body.about .hero h2,
  body.strategies .hero h2,
  body.performance .hero h2,
  body.contact .hero h2,
  body.home .hero h2,
  body.terms .hero h2,
  body.privacy .hero h2,
  body.disclaimer .hero h2{
    font-size: clamp(18px, 4.8vw, 26px) !important;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  /* Stack hero columns on all pages */
  .hero-grid{
    grid-template-columns: 1fr !important;
  }

  /* Media never overflows */
  img, svg{
    max-width: 100%;
    height: auto;
  }
}

/* Extra-small phones */
@media (max-width: 360px){
  .brand-title{
    font-size: 12.4px !important;
  }
}

/* ============================================================
   FIX: STRATEGIES + PERFORMANCE HERO (prevent sideways overflow)
   ============================================================ */

/* Ensure grid children can shrink */
body.strategies .hero-grid--enhanced > *,
body.performance .hero-grid > *{
  min-width: 0;
}

/* Strategies: pipeline inside hero should wrap on mobile */
@media (max-width: 680px){
  body.strategies .hero-card--primary .pipeline{
    max-width: 100%;
    flex-wrap: wrap;
    row-gap: 10px;
    overflow: hidden;
  }

  body.strategies .hero-card--primary .pipeline-step{
    white-space: normal;
  }

  body.strategies .hero-card--primary .pipeline-line{
    display: none;
  }
}

/* Performance: keep pipeline from leaking width */
body.performance .val-pipeline,
body.performance .val-strip{
  min-width: 0;
  max-width: 100%;
}

/* ============================================================
   PERFORMANCE: mobile-safe validation pipeline (no overflow)
   ============================================================ */
@media (max-width: 680px){
  body.performance .val-pipeline{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
    padding: 0;
    border: none;
    background: transparent;
  }

  body.performance .vp-line{
    display: none !important;
  }

  body.performance .vp-step{
    white-space: normal;
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(244,243,238,.12);
    background: rgba(255,255,255,.02);
  }
}


/* ============================================================
   LANGUAGE SWITCH — active state clarity
   ============================================================ */

.lang-switch{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  user-select: none;
}

.lang{
  color: var(--muted);
  opacity: 0.55;
  transition: opacity .2s ease, color .2s ease;
}

.lang:hover{
  opacity: 0.9;
  text-decoration: underline;
}

/* ACTIVE LANGUAGE */
.lang.active{
  color: var(--text);
  opacity: 1;
  cursor: default;
  text-decoration: none;
  pointer-events: none;        /* prevents clicking current language */
  position: relative;
}

/* subtle underline marker (institutional, not flashy) */
.lang.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent3)
  );
}

/* separator */
.lang-sep{
  opacity: 0.35;
}

/* Mobile alignment */
@media (max-width: 680px){
  .lang-switch{
    margin-left: auto;
    margin-right: auto;
  }
}


/* ============================================================
   HARD WIDTH LOCK — prevent X-axis drift across pages
   ============================================================ */

/* All main layout blocks must respect container width */
.nav-inner,
.hero > .container,
.section > .container,
.footer-inner{
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* Prevent grid/flex children from forcing overflow */
.hero-grid > *,
.split > *,
.grid > *,
.nav-inner > *{
  min-width: 0;
}

/* Absolute safety: never allow horizontal bleed */
body{
  overflow-x: hidden;
}

/* ============================================================
   FINAL NORMALISATION: hero width consistency (index vs others)
   ============================================================ */

/* Ensure hero grid never defines width independently */
.hero-grid{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Force hero container to be the ONLY width authority */
.hero > .container{
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 18px;
  padding-right: 18px;
  box-sizing: border-box;
}

/* Neutralise any grid-induced overflow */
.hero-grid > *{
  min-width: 0;
}

/* Ensure hero background never affects layout width */
.hero::before{
  left: 0;
  right: 0;
  max-width: 100vw;
}


