/* All Brands Consultants
   ------------------------------------------------------------------
   Fonts: the site falls back to fonts already on the visitor's device.
   To self-host (recommended), put the .woff2 files in /fonts and
   uncomment the @font-face blocks below.

@font-face { font-family: "Display"; src: url("../fonts/display-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Text"; src: url("../fonts/text-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Text"; src: url("../fonts/text-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
*/

:root {
  --ink: #0a1018;          /* page */
  --ink-2: #101924;        /* raised surfaces */
  --ivory: #ece7dc;        /* text */
  --stone: #9aa3ad;        /* secondary text */
  --rule: rgba(236, 231, 220, .14);
  --brass: #c2a36b;        /* accent */
  --brass-deep: #8f7646;
  --signal: #86c9b6;       /* "open" status */

  --display: "Display", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --text: "Text", "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  --figures: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --band: clamp(72px, 11vw, 148px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.nowrap { white-space: nowrap; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.top, main, .foot { position: relative; z-index: 1; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 20; background: var(--ivory); color: var(--ink); padding: 10px 16px; }
.skip:focus { left: 12px; top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
  background: rgba(10, 16, 24, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 22px; height: 22px; border: 1px solid var(--brass); border-radius: 50%; position: relative; flex: none;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; border-radius: 50%; background: var(--brass);
}
.brand-mark::before { width: 6px; height: 6px; left: 7px; top: 7px; }
.brand-mark::after { width: 1px; height: 8px; left: 10px; top: -5px; border-radius: 0; }
.brand-name { font: 400 19px/1 var(--display); letter-spacing: .01em; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); font-size: 14.5px; }
.nav a { text-decoration: none; color: var(--stone); transition: color .2s; }
.nav a:hover { color: var(--ivory); }
.nav .nav-cta { color: var(--ivory); border: 1px solid var(--rule); padding: 9px 16px; border-radius: 2px; transition: border-color .2s, color .2s; }
.nav .nav-cta:hover { border-color: var(--brass); color: var(--brass); }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); padding: 8px 14px; border-radius: 2px; font-size: 14px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 15px/1 var(--text); text-decoration: none; cursor: pointer;
  padding: 16px 26px; border-radius: 2px; border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--brass); color: #0b0f15; border-color: var(--brass); }
.btn-solid:hover { background: var(--ivory); border-color: var(--ivory); }
.btn-line { background: transparent; border-color: var(--rule); color: var(--ivory); padding: 11px 16px; font-size: 14px; white-space: nowrap; }
.btn-line:hover { border-color: var(--brass); color: var(--brass); }
.btn[disabled] { opacity: .55; cursor: default; }
.text-link { color: var(--brass); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--ivory); }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 120px; }
.hero-inner { width: 100%; padding-bottom: clamp(48px, 9vh, 110px); }
.hero-brand { font: 400 clamp(17px, 1.6vw, 21px)/1.2 var(--display); color: var(--brass); margin-bottom: clamp(18px, 3vh, 30px); }
h1 {
  font: 300 clamp(46px, 9.4vw, 136px)/.98 var(--display);
  letter-spacing: -.022em; max-width: 11ch; margin-bottom: clamp(32px, 6vh, 56px);
  text-wrap: balance;
}

.ticker {
  display: flex; align-items: stretch; text-decoration: none;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: rgba(10, 16, 24, .78);
  font-size: 13.5px; color: var(--stone);
}
.ticker-label, .ticker-more { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px var(--gutter); color: var(--ivory); }
.ticker-label { border-right: 1px solid var(--rule); }
.ticker-more { border-left: 1px solid var(--rule); color: var(--brass); }
.ticker:hover .ticker-more { color: var(--ivory); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(134, 201, 182, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(134, 201, 182, 0); } 100% { box-shadow: 0 0 0 0 rgba(134, 201, 182, 0); } }
.ticker-window { flex: 1; overflow: hidden; display: flex; align-items: center; min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: inline-flex; white-space: nowrap; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-visible .ticker-track { animation-play-state: paused; }
.ticker-item { padding: 0 28px; }
.ticker-item b { font: 400 12.5px var(--figures); color: var(--brass); margin-right: 10px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Bands ---------- */
.band { padding: var(--band) 0; border-top: 1px solid var(--rule); background: rgba(10, 16, 24, .76); }
.hero + .band { border-top: 0; }
h2 { font: 300 clamp(34px, 4.6vw, 60px)/1.05 var(--display); letter-spacing: -.015em; }
.body-lg { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.55; color: #d3d0c8; max-width: 34em; }
.sub { margin-top: 18px; color: var(--stone); max-width: 38em; font-size: 18px; }

.intro-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: end; }
.lede { font: 300 clamp(30px, 4.2vw, 56px)/1.1 var(--display); letter-spacing: -.015em; text-wrap: balance; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); }
.split-body > * + * { margin-top: 1.3em; }
.closing { font: 300 clamp(24px, 2.8vw, 36px)/1.2 var(--display); color: var(--brass); padding-top: .4em; text-wrap: balance; }

/* ---------- What we do ---------- */
.services { margin-top: clamp(36px, 5vw, 64px); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.services li { padding: clamp(24px, 3vw, 40px); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: rgba(16, 25, 36, .5); transition: background-color .25s; }
.services li:hover { background: rgba(16, 25, 36, .95); }
.services h3 { font: 400 clamp(22px, 2vw, 27px)/1.15 var(--display); margin-bottom: 14px; }
.services p { color: var(--stone); font-size: 16px; }
.services .service-else { grid-column: span 3; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; background: transparent; }
.services .service-else h3 { margin: 0; color: var(--brass); }
.services .service-else p { color: var(--ivory); font-size: 18px; }
.services .service-else .text-link { margin-left: auto; }

/* ---------- Reel ---------- */
.reel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.reel-controls { display: flex; align-items: center; gap: 10px; }
.reel-count { font: 400 13px var(--figures); color: var(--stone); margin-right: 8px; }
.reel-btn { width: 44px; height: 44px; background: none; border: 1px solid var(--rule); border-radius: 50%; cursor: pointer; transition: border-color .2s, color .2s; }
.reel-btn:hover { border-color: var(--brass); color: var(--brass); }
.reel {
  margin-top: clamp(32px, 4vw, 56px);
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 14px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 min(78vw, 760px); scroll-snap-align: start; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--rule); background: var(--ink-2); }
.reel-media { position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(236,231,220,.035) 0 1px, transparent 1px 64px),
    radial-gradient(120% 90% at 85% 10%, rgba(194,163,107,.20), transparent 60%),
    linear-gradient(160deg, #142030, #0b121b);
}
.reel-media img, .reel-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.caption { position: absolute; inset: auto 0 0 0; padding: 56px clamp(18px, 2.4vw, 30px) clamp(16px, 2vw, 24px); font-size: 15.5px; color: #d3d0c8; background: linear-gradient(transparent, rgba(6, 10, 15, .92)); }
.caption strong { display: block; font: 400 clamp(22px, 2.4vw, 32px)/1.15 var(--display); color: var(--ivory); margin-bottom: 4px; }

/* ---------- Live mandates ---------- */
.ledger-head, .ledger li { display: grid; grid-template-columns: 56px 150px minmax(0, 1fr) 130px 190px; gap: 20px; align-items: center; }
.ledger-head { margin-top: clamp(36px, 5vw, 60px); padding: 0 0 12px; font-size: 13px; color: var(--stone); border-bottom: 1px solid var(--ivory); }
.ledger li { padding: 20px 0; border-bottom: 1px solid var(--rule); transition: background-color .2s; }
.ledger li:hover { background: rgba(16, 25, 36, .8); }
.m-no { font: 400 14px var(--figures); color: var(--brass); }
.m-sector { color: var(--stone); font-size: 15px; }
.m-title { font: 400 clamp(19px, 1.7vw, 23px)/1.25 var(--display); }
.m-status { font-size: 14px; display: inline-flex; align-items: center; gap: 9px; }
.m-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; }
.ledger .btn { justify-self: end; }
[data-status="conversation"] .m-status::before { background: var(--brass); }
[data-status="approval"] .m-status::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--brass); }
[data-status="placed"] .m-status::before { background: var(--stone); }
[data-status="placed"] .m-title, [data-status="placed"] .m-no { color: var(--stone); }
[data-status="placed"] .m-title { text-decoration: line-through; text-decoration-thickness: 1px; }
[data-status="placed"] .btn { display: none; }
.ledger-foot { margin-top: 22px; color: var(--stone); font-size: 14.5px; }

/* ---------- Contact / footer ---------- */
.contact { text-align: left; }
.contact-title { font-size: clamp(44px, 8vw, 112px); letter-spacing: -.022em; line-height: 1; margin-bottom: 24px; text-wrap: balance; }
.contact .btn { margin-top: 36px; }
.foot { border-top: 1px solid var(--rule); background: var(--ink); font-size: 14px; color: var(--stone); }
.foot-inner { display: flex; justify-content: space-between; gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.foot a { text-underline-offset: 4px; }
.foot a:hover { color: var(--ivory); }

/* ---------- Enquiry dialog and form ---------- */
.dialog { width: min(560px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--rule); border-radius: 3px; background: var(--ink-2); color: var(--ivory); overflow: auto; }
.dialog::backdrop { background: rgba(4, 7, 11, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog[open] { animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.dialog form, .form-page form { padding: clamp(22px, 4vw, 36px); }
.dialog-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.dialog-head h2 { font-size: clamp(28px, 4vw, 36px); }
.dialog-ref { font: 400 13px var(--figures); color: var(--brass); margin-bottom: 8px; }
.dialog-sub { color: var(--stone); font-size: 15.5px; margin-top: 8px; }
.dialog-sub:empty { display: none; }
.dialog-close { flex: none; width: 40px; height: 40px; background: none; border: 1px solid var(--rule); border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.dialog-close:hover { border-color: var(--brass); color: var(--brass); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { margin-bottom: 16px; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 16px; }
.field label { display: block; font-size: 14px; color: var(--stone); margin-bottom: 7px; }
.opt { opacity: .7; }
.field input, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--text); color: var(--ivory);
  background: rgba(10, 16, 24, .7); border: 1px solid var(--rule); border-radius: 2px; padding: 12px 13px;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brass); }
.field [aria-invalid="true"] { border-color: #d98a7a; }
.form-status { min-height: 1.5em; font-size: 15px; margin: 4px 0 14px; }
.form-status.is-error { color: #e6a596; }
.form-status.is-ok { color: var(--signal); }
.dialog-actions { display: flex; justify-content: flex-end; }

/* Standalone form page (contact.php without JavaScript) */
.form-page { min-height: 100svh; display: grid; place-items: center; padding: 28px 14px; position: relative; z-index: 1; }
.form-page .panel { width: min(560px, 100%); border: 1px solid var(--rule); border-radius: 3px; background: var(--ink-2); }
.form-page .back { display: inline-block; margin: 0 0 18px; color: var(--stone); font-size: 14.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .ledger-head { display: none; }
  .ledger { margin-top: 36px; border-top: 1px solid var(--ivory); }
  .ledger li { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "no sector status" "no title title" "no btn btn"; gap: 6px 14px; align-items: start; padding: 22px 0; }
  .m-no { grid-area: no; padding-top: 2px; } .m-sector { grid-area: sector; } .m-status { grid-area: status; }
  .m-title { grid-area: title; } .ledger .btn { grid-area: btn; justify-self: start; margin-top: 10px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .services .service-else { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); border-bottom: 1px solid var(--rule); padding: 6px var(--gutter) 20px; display: none; font-size: 17px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav .nav-cta { margin-top: 16px; text-align: center; border: 1px solid var(--brass); color: var(--brass); }
  .intro-grid, .split { grid-template-columns: 1fr; }
  .ticker-more { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand-name { font-size: 17px; }
  .services { grid-template-columns: 1fr; }
  .services .service-else { grid-column: auto; }
  .services .service-else .text-link { margin-left: 0; }
  .slide { flex-basis: 86vw; aspect-ratio: 4 / 5; }
  .field-row { flex-direction: column; gap: 0; }
  .ticker-label { padding-right: 14px; }
  .foot-inner { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .pulse, .dialog[open] { animation: none; }
  .ticker-window { overflow-x: auto; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Header progress line and link hover ---------- */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--brass); transform: scaleX(0); transform-origin: left; }
@media (min-width: 861px) {
  .nav a:not(.nav-cta) { position: relative; padding: 6px 0; }
  .nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
  .nav a:not(.nav-cta)::before { content: ""; position: absolute; left: -2px; bottom: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--brass); opacity: 0; transition: opacity .2s; }
  .nav a:not(.nav-cta):hover::after, .nav a:not(.nav-cta):focus-visible::after { transform: scaleX(1); }
  .nav a:not(.nav-cta):hover::before, .nav a:not(.nav-cta):focus-visible::before { opacity: 1; }
}

/* ---------- Hero entrance (plays once on load) ---------- */
@keyframes enter { from { opacity: 0; transform: translateY(24px); } }
@keyframes fade { from { opacity: 0; } }
#bg { animation: fade 2.2s ease-out both; }
.hero-brand { animation: enter 1s .15s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 { animation: enter 1.1s .3s cubic-bezier(.2, .7, .2, 1) both; }
.hero .btn { animation: enter 1s .55s cubic-bezier(.2, .7, .2, 1) both; }
.ticker { animation: fade 1.2s 1s both; }

/* ---------- Connecting the dots ---------- */
.route { margin-top: clamp(48px, 7vw, 104px); }
.route svg { display: block; overflow: visible; }
.route-field circle { fill: rgba(236, 231, 220, .3); }
.route-maybe { stroke: rgba(236, 231, 220, .13); stroke-width: 1; stroke-dasharray: 2 5; }
.route-line { fill: none; stroke: var(--brass); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.route-pulse { fill: #fff; opacity: 0; filter: drop-shadow(0 0 6px var(--brass)) drop-shadow(0 0 14px var(--brass)); }
.route-dot { fill: var(--ink); stroke: var(--stone); stroke-width: 1.5; transition: fill .4s, stroke .4s; }
.route-ring { fill: none; stroke: var(--brass); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .5s, transform .7s cubic-bezier(.2, .7, .2, 1); }
.route-stop text { fill: var(--stone); font: 400 14.5px var(--text); transition: fill .5s; }
.route-stop.is-end text { font: 400 20px var(--display); }
.route-stop.on .route-dot { fill: var(--brass); stroke: var(--brass); }
.route-stop.on .route-ring { opacity: .5; transform: scale(1); }
.route-stop.on text { fill: var(--ivory); }
.route.is-done .is-final .route-ring { animation: arrive 2.6s ease-out infinite; }
@keyframes arrive { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }

/* ---------- Mandate count ---------- */
.ledger-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.ledger-count { font: 400 13.5px var(--figures); color: var(--brass); }
.ledger-count:empty { display: none; }

/* ---------- Sent confirmation ---------- */
.sent { text-align: center; padding: 18px 0 8px; }
.sent svg { display: block; margin: 0 auto 22px; }
.sent-line { stroke: var(--brass); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; animation: join .9s .15s cubic-bezier(.4, 0, .2, 1) forwards; }
.sent-dot { fill: var(--brass); }
.sent-dot-b { fill: var(--ink-2); stroke: var(--brass); stroke-width: 1.5; animation: lit .3s 1s forwards; }
@keyframes join { to { stroke-dashoffset: 0; } }
@keyframes lit { to { fill: var(--brass); } }
.sent-title { font: 400 clamp(22px, 3vw, 28px)/1.2 var(--display); margin-bottom: 26px; }
.sent-title:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  #bg, .hero-brand, .hero h1, .hero .btn, .ticker, .route.is-done .is-final .route-ring { animation: none; }
  .sent-line { animation: none; stroke-dashoffset: 0; }
  .sent-dot-b { animation: none; fill: var(--brass); }
}

/* Ecosystem ring: a hub at the centre linked to every point */
.route-chords { opacity: 0; }
.route-chords line { stroke: var(--brass); stroke-width: 1; opacity: .35; }
.route-chords circle { fill: var(--brass); }
.route-chords .route-hub-ring { fill: none; stroke: var(--brass); stroke-width: 1; opacity: .5; }
