/*
 * RichFolds homepage design layer
 * Separated for a clean future migration into WordPress templates.
 */

:root {
  --rf-ink: #11111d;
  --rf-paper: #f8f8fc;
  --rf-blue: #a6dcff;
  --rf-purple: #7657e8;
  --rf-lilac: #c8baff;
  --rf-yellow: #f2ff9f;
  --rf-radius: 22px;
  --rf-shadow: 0 30px 80px rgba(34, 27, 71, 0.1);
}

html {
  background: var(--rf-ink);
}

body {
  overflow-x: hidden;
  background: var(--rf-paper);
}

main {
  position: relative;
  z-index: 1;
}

/* Hero refinement */
.site-header {
  min-height: max(760px, 100svh);
  border-bottom: 0;
}

.hero-shade {
  background:
    linear-gradient(180deg, rgba(7, 8, 17, 0.06), rgba(7, 8, 17, 0.3)),
    radial-gradient(circle at 50% 46%, transparent 0 25%, rgba(7, 8, 17, 0.2) 76%);
}

.hero-content {
  width: min(1440px, calc(100% - 72px));
}

.hero-kicker {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(9, 10, 20, 0.5);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
}

.hero-copy h1 {
  text-wrap: balance;
}

.hero-actions a {
  min-height: 54px;
  border-radius: 999px;
}

.hero-primary {
  box-shadow: 0 14px 34px rgba(166, 220, 255, 0.15);
}

.canvas-stage {
  border-color: rgba(166, 220, 255, 0.22);
  background: rgba(11, 12, 24, 0.22);
  box-shadow:
    inset 0 0 50px rgba(118, 87, 232, 0.06),
    0 32px 90px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(3px);
}

/* Continuous signal bridge */
.signal-strip {
  border: 0;
  background: linear-gradient(90deg, #efff9b, #f8ffc6 46%, #d9ffb5);
  box-shadow: 0 14px 35px rgba(76, 63, 23, 0.08);
}

.signal-track {
  min-height: 72px;
}

.signal-group {
  gap: 26px;
  padding: 0 13px;
}

.signal-group span {
  font-size: 10px;
  letter-spacing: 0.11em;
}

.signal-group i {
  width: 5px;
  height: 5px;
  flex-basis: 5px;
  border-radius: 50%;
}

/* Shared section rhythm */
.home-section {
  width: min(1280px, calc(100% - 72px));
  padding: clamp(110px, 11vw, 172px) 0;
}

.section-heading {
  grid-template-columns: minmax(150px, 0.25fr) minmax(0, 1fr);
  gap: clamp(38px, 7vw, 112px);
  margin-bottom: clamp(62px, 8vw, 104px);
}

.section-label {
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.section-label::after {
  content: "";
  width: 34px;
  height: 1px;
  margin-left: 4px;
  background: currentColor;
  opacity: 0.4;
}

.section-heading h2,
.work-intro h2,
.proof-copy h2,
.stack-layout > h2 {
  font-size: clamp(48px, 5.4vw, 78px);
  line-height: 0.96;
  text-wrap: balance;
}

/* Capabilities: balanced editorial grid */
.capabilities {
  width: min(1280px, calc(100% - 72px));
  color: var(--rf-ink);
}

.capabilities::before {
  background:
    radial-gradient(circle at 95% 0%, rgba(200, 186, 255, 0.3), transparent 25%),
    linear-gradient(rgba(118, 87, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 87, 232, 0.035) 1px, transparent 1px),
    #fff;
  background-size: auto, 48px 48px, 48px 48px, auto;
}

.capabilities::after {
  display: none;
}

.capabilities .section-heading {
  align-items: end;
}

.capabilities .section-heading h2 {
  max-width: 880px;
  color: var(--rf-ink);
}

.capabilities .section-heading h2 em {
  color: var(--rf-purple);
}

.capabilities .capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(390px, auto));
  gap: 16px;
}

.capabilities .capability-card:nth-child(1),
.capabilities .capability-card:nth-child(2),
.capabilities .capability-card:nth-child(3),
.capabilities .capability-card:nth-child(4) {
  grid-column: auto;
  grid-row: auto;
}

.capabilities .capability-card,
.capabilities .capability-featured {
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: clamp(28px, 3vw, 42px);
  border: 1px solid rgba(31, 28, 54, 0.1);
  border-radius: var(--rf-radius);
  color: var(--rf-ink);
  box-shadow: none;
  transform: none;
  transition:
    box-shadow 260ms ease,
    border-color 260ms ease,
    background-position 500ms ease;
}

.capabilities .capability-card:nth-child(1) {
  background:
    linear-gradient(rgba(17, 17, 29, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 29, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 92% 10%, rgba(242, 255, 159, 0.95), transparent 29%),
    linear-gradient(145deg, #a9ddff, #c3bcff 95%);
  background-size: 30px 30px, 30px 30px, auto, auto;
}

.capabilities .capability-card:nth-child(2) {
  background:
    radial-gradient(circle at 94% 8%, rgba(166, 220, 255, 0.45), transparent 32%),
    linear-gradient(145deg, #fff, #eff4ff);
}

.capabilities .capability-card:nth-child(3) {
  background:
    radial-gradient(circle at 8% 100%, rgba(242, 255, 159, 0.46), transparent 30%),
    linear-gradient(145deg, #fff, #f6f2ff);
}

.capabilities .capability-card:nth-child(4) {
  background:
    radial-gradient(circle at 92% 100%, rgba(200, 186, 255, 0.5), transparent 33%),
    linear-gradient(145deg, #fff, #f1f4ff);
}

.capabilities .capability-card:not(.capability-featured) {
  display: flex;
  padding: clamp(28px, 3vw, 42px);
}

.capabilities .capability-card:not(.capability-featured) .pixel-icon,
.capabilities .capability-featured .pixel-icon {
  width: 76px;
  height: 76px;
  align-self: flex-start;
  color: var(--rf-purple);
}

.capabilities .capability-featured .pixel-icon {
  color: var(--rf-ink);
}

.capabilities .capability-card:not(.capability-featured) > div:not(.pixel-icon) {
  padding-right: 0;
}

.capabilities .capability-card h3,
.capabilities .capability-featured h3 {
  max-width: 480px;
  margin-bottom: 13px;
  color: var(--rf-ink);
  font-size: clamp(29px, 3vw, 43px);
  line-height: 1;
}

.capabilities .capability-card p,
.capabilities .capability-featured p {
  max-width: 540px;
  color: rgba(17, 17, 29, 0.62);
  font-size: 14px;
}

.capabilities .capability-card ul {
  margin-top: 22px;
  color: rgba(17, 17, 29, 0.7);
}

.capabilities .capability-card > a,
.capabilities .capability-card:not(.capability-featured) > a {
  margin-top: 28px;
  color: var(--rf-ink);
}

.capabilities .capability-card > a span,
.capabilities .capability-featured > a span {
  color: var(--rf-purple);
}

.capabilities .capability-card .card-number,
.capabilities .capability-featured .card-number {
  color: rgba(17, 17, 29, 0.42);
}

.capabilities .capability-featured::after {
  display: none;
}

.capabilities .capability-card:hover,
.capabilities .capability-featured:hover {
  transform: none;
  border-color: rgba(118, 87, 232, 0.2);
  box-shadow: var(--rf-shadow);
}

/* Work chapter */
.work-section {
  position: relative;
  padding: clamp(110px, 11vw, 174px) 0;
  background:
    radial-gradient(circle at 80% 5%, rgba(118, 87, 232, 0.26), transparent 28%),
    radial-gradient(circle at 8% 74%, rgba(166, 220, 255, 0.12), transparent 26%),
    #10101b;
}

.work-intro,
.project-list {
  width: min(1280px, calc(100% - 72px));
}

.work-intro {
  display: grid;
  grid-template-columns: minmax(150px, 0.25fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(38px, 7vw, 112px);
  margin-bottom: clamp(62px, 8vw, 100px);
}

.work-intro h2 {
  max-width: 920px;
  color: #f7f6f1;
}

.project-list {
  display: grid;
  gap: 26px;
}

.project-card {
  min-height: 630px;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.22);
}

.project-violet {
  background:
    radial-gradient(circle at 85% 10%, rgba(242, 255, 159, 0.25), transparent 22%),
    linear-gradient(135deg, #6d4ee2, #392d76);
}

.project-blue {
  background:
    radial-gradient(circle at 10% 10%, rgba(200, 186, 255, 0.38), transparent 25%),
    linear-gradient(135deg, #8fd3ff, #4073bd);
}

.project-meta h3 {
  font-size: clamp(30px, 3vw, 46px);
}

.mock-window {
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(16, 11, 46, 0.22);
}

.project-stat {
  border-radius: 16px;
  box-shadow: 0 20px 46px rgba(18, 12, 45, 0.18);
}

/* CRO chapter */
.proof-section {
  width: min(1280px, calc(100% - 72px));
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: clamp(70px, 9vw, 138px);
  position: relative;
}

.proof-section::before {
  content: "";
  position: absolute;
  inset: 0 50%;
  z-index: -1;
  width: 100vw;
  margin-left: -50vw;
  background:
    radial-gradient(circle at 12% 85%, rgba(166, 220, 255, 0.3), transparent 25%),
    #f7f7fb;
}

.proof-copy h2 {
  color: var(--rf-ink);
}

.metric-board {
  min-height: 560px;
  padding: clamp(30px, 4vw, 52px);
  border: 1px solid rgba(118, 87, 232, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(rgba(118, 87, 232, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 87, 232, 0.06) 1px, transparent 1px),
    linear-gradient(145deg, #fff, #eeeaff);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: var(--rf-shadow);
}

.metric-main strong {
  color: var(--rf-purple);
  font-size: clamp(72px, 9vw, 126px);
}

.pixel-chart-large span {
  background: linear-gradient(180deg, var(--rf-purple), var(--rf-blue));
}

/* Process chapter */
.process-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 8%, rgba(242, 255, 159, 0.58), transparent 22%),
    linear-gradient(145deg, #a8dcff, #c9bdff);
  color: var(--rf-ink);
}

.process-section::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border: 70px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.process-section .section-label.light,
.process-section .section-heading h2,
.process-section .process-heading > div > p {
  color: var(--rf-ink);
}

.process-section .section-label.light span,
.process-heading h2 em {
  color: #4f31c5;
}

.process-list {
  position: relative;
  z-index: 1;
  border-top-color: rgba(17, 17, 29, 0.18);
}

.process-list li {
  grid-template-columns: 55px 72px minmax(210px, 0.7fr) minmax(280px, 1fr);
  border-bottom-color: rgba(17, 17, 29, 0.16);
  transition: background 220ms ease, padding 220ms ease;
}

.process-list li:hover {
  padding-right: 22px;
  padding-left: 22px;
  background: rgba(255, 255, 255, 0.22);
}

.process-list > li > span,
.process-list p {
  color: rgba(17, 17, 29, 0.6);
}

.pixel-step {
  border-color: rgba(17, 17, 29, 0.18);
  background: rgba(255, 255, 255, 0.3);
  color: var(--rf-ink);
}

/* Stack chapter */
.stack-section {
  position: relative;
}

.stack-section::before {
  content: "";
  position: absolute;
  inset: 0 50%;
  z-index: -1;
  width: 100vw;
  margin-left: -50vw;
  background: #fff;
}

.stack-layout {
  gap: clamp(70px, 9vw, 150px);
}

.stack-grid {
  gap: 10px;
}

.stack-grid span {
  min-height: 66px;
  border: 1px solid rgba(118, 87, 232, 0.13);
  border-radius: 999px;
  background: #f8f7fc;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.stack-grid span::before {
  background: var(--rf-purple);
}

.stack-grid span:hover {
  border-color: var(--rf-purple);
  background: var(--rf-purple);
  color: #fff;
  transform: none;
}

.stack-grid span:hover::before {
  background: var(--rf-yellow);
}

/* CTA chapter */
.pre-footer-cta {
  min-height: 650px;
  padding: clamp(100px, 11vw, 170px) 36px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 20% 85%, rgba(166, 220, 255, 0.7), transparent 30%),
    linear-gradient(135deg, #7657e8, #35236f);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.pre-footer-cta h2 {
  font-size: clamp(64px, 10vw, 146px);
  letter-spacing: -0.075em;
}

.pre-footer-cta h2 span {
  color: var(--rf-yellow);
  -webkit-text-stroke: 0;
}

.pre-footer-cta a {
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--rf-yellow);
  color: var(--rf-ink);
}

.pre-footer-cta a:hover {
  background: #fff;
}

.site-footer {
  border-top: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(118, 87, 232, 0.2), transparent 24%),
    #0b0b12;
}

/* Responsive composition */
@media (max-width: 1040px) {
  .hero-content,
  .home-section,
  .capabilities,
  .work-intro,
  .project-list,
  .proof-section {
    width: min(calc(100% - 48px), 920px);
  }

  .capabilities .capability-grid {
    grid-template-rows: repeat(2, minmax(360px, auto));
  }

  .proof-section {
    grid-template-columns: 1fr;
  }

  .proof-copy {
    max-width: 720px;
  }

  .metric-board {
    min-height: 520px;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 820px;
  }

  .hero-content,
  .home-section,
  .capabilities,
  .work-intro,
  .project-list,
  .proof-section {
    width: calc(100% - 32px);
  }

  .section-heading,
  .work-intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .section-heading h2,
  .work-intro h2,
  .proof-copy h2,
  .stack-layout > h2 {
    font-size: clamp(43px, 12vw, 62px);
  }

  .capabilities .capability-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .capabilities .capability-card,
  .capabilities .capability-featured {
    min-height: 390px;
    border-radius: 18px;
  }

  .project-card {
    min-height: 570px;
    border-radius: 20px;
  }

  .process-list li {
    grid-template-columns: 42px 58px minmax(0, 1fr);
    gap: 15px;
  }

  .process-list li p {
    grid-column: 3;
  }

  .stack-layout {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

@media (max-width: 520px) {
  .home-section {
    padding: 92px 0;
  }

  .signal-track {
    min-height: 62px;
  }

  .capabilities .capability-card,
  .capabilities .capability-featured {
    min-height: 410px;
    padding: 25px;
  }

  .capabilities .capability-card h3,
  .capabilities .capability-featured h3 {
    font-size: 32px;
  }

  .project-card {
    min-height: 500px;
    padding: 22px;
  }

  .metric-board {
    min-height: 500px;
    padding: 25px;
    border-radius: 20px;
  }

  .process-list li,
  .process-list li:hover {
    grid-template-columns: 38px 1fr;
    padding: 28px 0;
  }

  .process-list .pixel-step {
    display: none;
  }

  .process-list li h3,
  .process-list li p {
    grid-column: 2;
  }

  .pre-footer-cta {
    min-height: 570px;
    padding-right: 18px;
    padding-left: 18px;
  }
}

/* Unified brand and typography */
:root {
  --baby-blue: #9ed8ff;
  --sky-blue: #69bdff;
  --soft-purple: #a78bfa;
  --rich-purple: #7657e8;
  --baby-yellow: #f2ff9f;
  --rf-blue: #9ed8ff;
  --rf-purple: #7657e8;
  --rf-lilac: #a78bfa;
  --rf-yellow: #f2ff9f;
  --rf-ink: #10101b;
  --rf-paper: #f7f7fb;
}

body,
button,
input,
textarea,
select {
  font-family: "Manrope", sans-serif;
}

h1,
h2,
h3,
h4,
p,
a,
li {
  font-family: inherit;
}

.section-heading h2 em,
.work-intro h2 em,
.proof-copy h2 em,
.stack-layout > h2 em,
.process-heading h2 em {
  font-family: inherit;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.section-label,
.card-number,
.project-meta > p,
.metric-top,
.hero-kicker,
.nav-section-label,
.stack-grid span::after {
  font-family: "DM Sans", sans-serif;
}

/* Section-to-section scroll choreography */
.scroll-section {
  --section-progress: 0;
  --section-y: 0px;
  position: relative;
}

.scroll-section > .scroll-transition-line {
  width: min(1280px, calc(100% - 72px));
  height: 1px;
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 8;
  overflow: hidden;
  background: rgba(118, 87, 232, 0.12);
  transform: translateX(-50%);
  pointer-events: none;
}

.scroll-section > .scroll-transition-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--rf-blue), var(--rf-purple), var(--rf-yellow));
  transform: scaleX(var(--line-progress, 0));
  transform-origin: left;
  will-change: transform;
}

.motion-ready .scroll-motion-item {
  opacity: var(--motion-opacity, 1);
  transform:
    translate3d(0, var(--motion-y, 0px), 0)
    scale(var(--motion-scale, 1));
  transform-origin: center bottom;
  will-change: transform, opacity;
}

.motion-ready .section-heading,
.motion-ready .work-intro,
.motion-ready .proof-copy,
.motion-ready .stack-layout > h2 {
  transform: translate3d(0, var(--section-y, 0px), 0);
  will-change: transform;
}

.motion-ready .site-header .hero-content {
  opacity: var(--hero-opacity, 1);
  transform: translate3d(0, var(--hero-y, 0px), 0);
  will-change: transform, opacity;
}

.motion-ready .site-header .canvas-stage {
  transform: translate3d(0, var(--stage-y, 0px), 0);
  will-change: transform;
}

.motion-ready .capabilities::before,
.motion-ready .proof-section::before,
.motion-ready .stack-section::before {
  background-position:
    center var(--section-bg-y, 0px),
    center var(--section-bg-y, 0px),
    center var(--section-bg-y, 0px),
    center;
}

/* Fixed section progress */
.section-progress {
  width: 34px;
  position: fixed;
  right: 22px;
  top: 50%;
  z-index: 1500;
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 13px 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(13, 13, 24, 0.76);
  box-shadow: 0 16px 38px rgba(11, 10, 25, 0.18);
  transform: translateY(-50%);
  backdrop-filter: blur(15px);
}

.section-progress::before {
  content: "";
  width: 1px;
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 50%;
  z-index: -1;
  background: rgba(255, 255, 255, 0.13);
}

.section-progress a {
  width: 7px;
  height: 7px;
  display: block;
  position: relative;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  transition:
    width 180ms ease,
    height 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.section-progress a::after {
  content: attr(data-label);
  position: absolute;
  right: 19px;
  top: 50%;
  padding: 6px 9px;
  border-radius: 3px;
  background: var(--rf-ink);
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transform: translate(5px, -50%);
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.section-progress a:hover::after,
.section-progress a:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.section-progress a.is-active {
  width: 11px;
  height: 11px;
  background: var(--rf-yellow);
  box-shadow: 0 0 16px rgba(242, 255, 159, 0.8);
}

/* Smooth section color boundaries */
.work-section,
.process-section,
.pre-footer-cta,
.site-footer {
  isolation: isolate;
}

.capabilities,
.proof-section,
.stack-section {
  isolation: isolate;
}

@media (max-width: 1040px) {
  .scroll-section > .scroll-transition-line {
    width: calc(100% - 48px);
  }
}

@media (max-width: 760px) {
  .section-progress {
    display: none;
  }

  .scroll-section > .scroll-transition-line {
    width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .scroll-motion-item,
  .motion-ready .section-heading,
  .motion-ready .work-intro,
  .motion-ready .proof-copy,
  .motion-ready .stack-layout > h2,
  .motion-ready .site-header .hero-content,
  .motion-ready .site-header .canvas-stage {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Tech stack redesign — numbered developer matrix, not pills */
.stack-section {
  width: min(1280px, calc(100% - 72px));
  color: #f7f6f1;
}

.stack-section::before {
  background:
    radial-gradient(circle at 82% 18%, rgba(118, 87, 232, 0.24), transparent 27%),
    linear-gradient(rgba(166, 220, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 220, 255, 0.045) 1px, transparent 1px),
    #10101b;
  background-size: auto, 48px 48px, 48px 48px, auto;
}

.stack-section > .section-label {
  margin-bottom: clamp(58px, 7vw, 92px);
  color: rgba(247, 246, 241, 0.55);
}

.stack-section > .section-label span {
  color: var(--rf-yellow);
}

.stack-layout {
  display: block;
}

.stack-layout > h2 {
  max-width: 940px;
  margin-bottom: clamp(58px, 7vw, 88px);
  color: #f7f6f1;
}

.stack-layout > h2 em {
  color: var(--rf-blue);
}

.stack-grid {
  counter-reset: technology;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(166, 220, 255, 0.16);
  border-radius: 18px;
  background: rgba(166, 220, 255, 0.16);
}

.stack-grid span {
  counter-increment: technology;
  min-width: 0;
  min-height: 190px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent),
    #151522;
  color: #f7f6f1;
  font-family: "Manrope", sans-serif;
  font-size: clamp(18px, 1.65vw, 25px);
  font-weight: 650;
  letter-spacing: -0.035em;
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

.stack-grid span::before {
  width: 10px;
  height: 10px;
  top: 28px;
  right: 28px;
  bottom: auto;
  left: auto;
  background: var(--rf-purple);
  box-shadow:
    -10px 10px 0 rgba(118, 87, 232, 0.46),
    -20px 20px 0 rgba(166, 220, 255, 0.28);
}

.stack-grid span::after {
  content: "0" counter(technology) " / 08";
  position: absolute;
  top: 28px;
  left: 28px;
  color: rgba(247, 246, 241, 0.38);
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.stack-grid span:nth-child(2),
.stack-grid span:nth-child(5),
.stack-grid span:nth-child(8) {
  background:
    radial-gradient(circle at 100% 0%, rgba(118, 87, 232, 0.16), transparent 48%),
    #151522;
}

.stack-grid span:hover {
  border: 0;
  background: var(--rf-blue);
  color: var(--rf-ink);
  transform: none;
}

.stack-grid span:hover::before {
  background: var(--rf-ink);
  box-shadow:
    -10px 10px 0 rgba(17, 17, 29, 0.42),
    -20px 20px 0 rgba(118, 87, 232, 0.34);
}

.stack-grid span:hover::after {
  color: rgba(17, 17, 29, 0.5);
}

@media (max-width: 900px) {
  .stack-section {
    width: min(calc(100% - 48px), 920px);
  }

  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .stack-section {
    width: calc(100% - 32px);
  }

  .stack-grid {
    border-radius: 14px;
  }

  .stack-grid span {
    min-height: 155px;
    padding: 22px;
    font-size: 18px;
  }

  .stack-grid span::before {
    top: 22px;
    right: 22px;
  }

  .stack-grid span::after {
    top: 22px;
    left: 22px;
  }
}
