/* ==========================================================================
   Suneel Mohidekar — Independent Problem-Solving Consultant
   Main stylesheet (loads after Bootstrap 5.3)
   ========================================================================== */

:root {
  --sm-primary: #7c1e08;
  --sm-primary-dark: #5e1606;
  --sm-primary-soft: #f4e9e4;
  --sm-charcoal: #333333;
  --sm-ink: #1f1d1c;
  --sm-bg: #ffffff;
  --sm-bg-light: #f7f5f3;
  --sm-accent: #d9a58f;
  --sm-text: #333333;
  --sm-muted: #6b6560;
  --sm-line: #e6e1dc;
  --sm-line-dark: rgba(255, 255, 255, .12);
  --sm-radius: 4px;
  --sm-radius-lg: 8px;
  --sm-shadow: 0 1px 2px rgba(31, 29, 28, .04), 0 8px 24px rgba(31, 29, 28, .06);
  --sm-shadow-hover: 0 2px 4px rgba(31, 29, 28, .06), 0 18px 40px rgba(31, 29, 28, .12);
  --sm-font-head: "Manrope", "DM Sans", "Inter", system-ui, sans-serif;
  --sm-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sm-ease: cubic-bezier(.2, .7, .2, 1);
  --sm-header-h: 76px;

  /* Bootstrap overrides */
  --bs-body-font-family: var(--sm-font-body);
  --bs-body-color: var(--sm-text);
  --bs-link-color: var(--sm-primary);
  --bs-link-color-rgb: 124, 30, 8;
  --bs-link-hover-color: var(--sm-primary-dark);
  --bs-link-hover-color-rgb: 94, 22, 6;
  --bs-primary: #7c1e08;
  --bs-primary-rgb: 124, 30, 8;
  --bs-border-color: var(--sm-line);
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--sm-header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sm-font-body);
  color: var(--sm-text);
  background: var(--sm-bg);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--sm-font-head);
  color: var(--sm-ink);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.display-title { font-size: clamp(2.35rem, 5.2vw, 4.25rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.section-title { font-size: clamp(1.85rem, 3.4vw, 2.75rem); font-weight: 800; letter-spacing: -.03em; }
.lead { font-size: clamp(1.075rem, 1.4vw, 1.25rem); line-height: 1.65; color: var(--sm-muted); font-weight: 400; }
.text-primary-brand { color: var(--sm-primary) !important; }
.text-muted-brand { color: var(--sm-muted) !important; }
::selection { background: var(--sm-primary); color: #fff; }

a { text-underline-offset: .2em; transition: color .2s var(--sm-ease); }

/* Accessibility */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  background: var(--sm-primary); color: #fff; padding: .6rem 1rem; border-radius: var(--sm-radius);
}
.skip-link:focus { top: 1rem; color: #fff; }
:focus-visible { outline: 3px solid var(--sm-accent); outline-offset: 2px; }

/* Eyebrow / technical label */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sm-font-head);
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sm-primary); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow.on-dark { color: var(--sm-accent); }
.eyebrow.centered::after { content: ""; width: 28px; height: 2px; background: currentColor; }

/* Sections */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; position: relative; }
.section-sm { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.bg-light-brand { background: var(--sm-bg-light); }
.bg-charcoal { background: var(--sm-ink); color: rgba(255,255,255,.78); }
.bg-charcoal h1, .bg-charcoal h2, .bg-charcoal h3, .bg-charcoal h4, .bg-charcoal h5 { color: #fff; }
.bg-charcoal .lead { color: rgba(255,255,255,.7); }
.bg-maroon { background: var(--sm-primary); color: rgba(255,255,255,.85); }
.bg-maroon h2, .bg-maroon h3 { color: #fff; }

/* Blueprint grid backdrop (subtle) */
.grid-backdrop { position: relative; isolation: isolate; }
.grid-backdrop::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(124,30,8,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124,30,8,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 75%);
}
.blueprint {
  position: relative; isolation: isolate; color: rgba(255,255,255,.8);
  background-color: #2a1410;
}
.blueprint::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(217,165,143,.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217,165,143,.10) 1px, transparent 1px),
    linear-gradient(to right, rgba(217,165,143,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217,165,143,.05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.blueprint h1, .blueprint h2, .blueprint h3 { color: #fff; }
.blueprint .lead { color: rgba(255,255,255,.72); }

/* Buttons */
.btn { font-family: var(--sm-font-head); font-weight: 700; letter-spacing: .01em; border-radius: var(--sm-radius); padding: .8rem 1.4rem; transition: all .25s var(--sm-ease); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.02rem; }
.btn-sm { padding: .5rem .9rem; font-size: .875rem; }
.btn-brand { background: var(--sm-primary); color: #fff; border: 1px solid var(--sm-primary); }
.btn-brand:hover, .btn-brand:focus-visible { background: var(--sm-primary-dark); border-color: var(--sm-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(124,30,8,.25); }
.btn-outline-brand { color: var(--sm-primary); border: 1px solid var(--sm-primary); background: transparent; }
.btn-outline-brand:hover, .btn-outline-brand:focus-visible { background: var(--sm-primary); color: #fff; }
.btn-ghost-light { color: #fff; border: 1px solid rgba(255,255,255,.4); background: transparent; }
.btn-ghost-light:hover, .btn-ghost-light:focus-visible { background: #fff; color: var(--sm-primary); border-color: #fff; }
.btn-light-brand { background: #fff; color: var(--sm-primary); border: 1px solid #fff; }
.btn-light-brand:hover, .btn-light-brand:focus-visible { background: var(--sm-bg-light); color: var(--sm-primary-dark); transform: translateY(-1px); }
.btn .bi { transition: transform .25s var(--sm-ease); }
.btn:hover .bi-arrow-right, .btn:hover .bi-arrow-up-right { transform: translateX(3px); }
.link-arrow { font-family: var(--sm-font-head); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; color: var(--sm-primary); }
.link-arrow .bi { transition: transform .25s var(--sm-ease); }
.link-arrow:hover .bi { transform: translateX(4px); }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--sm-line); box-shadow: 0 6px 24px rgba(31,29,28,.05); }
.site-header .navbar { min-height: var(--sm-header-h); padding: .5rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--sm-ink); }
.brand-mark {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  background: var(--sm-primary); color: #fff; border-radius: var(--sm-radius);
  font-family: var(--sm-font-head); font-weight: 800; font-size: 1rem; letter-spacing: -.02em;
  position: relative;
}
.brand-mark::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-right: 2px solid var(--sm-accent); border-bottom: 2px solid var(--sm-accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--sm-font-head); font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; }
.brand-role { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sm-muted); font-weight: 600; }
.site-header .nav-link {
  font-family: var(--sm-font-head); font-weight: 600; font-size: .95rem; color: var(--sm-charcoal);
  padding: .5rem .85rem !important; position: relative;
}
.site-header .nav-link::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 2px;
  background: var(--sm-primary); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--sm-ease);
}
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--sm-primary); }
.site-header .nav-link:hover::after, .site-header .nav-link.active::after { transform: scaleX(1); }
.navbar-toggler { border: 1px solid var(--sm-line); padding: .5rem .6rem; border-radius: var(--sm-radius); }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(217,165,143,.6); }
.toggler-bars { display: block; width: 22px; height: 14px; position: relative; }
.toggler-bars span { position: absolute; left: 0; width: 100%; height: 2px; background: var(--sm-ink); transition: all .3s var(--sm-ease); }
.toggler-bars span:nth-child(1) { top: 0; } .toggler-bars span:nth-child(2) { top: 6px; } .toggler-bars span:nth-child(3) { top: 12px; }
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

@media (max-width: 1199.98px) {
  .site-header .navbar-collapse { border-top: 1px solid var(--sm-line); margin-top: .5rem; padding: .75rem 0 1.25rem; }
  .site-header .nav-link { padding: .8rem 0 !important; font-size: 1.05rem; border-bottom: 1px solid var(--sm-line); }
  .site-header .nav-link::after { display: none; }
  .site-header .header-cta { width: 100%; margin-top: 1rem; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 8vw, 6rem); overflow: hidden; }
.hero .display-title .accent { color: var(--sm-primary); }
.hero-support { font-size: 1rem; color: var(--sm-muted); border-left: 2px solid var(--sm-accent); padding-left: 1rem; max-width: 34rem; }
/* Hero illustration — complex problem → clear thinking → practical solution.
   Three masked copies of one image reveal in sequence; later layers sit above
   earlier ones with a feathered edge so the seams never haze. */
.hero .display-title { font-size: clamp(2.3rem, 4vw, 3.55rem); }
.hero-ill { position: relative; margin: 0; }
.hero-stage { position: relative; width: 100%; aspect-ratio: 1774 / 887; mix-blend-mode: multiply; }
.hero-stage picture, .hero-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.hero-stage .z1 { -webkit-mask-image: linear-gradient(90deg, #000 0 46%, transparent 51%); mask-image: linear-gradient(90deg, #000 0 46%, transparent 51%); }
.hero-stage .z2 { -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 41% 73%, transparent 78%); mask-image: linear-gradient(90deg, transparent 35%, #000 41% 73%, transparent 78%); }
.hero-stage .z3 { -webkit-mask-image: linear-gradient(90deg, transparent 64%, #000 70%); mask-image: linear-gradient(90deg, transparent 64%, #000 70%); }
.js .hero-ill:not(.play) .hero-stage img { opacity: 0; }
.hero-ill.play .z1 { animation: heroChaos 1.1s var(--sm-ease) both; }
.hero-ill.play .z2 { animation: heroMind 1s var(--sm-ease) .75s both; }
.hero-ill.play .z3 { animation: heroSolve 1s var(--sm-ease) 1.45s both; }
.hero-ill.live .hero-stage { animation: heroFloat 7s ease-in-out infinite; }
@keyframes heroChaos { from { opacity: 0; filter: blur(6px); transform: translateX(-18px) scale(1.03); } to { opacity: 1; filter: none; transform: none; } }
@keyframes heroMind { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes heroSolve { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes heroFloat { 50% { transform: translateY(-6px); } }

.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.hero-ill.live .hero-fx { opacity: 1; }
.hero-fx .fx-glow { mix-blend-mode: screen; transform-box: fill-box; transform-origin: center; animation: fxGlow 3.2s ease-in-out infinite; }
.hero-fx .fx-spark { transform-box: fill-box; transform-origin: center; animation: fxTwinkle 2.6s ease-in-out infinite; }
.hero-fx .fx-ring { transform-box: fill-box; transform-origin: center; animation: fxRing 2.4s ease-out infinite; }
.hero-fx .fx-shine { mix-blend-mode: screen; animation: fxShine 4.5s ease-in-out 1s infinite; }
@keyframes fxGlow { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: .85; transform: scale(1.06); } }
@keyframes fxTwinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
@keyframes fxRing { from { opacity: .8; transform: scale(.6); } to { opacity: 0; transform: scale(1.9); } }
@keyframes fxShine { 0% { transform: translateX(-260px); } 60%, 100% { transform: translateX(420px); } }

.hero-labels { display: grid; grid-template-columns: 42fr 32fr 26fr; margin-top: .9rem; border-top: 1px solid var(--sm-line); }
.hero-labels div { padding: .75rem .25rem 0; font-family: var(--sm-font-head); font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sm-muted); }
.hero-labels div i { display: block; font-family: var(--sm-font-body); font-style: normal; font-weight: 500; font-size: .82rem; letter-spacing: 0; text-transform: none; margin-top: .15rem; }
.hero-labels div:nth-child(2) { color: var(--sm-primary); }
.hero-labels div:nth-child(3) { text-align: right; }
.js .hero-ill .hero-labels div { opacity: 0; transform: translateY(6px); transition: opacity .6s ease, transform .6s ease; }
.js .hero-ill.play .hero-labels div { opacity: 1; transform: none; }
.hero-ill.play .hero-labels div:nth-child(1) { transition-delay: .4s; }
.hero-ill.play .hero-labels div:nth-child(2) { transition-delay: 1.1s; }
.hero-ill.play .hero-labels div:nth-child(3) { transition-delay: 1.8s; }

.hero-tag {
  position: absolute; right: -14px; top: -64px; background: var(--sm-ink); color: #fff;
  padding: .9rem 1.1rem; border-radius: var(--sm-radius); box-shadow: var(--sm-shadow-hover); max-width: 230px;
}
.js .hero-ill .hero-tag { opacity: 0; transform: translateY(10px); transition: opacity .6s ease 2.3s, transform .6s ease 2.3s; }
.js .hero-ill.play .hero-tag { opacity: 1; transform: none; }
.hero-tag strong { display: block; white-space: nowrap; font-family: var(--sm-font-head); font-size: 1.6rem; line-height: 1; color: var(--sm-accent); }
.hero-tag span { font-size: .8rem; line-height: 1.35; display: block; margin-top: .35rem; color: rgba(255,255,255,.82); }
@media (max-width: 1399.98px) { .hero-tag { top: -48px; right: 0; } }
@media (max-width: 1199.98px) { .hero-tag { top: -28px; right: 8px; } .hero-ill { max-width: 860px; margin: 1rem auto 0; } }
@media (max-width: 575.98px) {
  .hero-labels div { font-size: .66rem; letter-spacing: .07em; }
  .hero-labels div i { display: none; }
  .hero-tag { position: static; max-width: none; margin-top: 1rem; display: flex; gap: .9rem; align-items: center; }
  .hero-tag span { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-ill .hero-stage, .hero-fx * { animation: none !important; }
}

/* Page hero (inner pages) */
.page-hero { padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid var(--sm-line); }
.page-hero.blueprint { border-bottom: 0; }
.breadcrumb { font-size: .85rem; margin-bottom: 1.25rem; --bs-breadcrumb-divider-color: var(--sm-muted); }
.breadcrumb a { color: var(--sm-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--sm-primary); }
.breadcrumb .active { color: var(--sm-primary); font-weight: 600; }
.blueprint .breadcrumb a, .blueprint .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.6); }
.blueprint .breadcrumb .active { color: var(--sm-accent); }

/* Stat strip */
.stat-strip { border-top: 1px solid var(--sm-line); margin-top: 2.5rem; padding-top: 1.75rem; }
.stat-strip .stat-num { font-family: var(--sm-font-head); font-weight: 800; font-size: 1.85rem; color: var(--sm-ink); line-height: 1; letter-spacing: -.03em; }
.stat-strip .stat-label { font-size: .85rem; color: var(--sm-muted); line-height: 1.4; margin-top: .4rem; }

/* ==========================================================================
   Cards
   ========================================================================== */
.card-service {
  position: relative; height: 100%; background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius);
  padding: 2.25rem 2rem 2rem; transition: transform .35s var(--sm-ease), box-shadow .35s var(--sm-ease), border-color .35s;
  display: flex; flex-direction: column;
}
.card-service::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--sm-primary); transition: width .45s var(--sm-ease); }
.card-service:hover { transform: translateY(-4px); box-shadow: var(--sm-shadow-hover); border-color: transparent; }
.card-service:hover::before { width: 100%; }
.card-service .num { position: absolute; top: 1.5rem; right: 1.75rem; font-family: var(--sm-font-head); font-weight: 800; font-size: .85rem; color: var(--sm-accent); letter-spacing: .1em; }
.icon-box {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--sm-radius);
  background: var(--sm-primary-soft); color: var(--sm-primary); font-size: 1.55rem; margin-bottom: 1.5rem; flex: none;
}
.card-service h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.card-service .tagline { font-family: var(--sm-font-head); font-weight: 700; color: var(--sm-primary); font-size: .95rem; margin-bottom: 1rem; }
.card-service p { color: var(--sm-muted); font-size: .98rem; }
.card-service .link-arrow { margin-top: auto; padding-top: .75rem; }
.stretched-link:focus-visible::after { outline: 3px solid var(--sm-accent); }

/* Feature list (pillars) */
.pillar { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 0; border-top: 1px solid var(--sm-line); }
.pillar:last-child { border-bottom: 1px solid var(--sm-line); }
.pillar .bi { color: var(--sm-primary); font-size: 1.35rem; line-height: 1.3; flex: none; }
.pillar h3 { font-size: 1.05rem; margin: 0 0 .2rem; }
.pillar p { margin: 0; font-size: .95rem; color: var(--sm-muted); }

/* Check list */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 2rem; margin-bottom: .75rem; }
.check-list li::before {
  content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .05rem;
  color: var(--sm-primary); font-size: 1.2rem; line-height: 1.4;
}
.on-dark .check-list li::before, .bg-charcoal .check-list li::before, .blueprint .check-list li::before { color: var(--sm-accent); }

/* Outcome chips */
.outcome-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; }
.outcome {
  display: flex; align-items: center; gap: .65rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--sm-line);
  border-radius: var(--sm-radius); font-weight: 600; font-size: .93rem; color: var(--sm-ink);
}
.outcome .bi { color: var(--sm-primary); font-size: 1.1rem; }

/* ==========================================================================
   Process
   ========================================================================== */
.process { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 0; position: relative; }
.process-step { position: relative; padding: 0 0 2.25rem 4.25rem; }
.process-step:last-child { padding-bottom: 0; }
.process-node {
  position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 2px solid var(--sm-line);
  font-family: var(--sm-font-head); font-weight: 800; color: var(--sm-muted); z-index: 1;
  transition: all .5s var(--sm-ease);
}
.process-step::before { /* connector (mobile: vertical) */
  content: ""; position: absolute; left: 23px; top: 48px; bottom: 0; width: 2px; background: var(--sm-line);
}
.process-step::after {
  content: ""; position: absolute; left: 23px; top: 48px; width: 2px; height: 0; background: var(--sm-primary);
  transition: height .7s var(--sm-ease);
}
.process-step:last-child::before, .process-step:last-child::after { display: none; }
.process-step h3 { font-size: 1.1rem; margin: .65rem 0 .4rem; }
.process-step p { font-size: .94rem; color: var(--sm-muted); margin: 0; }
.process.is-active .process-node { background: var(--sm-primary); border-color: var(--sm-primary); color: #fff; box-shadow: 0 0 0 6px var(--sm-primary-soft); }
.process.is-active .process-step::after { height: calc(100% - 48px); }
.process.is-active .process-step:nth-child(2) .process-node, .process.is-active .process-step:nth-child(2)::after { transition-delay: .15s; }
.process.is-active .process-step:nth-child(3) .process-node, .process.is-active .process-step:nth-child(3)::after { transition-delay: .3s; }
.process.is-active .process-step:nth-child(4) .process-node, .process.is-active .process-step:nth-child(4)::after { transition-delay: .45s; }
.process.is-active .process-step:nth-child(5) .process-node { transition-delay: .6s; }
@media (min-width: 992px) {
  .process { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
  .process-step { padding: 0; }
  .process-node { position: relative; margin-bottom: 1rem; }
  .process-step::before { left: 56px; right: -1.5rem; top: 23px; bottom: auto; width: auto; height: 2px; }
  .process-step::after { left: 56px; top: 23px; width: 0; height: 2px; transition: width .7s var(--sm-ease); }
  .process.is-active .process-step::after { height: 2px; width: calc(100% - 56px + 1.5rem); }
}

/* ==========================================================================
   Machine portfolio
   ========================================================================== */
.machine-card {
  height: 100%; background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .35s var(--sm-ease), box-shadow .35s var(--sm-ease);
}
.machine-card:hover { transform: translateY(-4px); box-shadow: var(--sm-shadow-hover); }
.machine-media { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--sm-bg-light); aspect-ratio: 4 / 3; overflow: hidden; cursor: zoom-in; }
.machine-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--sm-ease); }
.machine-card:hover .machine-media img { transform: scale(1.04); }
.machine-media .count {
  position: absolute; right: .75rem; bottom: .75rem; background: rgba(31,29,28,.82); color: #fff;
  font-size: .75rem; font-weight: 600; padding: .3rem .55rem; border-radius: 3px; display: inline-flex; gap: .35rem; align-items: center;
}
.machine-body { padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.machine-cat { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sm-primary); margin-bottom: .45rem; }
.machine-body h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.machine-body p { font-size: .93rem; color: var(--sm-muted); margin-bottom: 1rem; }
.spec-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.spec-chip { font-size: .76rem; font-weight: 600; color: var(--sm-ink); background: var(--sm-bg-light); border: 1px solid var(--sm-line); padding: .25rem .55rem; border-radius: 3px; }
.machine-actions { margin-top: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.machine-actions .btn { flex: 1 1 auto; }

.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-btn {
  font-family: var(--sm-font-head); font-weight: 700; font-size: .88rem; padding: .55rem 1rem; border-radius: 999px;
  border: 1px solid var(--sm-line); background: #fff; color: var(--sm-charcoal); transition: all .2s;
}
.filter-btn:hover { border-color: var(--sm-primary); color: var(--sm-primary); }
.filter-btn.is-active { background: var(--sm-primary); border-color: var(--sm-primary); color: #fff; }
.machine-item.is-hidden { display: none; }

/* Home teaser tiles */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { position: relative; overflow: hidden; border-radius: var(--sm-radius); aspect-ratio: 4 / 3; display: block; background: #000; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: transform .7s var(--sm-ease), opacity .4s; }
.tile:hover img { transform: scale(1.05); opacity: 1; }
.tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem .9rem .75rem; color: #fff;
  font-family: var(--sm-font-head); font-weight: 700; font-size: .92rem;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
}

/* Machine detail */
.gallery-main { position: relative; background: var(--sm-bg-light); border: 1px solid var(--sm-line); border-radius: var(--sm-radius); overflow: hidden; aspect-ratio: 4 / 3; }
.gallery-main button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main .zoom-hint { position: absolute; right: .75rem; top: .75rem; background: rgba(255,255,255,.92); border-radius: 3px; padding: .3rem .55rem; font-size: .78rem; font-weight: 600; pointer-events: none; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .5rem; margin-top: .75rem; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 3px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sm-bg-light); }
.gallery-thumbs button.is-active { border-color: var(--sm-primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.spec-table { font-size: .92rem; margin-bottom: 0; }
.spec-table th { font-family: var(--sm-font-head); font-weight: 700; color: var(--sm-ink); background: var(--sm-bg-light) !important; white-space: nowrap; }
.spec-table thead th { background: var(--sm-ink) !important; color: #fff; font-size: .82rem; letter-spacing: .04em; }
.spec-table td, .spec-table th { padding: .65rem .85rem; vertical-align: top; }
.spec-note { font-size: .82rem; color: var(--sm-muted); }
.sub-machine { border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: 1.5rem; margin-bottom: 1.25rem; background: #fff; }
.sub-machine h3 { font-size: 1.15rem; }

/* Lightbox */
.lightbox .modal-content { background: #111; border: 0; border-radius: 0; }
.lightbox .modal-header { border: 0; color: #fff; padding: .75rem 1rem; }
.lightbox .modal-title { color: #fff; font-size: 1rem; font-weight: 600; font-family: var(--sm-font-body); }
.lightbox .lb-stage { position: relative; height: calc(100vh - 140px); overflow: hidden; display: grid; place-items: center; touch-action: pan-y; }
.lightbox .lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .3s var(--sm-ease); cursor: zoom-in; user-select: none; }
.lightbox .lb-stage.is-zoomed img { cursor: zoom-out; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.5); color: #fff; font-size: 1.3rem; display: grid; place-items: center; z-index: 2; }
.lightbox .lb-nav:hover { background: var(--sm-primary); border-color: var(--sm-primary); }
.lightbox .lb-prev { left: 1rem; } .lightbox .lb-next { right: 1rem; }
.lightbox .modal-footer { border: 0; justify-content: space-between; color: rgba(255,255,255,.75); font-size: .85rem; padding: .5rem 1rem 1rem; }
.lightbox .lb-tools button { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 3px; padding: .3rem .6rem; margin-left: .35rem; }
.lightbox .lb-tools button:hover { border-color: var(--sm-accent); color: var(--sm-accent); }
.lightbox .btn-close { filter: invert(1); opacity: .85; }

/* Blueprint know-how panel */
.bp-panel { border: 1px solid rgba(217,165,143,.35); padding: clamp(1.75rem, 4vw, 3rem); position: relative; background: rgba(0,0,0,.18); }
.bp-panel::before, .bp-panel::after { content: ""; position: absolute; width: 18px; height: 18px; border-color: var(--sm-accent); border-style: solid; }
.bp-panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.bp-panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.bp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.bp-list li { display: flex; gap: .85rem; align-items: flex-start; }
.bp-list .bi { color: var(--sm-accent); font-size: 1.2rem; line-height: 1.4; }
.bp-label { font-family: var(--sm-font-head); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sm-accent); }
.bp-titleblock { border: 1px solid rgba(217,165,143,.35); font-size: .78rem; display: grid; grid-template-columns: 1fr 1fr; margin-top: 2rem; }
.bp-titleblock div { padding: .55rem .8rem; border-right: 1px solid rgba(217,165,143,.25); border-bottom: 1px solid rgba(217,165,143,.25); }
.bp-titleblock div:nth-child(2n) { border-right: 0; }
.bp-titleblock div:nth-last-child(-n+2) { border-bottom: 0; }
.bp-titleblock span { display: block; color: var(--sm-accent); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }

/* Notice */
.notice { border-left: 3px solid var(--sm-accent); background: var(--sm-bg-light); padding: 1rem 1.25rem; font-size: .88rem; color: var(--sm-muted); border-radius: 0 var(--sm-radius) var(--sm-radius) 0; }
.notice strong { color: var(--sm-ink); }

/* ==========================================================================
   About / timeline
   ========================================================================== */
.monogram-card {
  position: relative; aspect-ratio: 4 / 5; background: var(--sm-ink); color: #fff; border-radius: var(--sm-radius);
  display: flex; flex-direction: column; justify-content: space-between; padding: 2rem; overflow: hidden; isolation: isolate;
}
.monogram-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(to right, rgba(217,165,143,.08) 1px, transparent 1px), linear-gradient(to bottom, rgba(217,165,143,.08) 1px, transparent 1px);
  background-size: 32px 32px;
}
.monogram-card .mono { font-family: var(--sm-font-head); font-weight: 800; font-size: clamp(5rem, 12vw, 8rem); line-height: .9; letter-spacing: -.06em; color: var(--sm-accent); }
.monogram-card .mono-name { font-family: var(--sm-font-head); font-size: 1.5rem; font-weight: 800; color: #fff; }
.monogram-card .mono-role { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.monogram-card .mono-quote { border-left: 2px solid var(--sm-primary); padding-left: 1rem; font-size: .95rem; color: rgba(255,255,255,.8); }

.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 2rem; }
.timeline::before { content: ""; position: absolute; left: 7px; top: .5rem; bottom: .5rem; width: 2px; background: var(--sm-line); }
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -2rem; top: .35rem; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--sm-primary); }
.timeline-card { background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: 1.5rem; }
.timeline-date { font-family: var(--sm-font-head); font-weight: 800; color: var(--sm-primary); font-size: .9rem; letter-spacing: .04em; }
.timeline-card h3 { font-size: 1.15rem; margin: .35rem 0 .6rem; }
.timeline-card p { font-size: .95rem; color: var(--sm-muted); }
.source-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 3px; }
.source-badge.verified { background: #e9f2ec; color: #1f5d36; }
.source-badge.supplied { background: var(--sm-primary-soft); color: var(--sm-primary); }
.meta-list { font-size: .85rem; color: var(--sm-muted); margin: 0; }
.meta-list dt { font-weight: 600; color: var(--sm-ink); display: inline; }
.meta-list dd { display: inline; margin: 0 1rem 0 .25rem; }

.quote-block { position: relative; font-family: var(--sm-font-head); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.35; letter-spacing: -.02em; color: var(--sm-ink); padding-left: 1.75rem; border-left: 3px solid var(--sm-primary); }
.bg-charcoal .quote-block { color: #fff; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-card { background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius-lg); padding: clamp(1.5rem, 4vw, 2.75rem); box-shadow: var(--sm-shadow); }
.form-label { font-family: var(--sm-font-head); font-weight: 700; font-size: .88rem; color: var(--sm-ink); margin-bottom: .4rem; }
.form-label .req { color: var(--sm-primary); }
.form-control, .form-select { border-radius: var(--sm-radius); border-color: #d8d2cc; padding: .75rem .9rem; font-size: .98rem; }
.form-control:focus, .form-select:focus { border-color: var(--sm-primary); box-shadow: 0 0 0 .2rem rgba(124,30,8,.12); }
.form-check-input:checked { background-color: var(--sm-primary); border-color: var(--sm-primary); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(124,30,8,.15); border-color: var(--sm-primary); }
.choice-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice-group .btn-check + label { font-family: var(--sm-font-head); font-weight: 600; font-size: .9rem; border: 1px solid #d8d2cc; color: var(--sm-charcoal); border-radius: 999px; padding: .45rem 1rem; }
.choice-group .btn-check:checked + label { background: var(--sm-primary); border-color: var(--sm-primary); color: #fff; }
.choice-group .btn-check:focus-visible + label { outline: 3px solid var(--sm-accent); outline-offset: 2px; }
.form-status { display: none; }
.form-status.show { display: block; }
.char-count { font-size: .8rem; color: var(--sm-muted); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Steps (brainstorm) */
.mini-steps { list-style: none; padding: 0; margin: 0; counter-reset: ms; }
.mini-steps li { counter-increment: ms; display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--sm-line); }
.mini-steps li::before { content: counter(ms, decimal-leading-zero); font-family: var(--sm-font-head); font-weight: 800; color: var(--sm-primary); min-width: 2.25rem; }
.audience { display: flex; flex-wrap: wrap; gap: .5rem; }
.audience span { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--sm-line); padding: .5rem .85rem; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.audience .bi { color: var(--sm-primary); }

.contact-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 0; border-bottom: 1px solid var(--sm-line); }
.contact-item .icon-box { margin: 0; width: 48px; height: 48px; font-size: 1.25rem; }
.contact-item h3 { font-size: 1rem; margin: 0 0 .2rem; }
.contact-item p { margin: 0; color: var(--sm-muted); font-size: .95rem; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; isolation: isolate; }
.cta-band::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; z-index: -1;
  border: 1px solid rgba(255,255,255,.14); border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255,255,255,.03), 0 0 0 120px rgba(255,255,255,.025);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #191716; color: rgba(255,255,255,.65); font-size: .93rem; padding-top: 4.5rem; }
.site-footer h2 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; font-weight: 700; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: var(--sm-accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand-role { color: rgba(255,255,255,.55); }
.footer-motto { font-family: var(--sm-font-head); font-weight: 800; font-size: 1.35rem; color: #fff; letter-spacing: -.02em; line-height: 1.3; }
.footer-motto span { color: var(--sm-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 3.5rem; padding: 1.5rem 0; font-size: .82rem; color: rgba(255,255,255,.5); }

.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1020; width: 46px; height: 46px; border-radius: 50%;
  background: var(--sm-primary); color: #fff; border: 0; display: grid; place-items: center; font-size: 1.2rem;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s var(--sm-ease); box-shadow: 0 8px 20px rgba(124,30,8,.3);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--sm-primary-dark); }

/* ==========================================================================
   Reveal animations
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--sm-ease), transform .8s var(--sm-ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--sm-ease); }
.js .reveal-img.is-visible { clip-path: inset(0 0 0 0); }
.js .reveal[data-delay="1"] { transition-delay: .1s; }
.js .reveal[data-delay="2"] { transition-delay: .2s; }
.js .reveal[data-delay="3"] { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .reveal-img { opacity: 1; transform: none; clip-path: none; }
}

/* Utilities */
.max-w-prose { max-width: 42rem; }
.border-top-line { border-top: 1px solid var(--sm-line); }
.small-caps { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.rule-accent { width: 56px; height: 3px; background: var(--sm-primary); border: 0; opacity: 1; margin: 1.5rem 0; }

@media (max-width: 575.98px) {
  body { font-size: 1rem; }
  .btn-lg { padding: .9rem 1.3rem; font-size: .98rem; }
  .hero .btn-lg { width: 100%; }
  .card-service { padding: 1.75rem 1.5rem; }
  .tile-grid { gap: 8px; }
  .brand-role { font-size: .64rem; }
}
@media print {
  .site-header, .site-footer, .back-to-top, .cta-band { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Radio-group validation feedback */
.was-validated fieldset:has(:invalid) > .invalid-feedback { display: block; }
.was-validated .choice-group .btn-check:invalid + label { border-color: var(--bs-form-invalid-border-color, #dc3545); }

/* Prevent large gutters from overflowing the container on small screens */
@media (max-width: 767.98px) { .row.g-5 { --bs-gutter-x: 1.5rem; } }

/* Keep brand + toggler on one row on narrow phones */
@media (max-width: 1199.98px) {
  .site-header .brand { flex: 1 1 0; min-width: 0; }
  .site-header .brand-text { min-width: 0; }
  .site-header .navbar-toggler { flex: none; margin-left: .75rem; }
}
@media (max-width: 400px) { .site-header .brand-role { white-space: normal; font-size: .6rem; letter-spacing: .05em; } }

/* Compact desktop nav between 1200px and 1399px */
.site-header .nav-link, .site-header .header-cta { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .site-header .nav-link { padding: .5rem .6rem !important; font-size: .9rem; }
  .site-header .nav-link::after { left: .6rem; right: .6rem; }
  .site-header .header-cta { padding: .65rem 1rem; font-size: .9rem; }
}

/* Footer contact */
.site-footer .footer-contact li { display: flex; gap: .6rem; align-items: center; margin-bottom: .45rem; }
.site-footer .footer-contact .bi { color: var(--sm-accent); }
