/* ============================================================
   BRASS HQ — Editorial design system
   Palette: deep burgundy / brass gold / tan brown / white
   ============================================================ */

:root {
  --burgundy: #4e1526;
  --burgundy-deep: #330e1a;
  --burgundy-soft: #6b2338;
  --brass: #b4883b;
  --brass-light: #d2ab61;
  --brass-pale: #ecdfc3;
  --tan: #a9805d;
  --tan-pale: #e9dccc;
  --cream: #faf6ef;
  --white: #ffffff;
  --ink: #2a1219;
  --ink-soft: #5d4650;
  --line: rgba(78, 21, 38, 0.14);
  --line-light: rgba(250, 246, 239, 0.18);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.94rem);
  --step-0: clamp(0.94rem, 0.9rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 3rem);
  --step-4: clamp(2rem, 1.6rem + 2.2vw, 3.2rem);
  --step-5: clamp(2.5rem, 1.9rem + 3.4vw, 4.3rem);

  --space-section: clamp(4.5rem, 3rem + 7vw, 9rem);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 78rem;

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

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--burgundy);
}

p {
  margin: 0 0 1.1em;
}

::selection {
  background: var(--brass-pale);
  color: var(--burgundy);
}

/* ---------- Utilities ---------- */

.container {
  width: min(var(--max), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.4rem;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--brass);
  transform: scaleX(1);
  transform-origin: left;
}

/* Self-drawing line: only animates when the eyebrow itself opts into .reveal */
.eyebrow.reveal::before {
  transform: scaleX(0);
  transition: transform 0.7s var(--ease) 0.1s;
}

.eyebrow.reveal.is-visible::before { transform: scaleX(1); }

.section {
  padding-block: var(--space-section);
}

.section--cream { background: var(--cream); }
.section--burgundy {
  position: relative;
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-deep) 45%, var(--burgundy) 100%);
  background-size: 220% 220%;
  animation: burgundy-drift 28s ease-in-out infinite;
  color: var(--cream);
}
.section--burgundy > .container { position: relative; z-index: 1; }
.section--burgundy h2,
.section--burgundy h3 { color: var(--white); }
.section--burgundy .eyebrow { color: var(--brass-light); }

@keyframes burgundy-drift {
  0%, 100% { background-position: 0% 30%; }
  50% { background-position: 100% 70%; }
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
}

.section--burgundy .lede { color: rgba(250, 246, 239, 0.78); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.btn svg { transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--solid {
  background: var(--burgundy);
  color: var(--cream);
}
.btn--solid:hover { background: var(--burgundy-deep); }

.btn--brass {
  background: var(--brass);
  color: var(--burgundy-deep);
}
.btn--brass:hover { background: var(--brass-light); }

.btn--ghost {
  position: relative;
  z-index: 0;
  overflow: hidden;
  border-color: var(--line);
  color: var(--burgundy);
  background: transparent;
}
.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.btn--ghost:hover {
  border-color: var(--brass);
  color: var(--burgundy-deep);
}
.btn--ghost:hover::before { transform: scaleX(1); }

.section--burgundy .btn--ghost {
  border-color: var(--line-light);
  color: var(--cream);
}
.section--burgundy .btn--ghost:hover { border-color: var(--brass-light); color: var(--burgundy-deep); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brass);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease);
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.text-link:hover { color: var(--burgundy); }
.text-link:hover::after { transform: scaleX(1); }
.section--burgundy .text-link:hover { color: var(--brass-light); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

/* The frosted background lives on ::before rather than the header itself —
   backdrop-filter on an ancestor of .site-nav would otherwise become the
   containing block for its fixed mobile overlay, trapping it inside the
   header's own (short) box instead of covering the full screen. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.05rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
}

.brand__mark {
  width: 0.72rem;
  height: 0.72rem;
  background: var(--brass);
  align-self: center;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--burgundy);
}

.brand__hq {
  color: var(--brass);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 1.9rem);
}

.site-nav a:not(.btn) {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
  color: var(--burgundy);
  border-color: var(--brass);
}

.site-nav .btn { padding: 0.65rem 1.35rem; font-size: 0.75rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--burgundy);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

@media (max-width: 960px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    inset: 0;
    top: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    background: var(--burgundy);
    transform: translateY(-100%);
    transition: transform 0.45s var(--ease);
    z-index: 50;
  }

  .site-nav.is-open { transform: translateY(0); }

  .site-nav a:not(.btn) {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0;
    color: var(--cream);
  }

  .site-nav a:not(.btn):hover,
  .site-nav a[aria-current="page"] { color: var(--brass-light); }

  body.nav-open { overflow: hidden; }

  body.nav-open .nav-toggle { border-color: rgba(250,246,239,0.4); position: relative; z-index: 70; }
  body.nav-open .nav-toggle span { background: var(--cream); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--burgundy);
  color: var(--cream);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(6rem, 4rem + 10vw, 12rem) clamp(5rem, 3rem + 8vw, 10rem);
  max-width: 60rem;
}

.hero .eyebrow { color: var(--brass-light); }

.hero h1 {
  font-size: var(--step-5);
  color: var(--white);
  max-width: 15ch;
  margin-bottom: 0.5em;
}

.hero h1 em {
  font-style: italic;
  color: var(--brass-light);
}

.hero__lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: rgba(250, 246, 239, 0.8);
  max-width: 52ch;
  margin-bottom: 2.4rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__art {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}

/* Page hero (interior pages) */

.page-hero {
  background: var(--burgundy);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.page-hero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(5rem, 3rem + 7vw, 9rem) clamp(4rem, 2.5rem + 5vw, 7rem);
  max-width: 56rem;
}

.page-hero .eyebrow { color: var(--brass-light); }

.page-hero h1 {
  font-size: var(--step-4);
  color: var(--white);
  max-width: 18ch;
}

.page-hero p {
  font-size: var(--step-1);
  line-height: 1.55;
  color: rgba(250, 246, 239, 0.8);
  max-width: 50ch;
  margin-bottom: 0;
}

/* ---------- Editorial pieces ---------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

@media (min-width: 880px) {
  .split { grid-template-columns: 5fr 7fr; }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split__sticky { position: sticky; top: 7rem; }
}

.section-title {
  font-size: var(--step-3);
  max-width: 18ch;
}

.manifesto {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--burgundy);
  max-width: 24ch;
  margin: 0;
}

.manifesto em {
  font-style: italic;
  color: var(--brass);
}

.section--burgundy .manifesto { color: var(--cream); }
.section--burgundy .manifesto em { color: var(--brass-light); }

.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rule-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}

.rule-list li:last-child { border-bottom: 1px solid var(--line); }

.rule-list .num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--brass);
  padding-top: 0.25rem;
  min-width: 2.2rem;
}

.rule-list h3 { font-size: var(--step-1); margin-bottom: 0.35em; }
.rule-list p { margin: 0; color: var(--ink-soft); max-width: 52ch; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2.2rem 2rem;
  text-decoration: none;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(180, 136, 59, 0.5);
  box-shadow: 0 24px 48px -28px rgba(51, 14, 26, 0.35);
}

.card__icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brass-pale);
  color: var(--burgundy);
  margin-bottom: 1.3rem;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.card:hover .card__icon {
  background: var(--brass);
  color: var(--white);
}

.card .card__kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.1rem;
}

.card h3 {
  font-size: var(--step-1);
  margin-bottom: 0.5em;
}

.card p {
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin-bottom: 1.4rem;
}

.card .card__foot {
  margin-top: auto;
}

.card ul {
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.card ul li {
  padding: 0.45rem 0 0.45rem 1.3rem;
  position: relative;
  border-top: 1px solid var(--line);
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--brass);
}

/* ---------- Framework diagram ---------- */

.framework-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  counter-reset: framework;
}

.framework-cell {
  position: relative;
  overflow: hidden;
  background: rgba(250, 246, 239, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-light);
  padding: 2rem 1.8rem;
  counter-increment: framework;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.framework-cell::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease) 0.15s;
}

.framework-cell.is-visible::after { transform: scaleX(1); }

.framework-cell:hover {
  background: rgba(250, 246, 239, 0.09);
  border-color: rgba(210, 171, 97, 0.55);
  transform: translateY(-4px);
}

.framework-cell::before {
  content: "0" counter(framework);
  display: block;
  font-family: var(--font-display);
  color: var(--brass-light);
  margin-bottom: 1.2rem;
}

.framework-cell h3 {
  font-size: var(--step-1);
  color: var(--white);
  margin-bottom: 0.4em;
}

.framework-cell p {
  color: rgba(250, 246, 239, 0.72);
  font-size: var(--step--1);
  margin: 0;
}

/* Light variant for framework page */
.section--cream .framework-cell,
.section:not(.section--burgundy) .framework-grid .framework-cell--light {
  background: var(--white);
  border-color: var(--line);
}

/* ---------- Industries ---------- */

.industry-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.industry-cell {
  background: var(--white);
  padding: 2rem 1.8rem;
  transition: background 0.35s var(--ease);
}

.industry-cell:hover { background: var(--cream); }

.industry-cell h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--burgundy);
  margin-bottom: 0.4em;
}

.industry-cell p {
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Case studies ---------- */

.case-card {
  display: grid;
  gap: 1.6rem;
  border-top: 1px solid var(--line);
  padding-block: 2.6rem;
}

@media (min-width: 880px) {
  .case-card { grid-template-columns: 2fr 6fr 4fr; }
}

.case-card:last-of-type { border-bottom: 1px solid var(--line); }

.case-card .case-card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
}

.case-card h3 { font-size: var(--step-2); max-width: 22ch; }
.case-card p { color: var(--ink-soft); max-width: 56ch; margin-bottom: 0.6em; }

.case-card .case-card__outcomes {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
  color: var(--ink);
}

.case-card .case-card__outcomes li {
  padding: 0.7rem 0 0.7rem 1.4rem;
  border-top: 1px solid var(--line);
  position: relative;
}

.case-card .case-card__outcomes li:first-child { border-top: 0; padding-top: 0; }

.case-card .case-card__outcomes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.3rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--brass);
}

.case-card .case-card__outcomes li:first-child::before { top: 0.6rem; }

/* ---------- Insights ---------- */

.insight-card {
  border-top: 2px solid var(--burgundy);
  padding-top: 1.6rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s var(--ease);
}

.insight-card:hover { border-color: var(--brass); }

.insight-card .insight-card__meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.9rem;
}

.insight-card h3 { font-size: var(--step-1); max-width: 24ch; }

.insight-card p {
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin-bottom: 1.2rem;
}

.insight-card .text-link { margin-top: auto; }

/* ---------- Quote / closing ---------- */

.pullquote {
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}

.pullquote blockquote {
  margin: 0 0 1.6rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.3;
  color: inherit;
}

.pullquote blockquote em { color: var(--brass-light); font-style: italic; }

/* ---------- Checklist (Why Brass HQ) ---------- */

.check-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.check-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.check-item .tick {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  border-radius: 50%;
  background: var(--brass);
  color: var(--burgundy-deep);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.check-item h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.3em;
}

.check-item p { font-size: var(--step--1); color: var(--ink-soft); margin: 0; }

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

.form-grid {
  display: grid;
  gap: 1.4rem;
}

@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .form-field--full { grid-column: 1 / -1; }
}

.form-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 0.5rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  transition: border-color 0.3s var(--ease);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}

.contact-aside {
  border-left: 2px solid var(--brass);
  padding-left: 1.8rem;
}

.contact-aside dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 1.6rem;
}

.contact-aside dt:first-child { margin-top: 0; }

.contact-aside dd {
  margin: 0.3rem 0 0;
  font-size: var(--step-0);
}

.contact-aside a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-aside a:hover { border-color: var(--brass); color: var(--burgundy); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--burgundy-deep);
  color: rgba(250, 246, 239, 0.75);
  padding-block: 4.5rem 2.5rem;
  font-size: var(--step--1);
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-light);
}

@media (min-width: 880px) {
  .site-footer__grid { grid-template-columns: 4fr 2fr 2fr 3fr; }
}

.site-footer .brand__name { color: var(--cream); }

.site-footer h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 1.1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li { margin-bottom: 0.6rem; }

.site-footer a {
  color: rgba(250, 246, 239, 0.75);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.site-footer a:hover { color: var(--brass-light); }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 2rem;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.3;
  color: var(--cream);
  max-width: 20ch;
  margin-top: 1.2rem;
}

.footer-tagline em { color: var(--brass-light); }

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .card, .btn, .btn svg { transition: none; }
  .section--burgundy { animation: none !important; }
  .particle-field { display: none !important; }
  .word .word__inner { transform: none !important; transition: none !important; }
  .cursor-glow { display: none !important; }
  .fw-svg__fill, .fw-svg__node circle, .fw-svg__node text { transition: none !important; }
}

/* ---------- Stat counters ---------- */

.stat-row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
}

.stat-tile {
  padding: 1.9rem 1.6rem;
  border: 1px solid var(--line-light);
  background: rgba(250, 246, 239, 0.05);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.stat-tile:hover {
  background: rgba(250, 246, 239, 0.09);
  border-color: rgba(210, 171, 97, 0.55);
  transform: translateY(-4px);
}

.stat-tile .stat-number {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--brass-light);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}

.stat-tile .stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 246, 239, 0.65);
}

/* Light variant, for use outside burgundy sections */
.stat-row--light .stat-tile {
  background: var(--white);
  border-color: var(--line);
}
.stat-row--light .stat-number { color: var(--burgundy); }
.stat-row--light .stat-label { color: var(--ink-soft); }

/* ---------- Media marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  padding-block: 1.6rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: 3.2rem;
  animation: marquee-scroll 34s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: rgba(250, 246, 239, 0.75);
  white-space: nowrap;
}

.marquee__item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* Light variant */
.marquee--light { border-color: var(--line); }
.marquee--light .marquee__item { color: var(--ink-soft); }

/* ---------- Badge row (who we work with) ---------- */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--burgundy);
  background: var(--white);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.badge:hover {
  background: var(--burgundy);
  color: var(--cream);
  border-color: var(--burgundy);
  transform: translateY(-2px);
}

.section--burgundy .badge {
  background: transparent;
  color: var(--cream);
  border-color: var(--line-light);
}
.section--burgundy .badge:hover {
  background: var(--brass);
  color: var(--burgundy-deep);
  border-color: var(--brass);
}

/* ---------- Partner cards ---------- */

.partner-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2.4rem 2.2rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.partner-card:hover {
  transform: translateY(-6px);
  border-color: rgba(180, 136, 59, 0.5);
  box-shadow: 0 24px 48px -28px rgba(51, 14, 26, 0.35);
}

.partner-card__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--burgundy);
  margin-bottom: 1.3rem;
}

.partner-card__mark .dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--brass);
}

.partner-card__logo {
  height: 6.5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 1.8rem;
}

/* ---------- Founder avatar ---------- */

.founder-avatar {
  position: relative;
  overflow: hidden;
  width: 11rem;
  height: 11rem;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--burgundy), var(--burgundy-deep));
  border: 3px solid var(--brass);
  box-shadow: 0 18px 40px -20px rgba(51, 14, 26, 0.5);
  color: var(--brass-light);
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin-block: 1.6rem 1.8rem;
}

.founder-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.founder-avatar--large {
  width: 16rem;
  height: 16rem;
}

.partner-card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.6rem;
}

.partner-card p {
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin-bottom: 0;
}

/* ---------- Timeline ---------- */

.timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--line);
  margin-left: 0.5rem;
}

.timeline-item {
  position: relative;
  padding: 0 0 2.4rem 2.2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--brass);
}

.timeline-item h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.3em;
}

.timeline-item p {
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin: 0;
  max-width: 48ch;
}

/* ---------- Tabs (pillars) ---------- */

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}

.tabs__tab {
  padding: 0.85rem 1.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.tabs__tab:hover { border-color: var(--brass); color: var(--burgundy); }

.tabs__tab[aria-selected="true"] {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--cream);
}

.section--burgundy .tabs__tab {
  background: transparent;
  border-color: var(--line-light);
  color: rgba(250, 246, 239, 0.7);
}
.section--burgundy .tabs__tab:hover { border-color: var(--brass-light); color: var(--brass-light); }
.section--burgundy .tabs__tab[aria-selected="true"] {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--burgundy-deep);
}

.tabs__panel {
  display: none;
}

.tabs__panel.is-active {
  display: block;
  animation: tab-fade 0.5s var(--ease);
}

@keyframes tab-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tabs__panel.is-active { animation: none; }
}

.pillar-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

@media (min-width: 720px) {
  .pillar-head { grid-template-columns: auto 1fr; align-items: end; }
}

.pillar-head .pillar-index {
  font-family: var(--font-display);
  font-size: var(--step-4);
  color: var(--brass);
  line-height: 1;
}

/* ---------- Phone / contact chip ---------- */

.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.phone-chip svg { flex: none; color: var(--brass); }

/* ---------- Vibrant hero glow ---------- */

.hero__glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(210, 171, 97, 0.28), transparent 62%);
  filter: blur(10px);
  z-index: 1;
  pointer-events: none;
  animation: glow-drift 16s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 3%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__glow { animation: none; }
}

/* ---------- Accessibility ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--burgundy);
  color: var(--cream);
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top 0.3s var(--ease);
}

.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* ============================================================
   Cinematic layer — atmosphere, depth, signature interaction
   ============================================================ */

/* ---------- Grain texture (sitewide, near-invisible) ---------- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Drifting brass particles (burgundy sections) ---------- */

.particle-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle-field span {
  position: absolute;
  bottom: -12px;
  left: var(--x, 50%);
  width: var(--size, 5px);
  height: var(--size, 5px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--brass-light), transparent 70%);
  opacity: 0;
  filter: blur(0.5px);
  animation: particle-float var(--dur, 16s) ease-in var(--delay, 0s) infinite;
}

@keyframes particle-float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: 0.55; }
  85% { opacity: 0.3; }
  100% { transform: translateY(-340px) translateX(var(--drift, 24px)); opacity: 0; }
}

/* ---------- Cursor halo (desktop pointer only, added via JS) ---------- */

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 171, 97, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  will-change: transform;
}

.cursor-glow.is-active { opacity: 1; }

/* ---------- Word-by-word heading reveal ---------- */

.word-reveal .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
}

.word-reveal .word__inner {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.85s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.05s);
}

.word-reveal.is-visible .word__inner { transform: translateY(0); }

/* ---------- Signature interaction: the framework builds itself ---------- */

.framework-map {
  align-items: start;
}

.fw-svg-wrap { padding-block: 1rem; }

.fw-svg {
  width: 100%;
  max-width: 150px;
  height: auto;
  overflow: visible;
  margin-inline: auto;
}

.fw-svg__track {
  stroke: var(--line);
  stroke-width: 2;
  fill: none;
}

.fw-svg__fill {
  stroke: var(--brass);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  transition: stroke-dashoffset 0.7s var(--ease);
}

.fw-svg__node circle {
  fill: var(--white);
  stroke: var(--line);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill 0.4s var(--ease), stroke 0.4s var(--ease), transform 0.4s var(--ease);
}

.fw-svg__node text {
  font-family: var(--font-display);
  font-size: 9px;
  fill: var(--ink-soft);
  text-anchor: middle;
  dominant-baseline: middle;
  transition: fill 0.4s var(--ease);
}

.fw-svg__node.is-active circle {
  fill: var(--brass);
  stroke: var(--brass);
  transform: scale(1.4);
}

.fw-svg__node.is-active text { fill: var(--white); }

.fw-steps {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fw-step {
  padding: 1.5rem 0 1.5rem 1.7rem;
  border-left: 2px solid var(--line);
  opacity: 0.5;
  transition: opacity 0.5s var(--ease), border-color 0.5s var(--ease), transform 0.5s var(--ease);
}

.fw-step.is-active {
  opacity: 1;
  border-color: var(--brass);
  transform: translateX(4px);
}

.fw-step h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--burgundy);
  margin-bottom: 0.3em;
}

.fw-step p { font-size: var(--step--1); color: var(--ink-soft); margin: 0; max-width: 46ch; }

@media (max-width: 879px) {
  /* The side diagram relies on the sticky column that only exists ≥880px;
     stacked on mobile it would render as a very tall, mostly-empty block
     ahead of the actual steps, so it's hidden here. The steps themselves
     still highlight one at a time via the same scroll observer. */
  .fw-svg-wrap { display: none; }
  .fw-step { border-left-width: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}
