/* =====================================================================
   TBK Global Capital — shared design system
   Tokens, base type, header, mega menu, mobile menu, buttons, footer
   ===================================================================== */

/* ---------- Self-hosted fonts (SIL Open Font License) ---------- */
@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/bodoni-moda-latin-standard-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-style: italic; font-weight: 400 900; font-display: swap; src: url('../fonts/bodoni-moda-latin-standard-italic.woff2') format('woff2'); }
@font-face { font-family: 'Albert Sans'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/albert-sans-latin-wght-normal.woff2') format('woff2'); }

:root {
  /* Ink — the navy of the logo, extended into a depth scale */
  --ink-950: #030c1b;
  --ink-900: #061629;
  --ink-850: #081d36;
  --ink-800: #0b2443;
  --ink-700: #143461;
  --ink-500: #3a5884;
  --mist-400: #8d9db4;
  --mist-300: #a9b7ca;
  --mist-100: #dfe6ef;

  /* Gold — the arc of the monogram */
  --gold-200: #f8e2ad;
  --gold-300: #f1cd84;
  --gold-400: #e0b062;
  --gold-500: #c9973f;
  --gold-600: #a97b2e;
  --gold-700: #8a6224;
  --gold-grad: linear-gradient(100deg, #8a6224 0%, #c9973f 22%, #f3d390 48%, #d8a852 70%, #8a6224 100%);

  /* Forest — the K */
  --forest-900: #062a1d;
  --forest-700: #0d4630;
  --forest-500: #1f6b4a;
  --leaf-400: #5cb080;

  /* Light surfaces — cool porcelain, not cream */
  --porcelain: #edf0f1;
  --paper: #f7f8f8;
  --white: #ffffff;
  --text-dark: #0b2443;
  --text-dark-2: #46597a;

  --line-on-dark: rgba(232, 238, 246, .14);
  --line-on-light: rgba(11, 36, 67, .14);

  --f-display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --f-sans: 'Albert Sans', 'Helvetica Neue', Arial, system-ui, sans-serif;

  --gutter: clamp(20px, 4.2vw, 72px);
  --max: 1520px;
  --header-h: 88px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure { margin: 0; }
::selection { background: var(--gold-400); color: var(--ink-900); }

:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 1000;
  background: var(--gold-400); color: var(--ink-900); padding: 10px 16px; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.display {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.02;
}
/* Bodoni at a text optical size: sturdier hairlines, calmer and more institutional than the display cut */
.display, .h-xl, .h-lg, .h-md, .mega__title, .mobile-menu__top, .site-footer__mail, .site-footer__phone { font-variation-settings: "opsz" 22; }
.h-xl { font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 5.4vw, 92px); line-height: 1.02; letter-spacing: -0.02em; }
.h-lg { font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 4vw, 64px); line-height: 1.06; letter-spacing: -0.015em; }
.h-md { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 2.4vw, 38px); line-height: 1.15; letter-spacing: -0.01em; }
.lede { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.6; max-width: 38em; }
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  color: var(--gold-500);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.on-dark .kicker { color: var(--gold-300); }
.gold-text {
  background: var(--gold-grad); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 54px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: var(--h); padding: 0 28px;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  border-radius: 2px; overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
  white-space: nowrap;
}
.btn > span { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 12px; }
.btn--sm { --h: 44px; padding: 0 20px; font-size: 14px; }
.btn--gold { color: var(--ink-900); background: var(--gold-grad); background-size: 220% 100%; background-position: 0% 0; transition: background-position .9s var(--ease), transform .4s var(--ease); }
.btn--gold::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 1s var(--ease);
}
.btn--gold:hover { background-position: 100% 0; }
.btn--gold:hover::after { transform: translateX(120%); }
.btn--ghost { color: var(--white); border: 1px solid rgba(255,255,255,.32); }
.btn--ghost::before {
  content: ""; position: absolute; inset: 0; z-index: 1; background: var(--white);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease);
}
.btn--ghost:hover { color: var(--ink-900); border-color: var(--white); }
.btn--ghost:hover::before { transform: scaleY(1); }
.btn--ink { color: var(--white); background: var(--ink-800); }
.btn--ink:hover { background: var(--ink-700); }
.btn--outline-dark { color: var(--ink-800); border: 1px solid var(--line-on-light); }
.btn--outline-dark:hover { border-color: var(--ink-800); }
.btn .arrow { width: 16px; height: 10px; transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: var(--gold-500);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 3px; transition: background-size .5s var(--ease);
}
.link-arrow::after {
  content: ""; width: 14px; height: 9px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M0 4.5h12.5M9 1l3.5 3.5L9 8' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M0 4.5h12.5M9 1l3.5 3.5L9 8' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .4s var(--ease);
}
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow:hover::after { transform: translateX(4px); }
.on-dark .link-arrow { color: var(--gold-300); }

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: var(--white);
  transition: transform .6s var(--ease), background-color .5s var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(6, 22, 41, .72);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
          backdrop-filter: blur(18px) saturate(140%);
  opacity: 0; transition: opacity .5s var(--ease);
  border-bottom: 1px solid var(--line-on-dark);
}
.site-header.is-scrolled::before,
.site-header.is-open::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__bar {
  height: var(--header-h);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.site-header__logo img { width: 164px; height: auto; }
.site-header__actions { display: flex; align-items: center; gap: 16px; }

.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 13px; font-size: 15px; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
  color: rgba(255,255,255,.86); transition: color .3s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 1px;
  background: var(--gold-400); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.nav__item:hover > .nav__link, .nav__link[aria-expanded="true"], .nav__item.is-current > .nav__link { color: var(--white); }
.nav__item:hover > .nav__link::after, .nav__link[aria-expanded="true"]::after, .nav__item.is-current > .nav__link::after { transform: scaleX(1); }
.nav__chev { opacity: .7; transition: transform .35s var(--ease); }
.nav__link[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

/* Mega panel */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s linear .45s;
  pointer-events: none;
}
.mega::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(5, 18, 34, .94);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line-on-dark);
}
.mega::after { /* gold hairline */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500) 30%, var(--gold-300) 50%, var(--gold-500) 70%, transparent);
  opacity: .6;
}
.nav__item.is-open .mega {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s;
}
.mega__inner {
  max-width: var(--max); margin: 0 auto; padding: 44px var(--gutter) 48px;
  display: grid; grid-template-columns: minmax(220px, 1fr) 2fr minmax(260px, 320px); gap: 56px; align-items: start;
}
.mega__title { font-family: var(--f-display); font-size: 40px; line-height: 1; margin-bottom: 16px; }
.mega__intro { color: var(--mist-300); font-size: 15px; line-height: 1.6; margin-bottom: 22px; max-width: 26em; }
.mega__links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; }
.mega__links a {
  display: block; padding: 14px 0 16px; border-bottom: 1px solid var(--line-on-dark);
  transition: border-color .3s var(--ease);
}
.mega__label { display: block; font-size: 17px; font-weight: 500; color: var(--white); transition: color .3s var(--ease), transform .4s var(--ease); }
.mega__desc { display: block; font-size: 13.5px; color: var(--mist-400); margin-top: 3px; }
.mega__links a:hover { border-color: var(--gold-500); }
.mega__links a:hover .mega__label { color: var(--gold-300); transform: translateX(4px); }
.mega__figure { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: var(--ink-800); }
.mega__figure img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.6s var(--ease-out); }
.nav__item.is-open .mega__figure img { transform: scale(1); }
.mega__figure figcaption {
  position: absolute; inset: auto 0 0 0; padding: 60px 20px 18px;
  background: linear-gradient(transparent, rgba(3,12,27,.92));
  font-size: 14px; color: var(--mist-100); display: grid; gap: 6px;
}
.mega__figure figcaption a { color: var(--gold-300); font-weight: 600; }

.mega__faces { display: grid; gap: 16px; align-content: start; }
.mega__faces-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mega__faces-grid span { aspect-ratio: 1; overflow: hidden; border-radius: 2px; background: var(--ink-800); }
.mega__faces-grid img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.5); transition: filter .5s var(--ease); }
.mega__faces-grid span:hover img { filter: none; }
.mega__faces p { font-size: 14px; color: var(--mist-300); display: grid; gap: 6px; }
.mega__faces a { color: var(--gold-300); font-weight: 600; }
.site-footer__address { font-style: normal; margin-top: 14px; line-height: 1.7; }

.site-header__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; }
.site-header__progress span { display: block; height: 100%; width: 100%; background: var(--gold-grad); transform: scaleX(0); transform-origin: left; }

/* Burger */
.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .45s var(--ease), top .45s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 26px; right: 16px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; right: 10px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--ink-950);
  padding: calc(var(--header-h) + 12px) var(--gutter) 32px; overflow-y: auto; color: var(--white);
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-out);
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.mobile-menu[hidden] { display: block; visibility: hidden; }
.mobile-menu.is-open[hidden] { visibility: visible; }
.mobile-menu__inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.mobile-menu__list > li { border-bottom: 1px solid var(--line-on-dark); }
.mobile-menu__top {
  display: flex; width: 100%; justify-content: space-between; align-items: center;
  padding: 18px 0; font-family: var(--f-display); font-size: 30px; line-height: 1.1; text-align: left;
}
.mobile-menu__top i { width: 14px; height: 14px; position: relative; }
.mobile-menu__top i::before, .mobile-menu__top i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--gold-300); transition: transform .4s var(--ease); }
.mobile-menu__top i::after { transform: rotate(90deg); }
.mobile-menu__top[aria-expanded="true"] i::after { transform: rotate(0); }
.mobile-menu__sub { max-height: 0; overflow: hidden; transition: max-height .5s var(--ease); }
.mobile-menu__sub a { display: block; padding: 9px 0; color: var(--mist-300); font-size: 16px; }
.mobile-menu__sub li:last-child a { padding-bottom: 20px; color: var(--gold-300); }
.mobile-menu__foot { display: grid; gap: 18px; }
.mobile-menu__mail { color: var(--mist-300); font-size: 15px; }

/* Transitions on body when menu open */
body.menu-open { overflow: hidden; }

/* =====================================================================
   SECTIONS — shared helpers
   ===================================================================== */
.section { position: relative; padding: clamp(96px, 12vw, 200px) 0; }
.on-dark { color: var(--white); background: var(--ink-900); }
.on-light { color: var(--text-dark); background: var(--paper); }
.on-porcelain { color: var(--text-dark); background: var(--porcelain); }

/* Reveal default state (only when JS + motion are available) */
.js [data-reveal] { will-change: transform, opacity; }

/* Grain overlay for dark surfaces — keeps big navy fields from banding on high-DPI screens */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  position: relative; overflow: hidden;
  background: var(--ink-950); color: var(--mist-300);
  padding: clamp(80px, 9vw, 140px) 0 36px;
  font-size: 15px;
}
.site-footer__glow {
  position: absolute; left: 50%; top: -340px; width: 1200px; height: 600px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(201,151,63,.16), transparent 70%);
  pointer-events: none;
}
.site-footer__top { position: relative; display: grid; grid-template-columns: minmax(260px, 1.1fr) 2.4fr; gap: clamp(40px, 6vw, 110px); padding-bottom: 64px; border-bottom: 1px solid var(--line-on-dark); }
.site-footer__logo img { width: 210px; }
.site-footer__statement { margin: 28px 0 24px; max-width: 30em; line-height: 1.7; }
.site-footer__mail, .site-footer__phone { display: block; color: var(--white); font-family: var(--f-display); font-size: 24px; margin-top: 6px; transition: color .3s var(--ease); }
.site-footer__mail:hover, .site-footer__phone:hover { color: var(--gold-300); }
.site-footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.site-footer__cols h3 { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 20px; }
.site-footer__cols li + li { margin-top: 11px; }
.site-footer__cols a { transition: color .3s var(--ease); }
.site-footer__cols a:hover { color: var(--white); }

.site-footer__clocks { display: flex; flex-wrap: wrap; gap: 12px 44px; padding: 28px 0; border-bottom: 1px solid var(--line-on-dark); }
.clock { display: inline-flex; align-items: baseline; gap: 10px; font-size: 14px; }
.clock__city { color: var(--mist-400); }
.clock__time { color: var(--white); font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.site-footer__legal { padding: 28px 0; font-size: 13px; line-height: 1.75; color: var(--mist-400); max-width: 110ch; }
.site-footer__legal strong { color: var(--mist-300); font-weight: 600; }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 24px; border-top: 1px solid var(--line-on-dark); font-size: 13px; }
.site-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.site-footer__bottom a:hover { color: var(--white); }
.site-footer__credit a { color: var(--mist-100); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1320px) {
  .nav { display: none; }
  .burger { display: block; }
  .mega__inner { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .site-footer__top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --header-h: 72px; }
  body { font-size: 16px; }
  .site-header__logo img { width: 132px; }
  .site-header__actions .btn { display: none; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 1321px) {
  .mobile-menu { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
