/* =====================================================================
   AXIA — GLOBAL STYLES (app.css)
   Brand: forest green #0F4D3F on cream #FBFAF6. WCAG 2.1 AA.
   Page-specific styles live in their own css files (home.css, firm.css...).
   ===================================================================== */

:root {
  --brand:        #0F4D3F;
  --brand-deep:   #0A3A2F;
  --brand-soft:   #1f6553;
  --brand-ink:    #052017;

  --bg:           #FBFAF6;
  --bg-alt:       #F2EFE7;
  --surface:      #FFFFFF;
  --ink:          #1A1A1A;
  --ink-muted:    #5B5B58;
  --rule:         #D9D4C6;
  --rule-strong:  #B5AE9A;

  --pos:          #0F4D3F;
  --neg:          #8B1E1E;
  --error:        #8B1E1E;
  --focus:        #B45309;   /* high-contrast focus ring */

  --ff-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --ff-body:    "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 2px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px); /* anchor scroll header chya khali na lapnyasathi */
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  color: var(--brand-ink);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}

p { margin: 0 0 1em; }

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s var(--ease);
}
a:hover { color: var(--brand-deep); }

/* ---- Skip link (WCAG 2.4.1 Bypass Blocks) ---- */
.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  background: var(--brand); color: #fff;
  padding: 12px 18px;
  z-index: 10000;
  border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---- Visible focus ring (WCAG 2.4.7) ---- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Screen-reader-only helper ---- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---- Layout container ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: sticky; top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .2s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 2px 18px rgba(5,32,23,.08); }

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 38px; width: auto; border-radius: var(--radius); }

.primary-nav ul { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  display: inline-block;
  padding: 10px 14px;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
  position: relative;
}
.primary-nav a:hover { color: var(--brand); }
.primary-nav a[aria-current="page"] { color: var(--brand); }
.primary-nav a[aria-current="page"]::after {
  content: ""; position: absolute;
  left: 14px; right: 14px; bottom: 6px;
  height: 2px; background: var(--brand);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: ""; display: block;
  width: 22px; height: 2px; background: var(--brand-ink);
  position: relative; transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   FOOTER  (forest green — matches logo background)
   ===================================================================== */
.site-footer {
  background: var(--brand);
  color: #EAF1ED;
  padding: 56px 0 28px;
  margin-top: 80px;
}
.site-footer a { color: #EAF1ED; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand img { height: 40px; margin-bottom: 14px; border-radius: var(--radius); }
.footer-brand p { color: #C7D6CF; max-width: 30ch; }

.footer-col h2 {
  font-family: var(--ff-body);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: #9FB8AE; margin-bottom: 14px; font-weight: 600;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }

.footer-sebi {
  border-top: 1px solid rgba(255,255,255,.16);
  margin-top: 36px; padding-top: 20px;
  font-size: 0.85rem; color: #BFD2CA;
}
.footer-sebi strong { color: #fff; }
.footer-bottom {
  margin-top: 14px; font-size: 0.8rem; color: #9FB8AE;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
}

/* =====================================================================
   BACK TO TOP
   ===================================================================== */
#back-to-top {
  position: fixed; right: 22px; bottom: 22px;
  width: 48px; height: 48px;
  background: var(--brand); color: #fff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 900;
  box-shadow: 0 4px 16px rgba(5,32,23,.25);
}
#back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* =====================================================================
   RESPONSIVE (tablet + mobile)
   ===================================================================== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 16px;
    transform: translateY(-120%);
    transition: transform .25s var(--ease);
    box-shadow: 0 12px 24px rgba(5,32,23,.10);
  }
  .primary-nav.is-open { transform: translateY(0); }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav a { padding: 14px 6px; border-bottom: 1px solid var(--rule); }
  .primary-nav a[aria-current="page"]::after { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- Print + high-contrast ---- */
@media print {
  .site-header, .site-footer, #back-to-top, .skip-link { display: none; }
}
@media (forced-colors: active) {
  .primary-nav a[aria-current="page"]::after { background: CanvasText; }


  /* =====================================================================
   SHARED SECTION PRIMITIVES  (used by all content pages)
   ===================================================================== */
.section { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }

.section-head { margin-bottom: clamp(28px, 4vw, 48px); max-width: 780px; }

.eyebrow {
  font-family: var(--ff-body);
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.78rem; font-weight: 600; color: var(--brand);
  margin: 0 0 14px;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08; max-width: 24ch; margin: 0;
}
.section-sub {
  color: var(--ink-muted); font-size: 1.08rem;
  max-width: 62ch; margin-top: 14px;
}

/* ===== BUTTONS (shared) ===== */
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px;
  font-family: var(--ff-body); font-weight: 600; font-size: 0.98rem;
  border-radius: var(--radius); text-decoration: none;
  border: 1.5px solid var(--brand);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand); color: #fff; }

/* ===== REVEAL-ON-SCROLL (shared) ===== */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
}
/* =====================================================================
   NAV DROPDOWN (Insights) — hover + click, hidden when closed
   ===================================================================== */
.primary-nav .has-dropdown { position: relative; }

.nav-disclosure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  border-radius: var(--radius);
}
.nav-disclosure:hover { color: var(--brand); }
.nav-disclosure .caret { font-size: .7em; transition: transform .2s var(--ease); }

/* submenu — hidden by default */
.nav-submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 230px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(5,32,23,.14);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  z-index: 80;
}
/* invisible bridge so hover doesn't drop in the gap */
.nav-submenu::before {
  content: "";
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 12px;
}

/* SHOW — on hover, keyboard focus, or click (JS is-open) */
.has-dropdown:hover .nav-submenu,
.has-dropdown:focus-within .nav-submenu,
.nav-submenu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 6px);
}
/* caret flips when open */
.has-dropdown:hover .nav-disclosure .caret,
.has-dropdown:focus-within .nav-disclosure .caret,
.nav-disclosure[aria-expanded="true"] .caret { transform: rotate(180deg); }

.nav-submenu li { list-style: none; }
.nav-submenu a {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--ink);
  white-space: nowrap;
}
.nav-submenu a:hover,
.nav-submenu a[aria-current="page"] { background: var(--brand); color: #fff; }

/* ---- Mobile: column nav, click-only (no hover) ---- */
@media (max-width: 720px) {
  .nav-disclosure {
    width: 100%;
    justify-content: space-between;
    padding: 14px 6px;
    border-bottom: 1px solid var(--rule);
  }
  .nav-submenu {
    position: static;
    transform: none;
    min-width: 0;
    padding: 2px 0 6px 14px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;          /* mobile var fakt click ne disel */
  }
  .nav-submenu::before { display: none; }
  .has-dropdown:hover .nav-submenu,
  .has-dropdown:focus-within .nav-submenu { display: none; }  /* hover nako (touch) */
  .nav-submenu.is-open { display: flex; }
}

/*.footer-address { font-weight: 400; font-size: 0.9rem; line-height: 1.5; margin: 6px 0 0; color: inherit; }*/
.footer-address { font-weight: 400; font-size: 0.9rem; line-height: 1.5; margin: 6px 0 0; }

.footer-address { white-space: pre-line; }

/* ===== Mobile: submenu in normal flow (fix tap hitting Contact) ===== */
.primary-nav.is-open .nav-submenu {
  position: static;
  transform: none;
  box-shadow: none;
  border: none;
  border-radius: 0;
  min-width: 0;
  padding: 0 0 0 14px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  display: none;            /* band asताna lapleli */
}
.primary-nav.is-open .nav-submenu.is-open {
  display: flex;            /* Insights tap kelyावar disel, in-flow */
}
.primary-nav.is-open .nav-submenu::before { display: none; }  /* hover-bridge mobile var nako */

