
  /* =========================================
     GATE — only used on this page
     ========================================= */
  .gate-stage {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px 80px;
    overflow: hidden;
  }
  .gate-prelude {
    font-family: 'Allura', cursive;
    font-size: 1.4rem;
    color: var(--text-soft);
    margin: 0 0 36px;
    text-shadow: 0 0 18px rgba(212, 161, 74, 0.4), 0 2px 8px rgba(0,0,0,0.7);
    text-align: center;
    opacity: 0.92;
  }
  .doorway {
    position: relative;
    width: min(460px, 88vw);
    aspect-ratio: 0.85;
    margin: 0 auto;
    cursor: pointer;
    user-select: none;
    perspective: 1500px;
    perspective-origin: center;
  }
  /* Outer ornate stone-iron arch frame — multiple layers for depth */
  .doorway::before {
    content: '';
    position: absolute;
    inset: -22px;
    border: 14px solid transparent;
    border-image: linear-gradient(135deg,
      #f4d590 0%,
      #d4a14a 18%,
      #8c5a32 38%,
      #4a3320 55%,
      #8c5a32 72%,
      #d4a14a 88%,
      #f4d590 100%) 1;
    border-radius: 50% 50% 8px 8px / 24% 24% 8px 8px;
    background: transparent;
    box-shadow:
      inset 0 0 0 2px rgba(0, 0, 0, 0.5),
      inset 0 4px 10px rgba(255, 220, 140, 0.32),
      inset 0 -6px 12px rgba(0, 0, 0, 0.6),
      0 24px 90px rgba(212, 161, 74, 0.35),
      0 0 0 6px rgba(60, 40, 26, 0.7),
      0 0 0 8px rgba(140, 90, 50, 0.45);
    pointer-events: none;
    z-index: 0;
  }
  /* Inner doorway recessed shadow */
  .doorway::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse at center,
        rgba(50, 30, 18, 0.55) 0%,
        rgba(20, 12, 6, 0.92) 70%,
        rgba(10, 6, 4, 0.98) 100%);
    z-index: 0;
    border-radius: 50% 50% 4px 4px / 22% 22% 4px 4px;
  }
  /* DOOR — multi-layer metallic body with patina + edge shading */
  .door {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    background:
      radial-gradient(ellipse at 30% 75%, rgba(45, 80, 60, 0.22) 0%, transparent 45%),
      linear-gradient(to right,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.18) 18%,
        transparent 28%,
        transparent 72%,
        rgba(255, 220, 140, 0.16) 95%,
        rgba(255, 220, 140, 0.22) 100%),
      linear-gradient(to bottom,
        rgba(255, 220, 150, 0.22) 0%,
        rgba(255, 220, 150, 0.06) 18%,
        transparent 45%,
        rgba(0, 0, 0, 0.18) 75%,
        rgba(0, 0, 0, 0.35) 100%),
      linear-gradient(165deg,
        #b87333 0%,
        #8c5a32 22%,
        #68522e 48%,
        #4a3320 75%,
        #2d1a0f 100%);
    border: 1px solid #100f0c;
    box-shadow:
      inset 0 0 90px rgba(0, 0, 0, 0.65),
      inset 0 4px 18px rgba(255, 220, 140, 0.22),
      inset 0 -12px 28px rgba(0, 0, 0, 0.55),
      inset 4px 0 14px rgba(0, 0, 0, 0.4);
    transition: transform 1.6s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 1.6s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    z-index: 2;
  }
  .door-left  { left: 0;  transform-origin: left center;  border-radius: 50% 0 0 0 / 30% 0 0 0; }
  .door-right { right: 0; transform-origin: right center; border-radius: 0 50% 0 0 / 0 30% 0 0; }
  /* DOOR RIVETS — 3D bolts via radial-gradient, with drop shadow */
  .door::before {
    content: '';
    position: absolute;
    inset: 14px;
    background-image:
      radial-gradient(circle at center,
        #f4d590 0%,
        #d4a14a 14%,
        #8c5a32 30%,
        #2d1a0f 48%,
        transparent 50%);
    background-size: 38px 38px;
    background-position: 0 0;
    opacity: 0.85;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
    pointer-events: none;
  }
  /* DOOR ENGRAVED CENTER PANEL — decorative inset with cross-hatching */
  .door::after {
    content: '';
    position: absolute;
    top: 32%;
    left: 18%;
    right: 18%;
    bottom: 22%;
    background:
      repeating-linear-gradient(45deg,
        rgba(212, 161, 74, 0.10) 0px,
        rgba(212, 161, 74, 0.10) 1px,
        transparent 1px,
        transparent 9px),
      repeating-linear-gradient(-45deg,
        rgba(212, 161, 74, 0.10) 0px,
        rgba(212, 161, 74, 0.10) 1px,
        transparent 1px,
        transparent 9px),
      linear-gradient(165deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.18) 50%,
        rgba(0, 0, 0, 0.35) 100%);
    border: 2px solid rgba(255, 220, 140, 0.22);
    border-radius: 4px;
    box-shadow:
      inset 0 0 18px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 220, 140, 0.3),
      inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    pointer-events: none;
  }
  .door-gear {
    position: absolute;
    width: 38%;
    aspect-ratio: 1;
    top: 6%;
    animation: gear-spin-corner 22s linear infinite;
    z-index: 3;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  }
  .door-left  .door-gear { left: 6%;  }
  .door-right .door-gear { right: 6%; animation-direction: reverse; animation-duration: 18s; }
  .wheel-half {
    position: absolute;
    width: 110%;
    aspect-ratio: 1;
    top: 50%;
    z-index: 4;
    pointer-events: none;
    animation: gear-rotate 60s linear infinite;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
  }
  .door-left .wheel-half  { right: -10%; transform: translateY(-50%); }
  .door-right .wheel-half { left:  -10%; transform: translateY(-50%); animation-direction: reverse; }
  .doorway svg.gear { display: block; width: 100%; height: 100%; overflow: visible; }
  .doorway.is-opening .door-left  { transform: rotateY(-115deg); box-shadow: inset 0 0 80px rgba(0,0,0,0.7), 0 0 60px rgba(212, 161, 74, 0.3); }
  .doorway.is-opening .door-right { transform: rotateY( 115deg); box-shadow: inset 0 0 80px rgba(0,0,0,0.7), 0 0 60px rgba(212, 161, 74, 0.3); }
  .doorway.is-opening .door-gear  { animation-duration: 0.6s; }
  .doorway.is-opening .wheel-half { animation-duration: 1.2s; }
  @keyframes gear-rotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to   { transform: translateY(-50%) rotate(360deg); }
  }
  @keyframes gear-spin-corner {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
  }
  .steam {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60px;
    pointer-events: none;
    opacity: 0;
  }
  .steam.puff { animation: steam-rise 1.6s ease-out forwards; }
  @keyframes steam-rise {
    0%   { opacity: 0;   transform: translateX(-50%) translateY(0)    scale(0.4); }
    35%  { opacity: 0.5; }
    100% { opacity: 0;   transform: translateX(-50%) translateY(-100px) scale(1.5); }
  }
  .steam-wisp {
    position: absolute;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 216, 184, 0.6) 0%, transparent 65%);
    filter: blur(8px);
  }
  .steam-wisp:nth-child(1) { left: 20%; }
  .steam-wisp:nth-child(2) { left: 45%; }
  .steam-wisp:nth-child(3) { left: 70%; }

  .gate-cta {
    margin-top: 48px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--sp-bright);
    text-shadow: 0 0 16px var(--sp-glow);
    text-align: center;
    transition: opacity 0.3s ease;
    animation: cta-pulse 3s ease-in-out infinite;
  }
  @keyframes cta-pulse {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
  }
  .doorway.is-opening + .gate-cta { opacity: 0; }

  .flash {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: radial-gradient(circle at center, var(--sp-gold) 0%, var(--sp-bright) 40%, transparent 75%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
  }
  .flash.is-firing {
    opacity: 1;
    transition: opacity 0.2s ease;
  }

  /* =========================================
     CHOOSER — five category cards revealed after gate
     ========================================= */
  .workshop-chooser {
    display: none;
    max-width: 1140px;
    margin: 0 auto;
    padding: 90px 5vw 130px;
    text-align: center;
  }
  .workshop-chooser.is-revealed {
    display: block;
    animation: reveal 0.8s ease;
  }
  .gate-stage.is-fading-out {
    opacity: 0;
    transform: translateY(-40px) scale(0.96);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
  }
  @keyframes reveal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
  }

  .chooser-lede {
    font-family: 'Allura', cursive;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    color: var(--sp-gold);
    margin: 0 0 56px;
    line-height: 1;
    text-shadow: 0 0 28px rgba(212, 161, 74, 0.5), 0 4px 18px rgba(0,0,0,0.6);
  }

  .chooser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
  .choice {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 48px 28px;
    min-height: 240px;
    text-decoration: none;
    color: var(--text-soft);
    border: 1px solid rgba(212, 161, 74, 0.28);
    border-radius: 4px;
    background:
      linear-gradient(165deg, rgba(110, 74, 42, 0.35) 0%, rgba(26, 14, 8, 0.55) 100%);
    transition: all 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  .choice::before {
    content: '';
    position: absolute;
    inset: 8px;
    background-image: radial-gradient(circle, var(--sp-gold) 1px, transparent 1.8px);
    background-size: 28px 28px;
    background-position: 0 0;
    opacity: 0.18;
    pointer-events: none;
    border-radius: 2px;
  }
  .choice::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, var(--glow-color, var(--sp-glow)) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
  }
  .choice:hover {
    transform: translateY(-3px);
    border-color: var(--sp-bright);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 36px var(--glow-color, var(--sp-glow));
  }
  .choice:hover::after { opacity: 0.35; }

  .choice-eyebrow {
    font-size: 0.7rem;
    font-weight: 100;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--sp-bright);
    opacity: 0.85;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
  }
  .choice-title {
    font-family: 'Allura', cursive;
    font-size: 2.6rem;
    line-height: 1;
    color: var(--sp-gold);
    margin: 4px 0 12px;
    text-shadow: 0 0 18px rgba(212, 161, 74, 0.45);
    position: relative;
    z-index: 2;
  }
  .choice-sub {
    font-size: 0.9rem;
    font-weight: 200;
    line-height: 1.55;
    color: var(--text-dim);
    max-width: 32ch;
    margin: 0 auto;
    position: relative;
    z-index: 2;
  }
  .choice-status {
    font-size: 0.62rem;
    font-weight: 100;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--sp-bright);
    margin-top: 14px;
    opacity: 0.7;
    position: relative;
    z-index: 2;
  }

  /* per-card glow tint — subtle variations within the brass family */
  .choice--3d         { --glow-color: rgba(184, 115, 51, 0.45); }
  .choice--code       { --glow-color: rgba(140, 90, 50, 0.4); }
  .choice--cyberdeck  { --glow-color: rgba(232, 197, 120, 0.45); }
  .choice--miniatures { --glow-color: rgba(212, 100, 60, 0.45); }
  .choice--spaces     { --glow-color: rgba(160, 130, 90, 0.45); }

  @media (max-width: 880px) {
    .chooser-grid { grid-template-columns: repeat(2, 1fr); }
    .workshop-chooser { padding: 70px 5vw 90px; }
  }
  @media (max-width: 540px) {
    .chooser-grid { grid-template-columns: 1fr; }
    .choice { padding: 40px 24px; min-height: 200px; }
    .choice-title { font-size: 2.2rem; }
  }
  @media (max-width: 720px) {
    .gate-stage { padding: 40px 16px 60px; }
    .gate-prelude { font-size: 1.15rem; margin-bottom: 28px; }
    .gate-cta { font-size: 0.78rem; letter-spacing: 0.4em; margin-top: 36px; }
  }

:root{--text-soft:var(--ink);--sp-bright:#e8c578;--sp-gold:#d4a14a;--sp-glow:#d4a14a55}
.gate-stage{min-height:calc(100dvh - 103px);padding:25px 24px 45px}.gate-stage h1{font-size:48px;margin-bottom:32px}.doorway{width:min(360px,68vw,44dvh)}.gate-cta{background:transparent;border:0;min-height:44px;letter-spacing:.22em;margin-top:35px}.gate-skip{margin-top:12px;font-size:13px;border-bottom:1px solid var(--line)}
body.motion-off .gate-stage *{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.gate-stage *{animation:none!important;transition:none!important}}
