/* global React */
/* ============================================================
   WV Smokehouse — Hero
   Three lit vignettes you swipe between.
   [Stage] [Tap*] [Pit]    *center, shown first
   ============================================================ */

const { useState, useEffect, useRef, useCallback } = React;

/* ---------- Scene 1: STAGE (left) ---------- */
function StageScene(){
  return (
    <svg className="scene-svg" viewBox="0 0 1600 900" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
      <defs>
        <radialGradient id="stage-spot" cx="50%" cy="20%" r="55%">
          <stop offset="0%"  stopColor="#f5c98a" stopOpacity=".55"/>
          <stop offset="40%" stopColor="#c4824b" stopOpacity=".22"/>
          <stop offset="100%" stopColor="#0c0805" stopOpacity="0"/>
        </radialGradient>
        <radialGradient id="stage-spot-2" cx="78%" cy="18%" r="35%">
          <stop offset="0%"  stopColor="#f5c98a" stopOpacity=".35"/>
          <stop offset="100%" stopColor="#0c0805" stopOpacity="0"/>
        </radialGradient>
        <linearGradient id="curtain" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%"  stopColor="#2b0d09"/>
          <stop offset="55%" stopColor="#4a160e"/>
          <stop offset="100%" stopColor="#1a0807"/>
        </linearGradient>
        <linearGradient id="mic-body" x1="0" x2="1" y1="0" y2="1">
          <stop offset="0%"  stopColor="#e6c894"/>
          <stop offset="35%" stopColor="#a88254"/>
          <stop offset="58%" stopColor="#3a2715"/>
          <stop offset="100%" stopColor="#0e0703"/>
        </linearGradient>
        <linearGradient id="mic-stem-grad" x1="0" x2="1" y1="0" y2="0">
          <stop offset="0%"  stopColor="#1a1108"/>
          <stop offset="50%" stopColor="#8a6c46"/>
          <stop offset="100%" stopColor="#1a1108"/>
        </linearGradient>
        <radialGradient id="mic-highlight" cx="30%" cy="35%" r="40%">
          <stop offset="0%"  stopColor="#fff2c8" stopOpacity=".8"/>
          <stop offset="100%" stopColor="#fff2c8" stopOpacity="0"/>
        </radialGradient>
        <filter id="soft-stage" x="-10%" y="-10%" width="120%" height="120%"><feGaussianBlur stdDeviation="1.4"/></filter>
        <filter id="curtain-blur"><feGaussianBlur stdDeviation="8"/></filter>
        <radialGradient id="vignette-stage" cx="50%" cy="55%" r="70%">
          <stop offset="55%" stopColor="#000" stopOpacity="0"/>
          <stop offset="100%" stopColor="#000" stopOpacity=".88"/>
        </radialGradient>
      </defs>

      {/* deep curtain backdrop, blurred */}
      <g filter="url(#curtain-blur)" opacity=".9">
        <rect x="0" y="0" width="1600" height="900" fill="url(#curtain)"/>
        {/* curtain pleats */}
        {Array.from({length: 22}).map((_,i)=>(
          <rect key={i} x={i*78-30} y="0" width="40" height="900" fill="#0c0403" opacity={i%2?.4:.2}/>
        ))}
      </g>

      {/* stage floor */}
      <rect x="0" y="630" width="1600" height="270" fill="#120804"/>
      <rect x="0" y="630" width="1600" height="6" fill="#3d1d13" opacity=".7"/>
      {/* floorboard lines */}
      {[660, 710, 760, 810, 860].map((y,i)=>(
        <rect key={i} x="0" y={y} width="1600" height="1" fill="#2a1409" opacity=".7"/>
      ))}

      {/* spotlight cones from above */}
      <ellipse cx="800" cy="0" rx="500" ry="700" fill="url(#stage-spot)"/>
      <ellipse cx="1240" cy="0" rx="280" ry="500" fill="url(#stage-spot-2)" opacity=".6"/>

      {/* dust motes */}
      {[
        [640,180,1.8,.9],[880,260,1.4,.7],[760,420,1.2,.8],[1020,380,1.6,.65],
        [580,520,1.3,.55],[920,580,1.7,.75],[800,650,1.4,.5],[700,300,1.1,.7],
        [980,160,1.2,.55],[840,500,1.0,.6],[660,640,1.2,.45],[940,720,1.3,.55],
        [1080,540,1.0,.5],[720,200,.9,.6],[860,360,1.0,.5]
      ].map(([x,y,r,o],i)=>(
        <circle key={i} cx={x} cy={y} r={r} fill="#fff3cf" opacity={o}/>
      ))}

      {/* upright piano silhouette far left, dim */}
      <g opacity=".5" filter="url(#soft-stage)">
        <rect x="60" y="510" width="240" height="220" fill="#0c0403"/>
        <rect x="60" y="510" width="240" height="14" fill="#1a0c06"/>
        <rect x="80" y="560" width="200" height="6" fill="#3d1d13" opacity=".5"/>
        {/* keys */}
        <rect x="80" y="600" width="200" height="22" fill="#1a1108"/>
        {Array.from({length: 11}).map((_,i)=>(
          <rect key={i} x={84 + i*18} y="600" width="14" height="22" fill="#e6d3a5" opacity=".7"/>
        ))}
        {Array.from({length: 10}).map((_,i)=>(
          <rect key={'b'+i} x={94 + i*18} y="600" width="9" height="14" fill="#0c0403"/>
        ))}
      </g>

      {/* mic stand */}
      <rect x="797" y="430" width="6" height="290" fill="url(#mic-stem-grad)"/>
      {/* base disc */}
      <ellipse cx="800" cy="720" rx="90" ry="11" fill="#0c0805" opacity=".95"/>
      <ellipse cx="800" cy="714" rx="74" ry="9" fill="#2a1d12"/>
      <ellipse cx="800" cy="710" rx="74" ry="7" fill="url(#mic-stem-grad)"/>

      {/* mic yoke */}
      <path d="M 748 320 Q 748 380 778 392 L 822 392 Q 852 380 852 320"
            stroke="#2a1d12" strokeWidth="7" fill="none" strokeLinecap="round"/>
      <circle cx="748" cy="320" r="6" fill="#8a6c46"/>
      <circle cx="852" cy="320" r="6" fill="#8a6c46"/>

      {/* mic head — capsule, more refined */}
      <g>
        {/* shadow behind mic for depth */}
        <ellipse cx="803" cy="268" rx="70" ry="92" fill="#000" opacity=".5" filter="url(#soft-stage)"/>
        {/* body */}
        <ellipse cx="800" cy="265" rx="68" ry="88" fill="url(#mic-body)"/>
        {/* horizontal grille lines (no dot pattern) */}
        {[200, 220, 240, 260, 280, 300, 320].map((y,i)=>(
          <ellipse key={i} cx="800" cy={y} rx={Math.sqrt(Math.max(0, 88*88 - (y-265)*(y-265))) * 68/88} ry="1.2"
                   fill="#0c0805" opacity=".55"/>
        ))}
        {/* vertical grille lines, faint */}
        {[-50, -30, -10, 10, 30, 50].map((dx,i)=>(
          <ellipse key={i} cx={800+dx} cy="265" rx="1" ry={Math.sqrt(Math.max(0, 88*88*(1-(dx*dx)/(68*68))))} fill="#0c0805" opacity=".25"/>
        ))}
        {/* highlight */}
        <ellipse cx="780" cy="240" rx="42" ry="55" fill="url(#mic-highlight)"/>
        {/* rim */}
        <ellipse cx="800" cy="265" rx="68" ry="88" fill="none" stroke="#d4b27e" strokeOpacity=".55" strokeWidth="1.5"/>
        {/* chrome band beneath head */}
        <rect x="770" y="350" width="60" height="16" rx="3" fill="url(#mic-body)"/>
        <rect x="770" y="350" width="60" height="3" fill="#e8d3a8" opacity=".75"/>
        {/* connector */}
        <rect x="782" y="366" width="36" height="60" fill="#1a1108"/>
        <rect x="782" y="366" width="36" height="6" fill="#4a3825"/>
      </g>

      {/* guitar headstock silhouette far right */}
      <g opacity=".45" filter="url(#soft-stage)">
        <path d="M 1380 470 L 1480 470 L 1495 510 L 1395 510 Z" fill="#0c0805"/>
        <rect x="1410" y="510" width="14" height="200" fill="#0c0805"/>
        <circle cx="1408" cy="488" r="4" fill="#c9a567"/>
        <circle cx="1428" cy="488" r="4" fill="#c9a567"/>
        <circle cx="1448" cy="488" r="4" fill="#c9a567"/>
      </g>

      {/* vignette */}
      <rect x="0" y="0" width="1600" height="900" fill="url(#vignette-stage)"/>
    </svg>
  );
}

/* ---------- Scene 2: TAP (center) ---------- */
function TapScene(){
  return (
    <svg className="scene-svg" viewBox="0 0 1600 900" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
      <defs>
        <linearGradient id="bar-back" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%"  stopColor="#1a0e07"/>
          <stop offset="40%" stopColor="#3a2515"/>
          <stop offset="100%" stopColor="#0e0703"/>
        </linearGradient>
        <radialGradient id="bulb-glow" cx="50%" cy="50%" r="50%">
          <stop offset="0%"  stopColor="#fff0b5" stopOpacity=".95"/>
          <stop offset="40%" stopColor="#f5b450" stopOpacity=".4"/>
          <stop offset="100%" stopColor="#f5b450" stopOpacity="0"/>
        </radialGradient>
        <linearGradient id="bar-top" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%"  stopColor="#5a3a22"/>
          <stop offset="100%" stopColor="#1a0e07"/>
        </linearGradient>
        <linearGradient id="brass" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%"  stopColor="#f0d089"/>
          <stop offset="30%" stopColor="#c9a567"/>
          <stop offset="60%" stopColor="#8a6e3f"/>
          <stop offset="100%" stopColor="#3d2a15"/>
        </linearGradient>
        <linearGradient id="brass-rail" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%"  stopColor="#f0d089"/>
          <stop offset="20%" stopColor="#d4ab66"/>
          <stop offset="55%" stopColor="#8a6e3f"/>
          <stop offset="100%" stopColor="#2a1d10"/>
        </linearGradient>
        <linearGradient id="handle-wood" x1="0" x2="1" y1="0" y2="1">
          <stop offset="0%"  stopColor="#7a3e1a"/>
          <stop offset="50%" stopColor="#4a2510"/>
          <stop offset="100%" stopColor="#1a0a04"/>
        </linearGradient>
        <linearGradient id="handle-side" x1="0" x2="1" y1="0" y2="0">
          <stop offset="0%"  stopColor="#1a0a04"/>
          <stop offset="50%" stopColor="#6a3520"/>
          <stop offset="100%" stopColor="#2a1409"/>
        </linearGradient>
        <linearGradient id="beer" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%"  stopColor="#fff5d0"/>
          <stop offset="6%"  stopColor="#fff5d0"/>
          <stop offset="14%" stopColor="#f5d77a"/>
          <stop offset="60%" stopColor="#d99a3a"/>
          <stop offset="100%" stopColor="#7d5018"/>
        </linearGradient>
        <linearGradient id="glass-shine" x1="0" x2="1" y1="0" y2="0">
          <stop offset="0%" stopColor="#fff" stopOpacity="0"/>
          <stop offset="20%" stopColor="#fff" stopOpacity=".55"/>
          <stop offset="40%" stopColor="#fff" stopOpacity="0"/>
        </linearGradient>
        <filter id="soft-tap" x="-10%" y="-10%" width="120%" height="120%"><feGaussianBlur stdDeviation="3"/></filter>
        <filter id="bg-blur-tap"><feGaussianBlur stdDeviation="16"/></filter>
        <radialGradient id="vignette-tap" cx="50%" cy="55%" r="70%">
          <stop offset="55%" stopColor="#000" stopOpacity="0"/>
          <stop offset="100%" stopColor="#000" stopOpacity=".85"/>
        </radialGradient>
      </defs>

      {/* deep wood-paneled wall */}
      <rect x="0" y="0" width="1600" height="900" fill="url(#bar-back)"/>
      {/* horizontal wall panel seams */}
      {[120, 240, 360].map((y,i)=>(
        <rect key={i} x="0" y={y} width="1600" height="1" fill="#0c0403" opacity=".7"/>
      ))}

      {/* blurred shelf with bottles, way back */}
      <g filter="url(#bg-blur-tap)" opacity=".55">
        <rect x="0" y="140" width="1600" height="6" fill="#5a3a22"/>
        <rect x="0" y="290" width="1600" height="6" fill="#5a3a22"/>
        {Array.from({length: 40}).map((_,i)=>(
          <rect key={i} x={20 + i*40} y={156} width={22 - (i%3)*3} height={130} rx="4"
                fill={i%3===0?'#3a1d0c':(i%3===1?'#5c2a13':'#2a1409')}/>
        ))}
      </g>

      {/* hanging tungsten bulbs glow */}
      <g opacity=".95">
        <ellipse cx="280" cy="160" rx="150" ry="110" fill="url(#bulb-glow)"/>
        <ellipse cx="800" cy="120" rx="180" ry="120" fill="url(#bulb-glow)"/>
        <ellipse cx="1320" cy="160" rx="150" ry="110" fill="url(#bulb-glow)" opacity=".85"/>
      </g>
      {/* the bulbs themselves */}
      <g>
        <line x1="280" y1="0" x2="280" y2="160" stroke="#1a0e07" strokeWidth="1.5"/>
        <line x1="800" y1="0" x2="800" y2="120" stroke="#1a0e07" strokeWidth="1.5"/>
        <line x1="1320" y1="0" x2="1320" y2="160" stroke="#1a0e07" strokeWidth="1.5"/>
        {/* small brass cap */}
        <rect x="270" y="150" width="20" height="8" rx="2" fill="#8a6e3f"/>
        <rect x="790" y="110" width="20" height="8" rx="2" fill="#8a6e3f"/>
        <rect x="1310" y="150" width="20" height="8" rx="2" fill="#8a6e3f"/>
        {/* edison bulb */}
        <ellipse cx="280" cy="172" rx="10" ry="14" fill="#fff5d0"/>
        <ellipse cx="800" cy="132" rx="11" ry="15" fill="#fff5d0"/>
        <ellipse cx="1320" cy="172" rx="10" ry="14" fill="#fff5d0"/>
      </g>

      {/* === LOWER COMPOSITION GROUP (taps & brass) === */}
      <g transform="translate(0 125)">
      {/* the brass rail the taps mount on */}
      <rect x="0" y="430" width="1600" height="38" fill="url(#brass-rail)"/>
      <rect x="0" y="430" width="1600" height="6" fill="#fff3c5" opacity=".55"/>
      <rect x="0" y="462" width="1600" height="6" fill="#000" opacity=".4"/>
      {/* support brackets */}
      {[100, 380, 800, 1220, 1500].map((x,i)=>(
        <g key={i}>
          <rect x={x-12} y="468" width="24" height="40" fill="url(#brass)"/>
          <rect x={x-16} y="500" width="32" height="10" fill="url(#brass)"/>
        </g>
      ))}

      {/* the taps — 4 flanking the central headline space */}
      {[180, 420, 1180, 1420].map((x,i)=>{
        const featured = i === 2;
        const handleW = featured ? 70 : 58;
        const handleH = featured ? 175 : 155;
        return (
          <g key={i}>
            {/* faucet drop shadow */}
            <ellipse cx={x} cy="500" rx="48" ry="6" fill="#000" opacity=".35"/>
            {/* shank coming out of rail */}
            <rect x={x-12} y="436" width="24" height="36" fill="url(#brass)"/>
            <rect x={x-12} y="436" width="24" height="3" fill="#fff3c5" opacity=".5"/>
            {/* faucet body — angled */}
            <path d={`M ${x-28} 472 L ${x+28} 472 L ${x+22} 530 L ${x-22} 530 Z`} fill="url(#brass)"/>
            <rect x={x-28} y="472" width="56" height="6" fill="#fff3c5" opacity=".55"/>
            {/* spout */}
            <rect x={x-10} y="530" width="20" height="28" fill="url(#brass)"/>
            <ellipse cx={x} cy="558" rx="11" ry="3" fill="#3a1d0c"/>

            {/* handle ferrule */}
            <rect x={x-8} y="416" width="16" height="20" fill="url(#brass)"/>
            <rect x={x-8} y="416" width="16" height="3" fill="#fff3c5" opacity=".5"/>

            {/* the handle: tall wooden paddle */}
            <g>
              {/* paddle */}
              <path d={`M ${x-handleW/2} ${260-handleH/2+60} Q ${x-handleW/2} ${240-handleH/2+30} ${x} ${240-handleH/2+30} Q ${x+handleW/2} ${240-handleH/2+30} ${x+handleW/2} ${260-handleH/2+60} L ${x+handleW/2-4} 414 L ${x-handleW/2+4} 414 Z`}
                    fill="url(#handle-wood)"/>
              {/* side shading on outer */}
              <path d={`M ${x-handleW/2} ${260-handleH/2+60} Q ${x-handleW/2} ${240-handleH/2+30} ${x} ${240-handleH/2+30} L ${x} 414 L ${x-handleW/2+4} 414 Z`}
                    fill="url(#handle-side)" opacity=".5"/>
              {/* highlight strip */}
              <path d={`M ${x-3} ${260-handleH/2+60} L ${x-3} 414`} stroke="#fff" strokeOpacity=".22" strokeWidth="2"/>
              {/* a tiny brass cap on top */}
              <rect x={x-handleW/2+8} y={260-handleH/2+38} width={handleW-16} height="6" fill="url(#brass)" opacity=".6"/>

              {/* hand-painted enamel label, deeper on the featured one */}
              {featured && (
                <g>
                  <rect x={x-handleW/2+8} y={260-handleH/2+72} width={handleW-16} height="78" rx="5" fill="#f1e5c8"/>
                  <rect x={x-handleW/2+8} y={260-handleH/2+72} width={handleW-16} height="78" rx="5" fill="none" stroke="#4a160e" strokeWidth="1.2"/>
                  <rect x={x-handleW/2+8} y={260-handleH/2+72} width={handleW-16} height="14" fill="#7a2a1f" opacity=".5"/>
                  <text x={x} y={260-handleH/2+95} textAnchor="middle" fontFamily="Rye, serif" fontSize="11" fill="#4a160e">TWO TOWNS</text>
                  <text x={x} y={260-handleH/2+112} textAnchor="middle" fontFamily="Caveat, cursive" fontSize="15" fill="#7a2a1f" fontWeight="700">cosmic</text>
                  <text x={x} y={260-handleH/2+126} textAnchor="middle" fontFamily="Caveat, cursive" fontSize="13" fill="#7a2a1f">raspberry</text>
                  <text x={x} y={260-handleH/2+142} textAnchor="middle" fontFamily="Rye, serif" fontSize="8" fill="#4a160e" letterSpacing="1.5">CIDER</text>
                </g>
              )}
              {!featured && (
                <g opacity=".7">
                  <rect x={x-handleW/2+8} y={260-handleH/2+78} width={handleW-16} height="52" rx="4" fill="#2a1409"/>
                  <rect x={x-handleW/2+8} y={260-handleH/2+78} width={handleW-16} height="52" rx="4" fill="none" stroke="#c9a567" strokeWidth=".8" strokeOpacity=".6"/>
                  <text x={x} y={260-handleH/2+100} textAnchor="middle" fontFamily="Rye, serif" fontSize="7" fill="#c9a567" opacity=".85">OREGON</text>
                  <text x={x} y={260-handleH/2+115} textAnchor="middle" fontFamily="Rye, serif" fontSize="7" fill="#c9a567" opacity=".85">CRAFT</text>
                </g>
              )}
            </g>
          </g>
        );
      })}
      </g>
      {/* === END LOWER COMPOSITION GROUP === */}

      {/* bar top */}
      <rect x="0" y="640" width="1600" height="260" fill="url(#bar-top)"/>
      <rect x="0" y="640" width="1600" height="4" fill="#a07045" opacity=".7"/>
      {/* wood grain stripes */}
      {Array.from({length: 7}).map((_,i)=>(
        <rect key={i} x="0" y={665 + i*32} width="1600" height="1" fill="#0c0403" opacity=".4"/>
      ))}

      {/* the pint glass on the bar — right side */}
      <g>
        <ellipse cx="1180" cy="870" rx="100" ry="10" fill="#000" opacity=".5"/>
        {/* glass body */}
        <path d="M 1100 680 L 1100 870 Q 1100 894 1125 894 L 1235 894 Q 1260 894 1260 870 L 1260 680 Z" fill="#1a0e07" opacity=".55"/>
        {/* beer inside */}
        <path d="M 1112 712 L 1112 870 Q 1112 884 1125 884 L 1235 884 Q 1248 884 1248 870 L 1248 712 Z" fill="url(#beer)"/>
        {/* foam */}
        <path d="M 1108 712 Q 1130 696 1170 706 Q 1210 688 1248 700 Q 1262 692 1264 708 L 1264 726 L 1108 726 Z" fill="#fff5dc"/>
        <path d="M 1112 712 Q 1130 700 1170 710 Q 1210 694 1248 706 Q 1262 698 1264 712" fill="none" stroke="#e8d3a8" strokeWidth="1" opacity=".6"/>
        {/* glass highlight */}
        <rect x="1118" y="694" width="12" height="180" rx="6" fill="url(#glass-shine)" opacity=".7"/>
        {/* condensation */}
        {[[1130,800],[1140,840],[1238,750],[1230,810],[1124,860]].map(([x,y],i)=>(
          <circle key={i} cx={x} cy={y} r="2" fill="#fff" opacity=".5"/>
        ))}
        {/* rim */}
        <ellipse cx="1180" cy="680" rx="80" ry="5" fill="none" stroke="#fff" strokeOpacity=".25" strokeWidth="1.2"/>
      </g>

      {/* a folded bar towel + a small chalkboard far left */}
      <g opacity=".88">
        {/* chalkboard */}
        <rect x="120" y="700" width="180" height="120" rx="3" fill="#1a0e07" stroke="#3a2515" strokeWidth="2"/>
        <rect x="120" y="700" width="180" height="120" rx="3" fill="none" stroke="#6a4a2a" strokeWidth="1" opacity=".5"/>
        <text x="210" y="730" textAnchor="middle" fontFamily="Caveat, cursive" fontSize="20" fontWeight="700" fill="#e6d3a5" opacity=".85">today</text>
        <text x="210" y="760" textAnchor="middle" fontFamily="Caveat, cursive" fontSize="14" fill="#d4ab66" opacity=".75">12 taps on</text>
        <line x1="140" y1="775" x2="280" y2="775" stroke="#6a4a2a" strokeWidth=".5" opacity=".5"/>
        <text x="210" y="795" textAnchor="middle" fontFamily="Caveat, cursive" fontSize="14" fill="#d4ab66" opacity=".75">Oregon craft</text>
      </g>

      {/* warm light wash across the brass */}
      <ellipse cx="800" cy="450" rx="780" ry="160" fill="#f5b450" opacity=".12" filter="url(#soft-tap)"/>

      {/* edge vignette */}
      <rect x="0" y="0" width="1600" height="900" fill="url(#vignette-tap)"/>
    </svg>
  );
}

/* ---------- Scene 3: PIT (right) ---------- */
function PitScene(){
  return (
    <svg className="scene-svg" viewBox="0 0 1600 900" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
      <defs>
        <linearGradient id="night-sky" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%"  stopColor="#1a0e07"/>
          <stop offset="50%" stopColor="#0f0805"/>
          <stop offset="100%" stopColor="#070302"/>
        </linearGradient>
        <radialGradient id="ember-glow-pit" cx="50%" cy="50%" r="50%">
          <stop offset="0%"  stopColor="#ffd07a" stopOpacity="1"/>
          <stop offset="30%" stopColor="#f5a35a" stopOpacity=".75"/>
          <stop offset="70%" stopColor="#c4612b" stopOpacity=".25"/>
          <stop offset="100%" stopColor="#7a2a1f" stopOpacity="0"/>
        </radialGradient>
        <linearGradient id="smoker-body" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%"  stopColor="#2a1d14"/>
          <stop offset="40%" stopColor="#15100b"/>
          <stop offset="100%" stopColor="#080503"/>
        </linearGradient>
        <linearGradient id="smoker-side-grad" x1="0" x2="1" y1="0" y2="0">
          <stop offset="0%"  stopColor="#3a2818"/>
          <stop offset="50%" stopColor="#0f0805"/>
          <stop offset="100%" stopColor="#1a0e07"/>
        </linearGradient>
        <radialGradient id="ground-pit" cx="50%" cy="80%" r="60%">
          <stop offset="0%"  stopColor="#3a1d0c" stopOpacity=".6"/>
          <stop offset="100%" stopColor="#070302" stopOpacity="0"/>
        </radialGradient>
        <radialGradient id="ember-inside-pit" cx="50%" cy="60%" r="55%">
          <stop offset="0%"  stopColor="#fff0c8"/>
          <stop offset="20%" stopColor="#ffb74a"/>
          <stop offset="55%" stopColor="#d9531f"/>
          <stop offset="100%" stopColor="#4a160e"/>
        </radialGradient>
        <filter id="smoke-blur-pit"><feGaussianBlur stdDeviation="14"/></filter>
        <filter id="smoke-blur-light-pit"><feGaussianBlur stdDeviation="6"/></filter>
        <radialGradient id="vignette-pit" cx="50%" cy="55%" r="70%">
          <stop offset="55%" stopColor="#000" stopOpacity="0"/>
          <stop offset="100%" stopColor="#000" stopOpacity=".88"/>
        </radialGradient>
        {/* white oak grain pattern */}
        <linearGradient id="oak-log" x1="0" x2="1" y1="0" y2="0">
          <stop offset="0%" stopColor="#2a1409"/>
          <stop offset="50%" stopColor="#5a3a22"/>
          <stop offset="100%" stopColor="#1a0a04"/>
        </linearGradient>
      </defs>

      {/* night sky */}
      <rect x="0" y="0" width="1600" height="900" fill="url(#night-sky)"/>
      {/* faint stars */}
      {[[120,90],[260,140],[440,60],[1140,80],[1320,160],[1080,120],[820,40],[180,210],[1300,260],[680,70],[920,130],[1480,220]]
        .map(([x,y],i)=>(<circle key={i} cx={x} cy={y} r="1" fill="#fff5d0" opacity=".7"/>))}

      {/* drifting smoke column from chimney — static, big and atmospheric */}
      <g filter="url(#smoke-blur-pit)" opacity=".55">
        <ellipse cx="950" cy="160" rx="120" ry="100" fill="#5a4a3a"/>
        <ellipse cx="1000" cy="280" rx="140" ry="100" fill="#4a3a2a"/>
        <ellipse cx="930" cy="380" rx="160" ry="80" fill="#3a2d20"/>
        <ellipse cx="980" cy="450" rx="180" ry="70" fill="#2a2018"/>
      </g>
      {/* lighter wisps */}
      <g filter="url(#smoke-blur-light-pit)" opacity=".5">
        <ellipse cx="960" cy="200" rx="60" ry="70" fill="#806852"/>
        <ellipse cx="990" cy="340" rx="70" ry="60" fill="#6a5240"/>
        <ellipse cx="950" cy="460" rx="80" ry="55" fill="#4a3826"/>
      </g>

      {/* ground glow */}
      <rect x="0" y="640" width="1600" height="260" fill="url(#ground-pit)"/>
      {/* gravel/dust on ground */}
      {Array.from({length: 30}).map((_,i)=>(
        <circle key={i} cx={50 + i*55} cy={720 + (i%7)*15} r=".8" fill="#5a3a22" opacity=".6"/>
      ))}

      {/* the smoker — offset barrel design, sitting big in the right-center */}
      <g>
        {/* legs */}
        <rect x="700" y="650" width="14" height="120" fill="#1a0e07"/>
        <rect x="1100" y="650" width="14" height="120" fill="#1a0e07"/>

        {/* main barrel — horizontal */}
        <ellipse cx="910" cy="500" rx="260" ry="110" fill="url(#smoker-body)"/>
        <rect x="650" y="500" width="520" height="170" fill="url(#smoker-body)"/>
        <ellipse cx="910" cy="670" rx="260" ry="50" fill="#0a0503"/>
        {/* barrel band */}
        <rect x="650" y="580" width="520" height="8" fill="#3a2818" opacity=".7"/>
        <rect x="650" y="580" width="520" height="2" fill="#8a6e3f" opacity=".5"/>
        {/* lid handle on top */}
        <rect x="895" y="378" width="30" height="14" rx="3" fill="#3a2818"/>
        <rect x="895" y="378" width="30" height="3" fill="#8a6e3f" opacity=".6"/>

        {/* chimney */}
        <rect x="980" y="280" width="40" height="220" fill="url(#smoker-side-grad)"/>
        <rect x="970" y="270" width="60" height="16" rx="2" fill="#2a1d14"/>
        <rect x="970" y="270" width="60" height="3" fill="#8a6e3f" opacity=".7"/>

        {/* temperature gauge */}
        <circle cx="780" cy="540" r="20" fill="#0c0805" stroke="#c9a567" strokeWidth="1.5"/>
        <circle cx="780" cy="540" r="16" fill="#2a1d14"/>
        <text x="780" y="538" textAnchor="middle" fontSize="6" fill="#c9a567" fontFamily="Rye, serif">225</text>
        <line x1="780" y1="540" x2="788" y2="530" stroke="#d97843" strokeWidth="2"/>
        <circle cx="780" cy="540" r="2" fill="#c9a567"/>

        {/* center barrel door — closed */}
        <ellipse cx="910" cy="560" rx="140" ry="60" fill="#0c0805" opacity=".7"/>
        <ellipse cx="910" cy="560" rx="140" ry="60" fill="none" stroke="#3a2818" strokeWidth="1.5"/>
        <circle cx="1030" cy="560" r="5" fill="#c9a567"/>
        <circle cx="1030" cy="560" r="2" fill="#fff" opacity=".6"/>

        {/* firebox — offset to the left */}
        <rect x="440" y="540" width="220" height="170" fill="url(#smoker-body)"/>
        <rect x="440" y="540" width="220" height="8" fill="#3a2818" opacity=".7"/>
        <rect x="440" y="540" width="220" height="2" fill="#8a6e3f" opacity=".5"/>
        {/* firebox legs */}
        <rect x="460" y="710" width="12" height="60" fill="#1a0e07"/>
        <rect x="640" y="710" width="12" height="60" fill="#1a0e07"/>
        {/* short stack on firebox */}
        <rect x="490" y="470" width="28" height="70" fill="url(#smoker-side-grad)"/>
        <rect x="484" y="464" width="40" height="10" rx="2" fill="#2a1d14"/>

        {/* firebox door — open, glowing — door pivots outward to right */}
        <g>
          {/* the open door */}
          <path d="M 660 580 L 700 568 L 700 700 L 660 688 Z" fill="#0c0805"/>
          <path d="M 660 580 L 700 568 L 700 700 L 660 688 Z" fill="none" stroke="#3a2818" strokeWidth="1.5"/>
          <rect x="668" y="588" width="6" height="10" fill="#c9a567" opacity=".6"/>
          <rect x="668" y="676" width="6" height="10" fill="#c9a567" opacity=".6"/>

          {/* big ember glow spilling out */}
          <ellipse cx="600" cy="640" rx="220" ry="120" fill="url(#ember-glow-pit)" opacity=".9"/>

          {/* inside of firebox — the glowing chamber */}
          <rect x="460" y="580" width="200" height="120" fill="#1a0a04"/>
          <rect x="460" y="580" width="200" height="120" fill="url(#ember-inside-pit)" opacity=".95"/>

          {/* white oak logs in the firebox */}
          <g>
            <ellipse cx="498" cy="690" rx="32" ry="9" fill="url(#oak-log)"/>
            <ellipse cx="558" cy="685" rx="28" ry="9" fill="url(#oak-log)"/>
            <ellipse cx="616" cy="692" rx="30" ry="10" fill="url(#oak-log)"/>
            <ellipse cx="528" cy="660" rx="24" ry="7" fill="url(#oak-log)" opacity=".85"/>
            <ellipse cx="590" cy="662" rx="22" ry="7" fill="url(#oak-log)" opacity=".85"/>
            {/* log ends — show oak grain (concentric rings) */}
            <g transform="translate(498 690)">
              <ellipse cx="-30" cy="0" rx="5" ry="9" fill="#3a1d0c"/>
              <ellipse cx="-30" cy="0" rx="3" ry="6" fill="#5a3a22" opacity=".7"/>
            </g>
          </g>
          {/* embers — bright bits */}
          {[[510,670,2.2],[560,675,1.8],[600,672,2],[480,685,1.6],[630,680,1.8],[540,690,1.6],[590,690,1.5]].map(([x,y,r],i)=>(
            <circle key={i} cx={x} cy={y} r={r} fill="#fff0a8" opacity=".95"/>
          ))}
          {/* rising sparks */}
          {[[510,600,1.3,.9],[540,560,1,.8],[570,610,1.2,.85],[600,580,.9,.7]].map(([x,y,r,o],i)=>(
            <circle key={'s'+i} cx={x} cy={y} r={r} fill="#fff5dc" opacity={o}/>
          ))}
        </g>

        {/* a hand-painted "17 HRS" tag hung off the barrel handle */}
        <g transform="translate(840 380) rotate(-7)">
          <line x1="55" y1="-12" x2="55" y2="0" stroke="#5a3a22" strokeWidth="1"/>
          <rect x="0" y="0" width="110" height="60" rx="4" fill="#f1e5c8"/>
          <rect x="0" y="0" width="110" height="60" rx="4" fill="none" stroke="#4a160e" strokeWidth="1.5"/>
          <rect x="0" y="0" width="110" height="8" fill="#7a2a1f" opacity=".55"/>
          <text x="55" y="28" textAnchor="middle" fontFamily="Rye, serif" fontSize="16" fill="#4a160e">17 HRS</text>
          <text x="55" y="46" textAnchor="middle" fontFamily="Caveat, cursive" fontSize="14" fontWeight="700" fill="#3a1d0c">brisket</text>
          <circle cx="8" cy="8" r="2" fill="#4a160e"/>
        </g>
      </g>

      {/* warm ember light spill on the ground */}
      <ellipse cx="600" cy="780" rx="320" ry="60" fill="#d9531f" opacity=".22" filter="url(#smoke-blur-light-pit)"/>

      {/* a small bistro chair silhouette far left */}
      <g opacity=".6" filter="url(#smoke-blur-light-pit)">
        <rect x="140" y="620" width="6" height="160" fill="#0c0805"/>
        <rect x="260" y="620" width="6" height="160" fill="#0c0805"/>
        <rect x="140" y="620" width="126" height="6" fill="#0c0805"/>
        <rect x="140" y="700" width="126" height="6" fill="#0c0805"/>
      </g>

      {/* vignette */}
      <rect x="0" y="0" width="1600" height="900" fill="url(#vignette-pit)"/>
    </svg>
  );
}

/* small smoke-wisp glyph for menu smoke-time chips */
function SmokeWisp(){
  return (
    <svg viewBox="0 0 14 14" width="11" height="11" fill="none" aria-hidden="true" style={{flex:'0 0 auto'}}>
      <path d="M7 1 C 8 3 9.5 3.6 9.5 5.6 C 9.5 7.3 8.4 8.4 7 8.4 C 5.6 8.4 4.5 7.3 4.5 5.6 C 4.5 4 6 3 7 1 Z"
            fill="currentColor"/>
    </svg>
  );
}

/* ---------- Per-scene ambient life (gated to the active scene) ---------- */
function SceneFX({ kind }){
  const bits = React.useMemo(() => {
    const rnd = (a, b) => a + Math.random() * (b - a);
    if (kind === 'motes'){
      // dust catching the bar light + the Edison bulbs flickering
      return {
        glows: [
          { left: 4,  top: 30, w: 90,  color: 'rgba(255,196,110,.9)', dur: 5.5, delay: 0,   flicker: true },
          { left: 17, top: 35, w: 70,  color: 'rgba(255,188,104,.85)',dur: 4.2, delay: -1.5, flicker: true },
          { left: 35, top: 41, w: 60,  color: 'rgba(255,184,100,.8)', dur: 6,   delay: -2.5, flicker: true },
          { left: 78, top: 45, w: 110, color: 'rgba(255,190,108,.85)',dur: 6.5, delay: -0.8, flicker: true },
          { left: 63, top: 53, w: 64,  color: 'rgba(255,182,98,.8)',  dur: 5,   delay: -3,   flicker: true },
          { left: 92, top: 56, w: 70,  color: 'rgba(255,186,102,.75)',dur: 7,   delay: -1.2, flicker: true },
        ],
        motes: Array.from({ length: 40 }).map(() => ({
          left: rnd(2, 78), top: rnd(26, 92),
          size: rnd(2, 6.5), dur: rnd(7, 14), delay: rnd(-14, 0),
          drift: rnd(-40, 34), rise: rnd(90, 200), op: rnd(.5, 1),
        })),
      };
    }
    if (kind === 'lights'){
      // strong stage wash + heavy beam dust + glints + the spotlight + lanterns
      return {
        glows: [
          { left: 22, top: 13, w: 150, color: 'rgba(255,200,120,.85)', dur: 5,   delay: 0,    flicker: false },
          { left: 86, top: 40, w: 70,  color: 'rgba(255,180,96,.8)',   dur: 3.6, delay: -1,   flicker: true },
          { left: 78, top: 62, w: 56,  color: 'rgba(255,176,92,.8)',   dur: 4.4, delay: -2,   flicker: true },
          { left: 77, top: 84, w: 48,  color: 'rgba(255,182,98,.85)',  dur: 3,   delay: -0.7, flicker: true },
        ],
        beam: Array.from({ length: 30 }).map(() => ({
          left: rnd(14, 52), top: rnd(6, 80),
          size: rnd(2, 5.5), dur: rnd(6, 12), delay: rnd(-12, 0),
          drift: rnd(-22, 26), rise: rnd(-70, 90), op: rnd(.55, 1),
        })),
        glints: Array.from({ length: 5 }).map(() => ({
          left: rnd(20, 46), top: rnd(20, 64),
          size: rnd(3, 6), dur: rnd(2.4, 4.5), delay: rnd(-4, 0),
        })),
      };
    }
    if (kind === 'embers'){
      // flickering firebox + string lights + fireflies + rising embers + smoke wisps
      return {
        glows: [
          { left: 73, top: 90.5, w: 120, color: 'rgba(255,128,44,.95)', dur: 2.4, delay: 0,    flicker: true },
          { left: 84, top: 40, w: 80,  color: 'rgba(255,186,104,.8)', dur: 5,   delay: -1,   flicker: false },
          { left: 40, top: 62, w: 30,  color: 'rgba(255,200,120,.9)', dur: 3,   delay: -0.5, flicker: true },
          { left: 47, top: 60, w: 26,  color: 'rgba(255,200,120,.9)', dur: 2.6, delay: -1.4, flicker: true },
          { left: 54, top: 62, w: 30,  color: 'rgba(255,200,120,.9)', dur: 3.4, delay: -2,   flicker: true },
          { left: 33, top: 63, w: 24,  color: 'rgba(255,200,120,.85)',dur: 2.8, delay: -0.9, flicker: true },
          { left: 60, top: 61, w: 24,  color: 'rgba(255,200,120,.85)',dur: 3.2, delay: -2.6, flicker: true },
        ],
        // fireflies drift across the whole scene, not just by the fire
        flies: Array.from({ length: 30 }).map(() => ({
          left: rnd(5, 95), top: rnd(18, 92),
          size: rnd(2.5, 5.5), fly: rnd(4, 9), flick: rnd(1.8, 4), delay: rnd(-9, 0),
          dx: rnd(-50, 50), dy: rnd(-44, 18),
        })),
        // rising embers off the (now lower, smaller) firebox
        sparks: Array.from({ length: 18 }).map(() => ({
          left: rnd(69, 79), top: rnd(85, 94),
          size: rnd(2, 4.5), dur: rnd(3.2, 6), delay: rnd(-6, 0),
          drift: rnd(-22, 26), rise: rnd(110, 220),
        })),
        // smoke only rises from the chimney mouth, straight up
        wisps: Array.from({ length: 6 }).map((_, i) => ({
          left: rnd(64, 69), top: rnd(36, 42),
          w: rnd(40, 64), dur: rnd(7, 12), delay: rnd(-10, 0) - i * 1.6,
        })),
      };
    }
    return {};
  }, [kind]);

  const renderGlows = (glows) => (glows || []).map((g, i) => (
    <span key={`gl${i}`} className={`glow ${g.flicker ? 'glow-flicker' : ''}`} style={{
      left: `${g.left}%`, top: `${g.top}%`,
      width: `${g.w}px`, height: `${g.w}px`,
      background: `radial-gradient(circle, ${g.color}, transparent 68%)`,
      animationDuration: `${g.dur}s`, animationDelay: `${g.delay}s`,
    }} />
  ));

  if (kind === 'motes'){
    return (
      <div className="fx" aria-hidden="true">
        {renderGlows(bits.glows)}
        {bits.motes.map((b, i) => (
          <span key={i} className="mote" style={{
            left: `${b.left}%`, top: `${b.top}%`,
            width: `${b.size}px`, height: `${b.size}px`,
            '--drift': `${b.drift}px`, '--rise': `${-b.rise}px`, '--op': b.op,
            animationDuration: `${b.dur}s`, animationDelay: `${b.delay}s`,
          }} />
        ))}
      </div>
    );
  }
  if (kind === 'lights'){
    return (
      <div className="fx" aria-hidden="true">
        {renderGlows(bits.glows)}
        <span className="stage-sweep" />
        <span className="stage-wash wash-amber" />
        <span className="stage-wash wash-crimson" />
        {bits.beam.map((b, i) => (
          <span key={`b${i}`} className="mote beam-mote" style={{
            left: `${b.left}%`, top: `${b.top}%`,
            width: `${b.size}px`, height: `${b.size}px`,
            '--drift': `${b.drift}px`, '--rise': `${-b.rise}px`, '--op': b.op,
            animationDuration: `${b.dur}s`, animationDelay: `${b.delay}s`,
          }} />
        ))}
        {bits.glints.map((b, i) => (
          <span key={`g${i}`} className="glint" style={{
            left: `${b.left}%`, top: `${b.top}%`,
            width: `${b.size}px`, height: `${b.size}px`,
            animationDuration: `${b.dur}s`, animationDelay: `${b.delay}s`,
          }} />
        ))}
      </div>
    );
  }
  if (kind === 'embers'){
    return (
      <div className="fx" aria-hidden="true">
        {renderGlows(bits.glows)}
        {bits.wisps.map((b, i) => (
          <span key={`w${i}`} className="wisp" style={{
            left: `${b.left}%`, top: `${b.top}%`, width: `${b.w}px`, height: `${b.w * 2.2}px`,
            animationDuration: `${b.dur}s`, animationDelay: `${b.delay}s`,
          }} />
        ))}
        {bits.sparks.map((b, i) => (
          <span key={`s${i}`} className="spark" style={{
            left: `${b.left}%`, top: `${b.top}%`,
            width: `${b.size}px`, height: `${b.size}px`,
            '--drift': `${b.drift}px`, '--rise': `${-b.rise}px`,
            animationDuration: `${b.dur}s`, animationDelay: `${b.delay}s`,
          }} />
        ))}
        {bits.flies.map((b, i) => (
          <span key={`f${i}`} className="firefly" style={{
            left: `${b.left}%`, top: `${b.top}%`,
            width: `${b.size}px`, height: `${b.size}px`,
            '--dx': `${b.dx}px`, '--dy': `${b.dy}px`,
            animationDuration: `${b.fly}s, ${b.flick}s`,
            animationDelay: `${b.delay}s, ${b.delay}s`,
          }} />
        ))}
      </div>
    );
  }
  return null;
}

/* ---------- The Hero proper ---------- */
function Hero(){
  const SCENES = [
    {
      key:'stage', label:"Who's on the Stage", Scene: StageScene,
      photo: 'assets/scene-stage.png', pos: '50% 42%', fx: 'lights',
      line:"Live music, paint nights, car meets, bike nights, and more.",
      kind:'lineup', placeholder:true,
      rows:[
        { a:'Fri', b:'Live Music' },
        { a:'Sat', b:'Paint Night' },
        { a:'Sun', b:'Car Meet & Bike Night' },
      ],
      foot:'A sample week — the owner keeps the calendar current.',
    },
    {
      key:'tap', label:"What's on Tap", Scene: TapScene,
      photo: 'assets/scene-tap.png', pos: '50% 60%', fx: 'motes',
      line:"12 taps of Oregon craft beer and cider, plus local wines.",
      kind:'taps',
      rows:[
        { a:'Featured', b:'Two Towns — Raspberry Cosmic Crisp', hot:true },
        { a:'On the board', b:'Oregon IPAs, cream ales & ciders' },
        { a:'For the table', b:'A popular pour of local wines' },
      ],
      foot:'12 taps · rotating · full board posted in-house.',
    },
    {
      key:'pit', label:"What's on the Menu", Scene: PitScene,
      photo: 'assets/scene-pit.png', pos: '50% 58%', fx: 'embers',
      line:"Smoked low and slow over locally sourced White Oak.",
      kind:'menu',
      rows:[
        { a:'Smoked Brisket', smoke:'17 hrs', b:'$22', hot:true },
        { a:'Pulled Pork',    smoke:'14 hrs', b:'$18' },
        { a:'Pork Rib Platter', smoke:'8 hrs', b:'$24' },
        { a:'Smoked Tri-Tip', smoke:'6 hrs', b:'$22' },
      ],
      foot:'All of it over locally sourced White Oak.',
    },
  ];

  const [active, setActive] = useState(1);              // center scene first
  const [drag, setDrag]     = useState(0);
  const dragging            = useRef(false);
  const startX              = useRef(0);
  const startActive         = useRef(1);
  const stageRef            = useRef(null);
  const [vw, setVw]         = useState(typeof window !== 'undefined' ? window.innerWidth : 1200);

  useEffect(() => {
    const onResize = () => setVw(window.innerWidth);
    window.addEventListener('resize', onResize);
    return () => window.removeEventListener('resize', onResize);
  }, []);

  const goTo = useCallback((i) => {
    const n = SCENES.length;
    setActive(((i % n) + n) % n);   // wrap-around: no dead-end / un-swipable direction
  }, []);

  useEffect(() => {
    const onKey = (e) => {
      if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return;
      if (e.key === 'ArrowLeft')  goTo(active - 1);
      if (e.key === 'ArrowRight') goTo(active + 1);
    };
    window.addEventListener('keydown', onKey);
    return () => window.removeEventListener('keydown', onKey);
  }, [active, goTo]);

  const onPointerDown = (e) => {
    if (e.target.closest('button, a, input, textarea, select')) return;
    dragging.current = true;
    startX.current = e.clientX;
    startActive.current = active;
    e.currentTarget.setPointerCapture?.(e.pointerId);
  };
  const onPointerMove = (e) => {
    if (!dragging.current) return;
    const dx = e.clientX - startX.current;
    setDrag(dx);
  };
  const onPointerUp = (e) => {
    if (!dragging.current) return;
    dragging.current = false;
    const w = stageRef.current?.offsetWidth || vw;
    const threshold = Math.max(30, Math.min(55, w * 0.08));  // easier to trigger
    let next = startActive.current;
    if (drag <= -threshold) next = startActive.current + 1;
    else if (drag >= threshold) next = startActive.current - 1;
    setDrag(0);
    goTo(next);
  };

  const w = stageRef.current?.offsetWidth || vw;
  const trackX = -active * w + drag;
  const scene = SCENES[active];

  return (
    <section
      className="hero" id="hero" data-screen-label="Hero — 3-scene swipe"
      onPointerDown={onPointerDown}
      onPointerMove={onPointerMove}
      onPointerUp={onPointerUp}
      onPointerCancel={onPointerUp}
    >
      <div className="hero-bg" aria-hidden="true" />

      {/* swipe is handled at the SECTION level so the whole hero is swipeable
          (pointer events bubble up from the overlay content), not just this backdrop */}
      <div
        ref={stageRef}
        className="swipe-stage"
      >
        <div
          className="swipe-track"
          style={{
            transform: `translate3d(${trackX}px, 0, 0)`,
            transition: dragging.current ? 'none' : 'transform .7s cubic-bezier(.18,.85,.25,1)'
          }}
        >
          {SCENES.map((s, i) => (
            <div key={s.key} className={`scene ${i === active ? 'is-active' : ''}`}>
              <s.Scene />
              <div
                className="scene-photo"
                style={{ backgroundImage: `url(${s.photo})`, backgroundPosition: s.pos || 'center 50%' }}
                aria-hidden="true"
              />
              <div className="scene-veil" aria-hidden="true" />
              <SceneFX kind={s.fx} />
            </div>
          ))}
        </div>

        <button
          className="arrow arrow-l"
          aria-label="Previous scene"
          onClick={() => goTo(active - 1)}
        >
          <svg width="22" height="22" viewBox="0 0 22 22" fill="none"><path d="M14 4 L7 11 L14 18" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/></svg>
        </button>
        <button
          className="arrow arrow-r"
          aria-label="Next scene"
          onClick={() => goTo(active + 1)}
        >
          <svg width="22" height="22" viewBox="0 0 22 22" fill="none"><path d="M8 4 L15 11 L8 18" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/></svg>
        </button>
      </div>

      {/* foreground content — stays put, scene label/line swap in */}
      <div className="hero-overlay">
        <div className="hero-eyebrow">
          <span className="diamond-mark">◆</span>
          <span>Willamette Valley Smokehouse</span>
          <span className="diamond-mark">◆</span>
        </div>

        <h1 className="hero-title">
          <span className="line-1">Smokin'</span>
          <span className="line-2">Good <em>BBQ!</em></span>
        </h1>

        <p className="hero-sub">
          Join us for mouth-watering BBQ, good spirits, and that down-home feeling here at The Corner.
        </p>

        {/* per-scene info card — the functional content of each scene */}
        <div className="scene-deck">
          {SCENES.map((s, i) => (
            <article key={s.key} className={`info-card kind-${s.kind} ${i === active ? 'is-active' : ''}`} aria-hidden={i !== active}>
              <div className="info-card-head">
                <span className="info-kicker">
                  <span className="ornament">❦</span>
                  {s.label}
                </span>
                {s.placeholder && <span className="info-flag">Placeholder</span>}
              </div>
              <p className="info-line">{s.line}</p>
              <ul className="info-rows">
                {s.rows.map((r, j) => (
                  <li key={j} className={`info-row ${r.hot ? 'is-hot' : ''}`}>
                    <span className="row-a">{r.a}</span>
                    {r.smoke && (
                      <span className="row-smoke">
                        <SmokeWisp />{r.smoke}
                      </span>
                    )}
                    <span className="row-dots" aria-hidden="true"></span>
                    <span className="row-b">{r.b}</span>
                  </li>
                ))}
              </ul>
              <div className="info-foot">{s.foot}</div>
            </article>
          ))}
        </div>

        {/* swipe cue sits right under the board so the triple-hero nav is obvious
            (replaces the old "Come in soon" CTA button — Michael, 2026-06-02) */}
        <div className="swipe-cue swipe-cue--lead" aria-hidden="true">
          <span className="cue-arrow cue-l">‹</span>
          <span className="cue-text">Swipe to look around</span>
          <span className="cue-arrow cue-r">›</span>
        </div>

        <div className="hero-cta-row">
          <div className="cta-support">
            Open daily, 11am–9pm.<br/>We look forward to seeing you!
          </div>
        </div>

        <div className="hero-bottom">
          <div className="scene-tabs" role="tablist">
            {SCENES.map((s, i) => (
              <button
                key={s.key}
                role="tab"
                aria-selected={i === active}
                className={`scene-tab ${i === active ? 'is-active' : ''}`}
                onClick={() => goTo(i)}
              >
                <span className="tab-dot" />
                <span className="tab-label">{s.label}</span>
              </button>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
}

window.Hero = Hero;
