/* ============================================================
   BAKLOK ADVISORS — DESIGN SYSTEM
   Brand tokens, base reset, global components
   ============================================================ */

/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600&display=swap');

/* --- DESIGN TOKENS --- */
:root {
  /* Brand Colours */
  --red:          #da0000;
  --red-hover:    #b80000;
  --text-dark:    #000000;
  --text-heading: #000000;
  --grey-light:   #F6F7F8;
  --near-white:   #F7F3F5;
  --dark-grey:    #000000;
  --gold:         #A08B72;  /* warm stone — replaces saturated gold */
  --dark-hero:    #272727;
  --white:        #ffffff;

  /* Typography */
  --font-display: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-label:   'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Open Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Type Scale */
  --text-nav:        11px;
  --text-label:      clamp(0.6875rem, 0.65rem + 0.18vw, 0.8125rem); /* 11–13px */
  --text-body:       1.125rem;  /* 18px fixed per spec */
  --text-section:    clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --text-h1:         clamp(2.75rem, 2rem + 2.5vw, 3.375rem); /* 44–54px */
  --text-pullquote:  clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); /* 20–24px */
  --text-card-title: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Section padding per spec: ≥80px desktop, ≥50px mobile */
  --section-pad: clamp(3.125rem, 7vw, 6rem);

  /* Layouts */
  --max-width:  1140px;
  --body-width: 720px;
  --nav-height: 72px;

  /* Borders */
  --radius-btn:  2px;
  --radius-card: 3px;

  /* Transition */
  --ease: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- BASE RESET --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  hanging-punctuation: first last;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.85;
  color: var(--text-dark);
  background: var(--white);
}

img, picture, video, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; transition: color var(--ease); }
button { cursor: pointer; font: inherit; border: none; background: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-heading);
  text-wrap: balance;
  line-height: 1.15;
}

p, li {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: rgba(218, 0, 0, 0.12);
  color: var(--text-dark);
}

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

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

/* --- LAYOUT CONTAINER --- */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(var(--sp-6), 5vw, var(--sp-16));
}

.wrap--body {
  max-width: var(--body-width);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid rgba(69,62,62,0.08);
  height: var(--nav-height);
  transition: box-shadow var(--ease);
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(39,39,39,0.07);
}

.nav__inner {
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(var(--sp-6), 5vw, var(--sp-16));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
  text-decoration: none;
}

.nav__logo-mark { width: 40px; height: 40px; flex-shrink: 0; object-fit: contain; }

.nav__logo-word {
  font-family: var(--font-label);
  font-size: 1.1875rem;
  font-weight: 600;
  color: #000000;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

/* Desktop links */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
}

.nav__link {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-heading);
  transition: color var(--ease);
  white-space: nowrap;
  padding: var(--sp-1) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.nav__link:hover { color: var(--red); }
.nav__link.active { color: var(--red); border-bottom-color: var(--red); }

/* Mobile hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
  cursor: pointer;
  background: none;
  border: none;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-heading);
  transition: transform var(--ease), opacity var(--ease);
}

.nav__burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.nav__drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  padding: var(--sp-8) clamp(var(--sp-6), 5vw, var(--sp-16));
  border-bottom: 1px solid rgba(69,62,62,0.08);
  box-shadow: 0 8px 32px rgba(39,39,39,0.1);
  z-index: 199;
  flex-direction: column;
  gap: 0;
}

.nav__drawer.open { display: flex; }

.nav__drawer-link {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-heading);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid rgba(69,62,62,0.06);
  transition: color var(--ease);
}

.nav__drawer-link:last-child { border-bottom: none; }
.nav__drawer-link:hover, .nav__drawer-link.active { color: var(--red); }

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--text-dark);
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-8);
  align-items: start;
}

/* Logo column */
.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer__logo-img {
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.footer__logo-word {
  font-family: var(--font-label);
  font-size: 1.0625rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.025em;
}

/* Nav column */
.footer__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

.footer__nav-link {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #ffffff;
  transition: color var(--ease);
}

.footer__nav-link:hover { color: rgba(255,255,255,0.9); }

/* Idiom column */
.footer__idiom {
  text-align: right;
}

.footer__idiom-cn {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.375rem;
  color: #ffffff;
  letter-spacing: 0.12em;
  display: block;
  line-height: 1.4;
}

.footer__idiom-en {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  color: #ffffff;
  letter-spacing: 0.06em;
  margin-top: var(--sp-2);
  font-style: normal;
}

/* Copyright */
.footer__copy {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-10);
  }
  .footer__logo { justify-content: center; }
  .footer__idiom { text-align: center; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding-block: var(--section-pad);
}

.section--hero {
  background: var(--near-white);
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.section--white { background: var(--white); }
.section--offset { background: var(--grey-light); }
.section--dark { background: var(--dark-hero); }

/* ============================================================
   TYPOGRAPHY COMPONENTS
   ============================================================ */

/* Eyebrow */
.eyebrow {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--dark-grey);
  display: block;
  margin-bottom: var(--sp-5);
}

.eyebrow--white { color: #ffffff; }

/* H1 hero — with red left border */
.h1-hero {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.1;
  max-width: 760px;
  border-left: 4px solid var(--red);
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-6);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* H1 plain (no border) */
.h1-plain {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.1;
  margin-bottom: var(--sp-4);
  letter-spacing: -0.01em;
}

/* Section heading H2 */
.h2 {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-8);
  line-height: 1.2;
}

.h2--white { color: #fff; }

/* Meta tags (Finance · Legal · Technology) */
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  margin-top: var(--sp-4);
}

.meta-tag {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--dark-grey);
}

.meta-tag + .meta-tag::before {
  content: '·';
  margin-right: var(--sp-3);
  color: var(--red);
  opacity: 0.7;
}

/* Red section rule */
.rule {
  display: block;
  width: 40px;
  height: 3px;
  background: var(--red);
  margin-bottom: var(--sp-8);
}

/* Body text grouping */
.prose p {
  font-size: var(--text-body);
  line-height: 1.85;
  color: var(--text-dark);
  margin-bottom: var(--sp-5);
  max-width: 72ch;
}

.prose p:last-child { margin-bottom: 0; }

/* Pull quote */
.pullquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-pullquote);
  color: #000000;
  border-left: 3px solid var(--gold);
  padding-left: var(--sp-6);
  margin-left: clamp(0px, 5.5vw, 60px);
  margin-block: var(--sp-10);
  max-width: 580px;
  line-height: 1.55;
}

/* ============================================================
   CREDENTIALS BAR
   ============================================================ */
.creds-bar {
  border-bottom: 3px solid var(--red);
  padding-bottom: var(--sp-10);
}

.creds-bar__label {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--dark-grey);
  margin-bottom: var(--sp-4);
}

.creds-bar__items {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: #000000;
  line-height: 1.85;
  max-width: none;
}

/* ============================================================
   ENGAGEMENTS LIST
   ============================================================ */
.engagements {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-block: var(--sp-8);
}

.engagement {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0 var(--sp-6);
  padding-block: var(--sp-5);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.engagement:first-child {
  border-top: 1px solid rgba(0,0,0,0.08);
}

.engagement__date {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dark-grey);
  padding-top: 3px;
  white-space: nowrap;
}

.engagement__desc {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: #000000;
}

@media (max-width: 768px) {
  .engagement {
    grid-template-columns: 1fr;
    gap: var(--sp-1) 0;
  }
  .engagement__date {
    font-size: 10px;
  }
}

/* ============================================================
   LINEAGE ITEMS
   ============================================================ */
.lineage {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  margin-block: var(--sp-10);
}

.lineage-item {
  padding-left: var(--sp-6);
  border-left: 3px solid rgba(69,62,62,0.14);
}

.lineage-item__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-card-title);
  color: var(--text-heading);
  margin-bottom: var(--sp-2);
}

.lineage-item__desc {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--dark-grey);
}

/* ============================================================
   INSET CARD (伯乐识马)
   ============================================================ */
.inset-card {
  background: #272727;
  padding: var(--sp-10) var(--sp-12);
  margin-block: var(--sp-10);
  max-width: 480px;
  border-left: 3px solid var(--gold);
}

.inset-card__cn {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.875rem;
  color: #ffffff;
  letter-spacing: 0.18em;
  display: block;
  margin-bottom: var(--sp-3);
}

.inset-card__en {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ffffff;
}

/* ============================================================
   CTA BUTTON
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn--red {
  background: var(--red);
  color: #fff;
}

.btn--red:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(218,0,0,0.25);
}

.btn--outline {
  background: transparent;
  color: #000000;
  border: 1.5px solid #000000;
}

.btn--outline:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn--outline-white {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid #ffffff;
}

.btn--outline-white:hover {
  background: #ffffff;
  color: #000000;
  transform: translateY(-1px);
}

.cta-pair {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}

.btn--red:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ============================================================
   ON INQUIRY (DARK SECTION)
   ============================================================ */
.dark-prose p {
  font-size: var(--text-body);
  line-height: 1.85;
  color: #ffffff;
  margin-bottom: var(--sp-5);
  max-width: 65ch;
}

.dark-prose p:last-child { margin-bottom: 0; }

.dark-close {
  margin-top: var(--sp-8);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.0625rem;
  color: #ffffff;
  max-width: 480px;
  line-height: 1.65;
}

/* ============================================================
   CREDENTIALS CARDS (Paul Kam)
   ============================================================ */
.cred-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-10);
}

.cred-card {
  background: var(--grey-light);
  padding: var(--sp-6) var(--sp-6) var(--sp-6);
  border-top: 3px solid var(--red);
}

.cred-card__label {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--dark-grey);
  margin-bottom: var(--sp-3);
}

.cred-card__value {
  font-family: var(--font-display);
  font-size: var(--text-card-title);
  color: var(--text-heading);
  line-height: 1.25;
}

.cred-card__sub {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--dark-grey);
  margin-top: var(--sp-1);
  line-height: 1.5;
}

/* ============================================================
   BOARDROOM SKILLS — SPECIFIC
   ============================================================ */

/* "This is not" list */
.not-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.not-list li {
  font-size: var(--text-body);
  color: var(--dark-grey);
  padding-left: var(--sp-6);
  position: relative;
  max-width: none;
}

.not-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--red);
}

/* Skills grid — explicit 2×2 for editorial balance */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-10);
}

.skill-card {
  padding: var(--sp-8) var(--sp-6);
  border-top: 3px solid var(--red);
  background: var(--white);
}

.skill-card__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.skill-card__title {
  font-family: var(--font-display);
  font-size: var(--text-card-title);
  font-weight: 700;
  color: var(--text-heading);
}

.skill-card__cn {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: #000000;
}

.skill-card__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--dark-grey);
}

/* Feature list (Boardroom Skills) */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-block: var(--sp-6);
}

.feature-list li {
  font-size: var(--text-body);
  color: var(--text-dark);
  padding-left: var(--sp-6);
  border-left: 2px solid var(--red);
  line-height: 1.75;
  max-width: 65ch;
}

/* Programme table */
.prog-table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
  margin-block: var(--sp-8);
}

.prog-table tr {
  border-bottom: 1px solid rgba(69,62,62,0.09);
}

.prog-table tr:last-child { border-bottom: none; }

.prog-table td {
  padding: var(--sp-4) var(--sp-4) var(--sp-4) 0;
  font-size: var(--text-body);
  vertical-align: top;
  line-height: 1.7;
}

.prog-table td:first-child {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dark-grey);
  white-space: nowrap;
  width: 34%;
  padding-top: var(--sp-5);
}

.prog-note {
  font-size: 0.9375rem;
  color: var(--dark-grey);
  font-style: italic;
  margin-top: var(--sp-4);
}

/* ============================================================
   CONTACT — FORM
   ============================================================ */
.contact-intro p {
  font-size: var(--text-body);
  line-height: 1.85;
  color: var(--text-dark);
  margin-bottom: var(--sp-4);
  max-width: 65ch;
}

.form-wrap {
  margin-top: var(--sp-10);
  max-width: var(--body-width);
}

.form-email {
  display: inline-block;
  margin-top: var(--sp-6);
  font-size: var(--text-body);
  color: var(--text-heading);
  border-bottom: 1px solid rgba(69,62,62,0.2);
  padding-bottom: 2px;
  transition: color var(--ease), border-color var(--ease);
}

.form-email:hover {
  color: var(--red);
  border-color: var(--red);
}

/* HubSpot form styling override */
.hbspt-form .hs-form {
  font-family: var(--font-body) !important;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.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;
}

.h2--tight { margin-bottom: var(--sp-4) !important; }

.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mt-10 { margin-top: var(--sp-10); }
.mt-12 { margin-top: var(--sp-12); }

/* Two-column layout helper */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: start;
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: var(--sp-8); }
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
  .pullquote {
    margin-left: 0;
  }
  /* Prevent H1 hero from overflowing narrow viewports */
  .h1-hero {
    font-size: clamp(1.75rem, 1.2rem + 4.5vw, 2.75rem);
    padding-left: var(--sp-4);
  }
  .h1-plain {
    font-size: clamp(1.75rem, 1.2rem + 4.5vw, 2.75rem);
  }
  .inset-card {
    padding: var(--sp-8) var(--sp-8);
    max-width: 100%;
  }
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cred-cards {
    grid-template-columns: 1fr 1fr;
  }
  .prog-table td:first-child { width: 38%; font-size: 10px; }
}

@media (max-width: 480px) {
  .cred-cards { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .meta-tags { flex-wrap: wrap; gap: var(--sp-2); }
  .meta-tag + .meta-tag::before { display: none; }
}
