/*
 * MARI homepage — focused refinement pass v5.
 * Loaded after polish-v4.css.
 */

/* Header and hero */

@media (min-width: 901px) {
  .header-inner {
    min-height: 80px;
    grid-template-columns: 64px 1fr 178px;
    gap: 28px;
  }

  .header-button {
    width: 178px;
    min-height: 43px;
    padding: 0 15px 0 17px;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(209, 232, 255, 0.08)),
      rgba(3, 61, 172, 0.18);
    color: rgba(255, 255, 255, 0.96) !important;
    font-size: 12px;
    font-weight: 550;
    box-shadow:
      0 10px 26px rgba(0, 25, 94, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .header-button > span {
    font-size: 18px;
  }

  .header-button:hover,
  .header-button:focus-visible {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.27), rgba(209, 232, 255, 0.11)),
      rgba(3, 61, 172, 0.2);
    box-shadow:
      0 14px 30px rgba(0, 25, 94, 0.23),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
  }
}

.scroll-cue {
  right: 2px;
  bottom: 42px;
  gap: 7px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 8.5px;
  font-weight: 550;
  letter-spacing: 0.045em;
}

.scroll-cue-icon {
  width: 39px;
  height: 39px;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(1, 46, 147, 0.22);
  color: #fff;
  font-size: 17px;
  font-weight: 450;
  line-height: 1;
  box-shadow:
    0 8px 22px rgba(0, 29, 105, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.scroll-cue-icon::before,
.scroll-cue-icon::after {
  content: none;
  display: none;
}

/* About */

.signature {
  margin-top: 41px;
  font-size: clamp(150px, 13vw, 195px);
  line-height: 0.6;
  transform: rotate(-4deg) translateX(2px);
  text-shadow: 0 10px 32px rgba(0, 116, 255, 0.34);
}

.stat-icon--experience {
  position: relative;
  width: 29px;
  height: 20px;
  margin-left: 0;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(145deg, #f7fbff 5%, #94d4ff 100%);
  box-shadow:
    0 6px 14px rgba(68, 172, 255, 0.2),
    inset 0 -3px 0 rgba(8, 88, 180, 0.15);
}

.stat-icon--experience::before {
  left: 8px;
  top: -6px;
  width: 13px;
  height: 8px;
  border: 3px solid #d9efff;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.stat-icon--experience::after {
  right: 0;
  left: 0;
  top: 8px;
  height: 4px;
  border: 0;
  border-top: 1px solid rgba(4, 75, 160, 0.28);
  border-bottom: 0;
  background: radial-gradient(circle, #fff 0 2px, transparent 2.4px) center -1px / 7px 7px no-repeat;
}

.stat-icon--education {
  position: relative;
  width: 31px;
  height: 27px;
  background:
    linear-gradient(#a9ddff 0 0) 25px 10px / 2px 11px no-repeat,
    radial-gradient(circle, #eaf7ff 0 2.4px, transparent 2.8px) 23px 19px / 6px 6px no-repeat;
  filter: drop-shadow(0 6px 9px rgba(53, 160, 245, 0.2));
}

.stat-icon--education::before {
  left: 0;
  top: 1px;
  width: 31px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg, #f8fbff, #8fd0ff);
  clip-path: polygon(50% 0, 100% 35%, 50% 72%, 0 35%);
}

.stat-icon--education::after {
  left: 7px;
  bottom: 2px;
  width: 17px;
  height: 10px;
  border: 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(145deg, #dff3ff, #80c4f6);
  clip-path: polygon(0 0, 50% 28%, 100% 0, 87% 70%, 50% 100%, 13% 70%);
}

.map-arrow {
  width: 42px;
  height: 42px;
  border: 1.5px solid rgba(237, 245, 255, 0.82);
  color: #fff;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 550;
  line-height: 1;
}

.map-arrow i,
.map-arrow::before,
.map-arrow::after {
  display: none;
}

/* Works: three equal cards, with no empty ribbon zone. */

.works-section {
  position: relative;
  isolation: isolate;
  padding-bottom: clamp(100px, 8vw, 132px);
  background:
    radial-gradient(circle at 90% 20%, rgba(0, 83, 230, 0.16), transparent 38%),
    linear-gradient(180deg, var(--mari-navy) 0%, #07101f 78%, #07101f 100%);
}

.works-section::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: -1;
  height: 170px;
  background: linear-gradient(180deg, transparent, #07101f);
  pointer-events: none;
}

.works-section > .site-shell {
  position: relative;
  z-index: 1;
}

.works-stage {
  height: clamp(470px, 39vw, 600px);
  margin-top: 48px;
}

.works-stage .work-card--left,
.works-stage .work-card--center,
.works-stage .work-card--right {
  position: absolute;
  top: auto;
  bottom: -3%;
  width: 31%;
  height: 81%;
  border-radius: 25px;
  filter: none;
  transform-origin: 50% 100%;
}

.works-stage .work-card--left {
  left: 4.5%;
  z-index: 2;
  transform: rotate(-6deg) translateY(5%);
}

.works-stage .work-card--center {
  left: 34.5%;
  bottom: -1%;
  z-index: 4;
  height: 81%;
  transform: none;
}

.works-stage .work-card--right {
  right: 4.5%;
  left: auto;
  z-index: 3;
  transform: rotate(6deg) translateY(5%);
}

.works-stage .work-card--left:hover,
.works-stage .work-card--center:hover,
.works-stage .work-card--right:hover {
  z-index: 8;
  transform: rotate(0deg) translateY(-15px);
}

.works-stage .work-meta b {
  font-size: clamp(19px, 1.8vw, 27px);
}

/* Process: one visual loop instead of a row of unrelated cards. */

.process-section {
  position: relative;
  isolation: isolate;
  padding: clamp(108px, 9vw, 148px) 0 clamp(118px, 10vw, 164px);
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 43%, rgba(255, 92, 129, 0.3), transparent 27%),
    radial-gradient(circle at 89% 55%, rgba(46, 210, 255, 0.3), transparent 31%),
    linear-gradient(180deg, #07101f 0%, #063699 17%, #075df1 46%, #0746c6 77%, #070f1e 100%);
  background-size: auto;
}

.process-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  width: auto;
  height: 250px;
  border: 0;
  border-radius: 0;
  opacity: 1;
  background:
    linear-gradient(rgba(130, 183, 247, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 183, 247, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, #07101f 0%, rgba(7, 16, 31, 0) 100%);
  background-size: 54px 54px, 54px 54px, auto;
  box-shadow: none;
}

.process-section::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: -1;
  height: 250px;
  background:
    linear-gradient(rgba(130, 183, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 183, 247, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(7, 15, 30, 0), #070f1e);
  background-size: 54px 54px, 54px 54px, auto;
  pointer-events: none;
}

.process-section > .site-shell {
  position: relative;
  z-index: 1;
}

.process-intro {
  position: relative;
  z-index: 2;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.5fr);
  align-items: end;
  gap: clamp(50px, 8vw, 130px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.process-intro::before {
  content: none;
  display: none;
}

.process-title-group .section-kicker {
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.66);
}

.process-title-group h2 {
  font-size: clamp(58px, 6.3vw, 96px);
  line-height: 0.84;
}

.process-lead {
  max-width: 390px;
  margin: 0 0 5px;
  padding: 5px 0 5px 22px;
  border-left: 3px solid var(--mari-coral);
  color: rgba(255, 255, 255, 0.83);
  font-size: 14px;
  line-height: 1.58;
}

.process-loop {
  position: relative;
  min-height: 680px;
  margin-top: 54px;
  overflow: hidden;
  border: 1px solid rgba(210, 235, 255, 0.3);
  border-radius: 42px;
  background:
    radial-gradient(circle at 50% 50%, rgba(16, 122, 255, 0.48), transparent 37%),
    linear-gradient(rgba(255, 255, 255, 0.058) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.058) 1px, transparent 1px),
    linear-gradient(145deg, rgba(5, 23, 64, 0.78), rgba(2, 40, 121, 0.5));
  background-size: auto, 42px 42px, 42px 42px, auto;
  box-shadow:
    0 42px 90px rgba(0, 20, 86, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.process-loop::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(213, 238, 255, 0.42);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(121, 204, 255, 0.045),
    0 0 0 68px rgba(121, 204, 255, 0.025),
    0 0 90px rgba(0, 172, 255, 0.22);
  transform: translate(-50%, -50%);
}

.process-loop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.45) 0 1.2px, transparent 1.7px) 0 0 / 18px 18px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0 28%, #000 57%, transparent 84%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 0 28%, #000 57%, transparent 84%);
  pointer-events: none;
}

.process-loop-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 254px;
  height: 254px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.23), rgba(75, 179, 255, 0.08)),
    rgba(4, 72, 194, 0.58);
  box-shadow:
    0 25px 70px rgba(0, 22, 99, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.process-loop-core span {
  margin-bottom: 13px;
  color: rgba(255, 255, 255, 0.7);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.process-loop-core strong {
  color: #fff;
  font-size: 28px;
  font-weight: 590;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.process-loop-core i {
  position: absolute;
  right: 33px;
  bottom: 31px;
  color: #ffb5c2;
  font-size: 28px;
  font-style: normal;
  font-weight: 400;
}

.process-loop .process-list {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  padding: 0;
  display: block;
  border: 0;
  list-style: none;
}

.process-loop .process-list li,
.process-loop .process-list li:first-child,
.process-loop .process-list li:last-child,
.process-loop .process-list li:nth-child(1),
.process-loop .process-list li:nth-child(2),
.process-loop .process-list li:nth-child(3),
.process-loop .process-list li:nth-child(4) {
  position: absolute;
  width: min(31%, 340px);
  min-height: 166px;
  height: 166px;
  margin: 0;
  padding: 22px 23px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  justify-content: initial;
  gap: 15px;
  overflow: visible;
  border: 1px solid rgba(210, 233, 255, 0.35);
  border-radius: 22px;
  color: #fff;
  transform: none;
  box-shadow:
    0 20px 48px rgba(0, 22, 88, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.process-loop .process-list li:nth-child(1) {
  top: 8%;
  left: 5%;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.28), transparent 27%),
    linear-gradient(145deg, rgba(255, 106, 135, 0.92), rgba(190, 38, 104, 0.88));
}

.process-loop .process-list li:nth-child(2) {
  top: 8%;
  right: 5%;
  left: auto;
  background:
    radial-gradient(circle at 88% 12%, rgba(38, 203, 255, 0.42), transparent 29%),
    linear-gradient(145deg, rgba(13, 51, 106, 0.92), rgba(6, 31, 76, 0.9));
}

.process-loop .process-list li:nth-child(3) {
  right: 5%;
  bottom: 8%;
  left: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(145deg, rgba(10, 122, 255, 0.94), rgba(4, 63, 190, 0.9));
  background-size: 24px 24px, 24px 24px, auto;
}

.process-loop .process-list li:nth-child(4) {
  bottom: 8%;
  left: 5%;
  background:
    radial-gradient(circle, rgba(255, 118, 145, 0.25) 0 3px, transparent 3.7px) 0 0 / 20px 20px,
    linear-gradient(145deg, rgba(19, 48, 91, 0.94), rgba(8, 26, 61, 0.92));
}

.process-loop .process-list li::before {
  content: none;
  display: none;
}

.process-loop .process-list li::after {
  position: absolute;
  z-index: 6;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(4, 47, 137, 0.58);
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(0, 25, 94, 0.25);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.process-loop .process-list li:nth-child(1)::after {
  content: "→";
  right: -50px;
  bottom: 26px;
}

.process-loop .process-list li:nth-child(2)::after {
  content: "↓";
  right: 28px;
  bottom: -49px;
}

.process-loop .process-list li:nth-child(3)::after {
  content: "←";
  left: -50px;
  bottom: 26px;
}

.process-loop .process-list li:nth-child(4)::after {
  content: "↑";
  left: 28px;
  top: -49px;
}

.process-loop .process-list li > span {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: 500 10px/1 var(--mono);
}

.process-loop .process-list li > div {
  position: relative;
  z-index: 2;
}

.process-loop .process-list strong {
  display: block;
  color: #fff;
  font-size: clamp(19px, 1.55vw, 23px);
  font-weight: 590;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.process-loop .process-list p {
  max-width: 230px;
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11.5px;
  line-height: 1.43;
}

.process-loop .process-list li:hover {
  transform: translateY(-6px);
}

/* The end of the process lands directly in the FAQ background. */

.faq-section {
  background:
    radial-gradient(circle at 12% 12%, rgba(16, 91, 224, 0.12), transparent 32%),
    linear-gradient(180deg, #070f1e, #070f1e);
}

@media (max-width: 1180px) and (min-width: 901px) {
  .process-loop {
    min-height: 630px;
  }

  .process-loop::before {
    width: 420px;
    height: 420px;
  }

  .process-loop-core {
    width: 224px;
    height: 224px;
    padding: 31px;
  }

  .process-loop-core strong {
    font-size: 25px;
  }

  .process-loop .process-list li,
  .process-loop .process-list li:first-child,
  .process-loop .process-list li:last-child,
  .process-loop .process-list li:nth-child(1),
  .process-loop .process-list li:nth-child(2),
  .process-loop .process-list li:nth-child(3),
  .process-loop .process-list li:nth-child(4) {
    width: 34%;
    min-height: 158px;
    height: 158px;
    padding: 19px;
  }
}

@media (max-width: 900px) {
  .signature {
    font-size: clamp(138px, 17vw, 172px);
  }

  .works-stage {
    height: 545px;
  }

  .works-stage .work-card--left,
  .works-stage .work-card--center,
  .works-stage .work-card--right {
    width: 34%;
    height: 74%;
  }

  .works-stage .work-card--left {
    left: 1%;
  }

  .works-stage .work-card--center {
    left: 33%;
  }

  .works-stage .work-card--right {
    right: 1%;
  }

  .process-section {
    padding: 92px 0 104px;
  }

  .process-intro {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .process-title-group h2 {
    font-size: clamp(58px, 10vw, 82px);
  }

  .process-lead {
    max-width: 520px;
    margin: 0;
  }

  .process-loop {
    min-height: auto;
    margin-top: 38px;
    padding: 34px 20px 20px;
    border-radius: 30px;
  }

  .process-loop::before {
    left: 50%;
    top: 137px;
    width: 270px;
    height: 270px;
    transform: translate(-50%, -50%);
  }

  .process-loop::after {
    -webkit-mask-image: linear-gradient(#000, transparent 50%);
    mask-image: linear-gradient(#000, transparent 50%);
  }

  .process-loop-core {
    position: relative;
    left: auto;
    top: auto;
    width: 205px;
    height: 205px;
    margin: 0 auto 50px;
    padding: 29px;
    transform: none;
  }

  .process-loop-core strong {
    font-size: 24px;
  }

  .process-loop-core i {
    right: 27px;
    bottom: 24px;
    font-size: 24px;
  }

  .process-loop .process-list {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .process-loop .process-list li,
  .process-loop .process-list li:first-child,
  .process-loop .process-list li:last-child,
  .process-loop .process-list li:nth-child(1),
  .process-loop .process-list li:nth-child(2),
  .process-loop .process-list li:nth-child(3),
  .process-loop .process-list li:nth-child(4) {
    position: relative;
    inset: auto;
    width: auto;
    min-height: 174px;
    height: auto;
    margin: 0;
    padding: 20px;
    transform: none;
  }

  .process-loop .process-list li::after {
    display: none;
  }

  .process-loop .process-list li:hover {
    transform: none;
  }
}

@media (max-width: 700px) {
  .scroll-cue {
    right: 1px;
    bottom: 27px;
    gap: 6px;
    font-size: 8px;
  }

  .scroll-cue-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .signature {
    margin-top: 36px;
    font-size: clamp(146px, 42vw, 174px);
  }

  .map-arrow {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .works-stage {
    width: calc(100% + 14px);
    height: auto;
    margin: 14px -14px 0 0;
  }

  .works-stage .work-card--left,
  .works-stage .work-card--center,
  .works-stage .work-card--right {
    position: relative;
    inset: auto;
    width: min(82vw, 330px);
    height: min(104vw, 420px);
    flex: 0 0 min(82vw, 330px);
    transform: none;
  }

  .works-stage .work-card--left:hover,
  .works-stage .work-card--center:hover,
  .works-stage .work-card--right:hover {
    transform: none;
  }

  .process-section {
    padding: 82px 0 92px;
  }

  .process-title-group h2 {
    font-size: 13.5vw;
  }

  .process-lead {
    padding-left: 17px;
    font-size: 13px;
  }

  .process-loop {
    padding: 30px 13px 13px;
    border-radius: 25px;
  }

  .process-loop::before {
    top: 126px;
    width: 245px;
    height: 245px;
  }

  .process-loop-core {
    width: 188px;
    height: 188px;
    margin-bottom: 42px;
    padding: 27px;
  }

  .process-loop-core strong {
    font-size: 22px;
  }

  .process-loop-core i {
    right: 24px;
    bottom: 21px;
    font-size: 22px;
  }

  .process-loop .process-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .process-loop .process-list li,
  .process-loop .process-list li:first-child,
  .process-loop .process-list li:last-child,
  .process-loop .process-list li:nth-child(1),
  .process-loop .process-list li:nth-child(2),
  .process-loop .process-list li:nth-child(3),
  .process-loop .process-list li:nth-child(4) {
    min-height: 142px;
    padding: 18px;
    grid-template-columns: 39px 1fr;
    gap: 13px;
    border-radius: 18px;
  }

  .process-loop .process-list li > span {
    width: 39px;
    height: 39px;
  }

  .process-loop .process-list strong {
    font-size: 20px;
  }

  .process-loop .process-list p {
    max-width: 250px;
    font-size: 11.5px;
  }
}

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