/* ============================================================
   Westbrook Capital International LLC — styles
   Design language ported from the "Aspect" template:
   dark obsidian canvas, a bordered-grid container, Figtree
   type, near-monochrome grays with one lavender accent.
   Tokens live in :root so the palette/scale retune easily.
   ============================================================ */

:root {
  /* Color — dark "obsidian" theme */
  --bg:         #050505;  /* obsidian page */
  --bg-alt:     #0a0a0c;  /* jet — alt section / footer wash */
  --ink:        #ffffff;  /* primary text */
  --muted:      #828282;  /* mid-gray — secondary text */
  --muted-2:    #a1a1a1;  /* lighter muted text */
  --line:       #232323;  /* dark-gray hairline borders */
  --line-soft:  #1a1a1a;  /* fainter inner border */
  --surface:    #0e0e10;  /* raised card surface */
  --surface-2:  #19191c;  /* secondary surface / button */
  --ebony:      #24222d;  /* primary button fill */
  --charcoal:   #363636;  /* button border */
  --accent:     #b2a5ea;  /* lavender "star" accent */
  --accent-ink: #c9bff2;  /* lighter accent for hover */

  /* Type */
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing / layout */
  --container: 1200px;
  --gutter: 20px;          /* inset gutter outside the bordered shell */
  --pad: clamp(20px, 4vw, 48px);
  --section-y: clamp(56px, 8vw, 104px);
  --radius: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

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

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Bordered-grid shell ----------
   Each band paints the obsidian canvas edge-to-edge with a small
   inset gutter; the inner .container carries the vertical hairlines
   so a continuous grid line runs down both sides of the page. */
.band { background: var(--bg); padding-inline: var(--gutter); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}
.band + .band .container,
.band--divide .container { border-top: 1px solid var(--line); }

.pad { padding: var(--section-y) var(--pad); }
.pad--flush { padding-bottom: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -48px;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; z-index: 100;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-inline: var(--gutter);
}
.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
  padding-inline: var(--pad);
}

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--ink); color: var(--bg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem; line-height: 1;
}
.brand-name { font-size: 1rem; letter-spacing: -0.01em; }

/* Nav */
.nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a {
  font-size: 0.92rem; color: var(--muted);
  transition: color .2s var(--ease);
}
.nav-menu a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  background: var(--ebony);
  border: 1px solid var(--charcoal);
  padding: 9px 18px; border-radius: 8px;
  font-weight: 600;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.nav-cta:hover { background: color-mix(in srgb, var(--ebony) 80%, #fff 6%); border-color: var(--muted); }

/* Lavender underline grows on hover (desktop nav) */
@media (min-width: 621px) {
  .nav-menu a:not(.nav-cta) { position: relative; }
  .nav-menu a:not(.nav-cta)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
    background: var(--accent); transform: scaleX(0); transform-origin: left;
    transition: transform .25s var(--ease);
  }
  .nav-menu a:not(.nav-cta):hover::after { transform: scaleX(1); }
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; cursor: pointer;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero .container { position: relative; overflow: hidden; }
.hero .container::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(55% 75% at 80% 38%, rgba(178, 165, 234, 0.14), transparent 70%);
  animation: hero-glow 9s ease-in-out infinite alternate;
}
@keyframes hero-glow { from { opacity: 0.5; } to { opacity: 1; } }
.hero-map {
  position: absolute; z-index: 0; pointer-events: none;
  top: 50%; right: -6%; transform: translateY(-50%);
  width: min(80%, 940px); aspect-ratio: 1320 / 667;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 50%), linear-gradient(to bottom, transparent, #000 20%, #000 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 50%), linear-gradient(to bottom, transparent, #000 20%, #000 82%, transparent);
  mask-composite: intersect;
}
.hero-map-dots { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0.5; }
.hero-map-arcs { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner {
  position: relative; z-index: 1;
  padding: clamp(64px, 11vw, 132px) var(--pad);
  max-width: 62ch;
}
@media (max-width: 760px) {
  .hero-map { width: 132%; right: -26%; top: 58%; }
  .hero-map-dots { opacity: 0.28; }
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 1.4rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted-2);
  max-width: 54ch;
  line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.4rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding-inline: 26px; border-radius: 8px;
  font-size: 0.95rem; font-weight: 600;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease), box-shadow .25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ebony); color: var(--ink); border-color: var(--charcoal); }
.btn-primary:hover {
  background: color-mix(in srgb, var(--ebony) 78%, #fff 8%); border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(178, 165, 234, 0.35), 0 12px 30px -10px rgba(178, 165, 234, 0.45);
}
.btn-ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover {
  border-color: var(--accent); background: color-mix(in srgb, var(--surface-2) 80%, #fff 6%);
  box-shadow: 0 0 0 1px rgba(178, 165, 234, 0.18);
}

/* ---------- Section heads ---------- */
.section-head { max-width: 60ch; margin-bottom: clamp(36px, 5vw, 60px); }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
.section-intro { margin-top: 1.1rem; color: var(--muted); font-size: 1.1rem; }

/* Two-column (about / contact) */
.two-col {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(28px, 5vw, 72px);
}
.col-label .eyebrow { margin-bottom: 0; }
.col-body .lead {
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  line-height: 1.4; letter-spacing: -0.01em;
  margin-bottom: 1.4rem; color: var(--ink);
}
.col-body p + p { margin-top: 1.2rem; }
.col-body p { color: var(--muted-2); }
.col-body .section-title { margin-bottom: 1.4rem; }

/* Scope-of-services statement (for compliance / bank review) */
.scope-note {
  margin-top: 2rem;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-2) !important;
  font-size: 1rem; line-height: 1.6;
}

/* ---------- Service cards (bordered grid) ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.card {
  position: relative;
  padding: clamp(26px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.card::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
/* remove the right border on the last card of each row of 3 */
.card:nth-child(3n) { border-right: 0; }
.card:hover { background: var(--surface); transform: translateY(-3px); }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--accent); margin-bottom: 18px;
  font-family: Georgia, serif; font-style: italic; font-size: 1.05rem;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover .card-icon {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 1px rgba(178, 165, 234, 0.18), 0 0 22px -2px rgba(178, 165, 234, 0.28);
}
.card-title { font-size: 1.2rem; margin-bottom: 0.55rem; }
.card-text { color: var(--muted); font-size: 0.97rem; }

/* ---------- Principles ---------- */
.principles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.principle { position: relative; border-top: 2px solid var(--line); padding-top: 22px; }
.principle::before {
  content: ""; position: absolute; top: -2px; left: 0; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .8s var(--ease) .15s;
}
.principle.is-visible::before { transform: scaleX(1); }
.principle-num {
  display: block; font-size: 0.95rem; color: var(--accent);
  font-style: italic; font-family: Georgia, serif; margin-bottom: 12px;
}
.principle-title { font-size: 1.25rem; margin-bottom: 0.6rem; }
.principle-text { color: var(--muted); font-size: 1rem; }

/* ---------- FAQ (pure-CSS accordion) ---------- */
.faq-list { border-top: 1px solid var(--line); margin-top: 0.5rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 2px; font-size: 1.08rem; font-weight: 500; color: var(--ink);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+"; color: var(--accent);
  font-size: 1.5rem; line-height: 1; font-weight: 400;
  transition: transform .25s var(--ease);
}
.faq-item[open] > summary::after { content: "\2212"; }
.faq-item[open] > summary { color: var(--accent-ink); }
.faq-item > summary:hover { color: var(--accent-ink); }
.faq-answer { padding: 0 2px 24px; color: var(--muted); max-width: 68ch; }
.faq-item[open] > .faq-answer { animation: faq-in .35s var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- World map arcs (used in hero) ---------- */
.wm-path {
  stroke: url(#wm-line); stroke-width: 1.5; fill: none;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: wm-draw 1.4s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes wm-draw { to { stroke-dashoffset: 0; } }
.wm-dot { fill: #b2a5ea; }
.wm-pulse { fill: #b2a5ea; animation: wm-pulse 2.6s ease-out infinite; }
@keyframes wm-pulse {
  0%   { r: 2; opacity: 0.6; }
  100% { r: 9; opacity: 0; }
}

/* ---------- Contact ---------- */
.contact-details {
  margin-top: 2.4rem; display: grid; gap: 24px;
  border-top: 1px solid var(--line); padding-top: 2rem;
}
.contact-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: baseline; }
.contact-key {
  font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted);
}
.contact-val { font-size: 1.05rem; color: var(--muted-2); }
a.contact-val { color: var(--accent); transition: color .2s var(--ease); }
a.contact-val:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); padding-inline: var(--gutter); }
.footer-inner {
  max-width: var(--container); margin-inline: auto;
  border: 1px solid var(--line); border-top: 0;
  background: var(--bg-alt);
}
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.footer-cell { padding: clamp(28px, 4vw, 48px) var(--pad); }
.footer-cell + .footer-cell { border-left: 1px solid var(--line); }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; margin-bottom: 14px; }
.footer-brand .brand-mark { background: var(--ink); color: var(--bg); }
.footer-tag { color: var(--muted); font-size: 0.95rem; max-width: 40ch; }
.footer-col-title {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); margin-bottom: 16px;
}
.footer-nav { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-nav a, .footer-nav span { color: var(--muted-2); font-size: 0.97rem; }
.footer-nav a { position: relative; transition: color .2s var(--ease); }
.footer-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.footer-nav a:hover { color: var(--ink); }
.footer-nav a:hover::after { transform: scaleX(1); }
.footer-bottom {
  padding: 22px var(--pad);
  color: var(--muted); font-size: 0.85rem;
}
.footer-bottom-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}

/* ---------- Scroll reveal ----------
   Scoped to .js so the page is fully visible without JavaScript. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Subtle staggered cascade within grids */
.js .card-grid .card.reveal:nth-child(2) { transition-delay: .07s; }
.js .card-grid .card.reveal:nth-child(3) { transition-delay: .14s; }
.js .card-grid .card.reveal:nth-child(4) { transition-delay: .07s; }
.js .card-grid .card.reveal:nth-child(5) { transition-delay: .14s; }
.js .card-grid .card.reveal:nth-child(6) { transition-delay: .21s; }
.js .principles .principle.reveal:nth-child(2) { transition-delay: .12s; }
.js .principles .principle.reveal:nth-child(3) { transition-delay: .24s; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(3n) { border-right: 1px solid var(--line); }
  .card:nth-child(2n) { border-right: 0; }
  .principles { grid-template-columns: 1fr; gap: 28px; }
  .two-col { grid-template-columns: 1fr; gap: 18px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-cell:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .footer-cell:nth-child(2) { border-left: 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  /* Mobile nav */
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 24px;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .nav-menu li { border-top: 1px solid var(--line); }
  .nav-menu li:first-child { border-top: 0; }
  .nav-menu a { display: block; padding: 15px 2px; font-size: 1.05rem; }
  .nav-cta {
    background: none !important; border: 0 !important;
    padding: 15px 2px !important; border-radius: 0 !important;
    text-align: left;
  }
  .nav-cta:hover { color: var(--accent) !important; }

  .card-grid { grid-template-columns: 1fr; }
  .card:nth-child(n) { border-right: 0; }
  .contact-item { grid-template-columns: 1fr; gap: 4px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-cell { border-left: 0 !important; }
  .footer-cell:not(:last-child) { border-bottom: 1px solid var(--line); }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .wm-path { animation: none; stroke-dashoffset: 0; }
  .wm-pulse { animation: none; opacity: 0; }
  .hero .container::before { animation: none; }
  html { scroll-behavior: auto; }
}

html { scroll-behavior: smooth; }
