/* ========================================================================
   AFFM S.A. - Layout styles
   Ported from AlkenFund.Web2/wwwroot/css/site.css, recoloured to AFFM tokens.
   ======================================================================== */

/* Reset */
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  font-synthesis: none;
  text-wrap: pretty;
  position: relative;
  overflow-x: hidden;
}

/* Make sure content sits above the atmospheric layers */
.page, header, footer { position: relative; z-index: 2; }
/* main is positioned (so it stays a containing block for absolute children) but must NOT
   carry a z-index: a z-index here makes main its own stacking context, which traps the
   fixed .bio-modal (z-index 300) below the sticky .site-header (z-index 100) and lets the
   header cover the modal's Close button. Without z-index, the modal joins .page's context
   and correctly paints above the header. */
main { position: relative; }

/* Sticky footer - keep the footer pinned to the bottom of the viewport on short
   pages / when zoomed out, instead of floating up with a gap beneath it. */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.page > main { flex: 1 0 auto; }

/* Type */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-1px);
}
.eyebrow .num { color: var(--accent); font-weight: 600; }

/* Layout */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut);
}

/* Marketing Communication topbar (S7) - same treatment as alken-fund.com */
.topbar {
  background: var(--paper);
  color: var(--ink-3);
  border-bottom: 1px solid var(--hair-2);
  font: 400 10px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.topbar__inner {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding-top: 2px;
  padding-bottom: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.02em;
}
.brand__word {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
}
.brand__word .light { color: var(--ink-3); font-weight: 400; letter-spacing: 0.02em; font-size: 13px; }

/* NOTE: brief's selector list also names `.brand__star` - no such selector exists in
   Web2's site.css (Web2 uses `.brand__mark`/`.brand__alken` instead, neither of which is
   in the brief's list), so nothing was copied for it. See task-B2-report.md. */

.nav { display: flex; align-items: center; gap: 8px; }

/* NOTE: brief's selector list also names `.nav-item` and `.nav-dropdown` - neither exists
   in Web2's site.css (Web2 styles nav links via `.nav a`, and has no dropdown nav), so
   nothing was copied for them. See task-B2-report.md. */

/* Mobile menu toggle - hidden on desktop, surfaced as a hamburger below 760px.
   Pure CSS (checkbox sibling combinator) so it needs no Blazor interactivity. */
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.nav-burger { display: none; }

@media (max-width: 760px) {
  .site-header__inner { gap: 12px; }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    padding: 11px 10px;
    margin: -10px -8px -10px 0;   /* larger tap target without shifting the bar */
    border-radius: 10px;
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .25s var(--ease-out), opacity .2s ease;
  }
  /* Hamburger morphs into an X when open */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle:focus-visible ~ .nav-burger { outline: 2px solid var(--affm); outline-offset: 2px; }

  /* The nav drops down as a full-width panel under the bar.
     nav.nav (not .nav): bootstrap.min.css loads after this sheet and its `.nav
     { display: flex }` would override a plain `.nav { display: none }` here,
     leaving the panel permanently open on mobile. */
  nav.nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 32px color-mix(in oklab, var(--ink) 12%, transparent);
    display: none;
  }
  .nav-toggle:checked ~ nav.nav { display: flex; }
  .nav-split { display: none; }
}

/* Footer */
.site-footer {
  /* No outer margin: it rendered as a large beige band (body background) between the last
     section and the dark footer. The footer's own .shell padding-top provides the spacing. */
  margin-top: 0;
  background: var(--ink);
  color: var(--bone);
}
.site-footer .shell { padding-top: 40px; padding-bottom: 24px; }
/* Flat legal row replacing the Legal/Site columns (S6) - modelled on the fund
   site's modern-footer__links row */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}
.footer-legal a {
  color: color-mix(in oklab, var(--bone) 85%, transparent);
  font-size: 14px;
  transition: color .2s ease;
}
.footer-legal a:hover { color: var(--bone); }
.footer-bottom__links { display: inline-flex; gap: 20px; }
.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in oklab, var(--bone) 14%, transparent);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--bone) 55%, transparent);
}

/* AFFM B4 component styles */

/* Brand logo image */
.brand__logo {
  height: 40px;
  width: auto;
  display: block;
}

/* Footer masthead (above the legal row) */
.footer-flag {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid color-mix(in oklab, var(--bone) 14%, transparent);
}
.footer-mark {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--bone);
  letter-spacing: 0.02em;
}
.footer-flag__note {
  margin: 8px 0 0;
  max-width: 640px;
  font-size: 12px;
  line-height: 1.6;
  color: color-mix(in oklab, var(--bone) 55%, transparent);
}

/* One-time entry acknowledgment pop-up (replaces the cookie consent banner, round 3) */
.entry-ack__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .55);
}
.entry-ack__dialog {
  max-width: 640px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
}
.entry-ack__dialog p { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: #222; }
.entry-ack__dialog a { text-decoration: underline; color: var(--accent); }
.entry-ack__actions { display: flex; justify-content: flex-end; }
.entry-ack__btn {
  font: 500 14px/1 var(--sans);
  padding: 10px 22px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

/* Nav CTA - olive button treatment, layered on top of the base .nav-link rules */
.nav-link.nav-link--cta {
  background: var(--affm);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 6px;
}
.nav-link.nav-link--cta::after { display: none; }
.nav-link.nav-link--cta:hover, .nav-link.nav-link--cta.active {
  background: var(--affm-darken);
  color: var(--paper);
}
