@import url('../fonts/montserrat.css');

/* ==========================================================================
   Bar Capital — design system
   Colours and type are lifted from the Divi build they replace.
   ========================================================================== */

:root {
  /* Brand palette */
  --pink:    #eb649f;
  --crimson: #c90d59;
  --maroon:  #70143d;
  --teal:    #2095ae;
  --navy:    #073243;
  --slate:   #6a97b8;

  --ink:     #222;
  --body:    #666;
  --rule:    #333;
  --white:   #fff;

  /* Accent — overridden per page via [data-accent] */
  --accent:     var(--teal);
  --accent-ink: var(--teal);

  --shell:   1382px;
  --gutter:  clamp(1.5rem, 5vw, 4rem);

  --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-accent="crimson"] { --accent: var(--crimson); --accent-ink: var(--crimson); }
[data-accent="maroon"]  { --accent: var(--maroon);  --accent-ink: var(--maroon); }
[data-accent="teal"]    { --accent: var(--teal);    --accent-ink: var(--teal); }
[data-accent="navy"]    { --accent: var(--navy);    --accent-ink: var(--navy); }
[data-accent="slate"]   { --accent: var(--slate);   --accent-ink: var(--slate); }
[data-accent="pink"]    { --accent: var(--pink);    --accent-ink: var(--crimson); }

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; color: var(--ink); }
p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

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

.visually-hidden {
  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: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .8rem 1.4rem; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* -------------------------------------------------------------- layout -- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--flush { padding-block: 0; }

/* -------------------------------------------------------------- header -- */

.masthead {
  position: absolute; inset: 0 0 auto; z-index: 60;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  pointer-events: none;
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; pointer-events: none;
}
.masthead__inner > * { pointer-events: auto; }

/* Three-column grid keeps the burger inside the gutter. Absolute positioning
   would resolve against the padding box and push it off the right edge — which
   is exactly how the Divi build lost its menu on interior pages. */
.masthead--centred .masthead__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.masthead--centred .brand { grid-column: 2; justify-self: center; }
.masthead--centred .nav-toggle { grid-column: 3; justify-self: end; }

.brand { display: inline-block; line-height: 0; }
.brand img { width: 115px; }

/* Burger */
.nav-toggle {
  position: relative; width: 46px; height: 34px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.nav-toggle span {
  position: absolute; left: 0; display: block;
  width: 100%; height: 4px; border-radius: 9px;
  background: var(--ink);
  transition: transform .18s var(--ease), opacity .12s var(--ease), background-color .18s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 30px; }

.masthead--on-dark .nav-toggle span { background: var(--white); }

.nav-toggle[aria-expanded="true"] span { background: var(--white); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 15px; transform: rotate(135deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 15px; transform: rotate(-135deg); }

/* Slide-in navigation */
.nav-panel {
  position: fixed; inset: 0 0 0 auto; z-index: 55;
  width: min(285px, 82vw);
  background: #000;
  display: flex; align-items: center;
  transform: translateX(100%);
  transition: transform .32s var(--ease);
  overflow-y: auto;
}
.nav-panel[data-open="true"] { transform: translateX(0); }

.nav-panel ul { list-style: none; margin: 0; padding: 2rem 0; width: 100%; }
.nav-panel a {
  display: block; padding: .95rem 1.75rem;
  color: var(--white); font-size: 14.4px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; text-align: center;
}
.nav-panel a:hover,
.nav-panel a[aria-current="page"] { color: var(--pink); text-decoration: none; }

.nav-scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden;
  transition: opacity .32s var(--ease), visibility .32s var(--ease);
}
.nav-scrim[data-open="true"] { opacity: 1; visibility: visible; }

body.nav-open { overflow: hidden; }

/* ---------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: clamp(420px, 62vw, 600px);
  padding-block: clamp(7rem, 16vw, 15.6rem) clamp(2.5rem, 5vw, 3.1rem);
  background: var(--accent) center / cover no-repeat;
  color: var(--white);
  overflow: hidden;
}
.hero--image { background-attachment: scroll; }
.hero--tall { min-height: clamp(480px, 70vw, 740px); }

/* The Divi hero sat 160px from the left edge, not inside the page shell. */
.hero .shell {
  max-width: none;
  padding-inline: clamp(1.5rem, 11vw, 160px);
}

/* Divi set the hero at weight 500 and bolded individual lines with <strong>. */
.hero__title {
  max-width: 1100px;
  font-size: clamp(2.125rem, 4.45vw, 4rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--white);
}
.hero__title strong { display: block; font-weight: 700; }
.hero__title span { display: block; }

/* Bio pages lead with a 52px surname above the 64px role line. */
.hero__eyebrow {
  display: block;
  font-size: clamp(1.75rem, 3.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
}

.hero--centred-brand { align-items: flex-start; }

/* -------------------------------------------------------------- bands -- */

.band { background: var(--accent); color: var(--white); }
.band--pink    { background: var(--pink); }
.band--crimson { background: var(--crimson); }
.band--maroon  { background: var(--maroon); }
.band--teal    { background: var(--teal); }
.band--navy    { background: var(--navy); }
.band--slate   { background: var(--slate); }
.band h2, .band h3, .band p { color: var(--white); }

/* Statement band: mark + oversized line (homepage) */
.statement {
  display: grid; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
  padding-block: clamp(2.5rem, 4vw, 3.5625rem);
}
.statement__mark { width: clamp(76px, 9vw, 128px); justify-self: center; }
.statement__text {
  margin: 0;
  max-width: 700px;
  font-size: clamp(1.5rem, 3.26vw, 2.9375rem);
  font-weight: 700; line-height: 1.5; color: var(--white);
}
@media (min-width: 981px) {
  .statement { grid-template-columns: 20% minmax(0, 1fr); }
  .statement__mark { justify-self: start; }
}

/* ------------------------------------------------------------- splits -- */

/* Eyebrow + heading on the left, prose on the right, hairline above. */
.split {
  display: grid; gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 2px solid currentColor;
}
.band .split { border-top-color: rgba(255, 255, 255, .55); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(2rem, 6vw, 5rem); }
}

.split__aside { color: var(--accent-ink); }
.band .split__aside { color: var(--white); }

.eyebrow {
  margin: 0 0 .35rem;
  font-size: .875rem; font-weight: 700; line-height: 1.4;
  letter-spacing: .09em; text-transform: uppercase;
  color: inherit;
}

.split__title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 800; line-height: 1.15; text-transform: uppercase;
  color: inherit;
}
.split__title--sentence { text-transform: none; font-weight: 700; }

.split__note {
  margin-top: clamp(1.5rem, 4vw, 3.5rem);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 700; line-height: 1.45;
  color: inherit;
}

.split__body { color: var(--body); }
.band .split__body { color: var(--white); }
.split__body > p + p { margin-top: 1.4em; }

/* ---------------------------------------------------------- tile grid -- */

.tiles { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tile {
  display: flex; flex-direction: column; justify-content: center;
  gap: 0;
  min-height: 418px;
  padding: clamp(2.5rem, 7vw, 6.25rem);
  color: var(--white);
  text-decoration: none;
  transition: filter .25s var(--ease);
}
.tile:hover { filter: brightness(1.08); text-decoration: none; }
.tile:hover .btn { background: var(--white); color: var(--ink); }

.tile--slate   { background: var(--slate); }
.tile--crimson { background: var(--crimson); }
.tile--maroon  { background: var(--maroon); }
.tile--navy    { background: var(--navy); }

.tile__text {
  margin: 0;
  font-size: clamp(1.375rem, 2.4vw, 2.125rem);
  font-weight: 600; line-height: 1.2; color: var(--white);
}

/* ------------------------------------------------------------ buttons -- */

/* Divi rendered these as bare uppercase text with a trailing arrow glyph —
   no border, no fill. */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  align-self: flex-start;
  padding: 15px 0 6px;
  font-family: inherit;
  font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 700;
  text-transform: uppercase;
  color: var(--white); background: none; border: 0;
  cursor: pointer; text-decoration: none;
  transition: gap .2s var(--ease), opacity .2s var(--ease);
}
.btn:hover { text-decoration: none; opacity: .82; gap: 1em; }
.btn::after { content: '\2192'; font-weight: 400; }

.btn--solid {
  padding: .85rem 2rem; border: 3px solid var(--accent);
  background: var(--accent); color: var(--white);
}
.btn--solid:hover { background: transparent; color: var(--accent); opacity: 1; }
.btn--solid::after { content: ''; }

.btn--ink { color: var(--ink); }
.btn--accent { color: var(--accent-ink); }

/* ------------------------------------------------------------ cta band -- */

.cta { padding-block: clamp(2.5rem, 5vw, 3.375rem); }
.cta__inner { display: grid; gap: 1.5rem; justify-items: start; }
.cta__title {
  max-width: 22ch;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800; line-height: 1.2; color: var(--white);
}
.cta hr {
  width: 100%; height: 0; margin: 0 0 1.5rem;
  border: 0; border-top: 2px solid rgba(255, 255, 255, .55);
}

/* --------------------------------------------------------------- team -- */

.team-grid {
  display: grid; gap: clamp(2rem, 6vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.person { display: block; color: var(--white); text-decoration: none; }
.person:hover { text-decoration: none; }
.person img { width: 100%; max-width: 340px; aspect-ratio: 1; object-fit: cover; }
.person__name {
  margin-top: 1.5rem;
  font-size: 1.25rem; font-weight: 700; line-height: 1.35; color: var(--white);
}
.person__name small { display: block; font-size: inherit; font-weight: 700; }
.person__role { margin-top: .35rem; font-size: 1.0625rem; color: var(--white); }
.person__role::after { content: ' \25B8'; }
.person:hover .person__role { text-decoration: underline; }

/* Bio page */
.bio { display: grid; gap: clamp(2rem, 5vw, 3.5rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .bio { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }

.bio__facts { list-style: none; margin: 0; padding: 0; }
.bio__facts > li + li { margin-top: 2rem; }
.bio__facts dt {
  font-size: .8125rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent-ink);
}
.bio__facts dd {
  margin: .5rem 0 0; font-size: .9375rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}
.bio__facts dd + dd { margin-top: .2rem; }

.bio__portrait { width: 100%; max-width: 420px; }

.social {
  display: flex; gap: 1rem; align-items: center;
  margin-top: 2rem; padding: 0; list-style: none;
}
.social a { font-weight: 700; color: var(--accent-ink); }

/* --------------------------------------------------------------- form -- */

.form { display: grid; gap: 1.5rem 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form__field--wide { grid-column: 1 / -1; }

.form label {
  display: block; margin-bottom: .5rem;
  font-size: .875rem; font-weight: 700; color: var(--ink);
}
.form label .req { color: var(--crimson); }

.form input,
.form textarea {
  width: 100%; padding: .8rem 1rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white);
  border: 1px solid #bbb; border-radius: 0;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.form input:focus,
.form textarea:focus {
  border-color: var(--accent); outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.form textarea { min-height: 190px; resize: vertical; }

.form__actions { grid-column: 1 / -1; }

/* Anti-spam honeypot — hidden from people, visible to naive bots. */
.form__hp {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.form__status { grid-column: 1 / -1; margin: 0; font-weight: 700; }
.form__status[data-state="error"]   { color: var(--crimson); }
.form__status[data-state="success"] { color: var(--teal); }
.form__status:empty { display: none; }

/* ------------------------------------------------------------- footer -- */

.site-footer { padding-block: 1.5rem; background: var(--white); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem 2rem;
}
.site-footer__left { display: flex; align-items: center; gap: .9rem; }
.site-footer__mark { width: 38px; }
.site-footer small,
.site-footer a { font-size: 14px; font-weight: 700; color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.site-footer nav a:hover { color: var(--accent-ink); }
.site-footer nav span[aria-hidden] { color: var(--ink); }

/* --------------------------------------------------------- misc pages -- */

.prose { max-width: 70ch; }
.prose h2 { margin: 2.5rem 0 1rem; font-size: 1.5rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .5rem; }

.criteria { margin: 0; padding-left: 1.25rem; }
.criteria li { margin-bottom: 1rem; }

.doc-frame {
  width: 100%; height: min(80vh, 1000px);
  border: 1px solid #ddd; background: #f6f6f6;
}

.video-block { background: #000; }
.video-block video { width: 100%; max-height: 78vh; }

.process { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.process li {
  position: relative; padding-left: 3.25rem; margin-bottom: 1.6rem;
}
.process li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: .1em;
  font-size: 1rem; font-weight: 800; color: var(--accent-ink);
}

.pair { display: grid; gap: clamp(1rem, 3vw, 2rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pair__card {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem;
  min-height: 260px; padding: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--white); text-decoration: none;
}
.pair__card:hover { text-decoration: none; filter: brightness(1.08); }
.pair__card span { font-size: 1rem; font-weight: 600; opacity: .85; }
.pair__card strong { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.1; }

.disclosure {
  padding-block: clamp(2rem, 5vw, 3rem);
  font-size: .9375rem; line-height: 1.65; color: var(--body);
}
.disclosure a { text-decoration: underline; }

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