/* Option 4: Optimistic Retro-Futurism.
   Original geometry and a map-world motif; one animated scene per project (parcel map, sports and money, commercial real estate); no film motifs or palettes copied.
   Deferred motion (follow-up): shapes spring/assemble into place on load and on scroll,
   Three.js versions of the three project scenes (.rt-art--map / --sports / --cre) with these SVG scenes as the static
   fallback, spring hover on buttons and tiles, mask/crop transitions between project cards,
   one scroll-linked composition. Needs an animation budget; disable on small screens / reduced motion. */
body.d-retro {
  --ink: #12183a;
  --navy: #14194a;
  --muted: #3a3f66;
  --paper: #fbf6ec;
  --vermilion: #ee4b23;
  --blue: #2447f5;
  --yellow: #ffd23f;
  --teal: #0d8f86;
  --rule: #12183a;
  --sans: "Archivo", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(1.25rem, 5vw, 4rem);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.d-retro a {
  color: var(--blue);
  font-weight: 600;
}

.d-retro .site-foot {
  padding: clamp(3rem, 6vw, 5rem) var(--pad) 3rem;
  background: var(--navy);
  color: #d4d8f4;
}

.d-retro .site-foot__label {
  font-family: var(--mono);
  color: var(--yellow);
}

.d-retro .site-foot__links {
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.d-retro .site-foot__links a {
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.3rem;
  border: 3px solid #d4d8f4;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.d-retro .site-foot__links a:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  transform: translateY(-2px);
}

.d-retro .site-foot__links li:first-child a {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

.d-retro .site-foot__kind {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
}

.d-retro .site-foot__detail {
  text-decoration: none;
}

.rt-mono {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rt h1,
.rt h2,
.rt h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.rt h2 {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* Bar */
.rt-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem var(--pad);
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.rt-bar a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.rt-bar__name {
  font-stretch: 85%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.rt-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}

.rt-bar nav a {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.rt-bar nav a:hover {
  background: var(--yellow);
}

/* Hero */
.rt-hero {
  position: relative;
  min-height: min(78vh, 46rem);
  display: grid;
  gap: 2.5rem;
  align-items: end;
  padding: 3rem var(--pad) 3.5rem;
  overflow: hidden;
  border-bottom: 3px solid var(--ink);
}

.rt-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 60rem;
}

.rt-hero h1 {
  font-size: clamp(3.8rem, 15vw, 12rem);
  text-transform: uppercase;
  font-stretch: 70%;
  line-height: 0.82;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.rt-hero__line {
  display: inline;
  padding: 0.1em 0.35em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background: var(--paper);
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.7;
}

.rt-hero__row {
  margin-top: 2rem;
}

.rt-hero__photo {
  margin: 0;
  max-width: 20rem;
}

.rt-hero__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 3px solid var(--ink);
  border-radius: 0 4.5rem 0 4.5rem;
  box-shadow: 0.9rem 0.9rem 0 var(--vermilion);
}

.rt-links a {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.rt-links a:hover {
  background: var(--yellow);
}

/* Scenes: one animated illustration per project, in a rounded map tile */
.rt-project__top {
  display: grid;
  gap: 2rem 3rem;
  align-items: center;
}

.rt-art {
  width: 100%;
  max-width: 30rem;
  aspect-ratio: 6 / 5;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 0 3.5rem 0 3.5rem;
  background: #f1e7cf;
  box-shadow: 0.8rem 0.8rem 0 var(--ink);
}

.rt-project--a .rt-art {
  box-shadow: 0.8rem 0.8rem 0 var(--vermilion);
}

.rt-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rt-depth {
  transform-box: view-box;
}

/* Shared parts */
.rt-parcel {
  transform-box: fill-box;
  transform-origin: center;
}

.rt-parcel__fill {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.rt-parcel__fill--agri { fill: var(--yellow); }
.rt-parcel__fill--green { fill: var(--teal); }
.rt-parcel__fill--ind { fill: var(--vermilion); }
.rt-parcel__fill--city { fill: var(--paper); }

.rt-river__edge,
.rt-river__water,
.rt-river__flow,
.rt-road__edge,
.rt-road__bed,
.rt-road__line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rt-river__edge { stroke: var(--ink); stroke-width: 30; }
.rt-river__water { stroke: var(--blue); stroke-width: 23; }
.rt-river__flow { stroke: #fff; stroke-width: 3; stroke-dasharray: 2 20; opacity: 0.85; }

.rt-road__edge { stroke: var(--ink); stroke-width: 20; }
.rt-road__bed { stroke: var(--paper); stroke-width: 13; }
.rt-road__line { stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 10 10; }

.rt-route {
  fill: none;
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 0.1 14;
}

.rt-pin {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.rt-pin path {
  fill: var(--vermilion);
  stroke: var(--ink);
  stroke-width: 3.5;
  stroke-linejoin: round;
}

.rt-pin circle { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }

/* Sports and money */
.rt-stadium__bowl,
.rt-stadium__stands,
.rt-stadium__field {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.rt-stadium__bowl { fill: var(--paper); }
.rt-stadium__stands { fill: var(--yellow); }
.rt-stadium__field { fill: var(--teal); }

.rt-stadium__lines {
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.5;
}

.rt-coin,
.rt-stadium {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.rt-coin rect {
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 3;
}

.rt-coin path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.5;
}

.rt-falling {
  transform-box: fill-box;
  transform-origin: center;
}

.rt-falling circle {
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 3.5;
}

.rt-falling text {
  fill: var(--ink);
  font: 900 26px var(--sans);
}

.rt-football {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.rt-football ellipse {
  fill: var(--vermilion);
  stroke: var(--ink);
  stroke-width: 3.5;
}

.rt-football path {
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* Commercial real estate */
.rt-ground {
  fill: var(--teal);
  stroke: var(--ink);
  stroke-width: 3;
}

.rt-land__plot { fill: var(--yellow); }
.rt-land__edge { fill: none; stroke: var(--ink); stroke-width: 3; }
.rt-furrow { fill: none; stroke: var(--ink); stroke-width: 2.2; opacity: 0.55; }

.rt-farm {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.rt-silo rect { fill: var(--paper); }
.rt-silo path { fill: var(--paper); }
.rt-silo__band { fill: none; stroke-width: 2.5; }
.rt-barn__body { fill: var(--vermilion); }
.rt-barn__roof { fill: var(--blue); }
.rt-barn__door { fill: var(--paper); }
.rt-barn__door-x { fill: none; stroke-width: 2.5; stroke-linecap: round; }

.rt-silo,
.rt-barn,
.rt-land {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.rt-bld,
.rt-factory {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.rt-bld__body,
.rt-factory__body,
.rt-factory__chimney,
.rt-factory__door {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.rt-bld__body--vermilion { fill: var(--vermilion); }
.rt-bld__body--blue { fill: var(--blue); }
.rt-bld__body--paper { fill: var(--paper); }
.rt-factory__body { fill: var(--paper); }
.rt-factory__chimney { fill: var(--vermilion); }
.rt-factory__door { fill: var(--ink); }

.rt-win {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 2;
}

.rt-win--lit { fill: var(--yellow); }

.rt-puff {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
}

/* Section tag: optional land-use icon beside the label */
.rt-head-tag {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

.rt-head-tag .rt-mono {
  margin: 0;
}

.rt-icon {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  flex: none;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
}

.rt-icon svg {
  width: 2.1rem;
  height: 2.1rem;
}

/* Matters tiles */
.rt-matters {
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
}

.rt-tiles,
.rt-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.rt-tile {
  position: relative;
  padding: 1.25rem 1.25rem 1.5rem;
  border: 3px solid var(--ink);
  min-height: 15rem;
  overflow: hidden;
}

.rt-tile--1 { background: var(--yellow); border-radius: 0 2.5rem 0 0; }
.rt-tile--2 { background: var(--vermilion); color: #12183a; border-radius: 0; }
.rt-tile--3 { background: var(--blue); color: #fff; border-radius: 2.5rem 0 0 0; }
.rt-tile--4 { background: var(--teal); color: #fff; border-radius: 0 0 2.5rem 0; }

.rt-tile__n {
  display: block;
  margin-bottom: 1.5rem;
  font-size: 3.5rem;
  font-weight: 900;
  font-stretch: 70%;
  line-height: 0.8;
  opacity: 0.9;
}

.rt-tile h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.rt-tile p {
  margin: 0;
  font-weight: 500;
}

/* Projects */
.rt-project {
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
  border-top: 3px solid var(--ink);
}

.rt-project--a {
  background: var(--navy);
  color: #eef0ff;
}

.rt-project--b {
  background: var(--blue);
  color: #fff;
}

.rt-project .rt-mono {
  color: var(--yellow);
}

.rt-project__fits {
  max-width: 36ch;
  margin: 0 0 1.5rem;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
}

.rt-btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink) !important;
  text-decoration: none;
  font-weight: 800 !important;
  transition: transform 0.15s ease;
}

.rt-btn:hover {
  transform: translateY(-2px);
}

.rt-btn--dark {
  background: var(--ink);
  color: var(--paper) !important;
}

.rt-beats {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.rt-beat {
  position: relative;
  padding: 1.25rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.rt-beat:nth-child(5n + 1) { border-radius: 0 2rem 0 0; }
.rt-beat:nth-child(5n + 3) { border-radius: 2rem 0 0 0; }
.rt-beat:nth-child(5n + 5) { border-radius: 0 0 2rem 0; }
.rt-beat--next { background: var(--yellow); }

.rt-beat__n {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 2.4rem;
  font-weight: 900;
  font-stretch: 70%;
  line-height: 0.85;
  color: var(--vermilion);
}

.rt-beat--next .rt-beat__n {
  color: var(--ink);
}

.rt-beat h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  font-stretch: 85%;
  text-transform: uppercase;
  line-height: 1.05;
}

.rt-beat p {
  margin: 0;
  font-size: 0.98rem;
}

/* Practice */
.rt-practice {
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
  background: var(--yellow);
  border-top: 3px solid var(--ink);
}

.rt-practice__grid {
  display: grid;
  gap: 2rem 3rem;
}

.rt-practice__lede + .rt-btn {
  margin-top: 1.75rem;
}

.rt-matters__sub {
  margin: -1rem 0 2rem;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 600;
}

.rt-practice__lede {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.rt-practice p {
  margin-top: 0;
}

.d-retro .rt-practice a:not(.rt-btn) {
  color: var(--ink);
}

/* Approach */
.rt-approach {
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
  border-top: 3px solid var(--ink);
}

.rt-steps li {
  padding: 1.25rem;
  border: 3px solid var(--ink);
  border-radius: 999px 999px 0 0;
  padding-top: 2.5rem;
  background: var(--paper);
}

.rt-steps__n {
  display: block;
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 900;
  font-stretch: 62%;
  line-height: 0.8;
  color: var(--vermilion);
}

.rt-steps h3 {
  margin: 0.5rem 0;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.rt-steps p {
  margin: 0;
}

/* Contact */
.rt-contact {
  display: grid;
  gap: 2rem 4rem;
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
  background: var(--navy);
  color: #eef0ff;
  border-top: 3px solid var(--ink);
}

.rt-contact__lede {
  max-width: 24ch;
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.d-retro .rt-contact a {
  color: var(--yellow);
}

.d-retro .rt-contact label {
  color: #eef0ff;
}

.d-retro .rt-contact input,
.d-retro .rt-contact textarea {
  border: 3px solid #eef0ff;
  border-radius: 0.75rem;
  background: var(--paper);
  color: var(--ink);
}

.d-retro button {
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--vermilion);
  color: var(--ink);
  font-weight: 800;
  padding: 0.7rem 1.6rem;
  transition: transform 0.15s ease;
}

.d-retro button:hover {
  transform: translateY(-2px);
}

@media (min-width: 860px) {
  .rt-hero {
    grid-template-columns: 1fr minmax(15rem, 21rem);
    gap: 3rem;
  }

  .rt-hero__photo {
    justify-self: end;
    margin-right: 0.9rem;
  }

  .rt-project__top {
    grid-template-columns: 1fr minmax(18rem, 28rem);
  }

  .rt-art {
    justify-self: end;
    margin-right: 0.8rem;
  }

  .rt-tiles {
    grid-template-columns: repeat(4, 1fr);
  }

  .rt-beats {
    grid-template-columns: repeat(3, 1fr);
  }

  .rt-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .rt-contact {
    grid-template-columns: 1fr 1fr;
  }

  .rt-practice__grid {
    grid-template-columns: 1fr minmax(18rem, 28rem);
    align-items: start;
  }

  .rt-practice__main {
    grid-column: 1;
    grid-row: 1;
  }

  .rt-practice .rt-art {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rt-btn,
  .d-retro button {
    transition: none;
  }
}

/* ---- Motion (snappy, springy). Driven by assets/js/fx.js; static without it. ---- */
@media (prefers-reduced-motion: no-preference) {
  /* Scene entrances start when the tile scrolls into view (fx.js adds .is-live); without JS they play on load. */
  .rt-parcel {
    animation: rt-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.2s + var(--i) * 80ms) both;
  }

  .rt-river__edge,
  .rt-river__water,
  .rt-road__edge,
  .rt-road__bed {
    stroke-dasharray: 1;
    animation: rt-draw 1.1s cubic-bezier(0.7, 0, 0.2, 1) 0.7s both;
  }

  .rt-road__edge,
  .rt-road__bed {
    animation-delay: 1s;
  }

  .rt-road__line {
    animation: rt-fade 0.6s ease 1.9s both;
  }

  .rt-river__flow {
    animation: rt-fade 0.6s ease 1.8s both, rt-flow 4s linear 1.8s infinite;
  }

  .rt-route {
    animation: rt-fade 0.6s ease 2s both, rt-flow-route 2.4s linear 2s infinite;
  }

  .rt-pin {
    animation: rt-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) calc(1.3s + var(--i) * 140ms) both;
  }

  .rt-stadium--big {
    animation: rt-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
  }

  .rt-coin {
    animation: rt-coin-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.9s + var(--i) * 150ms) both;
  }

  .rt-falling {
    animation: rt-drop 2.6s cubic-bezier(0.5, 0, 0.9, 0.6) 2.2s infinite;
  }

  .rt-football {
    animation: rt-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both, rt-bounce 1.6s ease-in-out 1.4s infinite;
  }

  .rt-route--arc {
    animation: rt-fade 0.6s ease 1.6s both, rt-flow-route 2.4s linear 1.6s infinite;
  }

  .rt-ground,
  .rt-land {
    animation: rt-fade 0.5s ease 0.1s both;
  }

  .rt-bld {
    animation: rt-rise 0.8s cubic-bezier(0.34, 1.3, 0.64, 1) calc(0.3s + var(--i) * 220ms) both;
  }

  .rt-factory {
    animation: rt-rise 0.7s cubic-bezier(0.34, 1.3, 0.64, 1) 0.1s both;
  }

  .rt-barn {
    animation: rt-rise 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s both;
  }

  .rt-silo {
    animation: rt-rise 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s both;
  }

  .rt-win--lit {
    animation: rt-lit 3.2s ease-in-out calc(1.4s + var(--w) * 0.45s) infinite;
  }

  .rt-puff {
    animation: rt-smoke 3.6s ease-out calc(1s + var(--i) * 1.2s) infinite;
  }

  @keyframes rt-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
  }

  @keyframes rt-fade {
    from { opacity: 0; }
  }

  @keyframes rt-flow {
    to { stroke-dashoffset: -22; }
  }

  @keyframes rt-flow-route {
    to { stroke-dashoffset: -14.1; }
  }

  @keyframes rt-rise {
    from { scale: 1 0; opacity: 0; }
    to { scale: 1 1; opacity: 1; }
  }

  @keyframes rt-coin-in {
    from { scale: 0.6 0; opacity: 0; }
    to { scale: 1 1; opacity: 1; }
  }

  @keyframes rt-drop {
    0% { translate: 0 -150px; opacity: 0; }
    12% { opacity: 1; }
    62% { translate: 0 0; opacity: 1; }
    72% { translate: 0 0; opacity: 0; }
    100% { translate: 0 0; opacity: 0; }
  }

  @keyframes rt-bounce {
    0%, 100% { translate: 0 0; scale: 1 1; }
    45% { translate: 0 -26px; scale: 0.94 1.06; }
    55% { translate: 0 -26px; }
    90% { scale: 1.08 0.92; }
  }

  @keyframes rt-lit {
    0%, 55%, 100% { fill: var(--paper); }
    62%, 88% { fill: var(--yellow); }
  }

  @keyframes rt-smoke {
    0% { translate: 0 0; scale: 0.5; opacity: 0; }
    15% { opacity: 1; }
    100% { translate: 22px -90px; scale: 1.7; opacity: 0; }
  }

  .rt-hero h1 {
    animation: rt-wipe 0.8s cubic-bezier(0.7, 0, 0.2, 1) 0.1s both;
  }

  @keyframes rt-pop {
    from { scale: 0; opacity: 0; }
    to { scale: 1; opacity: 1; }
  }

  @keyframes rt-wipe {
    from { clip-path: inset(-10% 100% -10% -5%); }
    to { clip-path: inset(-10% -5% -10% -5%); }
  }
}

.fx-js .fx-reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.92) rotate(-1.5deg);
  transition: opacity 0.35s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fx-js .fx-reveal.is-in {
  opacity: 1;
  transform: none;
}

.fx-js .fx-wipe {
  clip-path: inset(-10% calc(100% - 2px) -10% -5%);
  transition: clip-path 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}

.fx-js .fx-wipe.is-in {
  clip-path: inset(-10% -5% -10% -5%);
}

.fx-js .rt-beat.is-in:hover,
.fx-js .rt-beat.is-in:focus-within,
.fx-js .rt-tile.is-in:hover,
.fx-js .rt-tile.is-in:focus-within {
  transform: translateY(-5px) rotate(-0.7deg);
}

/* Section colour: each block paints itself in as it is reached (wipe down from the top) */
.fx-js .rt-project,
.fx-js .rt-practice,
.fx-js .rt-contact {
  position: relative;
  isolation: isolate;
  background: transparent;
}

.fx-js .rt-project::before,
.fx-js .rt-practice::before,
.fx-js .rt-contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--block);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s cubic-bezier(0.7, 0, 0.2, 1);
}

.fx-js .rt-project--a { --block: var(--navy); }
.fx-js .rt-project--b { --block: var(--blue); }
.fx-js .rt-practice { --block: var(--yellow); }
.fx-js .rt-contact { --block: var(--navy); }

.fx-js .fx-block.is-in::before {
  clip-path: inset(0);
}

/* Scenes stay paused until scrolled into view, and pause again when they leave it. */
.fx-js .rt-art:not(.is-live) *,
.fx-js .rt-art:not(.is-live) *::before {
  animation-play-state: paused !important;
}
