/* ==========================================================================
   Bellatryxx — main.css
   Enterprise technology design system. Layout, grid, spacing, hierarchy and
   interaction patterns modelled on the UX approach of large global tech
   sites (IBM as reference); original Bellatryxx branding and content.
   Warm brand palette (Sand / Navy slate / Leather); square corners, thin borders.
   Utilities: /css/libs/tailwind.min.css (Tailwind v2, AOT) — resets only.
   Icons: Font Awesome 6 (base.html). All visuals: bx-* classes.
   ========================================================================== */

:root {
  /* Surfaces — Bellatryxx brand: Sand (warm, not white) */
  --bg: #f2f0ec;
  --bg-2: #eae7df;
  --bg-3: #e1ddd2;
  --surface: #f9f8f4;
  --navy: #3a444f;
  --navy-2: #2c343d;

  /* Ink */
  --ink: #1e1e1e;
  --ink-2: #4c473f;
  --ink-3: #7c766b;
  --on-dark: #f2f0ec;
  --on-dark-2: #aeb4bc;

  /* Brand accents — Leather (primary) + Navy slate (secondary) */
  --accent: #846349;
  --accent-2: #6a4d37;
  --accent-tint: #ece1d4;
  --slate: #445160;
  --tan-soft: #c9a986;

  /* Lines */
  --line: #ddd7cc;
  --line-2: #c7bfb1;
  --line-dark: rgba(242, 240, 236, 0.16);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1288px;
  --pad-x: 32px;
  --header-h: 76px;

  --r: 2px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body.bx-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.bx-body a {
  color: inherit;
  text-decoration: none;
}

.bx-body h1,
.bx-body h2,
.bx-body h3,
.bx-body h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.bx-body p {
  margin: 0;
}

.bx-body img {
  display: block;
  max-width: 100%;
}

.bx-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #f9f8f4;
}

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

main {
  display: block;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.bx-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: max(var(--pad-x), env(safe-area-inset-left)) max(var(--pad-x), env(safe-area-inset-right));
}

.bx-band {
  padding-block: clamp(72px, 11vw, 148px);
}

.bx-band--sm {
  padding-block: clamp(56px, 8vw, 100px);
}

.bx-band--gray {
  background: #eae7df;
}

.bx-band--dark {
  background: #3a444f;
  color: #f2f0ec;
}

.bx-rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

/* Kicker / eyebrow */
.bx-kicker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.bx-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.bx-band--dark .bx-kicker {
  color: var(--tan-soft);
}

.bx-band--dark .bx-kicker::before {
  background: var(--tan-soft);
}

/* Section head */
.bx-shead {
  max-width: 760px;
}

.bx-shead .bx-kicker {
  margin-bottom: 24px;
}

.bx-shead p {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
}

.bx-band--dark .bx-shead p {
  color: #c4c9d0;
}

/* Type scale */
.bx-h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.bx-h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.bx-h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bx-lead {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
}

.bx-measure {
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.bx-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  min-width: 200px;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  color: #faf9f6;
  background-color: #846349;
  border: 1px solid #846349;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.bx-btn i {
  font-size: 0.85em;
  transition: transform 0.16s var(--ease);
}

.bx-btn:hover {
  background-color: #6a4d37;
  border-color: #6a4d37;
}

.bx-btn:hover i {
  transform: translateX(4px);
}

.bx-btn--dark {
  color: #faf9f6;
  background-color: #1e1e1e;
  border-color: #1e1e1e;
}

.bx-btn--dark:hover {
  background-color: #14171c;
  border-color: #14171c;
}

.bx-btn--outline {
  color: #1e1e1e;
  background-color: transparent;
  border-color: #1e1e1e;
}

.bx-btn--outline:hover {
  background-color: #ece1d4;
  border-color: #1e1e1e;
}

.bx-btn--ghost-dark {
  color: #f2f0ec;
  background-color: transparent;
  border-color: rgba(242, 240, 236, 0.5);
}

.bx-btn--ghost-dark:hover {
  background-color: rgba(242, 240, 236, 0.12);
  border-color: rgba(242, 240, 236, 0.8);
}

.bx-btn--sm {
  min-width: 0;
  padding: 11px 18px;
  font-size: 0.9rem;
  gap: 10px;
}

/* Arrow link — the enterprise "learn more" pattern */
.bx-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #846349;
}

.bx-arrow i {
  transition: transform 0.16s var(--ease);
}

.bx-arrow:hover i {
  transform: translateX(5px);
}

.bx-arrow--ink {
  color: #1e1e1e;
}

.bx-arrow--light {
  color: #f2f0ec;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.bx-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(242, 240, 236, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}

.bx-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line), 0 8px 28px -20px rgba(14, 23, 33, 0.3);
}

.bx-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  height: var(--header-h);
}

.bx-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bx-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r);
  background: var(--slate);
  color: #f2f0ec;
  font-size: 13px;
}

.bx-brand-name {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.bx-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.bx-nav-link {
  position: relative;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #4c473f;
}

.bx-nav-link.is-active {
  color: #1e1e1e;
}

.bx-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
}

.bx-nav-cta {
  flex-shrink: 0;
}

.bx-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  cursor: pointer;
}

.bx-burger span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.bx-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.bx-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.bx-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.bx-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 95;
  background: #f2f0ec;
  border-top: 1px solid var(--line);
  padding: 16px var(--pad-x) 40px;
  overflow-y: auto;
  transform: translateY(-6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}

.bx-mobile.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bx-mobile a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 2px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.bx-mobile a i {
  color: var(--ink-3);
  font-size: 0.8rem;
}

.bx-mobile a.is-active {
  color: var(--accent);
}

.bx-mobile .bx-btn {
  margin-top: 26px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Hero — single-column editorial + full-bleed figure band
   -------------------------------------------------------------------------- */
.bx-hero {
  padding-top: calc(var(--header-h) + clamp(52px, 7vw, 92px));
}

.bx-hero-copy {
  max-width: 940px;
}

.bx-hero-copy .bx-kicker {
  margin-bottom: 26px;
}

.bx-hero-copy h1 {
  max-width: 20ch;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

.bx-hero-copy .bx-lead {
  margin-top: 26px;
  max-width: 58ch;
}

.bx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.bx-hero-note {
  margin-top: 22px;
  font-size: 0.92rem;
  color: #7c766b;
  max-width: 52ch;
}

/* Capability rail — horizontal divided strip */
.bx-hero-rail {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.bx-hero-rail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px clamp(18px, 3vw, 32px) 24px 0;
  font-size: 0.98rem;
  color: #4c473f;
}

.bx-hero-rail-item + .bx-hero-rail-item {
  padding-left: clamp(18px, 3vw, 32px);
  border-left: 1px solid var(--line);
}

.bx-hero-rail-item i {
  font-size: 1.1rem;
  color: #846349;
  flex-shrink: 0;
}

/* Full-bleed figure band */
.bx-hero-figure {
  position: relative;
  margin-top: clamp(44px, 6vw, 72px);
  padding: 0 var(--pad-x);
  background: #2c343d;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.bx-hero-figure-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  height: clamp(220px, 30vw, 340px);
}

.bx-hero-figure-label {
  position: absolute;
  top: 22px;
  left: 0;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aeb4bc;
}

.bx-hero-figure svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bx-hero-figure .grid-line {
  stroke: rgba(242, 240, 236, 0.14);
  stroke-width: 1;
}

.bx-hero-figure .flow {
  stroke: #c9a986;
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  pathLength: 1;
  animation: bx-draw 2.4s var(--ease) forwards 0.2s;
}

.bx-hero-figure .flow--2 { animation-delay: 0.5s; }
.bx-hero-figure .flow--3 { animation-delay: 0.9s; }

.bx-hero-figure .node {
  fill: #2c343d;
  stroke: #c9a986;
  stroke-width: 2;
}

.bx-hero-figure .node--fill {
  fill: #846349;
  stroke: #846349;
}

.bx-hero-figure .chip {
  fill: rgba(242, 240, 236, 0.04);
  stroke: rgba(242, 240, 236, 0.2);
  stroke-width: 1;
}

.bx-hero-figure .bar { fill: #c9a986; }
.bx-hero-figure .bar--soft { fill: #846349; }

/* Bordered detail list — used on inner pages */
.bx-hero-list {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.bx-hero-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
  color: #4c473f;
}

.bx-hero-list i {
  color: #846349;
  font-size: 0.95rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

@keyframes bx-draw {
  to { stroke-dashoffset: 0; }
}

/* --------------------------------------------------------------------------
   Inner page hero
   -------------------------------------------------------------------------- */
.bx-phero {
  padding-top: calc(var(--header-h) + clamp(56px, 8vw, 96px));
  padding-bottom: clamp(44px, 6vw, 76px);
  border-bottom: 1px solid var(--line);
}

.bx-phero .bx-kicker {
  margin-bottom: 24px;
}

.bx-phero h1 {
  max-width: 18ch;
}

.bx-phero .bx-lead {
  margin-top: 22px;
  max-width: 60ch;
}

.bx-phero p + p {
  margin-top: 14px;
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   Editorial card grid
   -------------------------------------------------------------------------- */
.bx-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
}

.bx-grid--2 { grid-template-columns: repeat(2, 1fr); }
.bx-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bx-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Grid/flex children must be allowed to shrink so long words never force
   horizontal overflow on small screens. */
.bx-card,
.bx-cap,
.bx-svc-item,
.bx-svc-item > div,
.bx-split-text,
.bx-contact-card,
.bx-stat,
.bx-hero-rail-item {
  min-width: 0;
}

.bx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 30px 30px;
  background: var(--surface);
  transition: background 0.16s var(--ease);
}

.bx-card:hover {
  background: var(--bg-2);
}

.bx-card-cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.bx-card-ico {
  color: var(--accent);
  font-size: 26px;
  margin-bottom: 22px;
}

.bx-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.bx-card p {
  font-size: 0.95rem;
  color: var(--ink-2);
}

.bx-card .bx-arrow {
  margin-top: auto;
  padding-top: 28px;
}

.bx-card--feature {
  padding: 40px 36px 34px;
}

.bx-card--feature h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
}

/* Column spans — use `1 / -1` (explicit tracks only) so a collapsed grid
   never spawns implicit columns and overflows. */
.bx-card--wide { grid-column: span 2; }
.bx-card--full { grid-column: 1 / -1; }

/* Services enterprise grid */
.bx-svc {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
}

.bx-svc-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 22px;
  padding: 36px 32px;
  background: var(--surface);
  transition: background 0.16s var(--ease);
}

.bx-svc-item:hover {
  background: var(--bg-2);
}

.bx-svc-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  padding-top: 6px;
}

.bx-svc-item h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.bx-svc-item p {
  font-size: 0.95rem;
  color: var(--ink-2);
  max-width: 52ch;
}

.bx-svc-item .bx-arrow {
  margin-top: 22px;
}

/* --------------------------------------------------------------------------
   Alternating split section
   -------------------------------------------------------------------------- */
.bx-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--line);
}

.bx-split + .bx-split {
  border-top: 0;
}

.bx-split--rev .bx-split-media {
  order: 2;
}

.bx-split-media {
  position: relative;
  min-height: 420px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.bx-split--rev .bx-split-media {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.bx-split-media svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bx-split-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 5vw, 72px);
}

.bx-split-text .bx-kicker {
  margin-bottom: 20px;
}

.bx-split-text h2,
.bx-split-text h3 {
  margin-bottom: 20px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
}

.bx-split-text p {
  color: var(--ink-2);
  max-width: 52ch;
}

.bx-split-text .bx-arrow,
.bx-split-text .bx-btn {
  margin-top: 30px;
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   Capabilities / why grid
   -------------------------------------------------------------------------- */
.bx-caps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
}

.bx-cap {
  padding: 34px 30px;
  background: var(--surface);
  transition: background 0.16s var(--ease);
}

.bx-cap:hover {
  background: var(--bg-2);
}

.bx-cap-ico {
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 20px;
}

.bx-cap h3 {
  font-size: 1.16rem;
  margin-bottom: 8px;
}

.bx-cap p {
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Impact stats band
   -------------------------------------------------------------------------- */
.bx-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  margin-top: 52px;
}

.bx-stat {
  padding: 40px 28px;
  background: #3a444f;
}

.bx-stat-v {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #f2f0ec;
}

.bx-stat-l {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cdd2d8;
}

/* --------------------------------------------------------------------------
   About split (light image panel + text)
   -------------------------------------------------------------------------- */
.bx-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.bx-about-media {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-2);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.bx-about-media svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bx-about-text h2 {
  margin: 20px 0;
}

.bx-about-text p + p {
  margin-top: 14px;
}

.bx-about-text .bx-arrow {
  margin-top: 28px;
}

/* --------------------------------------------------------------------------
   Sectors list
   -------------------------------------------------------------------------- */
.bx-sectors {
  border-top: 1px solid var(--line);
  margin-top: 52px;
}

.bx-sector {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px 8px;
  border-bottom: 1px solid var(--line);
  transition: padding 0.18s var(--ease), background 0.18s var(--ease);
}

.bx-sector:hover {
  background: var(--bg-2);
  padding-inline: 20px 8px;
}

.bx-sector-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.bx-sector h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.bx-sector p {
  font-size: 0.92rem;
  color: var(--ink-3);
}

.bx-sector .go {
  color: var(--ink-3);
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
}

.bx-sector:hover .go {
  color: var(--accent);
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Trusted-by strip
   -------------------------------------------------------------------------- */
.bx-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 36px;
  padding-block: 28px;
  border-block: 1px solid var(--line);
}

.bx-trust-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.bx-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
}

.bx-trust-item i {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */
.bx-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #2c343d;
  color: #f2f0ec;
  padding-block: clamp(64px, 9vw, 120px);
}

.bx-cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(242, 240, 236, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 236, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 90% at 20% 0%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 20% 0%, #000, transparent 78%);
}

.bx-cta .bx-kicker {
  color: var(--tan-soft);
}

.bx-cta .bx-kicker::before {
  background: var(--tan-soft);
}

.bx-cta h2 {
  color: #f2f0ec;
  max-width: 20ch;
}

.bx-cta p {
  margin-top: 20px;
  max-width: 54ch;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: #c4c9d0;
}

.bx-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* CTA button — leather fill + light label. Fail-safe: if the fill does not
   paint, light text still reads on the dark band. */
.bx-cta .bx-btn,
.bx-cta .bx-btn:link,
.bx-cta .bx-btn:visited {
  color: #faf9f6;
  background-color: #846349;
  border-color: #846349;
}

.bx-cta .bx-btn i {
  color: #faf9f6;
}

.bx-cta .bx-btn:hover {
  color: #faf9f6;
  background-color: #6a4d37;
  border-color: #6a4d37;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.bx-contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 52px;
}

.bx-contact-card {
  padding: 36px 30px;
  background: var(--surface);
}

.bx-contact-k {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.bx-contact-k i {
  color: var(--accent);
}

.bx-contact-v {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.bx-contact-v a:hover {
  color: var(--accent);
}

.bx-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.bx-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.bx-footer {
  background: var(--navy-2);
  color: var(--on-dark-2);
  padding-block: clamp(56px, 7vw, 88px) 28px;
}

.bx-footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-dark);
}

.bx-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f2f0ec;
}

.bx-footer-brand .bx-brand-name {
  color: #f2f0ec;
}

.bx-footer-blurb {
  margin-top: 18px;
  max-width: 40ch;
  font-size: 0.92rem;
  color: var(--on-dark-2);
}

.bx-footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7f8ea0;
  margin-bottom: 16px;
}

.bx-footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bx-footer-col a,
.bx-footer-col span {
  font-size: 0.9rem;
  color: var(--on-dark-2);
  transition: color 0.14s ease;
}

.bx-footer-col a:hover {
  color: #f2f0ec;
}

.bx-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #7f8ea0;
}

.bx-footer-bottom a:hover {
  color: #f2f0ec;
}

.bx-footer-bottom .sep {
  color: #4a5a6c;
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
.bx-totop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #f9f8f4;
  background: var(--accent);
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
  box-shadow: 0 12px 30px -12px rgba(132, 99, 73, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.16s ease;
}

.bx-totop.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.bx-totop:hover {
  background: var(--accent-2);
}

.bx-totop[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   AOS safety
   -------------------------------------------------------------------------- */
.no-js [data-aos],
.aos-fail [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Laptop / small desktop */
@media (max-width: 1180px) {
  :root { --pad-x: 28px; }

  .bx-nav { gap: 20px; }
}

/* Tablet landscape */
@media (max-width: 1024px) {
  :root { --header-h: 70px; }

  .bx-hero-copy h1 { max-width: 22ch; }

  .bx-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .bx-split,
  .bx-about {
    grid-template-columns: 1fr;
  }

  .bx-split-media {
    min-height: 300px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .bx-split--rev .bx-split-media {
    order: 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .bx-footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
  }
}

/* Tablet portrait */
@media (max-width: 920px) {
  .bx-nav-links,
  .bx-nav-cta {
    display: none;
  }

  .bx-burger {
    display: flex;
  }

  .bx-grid--3,
  .bx-grid--4,
  .bx-caps {
    grid-template-columns: repeat(2, 1fr);
  }

  .bx-card--wide {
    grid-column: 1 / -1;
  }

  .bx-svc {
    grid-template-columns: 1fr;
  }

  .bx-contact {
    grid-template-columns: 1fr;
  }

  .bx-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .bx-hero-rail {
    grid-template-columns: 1fr;
  }

  .bx-hero-rail-item {
    padding-right: 0;
  }

  .bx-hero-rail-item + .bx-hero-rail-item {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .bx-footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
  }
}

/* Large phone */
@media (max-width: 600px) {
  :root { --pad-x: 20px; }

  .bx-band { padding-block: clamp(48px, 14vw, 80px); }
  .bx-band--sm { padding-block: clamp(40px, 11vw, 64px); }

  .bx-hero { padding-top: calc(var(--header-h) + clamp(36px, 12vw, 60px)); }

  .bx-phero {
    padding-top: calc(var(--header-h) + clamp(32px, 11vw, 56px));
    padding-bottom: clamp(32px, 8vw, 52px);
  }

  .bx-hero-figure-inner { height: clamp(170px, 44vw, 260px); }

  .bx-grid--2,
  .bx-grid--3,
  .bx-grid--4,
  .bx-caps,
  .bx-contact,
  .bx-stats {
    grid-template-columns: 1fr;
  }

  /* Any card span collapses to a single column on phones. */
  .bx-grid > * {
    grid-column: auto !important;
  }

  .bx-btn:not(.bx-btn--sm) {
    width: 100%;
    justify-content: center;
  }

  .bx-split-text {
    padding: 40px 24px;
  }

  .bx-split-text .bx-btn {
    align-self: stretch;
  }

  .bx-split-media {
    min-height: 240px;
  }

  .bx-card--feature {
    padding: 30px 24px 28px;
  }

  .bx-svc-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 28px 24px;
  }

  .bx-contact-card {
    padding: 30px 24px;
  }

  .bx-footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
    justify-items: center;
    text-align: center;
  }

  .bx-footer-top > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bx-footer-blurb {
    margin-inline: auto;
  }

  .bx-footer-col ul {
    align-items: center;
  }

  .bx-footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .bx-footer-bottom .sep {
    display: none;
  }

  .bx-totop {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
  }
}

/* Small phone */
@media (max-width: 400px) {
  :root { --pad-x: 16px; }

  .bx-h1 { font-size: clamp(2.1rem, 10vw, 2.6rem); }

  .bx-brand-name { font-size: 1.1rem; }

  .bx-hero-figure-inner { height: 150px; }

  .bx-mobile a { font-size: 1.18rem; padding: 16px 2px; }

  .bx-card,
  .bx-cap {
    padding: 28px 22px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .bx-hero-figure .flow {
    stroke-dashoffset: 0;
  }
}
