
.kiln-promo {
  --stone: #111311;
  --forge-ink: #100e0d;
  --forge-copy: #e9d9c3;
  --rail-shadow: #161613;
  --table-shadow: #171714;
  --rail-width: min(calc(100% - 6rem), clamp(64rem, 76vw, 80rem));
  background: var(--forge-ink);
}
.kiln-promo :target { scroll-margin-top: 1.5rem; }
.kiln-promo .reforge-hero {
  z-index: 1;
  grid-template-rows: 1fr auto auto;
  min-height: clamp(39rem, 100svh, 85rem);
  background: var(--rail-shadow);
}
.kiln-promo.home .reforge-hero::after { content: none; }
.kiln-promo .reforge-hero .shots::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: clamp(6.2rem, 14vh, 11.5rem);
  background: linear-gradient(transparent 0%, #16161366 39%, var(--rail-shadow) 100%);
  opacity: var(--castle-blend, 0);
  pointer-events: none;
}
.kiln-promo .reforge-hero .frame { inset-block-end: 0; }
.kiln-promo .reforge-hero .controls { padding-bottom: clamp(.8rem, 2vh, 1.5rem); }
.kiln-promo .reforge-hero .controls button {
  min-height: 44px;
  padding-inline: .8rem;
}
.kiln-promo :is(.is-entering, .is-playing) .hero-copy { visibility: hidden; }

.hero-sill {
  position: relative;
  z-index: 3;
  width: var(--rail-width);
  margin-inline: auto;
  isolation: isolate;
}
.hero-sill-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px clamp(3rem, 5vw, 5.75rem);
  min-height: 62px;
  background:
    linear-gradient(#1d1713e8, #1d1814c4 62%, #0d0b0aeb),
    url("hero/parapetto.webp") center 69% / 480px auto repeat-x;
  border-block: 1px solid #b78a5b;
  outline: 3px solid #221c14;
  box-shadow: 0 5px 0 #392c21, 0 13px 25px #080706d9, inset 0 -3px 0 #120c08;
}
.hero-sill::before, .hero-sill::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset-block: -59px -83px;
  width: clamp(100px, 10vw, 152px);
  pointer-events: none;
  background: url("hero/parapetto.webp") 5% 82% / auto 175px no-repeat;
  clip-path: polygon(0 39%, 16% 39%, 30% 35%, 44% 36%, 58% 32%, 68% 36%, 78% 53%, 100% 66%, 100% 100%, 0 100%);
  mask-image: linear-gradient(90deg, transparent, #000c 12%, #000 26%, #000 63%, #0009 79%, transparent),
    linear-gradient(180deg, #000 47%, #000b 69%, #0004 85%, transparent 100%);
  mask-composite: intersect;
}
.hero-sill::before {
  inset-inline-start: clamp(-51px, -3vw, -28px);
  clip-path: polygon(0 50%, 18% 47%, 33% 47%, 49% 45%, 62% 43%, 75% 42%, 83% 50%, 100% 67%, 100% 100%, 0 100%);
}
.hero-sill::after {
  inset-inline-end: clamp(-51px, -3vw, -28px);
  background-position: 74% 58%;
  transform: scaleX(-1);
}
.hero-sill a {
  display: grid;
  place-items: center;
  min-height: 48px;
  margin: 1px 0;
  padding: .375rem .4rem;
  border-inline-start: 1px solid #be95613d;
  border-block-end: 2px solid transparent;
  color: #ffdeb1;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  text-align: center;
  text-shadow: 0 2px 4px #000;
  text-decoration: none;
}
.hero-sill a:first-child { border-inline-start: 0; }
.hero-sill a:is(:hover, [aria-current]) {
  background: #c6894c26;
  color: #fff0cf;
  border-block-end-color: #bd824f;
}
.hero-sill a:focus-visible { outline-offset: -4px; }
.hero-sill a:last-child { color: #ffe2ad; font-weight: 700; }

.promo-features, .promo-stories, .promo-closing {
  position: relative;
  isolation: isolate;
}
.promo-features {
  background:
    linear-gradient(var(--rail-shadow), #16161300 24%, #17171408 60%, var(--table-shadow) 100%),
    radial-gradient(ellipse at 26% 41%, #58412d88, transparent 48%),
    radial-gradient(ellipse at 68% 42%, #2c4641aa, transparent 65%),
    #171614;
  padding-block: clamp(3rem, 5vw, 5.8rem) clamp(3rem, 6vw, 6rem);
}
.promo-features::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  width: min(100%, 1940px);
  margin-inline: auto;
  background: url("hero/parapetto.webp") 50% 64% / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent),
    radial-gradient(ellipse at 37% 37%, #000 7%, transparent 74%);
  mask-composite: intersect;
  opacity: .26;
  pointer-events: none;
}
.kiln-promo :is(.feature-layout, .story-layout) {
  width: min(1300px, calc(100% - clamp(2rem, 9vw, 8.25rem)));
}
.feature-layout { display: block; }
.is-interactive .feature-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.8rem, 5vw, 5.4rem);
  align-items: center;
}
.feature-fan {
  --card-width: clamp(9.35rem, 21vw, 14rem);
  --fan-inset: 14px;
  --fan-height: calc(var(--card-width) * 1.43 + 2.3rem);
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
  min-width: 0;
  height: calc(var(--fan-height) + 3.8rem);
}
.feature-card {
  --slot: 0;
  --tilt: 0deg;
  --rest: 1;
  --offset: 0px;
  --label-offset: 0cqw;
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #f7e3bc;
  pointer-events: none;
}
.feature-card:nth-child(2) { --label-offset: 25cqw; }
.feature-card:nth-child(3) { --label-offset: 50cqw; }
.feature-card:nth-child(4) { --label-offset: 75cqw; }
.feature-card-face {
  position: absolute;
  display: grid;
  grid-template-rows: 1fr auto;
  align-content: stretch;
  isolation: isolate;
  top: calc(1.3rem + var(--offset));
  left: calc(var(--fan-inset) + (100cqw - var(--card-width) - 2 * var(--fan-inset)) * var(--slot) / 3 - var(--label-offset));
  width: var(--card-width);
  height: calc(var(--card-width) * 1.42);
  padding: 4px;
  overflow: hidden;
  border: 2px solid #926744;
  border-radius: 13px 13px 10px 10px;
  background: #21170f;
  box-shadow: 0 14px 18px #0b0907a3, 0 4px 0 #36271c, 0 0 0 2px #130f0c, inset 0 0 0 1px #bd976474;
  color: #f7e3bc;
  text-align: center;
  transform: rotate(var(--tilt)) scale(var(--rest));
  transform-origin: left 85%;
  cursor: pointer;
  pointer-events: auto;
}
.feature-card[data-depth="0"] { --slot: 3; z-index: 4; }
.feature-card[data-depth="0"] .feature-card-face {
  border-color: #d6a36e;
  box-shadow: 0 20px 32px #060504d1, 0 4px 0 #3b2818, 0 0 0 2px #27190e, inset 0 0 0 1px #eac39795;
}
.feature-card[data-depth="1"] { --slot: 2; --tilt: -7deg; --offset: 8px; --rest: .88; z-index: 3; }
.feature-card[data-depth="2"] { --slot: 1; --tilt: -12deg; --offset: 20px; --rest: .82; z-index: 2; }
.feature-card[data-depth="3"] { --slot: 0; --tilt: -15deg; --offset: 34px; --rest: .76; z-index: 1; }
.feature-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: var(--art-position, center);
  border: 1px solid #b188587a;
  border-radius: 8px 8px 2px 2px;
  pointer-events: none;
}
#feature-build { --art-position: 54% 56%; }
#feature-profiles { --art-position: 63% 50%; }
#feature-servers { --art-position: 61% 54%; }
.feature-card:not([aria-selected="true"]) img { filter: brightness(.78) saturate(.9); }
.feature-card:hover img { filter: none; }
.kiln-promo .feature-card:focus-visible { outline: none; }
.feature-card:focus-visible :is(.feature-card-face, .feature-selector) {
  outline: 2px solid #ffe2b1;
  outline-offset: 3px;
}
.feature-selector {
  position: absolute;
  inset: auto .25rem 0;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: .25rem .3rem;
  border-block: 1px solid #a0784a55;
  background: #211b16;
  color: #ead6b7;
  font: 650 clamp(.72rem, 1.17vw, .95rem)/1.15 "Segoe UI", sans-serif;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
}
.feature-card:hover .feature-selector,
.feature-card[aria-selected="true"] .feature-selector {
  background: #4b3424;
  border-color: #c79364;
  color: #ffecca;
}
.feature-card-caption {
  display: grid;
  place-items: center;
  align-content: center;
  gap: .2rem;
  padding: .43rem .15rem .36rem;
  border-block-start: 1px solid #c39862;
  background: linear-gradient(#312218, #1b140f);
  pointer-events: none;
}
.feature-card-caption > span {
  font: 600 clamp(1rem, 1.45vw, 1.28rem)/1.05 var(--display);
}
.feature-card-caption small {
  display: block;
  max-width: 29ch;
  color: #ecd6ad;
  font: .75rem/1.2 "Segoe UI", sans-serif;
}
.feature-copy { position: relative; min-width: 0; }
.feature-copy h2, .story-copy h2 {
  margin: 0;
  color: #fff0d6;
  font: 500 clamp(2.9rem, 5.4vw, 5.65rem)/.9 var(--display);
  letter-spacing: -.068em;
}
.feature-copy h2 em, .story-copy h2 em { display: block; color: var(--title-accent); font-weight: 400; }
.feature-copy article { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.feature-copy h3 {
  margin: 0;
  color: #ffedd5;
  font: 650 clamp(1.35rem, 2.3vw, 2.2rem)/1.1 var(--display);
  letter-spacing: -.032em;
}
.feature-copy p, .story-copy p {
  max-width: 44ch;
  margin: .65rem 0 0;
  color: var(--forge-copy);
  font-size: clamp(1rem, 1.22vw, 1.15rem);
  line-height: 1.65;
}
.feature-copy .world-link, .story-copy .world-link { margin-top: 1.1rem; }
.kiln-promo .world-link:where(:not(.kiln-button)) {
  border-color: #926b47;
  background: #251b14;
  color: #ffe6bc;
}
.kiln-promo .world-link:where(:not(.kiln-button)):hover { background: #4a3221; border-color: #e1b382; }
.kiln-promo .world-link.kiln-button {
  min-height: 47px;
  max-width: 100%;
  padding: .48rem 18px;
  border: 0;
  background: none;
  font-size: .9rem;
  text-align: center;
  white-space: normal;
}
.kiln-promo .world-link.kiln-button--primary { min-height: 49px; }

@media (prefers-reduced-motion: no-preference) {
  .feature-card-face { transition: left 420ms cubic-bezier(.22,.72,.25,1), top 420ms ease, transform 420ms cubic-bezier(.22,.72,.25,1); }
  .feature-card img { transition: filter 240ms ease; }
  .feature-fan.is-opening .feature-card-face { animation: open-feature-fan 340ms cubic-bezier(.22,.72,.25,1) both; }
  .is-interactive .feature-copy article:not([hidden]) { animation: feature-copy-appear 260ms ease-out both; }
  @keyframes open-feature-fan { from { left: calc((100cqw - var(--card-width)) / 2 - var(--label-offset)); transform: scale(.91); } }
  @keyframes feature-copy-appear { from { opacity: .5; transform: translateY(5px); } }
}

.promo-stories {
  padding-block: clamp(3rem, 7.4vw, 8rem);
  background:
    linear-gradient(var(--table-shadow), #17171400 clamp(4rem, 9vw, 8.5rem)),
    radial-gradient(ellipse at 72% 15%, #20312d, transparent 52%),
    linear-gradient(var(--table-shadow), #121413 58%, #141511);
}
.promo-story + .promo-story { margin-top: clamp(4rem, 9vw, 9rem); }
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, .79fr) minmax(0, 1.16fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6.75rem);
}
.promo-story--build .story-layout { grid-template-columns: minmax(0, 1.16fr) minmax(0, .79fr); }
.story-art {
  position: relative;
  display: grid;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #866243;
  box-shadow: 0 0 0 4px #201915, 0 15px 46px #08080792;
  background: #1c1914;
}
.home-landscape .promo-story .story-art {
  box-shadow: 0 0 0 4px #201915, 0 7px 13px -3px #080604dd, 0 30px 54px -16px #070503e0;
}
.story-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.promo-story--launcher img { object-position: 63% 53%; }
.promo-story--build img { object-position: 54% 56%; }

@media (prefers-reduced-motion: no-preference) {
  .promo-stories.has-story-motion { overflow-x: clip; }
  .promo-story { --story-side: 1; }
  .promo-story--build { --story-side: -1; }
  .story-art {
    --story-start-pose: translate3d(calc(var(--story-side) * var(--story-distance, 0px)), 24px, 0)
      perspective(1200px) translateZ(-110px)
      rotateY(calc(var(--story-side) * 23deg)) rotateZ(calc(var(--story-side) * 2deg));
  }

  .promo-story [data-story-entrance="pending"]:not(:focus-within) { opacity: 0; }
  .story-art[data-story-entrance="pending"] { transform: var(--story-start-pose); }
  .story-copy[data-story-entrance="entering"] {
    animation: story-copy-entrance 640ms cubic-bezier(.2, .64, .3, 1) both;
  }
  .story-art[data-story-entrance="entering"] {
    animation: story-art-entrance 1040ms both;
  }
  @media (min-width: 1920px) {
    .story-art[data-story-entrance="entering"] { animation-duration: 1220ms; }
  }
  .story-art[data-story-entrance="settled"],
  .story-copy[data-story-entrance="settled"] > :is(h2, p) {
    translate: 0 var(--story-parallax-y, 0px);
  }

  @keyframes story-copy-entrance {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes story-art-entrance {
    0% {
      opacity: 0;
      transform: var(--story-start-pose);
      animation-timing-function: cubic-bezier(.32, .24, .18, 1);
    }
    30% { opacity: 1; }
    76% {
      transform: translate3d(calc(var(--story-side) * -8px), -2px, 0)
        perspective(1200px) translateZ(0)
        rotateY(calc(var(--story-side) * -1.5deg)) rotateZ(0);
      animation-timing-function: cubic-bezier(.3, .55, .4, 1);
    }
    100% {
      opacity: 1;
      transform: translate3d(0, 0, 0) perspective(1200px) translateZ(0) rotateY(0) rotateZ(0);
    }
  }
}

.reload-example {
  align-items: end;
  min-height: clamp(19rem, 31vw, 30rem);
  isolation: isolate;
}
.reload-example img {
  position: absolute;
  z-index: -1;
  inset: 0;
  height: 100%;
  object-position: 67% 49%;
}
.reload-example fieldset {
  min-width: 0;
  margin: clamp(1rem, 4vw, 2.4rem);
  padding: .75rem clamp(.7rem, 2vw, 1.35rem) 1.15rem;
  border: 1px solid #b38b605b;
  background: #131613ee;
  color: #f6e2c5;
}
.reload-example legend {
  padding: .35rem .65rem;
  border: 1px solid #b38b60;
  background: #241c16;
}
.reload-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.reload-options label {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .65rem;
  border: 1px solid #8d745b;
  color: #f8e5cb;
  font-size: .88rem;
  cursor: pointer;
}
.reload-options input { margin: 0 .45rem 0 0; accent-color: #e7b474; }
.reload-options label:has(:checked) { background: #4a3321; border-color: #efbf83; }
.reload-options label:has(:focus-visible) { outline: 2px solid #ffdfa9; outline-offset: 2px; }
.reload-step { display: none; margin-top: .7rem; }
.reload-example:has([value="build"]:checked) [data-step="build"],
.reload-example:has([value="deploy"]:checked) [data-step="deploy"] { display: block; }
.reload-step pre {
  margin: 0;
  padding: .65rem .55rem;
  border-inline-start: 2px solid #79ad92;
  background: #0a100e;
  color: #bde2c3;
  font-size: .9rem;
  overflow-x: auto;
}
.reload-step p { margin: .55rem 0 0; color: #f1dec3; font-size: .88rem; }

.promo-closing {
  display: grid;
  min-height: clamp(26rem, 37vw, 40rem);
  place-items: center;
  text-align: center;
  background: linear-gradient(#141511, #101916 24%);
}
.promo-closing::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  width: min(100%, 1940px);
  margin-inline: auto;
  background:
    radial-gradient(ellipse at 50% 52%, #0e1817dc 5%, #0e181785 51%, #13171419 78%),
    url("hero/sottobosco-fucina.webp") 53% 49% / cover no-repeat;
  mask-image: linear-gradient(180deg, transparent, #000 20%),
    radial-gradient(ellipse 72% 80%, #000 45%, transparent 100%);
  mask-composite: intersect;
}
.promo-closing .story-copy { padding-block: 4rem; }
.promo-closing .story-copy p { margin-inline: auto; }
.promo-closing .actions { justify-content: center; align-items: center; }
.promo-closing .world-link { margin: 0; }
.promo-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .6rem 1.4rem;
  border: 1px solid #f5c283;
  background: linear-gradient(#edc48b, #bb8049);
  box-shadow: inset 0 0 0 2px #e1a76c96, 0 5px 15px #05050499;
  color: #24140a;
  font-weight: 750;
  text-decoration: none;
}
.promo-download:hover { background: #f3cc97; }

@media (min-width: 1000px) and (max-width: 1800px) {
  .kiln-promo .reforge-hero .hero-copy {
    margin-inline-start: max(3rem, calc((100% - 1300px) / 2));
    padding-block-start: 3rem;
  }
  .kiln-promo .reforge-hero .hero-copy h1 { width: min(52vw, 45rem); }
}

@media (max-width: 960px) {
  .is-interactive .feature-layout { gap: 1.9rem; }
  .feature-card-caption small { display: none; }
  .story-layout, .promo-story--build .story-layout { gap: 2rem; }
}

@media (max-width: 730px) {
  .kiln-promo { --rail-width: calc(100% - 2.25rem); }
  .kiln-promo .reforge-hero { min-height: 100svh; }
  .kiln-promo .reforge-hero .hero-copy { padding-block-end: 1.3rem; }
  .kiln-promo .reforge-hero .controls { padding: .55rem .3rem .9rem; }
  .hero-sill-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 12px;
    padding-block: 2px;
  }
  .hero-sill a { min-height: 44px; font-size: 1.05rem; }
  .hero-sill a:nth-child(odd) { border-inline-start: 0; }
  .hero-sill a:nth-child(n + 3) { border-block-start: 1px solid #be95613d; }
  .hero-sill::before, .hero-sill::after {
    inset-block: -25px -58px;
    width: 32px;
    background-size: auto 114px;
  }
  .hero-sill::before {
    inset-inline-start: -14px;
    clip-path: polygon(0 58%, 35% 56%, 62% 55%, 89% 52%, 100% 63%, 100% 100%, 0 100%);
  }
  .hero-sill::after { inset-inline-end: -14px; }
  .is-interactive .feature-layout { grid-template-columns: minmax(0, 1fr); gap: 1.55rem; }
  .feature-fan {
    --card-width: clamp(8.5rem, 40vw, 12.15rem);
    --fan-inset: 10px;
    width: min(100%, 28rem);
    margin-inline: auto;
  }
  .feature-card[data-depth="3"] { --tilt: -9deg; --offset: 26px; }
  .feature-card[data-depth="2"] { --tilt: -6deg; --offset: 16px; }
  .feature-card[data-depth="1"] { --tilt: -4deg; --offset: 7px; }
  .feature-selector { inset-inline: .15rem; padding-inline: .14rem; }
  .feature-copy h2, .story-copy h2 { font-size: clamp(2.9rem, 10vw, 4.4rem); }
  .story-layout, .promo-story--build .story-layout { grid-template-columns: minmax(0, 1fr); }
  .story-copy { grid-row: 1; }
}

@media (max-width: 370px) {
  .kiln-promo .reforge-hero .hero-copy { padding-block-start: 8.9rem; }
  .kiln-promo .reforge-hero .controls button { padding-inline: .65rem; }
}

