/* p-m38: ERP for home textiles and furnishings in Bangalore (ETC-303). Prefix m38-.
   Magazine-cover hero with an oversized keyword, block-print press motion, rounded 22px soft cards, stepper slider with
   numbered dots, scale-on-scroll art, numbered margin notes, channel matrix with toggles, KPI gauges. */
:root { --m38-acc: #4338CA; --m38-acc-d: #3730A3; --m38-teal: #0F766E; --m38-linen: #F3EEE3; --m38-soft: 0 24px 48px -28px rgba(55, 48, 163, .35), 0 2px 6px rgba(15, 23, 42, .05); }

/* hero: magazine cover */
.m38-hero { background: radial-gradient(circle at 1px 1px, #E7E0D0 1px, transparent 0) 0 0 / 22px 22px, linear-gradient(#FBF8F1, #fff); }
.m38-cover { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: end; margin-top: 10px; padding-top: 30px; }
.m38-cover__word { position: absolute; left: -6px; top: -10px; z-index: -1; margin: 0; font: 800 clamp(110px, 16vw, 230px)/.85 var(--font); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 2px #DCD3F5; pointer-events: none; user-select: none; white-space: nowrap; }
.m38-cover__mast { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding-bottom: 10px; border-bottom: 2px solid var(--ink);
  font: 700 12.5px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--m38-acc-d); }
.m38-cover__mast span + span::before { content: "·"; margin-right: 18px; color: var(--muted); }
.m38-cover__copy { padding-top: 18px; }
.m38-cover__copy h1 { font-size: clamp(32px, 1.3rem + 2.2vw, 52px); letter-spacing: -.02em; }
.m38-inset { position: relative; transform: scale(var(--m38-s, 1)); transform-origin: 50% 100%; }
.m38-inset .st-art { border-radius: 22px; box-shadow: var(--m38-soft); }
/* motion: block-print press steps down and up, prints appear */
.m38-press { transform-box: fill-box; animation: m38-press 2.4s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes m38-press { 0%, 100% { transform: translateY(0); } 40%, 55% { transform: translateY(26px); } }
.m38-prints circle { opacity: .15; animation: m38-print 12s steps(1) infinite; }
.m38-prints circle:nth-child(2) { animation-delay: 2.4s; } .m38-prints circle:nth-child(3) { animation-delay: 4.8s; }
.m38-prints circle:nth-child(4) { animation-delay: 7.2s; } .m38-prints circle:nth-child(5) { animation-delay: 9.6s; }
@keyframes m38-print { 0% { opacity: .15; } 4%, 96% { opacity: 1; } }
.m38-unroll { stroke-dasharray: 130; stroke-dashoffset: 130; animation: m38-unroll 6s ease-in-out infinite; }
@keyframes m38-unroll { 0% { stroke-dashoffset: 130; } 50%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 130; } }
.m38-inset .st-art.is-paused * { animation-play-state: paused !important; }

/* frame: rounded 22px soft cards */
.m38-card { border-radius: 22px; background: #fff; box-shadow: var(--m38-soft); padding: 24px; border: 1px solid #EEF0F6; }
.m38-card h3 { font-size: 21px; }
.m38-sec .eyebrow { color: var(--m38-acc-d); }
.m38-sec .eyebrow::before { background: linear-gradient(90deg, var(--m38-acc), var(--m38-teal)); }
.m38-proof .proof__n span { background: linear-gradient(45deg, var(--m38-acc), var(--m38-teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.m38-note { margin-top: 14px; font: 500 14px/1.5 var(--font-ui); color: var(--muted); }

/* type: numbered margin notes */
main { counter-reset: m38n; }
.m38-headgrid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 40px; align-items: start; }
.m38-mnote { counter-increment: m38n; position: relative; margin-top: 46px; padding: 14px 16px 14px 52px; border-left: 2px solid var(--m38-acc);
  font: 500 14px/1.5 var(--font-ui); color: var(--muted); }
.m38-mnote::before { content: counter(m38n); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--m38-acc); color: #fff; font: 700 13px/1 var(--font-ui); }
.m38-mnote b { display: block; color: var(--ink); font: 700 12px/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }

/* fit: pick tabs */
.m38-pick__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.m38-pick__tabs button { min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid #C7D2FE; background: #fff; cursor: pointer;
  font: 600 14.5px/1.2 var(--font-ui); color: var(--m38-acc-d); }
.m38-pick__tabs button[aria-selected="true"] { background: var(--m38-acc); border-color: var(--m38-acc); color: #fff; }
.m38-pick .m38-card p:last-child { margin-bottom: 0; }

/* signature 1: channel matrix with toggles */
.m38-matrix__toggles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.m38-matrix__toggles button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px 8px 10px; border-radius: 999px; border: 1px solid #C7D2FE;
  background: #fff; cursor: pointer; font: 600 14.5px/1.2 var(--font-ui); color: var(--ink); }
.m38-matrix__toggles button::before { content: ""; width: 34px; height: 20px; border-radius: 999px; background: #CBD5E1;
  box-shadow: inset 2px 0 0 2px #CBD5E1, inset -14px 0 0 2px #fff; transition: box-shadow .2s, background .2s; }
.m38-matrix__toggles button[aria-pressed="true"]::before { background: var(--m38-teal); box-shadow: inset 14px 0 0 2px #fff, inset -2px 0 0 2px var(--m38-teal); }
.m38-matrix__scroll { overflow-x: auto; border-radius: 22px; box-shadow: var(--m38-soft); background: #fff; }
.m38-matrix table { width: 100%; border-collapse: collapse; min-width: 640px; font: 500 14.5px/1.4 var(--font-ui); }
.m38-matrix th, .m38-matrix td { padding: 12px 14px; border-bottom: 1px solid #EEF0F6; text-align: left; vertical-align: top; }
.m38-matrix thead th { background: #EEF2FF; color: var(--m38-acc-d); font-weight: 700; }
.m38-matrix tbody th { color: var(--ink); font-weight: 600; }
.m38-matrix .is-off { display: none; }
.m38-matrix__sum { margin: 16px 0 0; padding: 14px 18px; border-radius: 16px; background: #F0FDFA; color: var(--ink); font: 500 15px/1.5 var(--font-ui); }

/* carousel: stepper slider with numbered dots */
.m38-step__slides { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.m38-step.is-live .m38-step__slides { display: block; }
.m38-step.is-live .m38-step__slide { display: none; }
.m38-step.is-live .m38-step__slide.is-on { display: block; animation: m38-in .4s ease both; }
@keyframes m38-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.m38-step__k { margin: 0 0 6px; font: 700 12px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--m38-teal); }
.m38-step__slide { max-width: 760px; }
.m38-step__slide p:last-child { margin-bottom: 0; }
.m38-step__nav { display: none; align-items: center; gap: 12px; margin-top: 18px; }
.m38-step.is-live .m38-step__nav { display: flex; }
.m38-step__nav > button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #C7D2FE; background: #fff; color: var(--m38-acc-d); font: 700 22px/1 var(--font-ui); cursor: pointer; }
.m38-step__nav > button:disabled { color: #94A3B8; border-color: var(--line); cursor: default; }
.m38-step__dots { display: flex; gap: 8px; }
.m38-step__dots button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #C7D2FE; background: #fff; color: var(--m38-acc-d); font: 700 15px/1 var(--font-ui); cursor: pointer; }
.m38-step__dots button[aria-current="step"] { background: var(--m38-acc); border-color: var(--m38-acc); color: #fff; }

/* signature 2: KPI gauges */
.m38-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.m38-gauge { margin: 0; text-align: center; padding: 20px 16px; }
.m38-gauge svg { width: 100%; max-width: 180px; margin: 0 auto 6px; }
.m38-gauge__bg, .m38-gauge__fg { fill: none; stroke-width: 10; stroke-linecap: round; }
.m38-gauge__bg { stroke: #EEF2FF; }
.m38-gauge__fg { stroke: var(--m38-teal); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--v) * 100); transition: stroke-dashoffset 1.2s ease; }
.m38-gauges.is-wait .m38-gauge__fg { stroke-dashoffset: 100; }
.m38-gauge:nth-child(even) .m38-gauge__fg { stroke: var(--m38-acc); }
.m38-gauge b { display: block; font: 700 30px/1 var(--font); color: var(--ink); }
.m38-gauge figcaption { margin-top: 8px; font: 600 14.5px/1.35 var(--font-ui); color: var(--ink); }
.m38-gauge figcaption small { display: block; margin-top: 4px; font-weight: 500; font-size: 12.5px; color: var(--muted); }

/* cost */
.m38-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.m38-prices p:last-child { margin-bottom: 0; }
.m38-areas > div { border-radius: 22px; }

@media (max-width: 960px) {
  .m38-cover { grid-template-columns: 1fr; gap: 24px; }
  .m38-headgrid { grid-template-columns: 1fr; gap: 0; }
  .m38-mnote { margin: 0 0 22px; }
  .m38-gauges { grid-template-columns: 1fr 1fr; }
  .m38-prices { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .m38-cover__word { font-size: 96px; top: 0; }
  .m38-card { padding: 18px; }
  .m38-step__nav { gap: 6px; }
  .m38-step__dots { gap: 4px; }
  .m38-step__dots button, .m38-step__nav > button { width: 44px; height: 44px; }
}
@media (max-width: 400px) {
  .m38-step__dots button { width: 38px; height: 44px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .m38-press, .m38-prints circle, .m38-unroll { animation: none !important; }
  .m38-prints circle { opacity: 1; } .m38-unroll { stroke-dashoffset: 0; }
  .m38-inset { transform: none; }
  .m38-gauge__fg { transition: none; }
}
