/*
 * SerasMac meeting-ready premium visual direction.
 * Scope: homepage, services and how-it-works presentation only.
 * Business logic, forms and route contracts are untouched.
 */

:root {
  --sm-mx-night: #06171d;
  --sm-mx-night-2: #0a252d;
  --sm-mx-paper: #f1eee5;
  --sm-mx-paper-2: #e8e1d4;
  --sm-mx-mint: #5fc4bf;
  --sm-mx-brass: #d2a77d;
  --sm-mx-white: #fdfcf8;
}

/* Shared editorial direction */
.sm-mx-kicker {
  margin: 0 0 1.25rem;
  color: var(--sm-mx-brass);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.sm-mx-section-index {
  color: rgba(13,27,30,.42);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sm-mx-text-link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: inherit;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}

.sm-mx-text-link::after {
  content: '↗';
  font-size: 1rem;
  transition: transform .25s ease;
}

.sm-mx-text-link:hover::after,
.sm-mx-text-link:focus-visible::after {
  transform: translate(3px,-3px);
}

/* Homepage */
.sm-mx-home {
  background: var(--sm-mx-paper);
  color: var(--sm-ink);
}

.sm-mx-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--sm-mx-white);
  background:
    radial-gradient(circle at 78% 20%, rgba(95,196,191,.12), transparent 28%),
    radial-gradient(circle at 12% 90%, rgba(210,167,125,.13), transparent 30%),
    linear-gradient(140deg, var(--sm-mx-night), var(--sm-mx-night-2));
}

.sm-mx-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}

.sm-mx-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
  min-height: min(860px, calc(100vh - 90px));
  padding-block: clamp(5rem, 9vw, 9rem);
}

.sm-mx-hero__copy {
  position: relative;
  z-index: 2;
}

.sm-mx-hero__title {
  max-width: 12ch;
  margin: 0;
  color: var(--sm-mx-white);
  font-family: var(--sm-font-display);
  font-size: clamp(4.1rem, 7.4vw, 7.4rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .91;
  text-wrap: balance;
}

.sm-mx-hero__title em {
  color: var(--sm-mx-brass);
  font-weight: 400;
}

.sm-mx-hero__lead {
  max-width: 600px;
  margin: 2rem 0 0;
  color: rgba(255,255,255,.68);
  font-size: clamp(1.08rem, 1.5vw, 1.34rem);
  line-height: 1.72;
}

.sm-mx-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.4rem;
}

.sm-mx-hero__actions .sm-btn--primary {
  color: var(--sm-mx-night);
  background: var(--sm-mx-white);
  border-color: var(--sm-mx-white);
  box-shadow: 0 18px 40px rgba(0,0,0,.2);
}

.sm-mx-hero__actions .sm-btn--primary:hover {
  color: var(--sm-mx-night);
  background: var(--sm-mx-brass);
  border-color: var(--sm-mx-brass);
}

.sm-mx-hero__actions .sm-mx-text-link {
  color: rgba(255,255,255,.74);
}

.sm-mx-hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
  margin: clamp(3.25rem, 6vw, 5.5rem) 0 0;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,.12);
}

.sm-mx-hero__facts div {
  min-width: 0;
  padding: 1.25rem 1rem 0 0;
}

.sm-mx-hero__facts dt {
  color: var(--sm-mx-brass);
  font-family: var(--sm-font-display);
  font-size: 1.45rem;
}

.sm-mx-hero__facts dd {
  margin: .35rem 0 0;
  color: rgba(255,255,255,.54);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sm-mx-hero__visual {
  min-width: 0;
}

.sm-mx-route {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 3px;
  box-shadow: 0 44px 110px rgba(0,0,0,.28);
}

.sm-mx-route::after {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,.055);
  pointer-events: none;
}

.sm-mx-route__topline {
  display: flex;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  color: rgba(255,255,255,.38);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sm-mx-route__map {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1rem;
}

.sm-mx-route__document {
  position: absolute;
  right: clamp(1.2rem, 3vw, 2.5rem);
  bottom: clamp(1.2rem, 3vw, 2.5rem);
  width: min(330px, calc(100% - 2.4rem));
  padding: 1.5rem;
  color: var(--sm-ink);
  background: var(--sm-mx-paper);
  box-shadow: 0 24px 60px rgba(0,0,0,.24);
}

.sm-mx-route__document-label {
  display: block;
  margin-bottom: .75rem;
  color: var(--sm-ink-muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sm-mx-route__document strong {
  display: block;
  padding-bottom: 1rem;
  font-family: var(--sm-font-display);
  font-size: 1.55rem;
  border-bottom: 1px solid var(--sm-line-strong);
}

.sm-mx-route__document ul {
  display: grid;
  gap: .75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.sm-mx-route__document li {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--sm-ink-soft);
  font-size: .78rem;
}

.sm-mx-route__document .sm-icon {
  width: 15px;
  height: 15px;
  color: var(--sm-teal);
}

.sm-mx-hero__footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  border-top: 1px solid rgba(255,255,255,.12);
}

.sm-mx-hero__footer span {
  padding: 1.25rem 1rem;
  color: rgba(255,255,255,.42);
  border-right: 1px solid rgba(255,255,255,.1);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

.sm-mx-hero__footer span:last-child { border-right: 0; }

.sm-mx-manifesto {
  padding-block: clamp(6rem, 10vw, 11rem);
  background: var(--sm-mx-paper);
}

.sm-mx-manifesto__grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1.25fr) minmax(280px, .55fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}

.sm-mx-manifesto h2,
.sm-mx-section-head h2,
.sm-mx-services h2,
.sm-mx-cta h2 {
  margin: 0;
  font-family: var(--sm-font-display);
  font-size: clamp(2.7rem, 5.2vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .98;
  text-wrap: balance;
}

.sm-mx-manifesto__copy {
  padding-top: 3rem;
}

.sm-mx-manifesto__copy p,
.sm-mx-services__intro > p {
  margin: 0 0 2rem;
  color: var(--sm-ink-soft);
  font-size: 1rem;
  line-height: 1.85;
}

.sm-mx-gates {
  padding-block: clamp(5rem, 9vw, 9rem);
  background: var(--sm-mx-white);
}

.sm-mx-section-head {
  display: grid;
  grid-template-columns: 130px minmax(0, 850px);
  gap: clamp(2rem, 5vw, 6rem);
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.sm-mx-gates__rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  border-top: 1px solid var(--sm-line-strong);
  border-bottom: 1px solid var(--sm-line-strong);
}

.sm-mx-gate {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid var(--sm-line);
}

.sm-mx-gate:last-child { border-right: 0; }

.sm-mx-gate__number {
  margin-bottom: 3.5rem;
  color: var(--sm-copper);
  font-family: var(--sm-font-display);
  font-size: 1.65rem;
}

.sm-mx-gate > .sm-icon {
  width: 30px;
  height: 30px;
  color: var(--sm-teal);
}

.sm-mx-gate h3 {
  margin: 1.5rem 0 .75rem;
  font-size: 1rem;
  letter-spacing: .02em;
}

.sm-mx-gate p {
  margin: 0;
  color: var(--sm-ink-muted);
  font-size: .8rem;
  line-height: 1.7;
}

.sm-mx-services {
  padding-block: clamp(6rem, 10vw, 11rem);
  color: var(--sm-mx-white);
  background: var(--sm-mx-night);
}

.sm-mx-services__grid {
  display: grid;
  grid-template-columns: minmax(320px, .75fr) minmax(0, 1.25fr);
  gap: clamp(3rem, 8vw, 9rem);
  align-items: start;
}

.sm-mx-services__intro {
  position: sticky;
  top: 130px;
}

.sm-mx-services .sm-mx-section-index { color: rgba(255,255,255,.3); }
.sm-mx-services h2 { color: var(--sm-mx-white); }
.sm-mx-services__intro > p { color: rgba(255,255,255,.58); }
.sm-mx-services .sm-btn--outline { color: #fff; border-color: rgba(255,255,255,.3); }
.sm-mx-services .sm-btn--outline:hover { color: var(--sm-mx-night); background: #fff; }

.sm-mx-services__list {
  border-top: 1px solid rgba(255,255,255,.14);
}

.sm-mx-service-row {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto 24px;
  gap: 1.25rem;
  align-items: center;
  min-height: 126px;
  padding: 1.4rem 0;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.14);
  text-decoration: none;
  transition: padding .25s ease, background .25s ease;
}

.sm-mx-service-row:hover,
.sm-mx-service-row:focus-visible {
  padding-inline: 1.25rem;
  color: #fff;
  background: rgba(255,255,255,.04);
}

.sm-mx-service-row > span {
  color: var(--sm-mx-brass);
  font-family: var(--sm-font-display);
  font-size: 1.35rem;
}

.sm-mx-service-row strong {
  font-family: var(--sm-font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -.02em;
}

.sm-mx-service-row small {
  max-width: 180px;
  color: rgba(255,255,255,.42);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: right;
  text-transform: uppercase;
}

.sm-mx-service-row .sm-icon {
  width: 20px;
  height: 20px;
  color: var(--sm-mx-mint);
}

.sm-mx-evidence {
  padding-block: clamp(6rem, 10vw, 11rem);
  color: #fff;
  background:
    radial-gradient(circle at 78% 10%, rgba(95,196,191,.13), transparent 24%),
    linear-gradient(145deg, #0a252d, #10343c);
}

.sm-mx-section-head--light .sm-mx-section-index { color: rgba(255,255,255,.3); }
.sm-mx-section-head--light h2 { color: #fff; }

.sm-mx-evidence__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  border-top: 1px solid rgba(255,255,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.sm-mx-evidence__grid article {
  min-height: 330px;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-right: 1px solid rgba(255,255,255,.14);
}

.sm-mx-evidence__grid article:last-child { border-right: 0; }

.sm-mx-evidence__grid span {
  color: var(--sm-mx-brass);
  font-family: var(--sm-font-display);
  font-size: 2.25rem;
}

.sm-mx-evidence__grid h3 {
  margin: clamp(4rem, 8vw, 7rem) 0 1rem;
  color: #fff;
  font-family: var(--sm-font-display);
  font-size: 2rem;
  font-weight: 500;
}

.sm-mx-evidence__grid p {
  margin: 0;
  color: rgba(255,255,255,.58);
  line-height: 1.8;
}

.sm-mx-cta {
  padding-block: clamp(5rem, 9vw, 9rem);
  background: var(--sm-mx-paper);
}

.sm-mx-cta__panel {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  padding-top: clamp(3rem, 6vw, 6rem);
  border-top: 1px solid var(--sm-line-strong);
}

.sm-mx-cta h2 { max-width: 880px; }

.sm-mx-cta__actions {
  display: grid;
  justify-items: start;
  gap: 1.4rem;
  min-width: 260px;
}

/* Services page: remove catalogue/card feel */
body .sm-page-hero:has(+ .sm-section .sm-lifecycle-rail),
body .sm-page-hero:has(~ .sm-section .sm-lifecycle-rail) {
  padding-block: clamp(5rem, 9vw, 8rem);
}

.sm-lifecycle-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 0;
  overflow: hidden;
  background: transparent;
  border-top: 1px solid var(--sm-line-strong);
  border-bottom: 1px solid var(--sm-line-strong);
}

.sm-lifecycle-rail__step {
  min-height: 190px;
  padding: 2rem 1.25rem;
  border-right: 1px solid var(--sm-line);
}

.sm-lifecycle-rail__step:last-child { border-right: 0; }
.sm-lifecycle-rail__connector { display: none; }

.sm-lifecycle-rail__icon {
  width: 34px;
  height: 34px;
  margin-bottom: 3rem;
  color: var(--sm-teal);
  background: transparent;
  border: 0;
}

.sm-lifecycle-rail__label {
  font-family: var(--sm-font-display);
  font-size: 1.35rem;
}

.sm-service-stage {
  display: grid;
  grid-template-columns: minmax(250px,.42fr) minmax(0,1fr);
  gap: clamp(2rem,5vw,5rem);
  padding-block: clamp(4rem,7vw,7rem);
  border-top: 1px solid var(--sm-line-strong);
}

.sm-service-stage__header {
  position: sticky;
  top: 130px;
  display: block;
  align-self: start;
}

.sm-service-stage__icon {
  width: 42px;
  height: 42px;
  margin-bottom: 2rem;
  color: var(--sm-teal);
  background: transparent;
  border: 1px solid var(--sm-line-strong);
  border-radius: 50%;
}

.sm-service-stage__title {
  font-size: clamp(2rem,3.8vw,3.8rem);
  line-height: 1;
}

.sm-service-stage__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.sm-service-detail-card {
  padding: 2.1rem 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--sm-line);
  border-radius: 0;
  box-shadow: none;
}

.sm-service-detail-card:last-child { border-bottom: 1px solid var(--sm-line); }

.sm-service-detail-card__title {
  font-size: clamp(1.65rem,2.8vw,2.65rem);
}

.sm-service-detail-card__section {
  display: grid;
  grid-template-columns: 180px minmax(0,1fr);
  gap: 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid rgba(13,27,30,.07);
}

.sm-service-detail-card__foot { margin-top: 1.4rem; }

/* How it works: editorial dossier instead of stacked cards */
.sm-hiw-proof-strip {
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  border-color: var(--sm-line-strong);
}

.sm-hiw-proof-item {
  flex: 1;
  min-height: 105px;
  padding: 1.5rem;
  border-right: 1px solid var(--sm-line);
}

.sm-hiw-proof-item:last-child { border-right: 0; }

.sm-hiw-principles-grid {
  gap: 0;
  border-top: 1px solid var(--sm-line-strong);
  border-bottom: 1px solid var(--sm-line-strong);
}

.sm-hiw-principle {
  min-height: 270px;
  padding: 2rem;
  border-right: 1px solid var(--sm-line);
}

.sm-hiw-principle:last-child { border-right: 0; }

.sm-hiw-journey {
  grid-template-columns: 210px minmax(0,1fr);
  gap: clamp(2rem,5vw,5rem);
}

.sm-hiw-rail__track {
  border-top: 1px solid var(--sm-line-strong);
}

.sm-hiw-rail__link {
  padding: 1rem 0;
  border-bottom: 1px solid var(--sm-line);
  border-left: 0;
  border-radius: 0;
}

.sm-hiw-rail__link:hover,
.sm-hiw-rail__link.is-active {
  color: var(--sm-ink);
  background: transparent;
  border-left-color: transparent;
}

.sm-hiw-steps { gap: 0; }

.sm-hiw-step {
  display: grid;
  grid-template-columns: 140px minmax(0,1fr);
  gap: 2rem;
  padding: clamp(2.5rem,5vw,4.5rem) 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--sm-line-strong);
  border-radius: 0;
}

.sm-hiw-step:hover { box-shadow: none; }

.sm-hiw-step__head {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.sm-hiw-step__head-main { display: block; }
.sm-hiw-step__number { margin-bottom: 1.5rem; font-size: 4.5rem; color: var(--sm-copper); }
.sm-hiw-step__phase { color: var(--sm-ink-muted); }
.sm-hiw-step__title { font-size: clamp(1.7rem,3vw,2.7rem); }

.sm-hiw-step__summary,
.sm-hiw-step__grid,
.sm-hiw-step__gate,
.sm-hiw-step__document {
  grid-column: 2;
}

.sm-hiw-step__cell {
  background: transparent;
  border-top: 1px solid var(--sm-line);
  border-radius: 0;
}

.sm-hiw-step__gate {
  background: transparent;
  border: 1px solid rgba(168,108,61,.24);
  border-radius: 0;
}

.sm-hiw-documents__list {
  gap: 0;
  border-top: 1px solid var(--sm-line-strong);
  border-bottom: 1px solid var(--sm-line-strong);
}

.sm-hiw-doc-card {
  min-height: 250px;
  padding: 1.75rem;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--sm-line);
  border-radius: 0;
}

.sm-hiw-doc-card:last-child { border-right: 0; }

@media (max-width: 1080px) {
  .sm-mx-hero__grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .sm-mx-hero__title { max-width: 10ch; }
  .sm-mx-hero__visual { max-width: 780px; }
  .sm-mx-manifesto__grid,
  .sm-mx-section-head,
  .sm-mx-services__grid,
  .sm-service-stage {
    grid-template-columns: 1fr;
  }
  .sm-mx-services__intro,
  .sm-service-stage__header { position: static; }
  .sm-mx-gates__rail { grid-template-columns: repeat(3,1fr); }
  .sm-mx-gate:nth-child(3) { border-right: 0; }
  .sm-mx-gate:nth-child(-n+3) { border-bottom: 1px solid var(--sm-line); }
  .sm-mx-evidence__grid { grid-template-columns: 1fr; }
  .sm-mx-evidence__grid article { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .sm-mx-evidence__grid article:last-child { border-bottom: 0; }
  .sm-mx-evidence__grid h3 { margin-top: 3rem; }
}

@media (max-width: 760px) {
  .sm-mx-hero__grid { padding-block: 4.5rem; }
  .sm-mx-hero__title { font-size: clamp(3.35rem, 16vw, 5.2rem); }
  .sm-mx-hero__facts { grid-template-columns: 1fr; }
  .sm-mx-hero__facts div { padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .sm-mx-route { min-height: 520px; }
  .sm-mx-route__map { width: 135%; margin-left: -18%; }
  .sm-mx-hero__footer { grid-template-columns: 1fr 1fr; }
  .sm-mx-hero__footer span:nth-child(2) { border-right: 0; }
  .sm-mx-hero__footer span:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .sm-mx-manifesto__grid { gap: 1.5rem; }
  .sm-mx-manifesto__copy { padding-top: 0; }
  .sm-mx-manifesto h2,
  .sm-mx-section-head h2,
  .sm-mx-services h2,
  .sm-mx-cta h2 { font-size: clamp(2.45rem, 12vw, 4rem); }
  .sm-mx-gates__rail { grid-template-columns: 1fr; }
  .sm-mx-gate,
  .sm-mx-gate:nth-child(3) { border-right: 0; border-bottom: 1px solid var(--sm-line); }
  .sm-mx-gate:last-child { border-bottom: 0; }
  .sm-mx-gate__number { margin-bottom: 1.75rem; }
  .sm-mx-service-row { grid-template-columns: 34px minmax(0,1fr) 20px; min-height: 110px; }
  .sm-mx-service-row small { display: none; }
  .sm-mx-cta__panel { grid-template-columns: 1fr; align-items: start; }
  .sm-lifecycle-rail { grid-template-columns: repeat(2,1fr); }
  .sm-lifecycle-rail__step { border-bottom: 1px solid var(--sm-line); }
  .sm-service-detail-card__section { grid-template-columns: 1fr; gap: .5rem; }
  .sm-hiw-journey { grid-template-columns: 1fr; }
  .sm-hiw-rail { display: none; }
  .sm-hiw-step { grid-template-columns: 1fr; }
  .sm-hiw-step__summary,
  .sm-hiw-step__grid,
  .sm-hiw-step__gate,
  .sm-hiw-step__document { grid-column: 1; }
  .sm-hiw-step__grid { grid-template-columns: 1fr; }
  .sm-hiw-documents__list { grid-template-columns: 1fr; }
  .sm-hiw-doc-card { min-height: auto; border-right: 0; border-bottom: 1px solid var(--sm-line); }
}

@media (prefers-reduced-motion: reduce) {
  .sm-mx-text-link::after,
  .sm-mx-service-row { transition: none; }
}
