// =============================================================
// SCENES — illustrative SVG landscapes (plane · sea · ships · trees · islands)
// Shared palette tuned to the pastel system used in styles.css
// =============================================================

// ---------- Shared atoms ----------
// Detailed commercial airliner silhouette. size scales uniformly.
function Plane({ size = 80, rotation = 0, color = "#2D3B52", shadow = true, className = "" }) {
  const w = size, h = size * 0.9;
  return (
    <svg viewBox="0 0 100 90" width={w} height={h}
         style={{ transform: `rotate(${rotation}deg)`, overflow: "visible" }}
         className={className}>
      <defs>
        <linearGradient id="plane-body" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#FAFBFD"/>
          <stop offset="0.55" stopColor="#E9EFF6"/>
          <stop offset="1" stopColor="#C7D5E5"/>
        </linearGradient>
        <linearGradient id="plane-wing" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#D9E3EF"/>
          <stop offset="1" stopColor="#A9BCD1"/>
        </linearGradient>
      </defs>
      {shadow && (
        <ellipse cx="50" cy="78" rx="34" ry="3" fill="#2D3B52" opacity="0.08"/>
      )}
      {/* main wing (back) */}
      <path d="M50 42 L18 58 L14 60 L12 57 L48 38 Z" fill="url(#plane-wing)"/>
      <path d="M50 42 L82 58 L86 60 L88 57 L52 38 Z" fill="url(#plane-wing)"/>
      {/* fuselage */}
      <path d="M48 10 Q55 10 56 18 L58 62 Q58 68 52 70 L48 70 Q42 68 42 62 L44 18 Q45 10 48 10 Z"
            fill="url(#plane-body)" stroke="#8FA3BC" strokeWidth="0.4"/>
      {/* nose cap */}
      <ellipse cx="50" cy="11" rx="5" ry="3" fill="#B8C7D8"/>
      {/* cockpit windows */}
      <path d="M47 14 Q50 13 53 14 L52 18 Q50 17 48 18 Z" fill="#4A6B8C" opacity="0.75"/>
      {/* cabin window strip */}
      <rect x="47.5" y="24" width="5" height="30" rx="1" fill="#3D5573" opacity="0.28"/>
      {/* tail wing */}
      <path d="M50 60 L38 70 L38 73 L50 67 Z" fill="url(#plane-wing)"/>
      <path d="M50 60 L62 70 L62 73 L50 67 Z" fill="url(#plane-wing)"/>
      {/* vertical stabilizer */}
      <path d="M50 55 L49 74 L51 74 Z" fill="#B8C7D8"/>
      {/* engines under wings */}
      <ellipse cx="30" cy="52" rx="3" ry="5" fill="#6B8099"/>
      <ellipse cx="70" cy="52" rx="3" ry="5" fill="#6B8099"/>
    </svg>
  );
}

// Sailing boat — small, elegant
function Sailboat({ size = 40, tilt = 0, style = {} }) {
  return (
    <svg viewBox="0 0 60 70" width={size} height={size * 1.1}
         style={{ transform: `rotate(${tilt}deg)`, ...style }}>
      <defs>
        <linearGradient id={`sail-${size}`} x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#FFFFFF"/>
          <stop offset="1" stopColor="#DEE8F2"/>
        </linearGradient>
      </defs>
      {/* mast */}
      <line x1="30" y1="8" x2="30" y2="50" stroke="#6B8099" strokeWidth="1"/>
      {/* main sail */}
      <path d="M30 10 L30 46 L48 46 Z" fill={`url(#sail-${size})`}
            stroke="#B8C7D8" strokeWidth="0.5"/>
      {/* jib sail */}
      <path d="M30 14 L30 46 L16 46 Z" fill="#F5F9FC"
            stroke="#C7D5E5" strokeWidth="0.5" opacity="0.95"/>
      {/* hull */}
      <path d="M10 48 Q30 62 50 48 L46 54 Q30 60 14 54 Z" fill="#2D3B52"/>
      <path d="M14 48 L46 48 L44 52 L16 52 Z" fill="#4A5F7A"/>
      {/* reflection */}
      <ellipse cx="30" cy="63" rx="18" ry="1.5" fill="#7FA3C4" opacity="0.25"/>
    </svg>
  );
}

// Pine tree silhouette
function Pine({ size = 40, style = {} }) {
  return (
    <svg viewBox="0 0 40 70" width={size * 0.6} height={size} style={style}>
      <defs>
        <linearGradient id={`pine-${size}`} x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#7FA88B"/>
          <stop offset="1" stopColor="#4E7764"/>
        </linearGradient>
      </defs>
      <rect x="18" y="52" width="4" height="14" fill="#5C4A3A"/>
      <path d="M20 8 L6 30 L14 30 L4 46 L16 46 L8 60 L32 60 L24 46 L36 46 L26 30 L34 30 Z"
            fill={`url(#pine-${size})`}/>
      {/* subtle highlight */}
      <path d="M20 8 L14 26 L18 26 Z" fill="#A3C6AE" opacity="0.5"/>
    </svg>
  );
}

// Small island with palm / pines — a "badge"
function Island({ w = 220, h = 140, kind = "palm", accent = "#9AD9B4" }) {
  return (
    <svg viewBox={`0 0 ${w} ${h}`} width="100%" height="100%"
         preserveAspectRatio="xMidYMid meet">
      <defs>
        <linearGradient id={`isl-sand-${w}-${h}`} x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#F4E7C7"/>
          <stop offset="1" stopColor="#D9C28E"/>
        </linearGradient>
        <linearGradient id={`isl-grass-${w}-${h}`} x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor={accent}/>
          <stop offset="1" stopColor="#5F9882"/>
        </linearGradient>
        <radialGradient id={`isl-glow-${w}-${h}`} cx="0.5" cy="0.4" r="0.6">
          <stop offset="0" stopColor="#FFFFFF" stopOpacity="0.7"/>
          <stop offset="1" stopColor="#FFFFFF" stopOpacity="0"/>
        </radialGradient>
      </defs>

      {/* soft halo glow */}
      <ellipse cx={w/2} cy={h*0.45} rx={w*0.45} ry={h*0.35}
               fill={`url(#isl-glow-${w}-${h})`}/>

      {/* reflection in water */}
      <ellipse cx={w/2} cy={h*0.95} rx={w*0.35} ry={h*0.03}
               fill={accent} opacity="0.2"/>

      {/* sand base */}
      <ellipse cx={w/2} cy={h*0.82} rx={w*0.38} ry={h*0.09}
               fill={`url(#isl-sand-${w}-${h})`}/>

      {/* grass dome */}
      <path d={`M ${w*0.22} ${h*0.82}
               Q ${w*0.35} ${h*0.48} ${w*0.5} ${h*0.45}
               Q ${w*0.68} ${h*0.46} ${w*0.78} ${h*0.82} Z`}
            fill={`url(#isl-grass-${w}-${h})`}/>

      {/* trees on island */}
      {kind === "palm" ? (
        <g transform={`translate(${w*0.45} ${h*0.28})`}>
          <path d="M5 30 Q4 15 8 2" fill="none" stroke="#6B5436" strokeWidth="2.2" strokeLinecap="round"/>
          <path d="M8 2 Q-6 4 -14 12" fill="none" stroke="#5F9882" strokeWidth="3" strokeLinecap="round"/>
          <path d="M8 2 Q22 4 30 12"  fill="none" stroke="#5F9882" strokeWidth="3" strokeLinecap="round"/>
          <path d="M8 2 Q2 -8 -8 -10" fill="none" stroke="#5F9882" strokeWidth="3" strokeLinecap="round"/>
          <path d="M8 2 Q14 -8 24 -10" fill="none" stroke="#5F9882" strokeWidth="3" strokeLinecap="round"/>
          <circle cx="8" cy="2" r="2" fill="#6B5436"/>
        </g>
      ) : (
        <g transform={`translate(${w*0.36} ${h*0.38})`}>
          <g transform="translate(0 8) scale(0.6)"><Pine size={32}/></g>
          <g transform="translate(28 -4) scale(0.8)"><Pine size={40}/></g>
          <g transform="translate(58 6) scale(0.55)"><Pine size={28}/></g>
        </g>
      )}
    </svg>
  );
}

// =============================================================
// HERO SCENE — dawn ocean with distant islands and a passing plane
// =============================================================
function HeroScene() {
  return (
    <div className="hero-scene" aria-hidden>
      <svg className="hero-scene__svg" viewBox="0 0 1600 900"
           preserveAspectRatio="xMidYMid slice">
        <defs>
          {/* sky — pink dawn to soft blue */}
          <linearGradient id="hs-sky" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#F6D4D0"/>
            <stop offset="0.25" stopColor="#F3D8E0"/>
            <stop offset="0.55" stopColor="#DCE4F0"/>
            <stop offset="0.85" stopColor="#C7DCF0"/>
            <stop offset="1" stopColor="#B7D2EA"/>
          </linearGradient>
          {/* sun glow */}
          <radialGradient id="hs-sun" cx="0.5" cy="0.5" r="0.5">
            <stop offset="0" stopColor="#FFF4D6" stopOpacity="1"/>
            <stop offset="0.35" stopColor="#FFDEC2" stopOpacity="0.8"/>
            <stop offset="1" stopColor="#F6D4D0" stopOpacity="0"/>
          </radialGradient>
          {/* distant mountains */}
          <linearGradient id="hs-mtn1" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#A9B8D0"/>
            <stop offset="1" stopColor="#8399B8"/>
          </linearGradient>
          <linearGradient id="hs-mtn2" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#7F95B3"/>
            <stop offset="1" stopColor="#5C7595"/>
          </linearGradient>
          {/* sea */}
          <linearGradient id="hs-sea" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#B6D2E8"/>
            <stop offset="0.4" stopColor="#8FB6D6"/>
            <stop offset="1" stopColor="#5C8BB3"/>
          </linearGradient>
          {/* sun reflection in water */}
          <linearGradient id="hs-reflect" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#FFE6C7" stopOpacity="0.65"/>
            <stop offset="1" stopColor="#FFE6C7" stopOpacity="0"/>
          </linearGradient>
          {/* cloud gradient */}
          <linearGradient id="hs-cloud" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#FFFFFF" stopOpacity="0.95"/>
            <stop offset="1" stopColor="#FFFFFF" stopOpacity="0.45"/>
          </linearGradient>
        </defs>

        {/* sky */}
        <rect width="1600" height="620" fill="url(#hs-sky)"/>
        {/* sun glow */}
        <circle cx="1150" cy="320" r="260" fill="url(#hs-sun)"/>
        <circle cx="1150" cy="320" r="42"  fill="#FFF5DE" opacity="0.9"/>

        {/* soft clouds */}
        <g opacity="0.85">
          <ellipse cx="220"  cy="200" rx="180" ry="18" fill="url(#hs-cloud)"/>
          <ellipse cx="520"  cy="140" rx="220" ry="14" fill="url(#hs-cloud)"/>
          <ellipse cx="1380" cy="180" rx="200" ry="16" fill="url(#hs-cloud)"/>
          <ellipse cx="900"  cy="260" rx="140" ry="10" fill="url(#hs-cloud)" opacity="0.65"/>
        </g>

        {/* far mountain range */}
        <path d="M 0 560
                 L 120 490 L 220 520 L 320 450 L 440 500 L 560 460
                 L 700 510 L 820 470 L 960 520 L 1100 480 L 1240 510
                 L 1380 470 L 1500 510 L 1600 490 L 1600 620 L 0 620 Z"
              fill="url(#hs-mtn1)" opacity="0.55"/>
        {/* nearer mountain range */}
        <path d="M 0 600
                 L 80 550 L 200 580 L 300 540 L 420 580 L 540 550
                 L 680 585 L 820 555 L 980 595 L 1120 560 L 1260 595
                 L 1400 560 L 1600 585 L 1600 620 L 0 620 Z"
              fill="url(#hs-mtn2)" opacity="0.65"/>

        {/* horizon sea line */}
        <rect y="620" width="1600" height="280" fill="url(#hs-sea)"/>

        {/* sun reflection on water */}
        <path d="M 1100 620 L 1200 620 L 1220 900 L 1080 900 Z"
              fill="url(#hs-reflect)" opacity="0.7"/>

        {/* distant small islands on horizon */}
        <g opacity="0.6">
          <ellipse cx="260" cy="628" rx="70" ry="8" fill="#6B8AAE"/>
          <path d="M 220 628 Q 260 608 300 628 Z" fill="#6B8AAE"/>
          <ellipse cx="620" cy="632" rx="48" ry="6" fill="#526F92"/>
          <path d="M 590 632 Q 620 618 650 632 Z" fill="#526F92"/>
          <ellipse cx="1420" cy="630" rx="58" ry="7" fill="#6B8AAE"/>
          <path d="M 1380 630 Q 1420 612 1460 630 Z" fill="#6B8AAE"/>
        </g>

        {/* sparkles on water */}
        <g fill="#FFFFFF" opacity="0.5">
          <circle cx="1100" cy="720" r="1.5"/>
          <circle cx="1170" cy="760" r="2"/>
          <circle cx="1130" cy="810" r="1.2"/>
          <circle cx="1200" cy="840" r="1.8"/>
          <circle cx="1080" cy="780" r="1"/>
          <circle cx="1220" cy="720" r="1.3"/>
        </g>

        {/* foreground wave */}
        <path d="M 0 880 Q 400 850 800 870 T 1600 860 L 1600 900 L 0 900 Z"
              fill="#FFFFFF" opacity="0.35"/>

        {/* dashed flight arc */}
        <path id="hs-arc"
              d="M -50 480 Q 400 200 820 300 Q 1200 380 1680 220"
              fill="none" stroke="#FFFFFF" strokeWidth="2"
              strokeDasharray="4 10" strokeLinecap="round" opacity="0.55"/>

        {/* small bird silhouettes */}
        <g fill="none" stroke="#2D3B52" strokeWidth="2" strokeLinecap="round" opacity="0.6">
          <path d="M 400 340 q 8 -6 16 0 q 8 -6 16 0"/>
          <path d="M 470 380 q 6 -5 12 0 q 6 -5 12 0"/>
          <path d="M 360 420 q 5 -4 10 0 q 5 -4 10 0"/>
        </g>
      </svg>

      {/* animated plane that flies along the arc */}
      <div className="hero-scene__plane">
        <Plane size={72} rotation={-8}/>
      </div>

      {/* a single sailboat on the water */}
      <div className="hero-scene__boat">
        <Sailboat size={46}/>
      </div>
    </div>
  );
}

// =============================================================
// ABOUT — map of the journey (watercolor map + route + city pins)
// =============================================================
function AboutScene() {
  // Not currently used inline — About section keeps its cards simple.
  // Left here for reuse if we want a decorative map strip.
  return null;
}

// =============================================================
// HELP ILLUSTRATIONS — plane / sailboat / pine grove
// =============================================================
function HelpFlight() {
  return (
    <svg viewBox="0 0 320 220" preserveAspectRatio="xMidYMid slice"
         style={{ width: "100%", height: "100%", display: "block" }}>
      <defs>
        <linearGradient id="hf-sky" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#F6E0D6"/>
          <stop offset="0.5" stopColor="#E6DBEF"/>
          <stop offset="1" stopColor="#C7DCF0"/>
        </linearGradient>
        <radialGradient id="hf-sun" cx="0.75" cy="0.3" r="0.45">
          <stop offset="0" stopColor="#FFF2D9" stopOpacity="0.95"/>
          <stop offset="1" stopColor="#FFF2D9" stopOpacity="0"/>
        </radialGradient>
      </defs>
      <rect width="320" height="220" fill="url(#hf-sky)"/>
      <circle cx="240" cy="66" r="80" fill="url(#hf-sun)"/>
      <circle cx="240" cy="66" r="18" fill="#FFF5DE" opacity="0.95"/>

      {/* soft cloud bands */}
      <ellipse cx="60"  cy="140" rx="90" ry="10" fill="#FFFFFF" opacity="0.85"/>
      <ellipse cx="200" cy="160" rx="110" ry="9" fill="#FFFFFF" opacity="0.7"/>
      <ellipse cx="130" cy="180" rx="70"  ry="7" fill="#FFFFFF" opacity="0.6"/>

      {/* dashed arc */}
      <path d="M 20 180 Q 160 60 310 130" fill="none"
            stroke="#2D3B52" strokeWidth="1.2"
            strokeDasharray="3 6" opacity="0.35"/>

      {/* plane banking */}
      <g transform="translate(190 100) rotate(-14)">
        <svg x="-36" y="-32" viewBox="0 0 100 90" width="72" height="64">
          <use href="#"/>
        </svg>
      </g>
      {/* inline plane (avoid reference) */}
      <g transform="translate(165 88) rotate(-14)">
        <path d="M 50 10 L 82 58 L 86 60 L 88 57 L 52 38 Z" fill="#A9BCD1" transform="translate(0 0)"/>
        <path d="M 50 10 L 18 58 L 14 60 L 12 57 L 48 38 Z" fill="#A9BCD1"/>
        <path d="M48 10 Q55 10 56 18 L58 62 Q58 68 52 70 L48 70 Q42 68 42 62 L44 18 Q45 10 48 10 Z"
              fill="#FAFBFD" stroke="#8FA3BC" strokeWidth="0.4"/>
        <ellipse cx="50" cy="11" rx="5" ry="3" fill="#B8C7D8"/>
        <path d="M47 14 Q50 13 53 14 L52 18 Q50 17 48 18 Z" fill="#4A6B8C" opacity="0.75"/>
        <rect x="47.5" y="24" width="5" height="30" rx="1" fill="#3D5573" opacity="0.28"/>
        <path d="M50 60 L38 70 L38 73 L50 67 Z" fill="#A9BCD1"/>
        <path d="M50 60 L62 70 L62 73 L50 67 Z" fill="#A9BCD1"/>
        <path d="M50 55 L49 74 L51 74 Z" fill="#B8C7D8"/>
        <ellipse cx="30" cy="52" rx="3" ry="5" fill="#6B8099"/>
        <ellipse cx="70" cy="52" rx="3" ry="5" fill="#6B8099"/>
      </g>
    </svg>
  );
}

function HelpVoyage() {
  return (
    <svg viewBox="0 0 320 220" preserveAspectRatio="xMidYMid slice"
         style={{ width: "100%", height: "100%", display: "block" }}>
      <defs>
        <linearGradient id="hv-sky" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#E4EEF7"/>
          <stop offset="1" stopColor="#BFD9F0"/>
        </linearGradient>
        <linearGradient id="hv-sea" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#8FB6D6"/>
          <stop offset="1" stopColor="#4A739B"/>
        </linearGradient>
      </defs>
      <rect width="320" height="130" fill="url(#hv-sky)"/>
      <rect y="130" width="320" height="90" fill="url(#hv-sea)"/>

      {/* sun */}
      <circle cx="70" cy="60" r="28" fill="#FFF5DE" opacity="0.95"/>
      <circle cx="70" cy="60" r="44" fill="#FFE9C6" opacity="0.4"/>

      {/* far island */}
      <ellipse cx="250" cy="132" rx="54" ry="6" fill="#D9C28E"/>
      <path d="M 210 132 Q 250 108 290 132 Z" fill="#6B8AAE"/>
      <g transform="translate(240 108) scale(0.55)"><Pine size={30}/></g>

      {/* waves */}
      <path d="M 0 160 Q 80 152 160 162 T 320 158" fill="none" stroke="#FFFFFF" strokeWidth="1.2" opacity="0.6"/>
      <path d="M 0 180 Q 80 174 160 184 T 320 178" fill="none" stroke="#FFFFFF" strokeWidth="1" opacity="0.45"/>
      <path d="M 0 200 Q 80 194 160 204 T 320 198" fill="none" stroke="#FFFFFF" strokeWidth="1" opacity="0.35"/>

      {/* sailboat — large in front */}
      <g transform="translate(120 100)">
        <line x1="30" y1="8" x2="30" y2="52" stroke="#6B8099" strokeWidth="1.2"/>
        <path d="M30 10 L30 48 L52 48 Z" fill="#FFFFFF" stroke="#B8C7D8" strokeWidth="0.5"/>
        <path d="M30 14 L30 48 L14 48 Z" fill="#F5F9FC" stroke="#C7D5E5" strokeWidth="0.5"/>
        <path d="M6 50 Q30 66 54 50 L50 58 Q30 64 10 58 Z" fill="#2D3B52"/>
        <path d="M10 50 L50 50 L48 54 L12 54 Z" fill="#4A5F7A"/>
        <ellipse cx="30" cy="68" rx="22" ry="2" fill="#1E3247" opacity="0.25"/>
      </g>

      {/* small distant sailboat */}
      <g transform="translate(250 148) scale(0.5)">
        <line x1="30" y1="8" x2="30" y2="52" stroke="#6B8099" strokeWidth="1"/>
        <path d="M30 10 L30 48 L50 48 Z" fill="#FFFFFF"/>
        <path d="M6 50 Q30 62 54 50 L50 56 Q30 62 10 56 Z" fill="#2D3B52"/>
      </g>
    </svg>
  );
}

function HelpGrove() {
  return (
    <svg viewBox="0 0 320 220" preserveAspectRatio="xMidYMid slice"
         style={{ width: "100%", height: "100%", display: "block" }}>
      <defs>
        <linearGradient id="hg-sky" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#F2E7DC"/>
          <stop offset="0.5" stopColor="#E4E6DA"/>
          <stop offset="1" stopColor="#C8D9C8"/>
        </linearGradient>
        <linearGradient id="hg-ground" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#9CB99E"/>
          <stop offset="1" stopColor="#6A8A6E"/>
        </linearGradient>
      </defs>
      <rect width="320" height="220" fill="url(#hg-sky)"/>

      {/* sun halo */}
      <circle cx="210" cy="60" r="80" fill="#FFF5DE" opacity="0.35"/>
      <circle cx="210" cy="60" r="20" fill="#FFF5DE" opacity="0.8"/>

      {/* rolling hills */}
      <path d="M 0 170 Q 60 140 140 160 Q 220 170 320 145 L 320 220 L 0 220 Z" fill="url(#hg-ground)"/>
      <path d="M 0 190 Q 70 175 160 190 Q 240 200 320 185 L 320 220 L 0 220 Z"
            fill="#5E7D62" opacity="0.75"/>

      {/* path meandering */}
      <path d="M 40 218 Q 80 195 140 200 Q 200 205 260 180"
            fill="none" stroke="#F4E7C7" strokeWidth="4" strokeLinecap="round" opacity="0.8"/>

      {/* pine grove, layered */}
      <g transform="translate(30 120)"><Pine size={48}/></g>
      <g transform="translate(78 108)"><Pine size={62}/></g>
      <g transform="translate(140 118)"><Pine size={56}/></g>
      <g transform="translate(192 112)"><Pine size={60}/></g>
      <g transform="translate(248 122)"><Pine size={46}/></g>

      {/* small house / signal of human on the path */}
      <g transform="translate(150 178)">
        <rect x="0" y="0" width="18" height="14" fill="#F4E7C7" stroke="#8B7A55" strokeWidth="0.5"/>
        <path d="M -2 0 L 9 -8 L 20 0 Z" fill="#A8604B"/>
        <rect x="7" y="5" width="4" height="9" fill="#8B7A55"/>
      </g>
    </svg>
  );
}

// Dispatcher for help cards
function HelpIllust({ kind }) {
  if (kind === "flight" || kind === "compass") return <HelpFlight/>;
  if (kind === "voyage" || kind === "toolbox") return <HelpVoyage/>;
  if (kind === "grove" || kind === "bridge") return <HelpGrove/>;
  return <HelpFlight/>;
}

// =============================================================
// APPS — island archipelago backdrop
// =============================================================
function AppsScene() {
  return (
    <div className="apps-scene" aria-hidden>
      <svg className="apps-scene__svg" viewBox="0 0 1600 600"
           preserveAspectRatio="xMidYMid slice">
        <defs>
          <linearGradient id="as-sky" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#EAF2FA"/>
            <stop offset="1" stopColor="#D6E7F4"/>
          </linearGradient>
          <linearGradient id="as-sea" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#A7C7E0"/>
            <stop offset="1" stopColor="#7BA8C9"/>
          </linearGradient>
        </defs>
        <rect width="1600" height="280" fill="url(#as-sky)"/>
        <rect y="280" width="1600" height="320" fill="url(#as-sea)"/>

        {/* horizon haze */}
        <rect y="270" width="1600" height="20" fill="#FFFFFF" opacity="0.4"/>

        {/* distant islands */}
        <g opacity="0.75">
          <ellipse cx="300"  cy="298" rx="120" ry="10" fill="#D9C28E"/>
          <path d="M 220 298 Q 300 250 380 298 Z" fill="#7FA88B"/>
          <g transform="translate(280 260) scale(0.6)"><Pine size={48}/></g>
          <g transform="translate(310 252) scale(0.7)"><Pine size={52}/></g>
        </g>
        <g opacity="0.7">
          <ellipse cx="900" cy="306" rx="90" ry="8" fill="#D9C28E"/>
          <path d="M 840 306 Q 900 272 960 306 Z" fill="#5F9882"/>
        </g>
        <g opacity="0.65">
          <ellipse cx="1380" cy="300" rx="110" ry="9" fill="#D9C28E"/>
          <path d="M 1300 300 Q 1380 258 1460 300 Z" fill="#7FA88B"/>
          <g transform="translate(1360 268) scale(0.8)"><Pine size={48}/></g>
        </g>

        {/* waves */}
        <g stroke="#FFFFFF" fill="none" strokeLinecap="round">
          <path d="M 40 380 Q 200 372 360 382 T 680 378 T 1000 382 T 1320 378 T 1600 380"
                strokeWidth="1.2" opacity="0.55"/>
          <path d="M 80 430 Q 240 422 400 432 T 720 428 T 1040 432 T 1360 428 T 1600 430"
                strokeWidth="1" opacity="0.4"/>
          <path d="M 20 490 Q 200 482 380 492 T 700 488 T 1020 492 T 1340 488 T 1600 490"
                strokeWidth="1" opacity="0.35"/>
        </g>

        {/* small sailboat in foreground */}
        <g transform="translate(1120 420) scale(0.9)">
          <line x1="30" y1="8" x2="30" y2="52" stroke="#6B8099" strokeWidth="1.2"/>
          <path d="M30 10 L30 48 L52 48 Z" fill="#FFFFFF" stroke="#B8C7D8" strokeWidth="0.5"/>
          <path d="M30 14 L30 48 L14 48 Z" fill="#F5F9FC"/>
          <path d="M6 50 Q30 66 54 50 L50 58 Q30 64 10 58 Z" fill="#2D3B52"/>
          <ellipse cx="30" cy="70" rx="22" ry="2" fill="#1E3247" opacity="0.2"/>
        </g>

        {/* plane up top */}
        <g transform="translate(430 100) rotate(8)">
          <path d="M 50 10 L 82 58 L 86 60 L 88 57 L 52 38 Z" fill="#A9BCD1"/>
          <path d="M 50 10 L 18 58 L 14 60 L 12 57 L 48 38 Z" fill="#A9BCD1"/>
          <path d="M48 10 Q55 10 56 18 L58 62 Q58 68 52 70 L48 70 Q42 68 42 62 L44 18 Q45 10 48 10 Z" fill="#FAFBFD"/>
          <ellipse cx="50" cy="11" rx="5" ry="3" fill="#B8C7D8"/>
          <path d="M47 14 Q50 13 53 14 L52 18 Q50 17 48 18 Z" fill="#4A6B8C" opacity="0.75"/>
        </g>

        {/* dashed trail behind plane */}
        <path d="M 50 160 Q 280 110 500 130" fill="none"
              stroke="#FFFFFF" strokeWidth="1.6" strokeDasharray="3 8" opacity="0.6"/>
      </svg>
    </div>
  );
}

// =============================================================
// HOBBIES — wide horizon with distant plane
// =============================================================
function HobbiesScene() {
  return (
    <div className="hob-scene" aria-hidden>
      <svg viewBox="0 0 800 380" preserveAspectRatio="xMidYMid slice"
           style={{ width: "100%", height: "100%", display: "block" }}>
        <defs>
          <linearGradient id="hb-sky" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#F3D8E0"/>
            <stop offset="0.6" stopColor="#DCE4F0"/>
            <stop offset="1" stopColor="#B7D2EA"/>
          </linearGradient>
          <linearGradient id="hb-sea" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#8FB6D6"/>
            <stop offset="1" stopColor="#4A739B"/>
          </linearGradient>
          <radialGradient id="hb-sun" cx="0.5" cy="0.5" r="0.5">
            <stop offset="0" stopColor="#FFF2D9" stopOpacity="0.95"/>
            <stop offset="1" stopColor="#FFF2D9" stopOpacity="0"/>
          </radialGradient>
        </defs>
        <rect width="800" height="240" fill="url(#hb-sky)"/>
        <rect y="240" width="800" height="140" fill="url(#hb-sea)"/>
        <circle cx="600" cy="140" r="110" fill="url(#hb-sun)"/>
        <circle cx="600" cy="140" r="22" fill="#FFF5DE" opacity="0.9"/>

        {/* soft distant island */}
        <ellipse cx="180" cy="246" rx="80" ry="6" fill="#6B8AAE" opacity="0.7"/>
        <path d="M 120 246 Q 180 220 240 246 Z" fill="#6B8AAE" opacity="0.7"/>

        {/* sun reflection */}
        <path d="M 560 240 L 640 240 L 660 380 L 540 380 Z"
              fill="#FFE6C7" opacity="0.55"/>

        {/* waves */}
        <path d="M 0 300 Q 200 292 400 302 T 800 298" fill="none" stroke="#FFFFFF" strokeWidth="1.2" opacity="0.5"/>
        <path d="M 0 340 Q 200 332 400 342 T 800 338" fill="none" stroke="#FFFFFF" strokeWidth="1" opacity="0.4"/>

        {/* plane mid-right, small */}
        <g transform="translate(420 100) rotate(-6) scale(0.7)">
          <path d="M 50 10 L 82 58 L 86 60 L 88 57 L 52 38 Z" fill="#A9BCD1"/>
          <path d="M 50 10 L 18 58 L 14 60 L 12 57 L 48 38 Z" fill="#A9BCD1"/>
          <path d="M48 10 Q55 10 56 18 L58 62 Q58 68 52 70 L48 70 Q42 68 42 62 L44 18 Q45 10 48 10 Z" fill="#FAFBFD"/>
          <ellipse cx="50" cy="11" rx="5" ry="3" fill="#B8C7D8"/>
          <rect x="47.5" y="24" width="5" height="30" rx="1" fill="#3D5573" opacity="0.28"/>
          <path d="M50 60 L38 70 L38 73 L50 67 Z" fill="#A9BCD1"/>
          <path d="M50 60 L62 70 L62 73 L50 67 Z" fill="#A9BCD1"/>
          <path d="M50 55 L49 74 L51 74 Z" fill="#B8C7D8"/>
        </g>
        {/* dashed trail */}
        <path d="M 100 130 Q 260 100 420 120" fill="none"
              stroke="#FFFFFF" strokeWidth="1.6" strokeDasharray="3 8" opacity="0.55"/>
      </svg>
    </div>
  );
}

// =============================================================
// CONTACT — paper plane SVG that animates on submit
// =============================================================
function PaperPlane({ launching = false }) {
  return (
    <div className={"paper-plane" + (launching ? " is-launching" : "")} aria-hidden>
      <svg viewBox="0 0 80 60" width="80" height="60">
        <defs>
          <linearGradient id="pp-body" x1="0" y1="0" x2="1" y2="1">
            <stop offset="0" stopColor="#FFFFFF"/>
            <stop offset="1" stopColor="#D9E7F4"/>
          </linearGradient>
          <linearGradient id="pp-fold" x1="0" y1="0" x2="1" y2="1">
            <stop offset="0" stopColor="#B9CDE2"/>
            <stop offset="1" stopColor="#7FA3C4"/>
          </linearGradient>
        </defs>
        {/* shadow */}
        <ellipse cx="40" cy="56" rx="22" ry="2.5" fill="#2D3B52" opacity="0.12"/>
        {/* back wing */}
        <path d="M 6 8 L 74 12 L 40 42 Z" fill="url(#pp-body)" stroke="#B9CDE2" strokeWidth="0.6"/>
        {/* body fold */}
        <path d="M 40 42 L 74 12 L 54 50 Z" fill="url(#pp-fold)"/>
        {/* crease line */}
        <path d="M 40 42 L 54 50" stroke="#FFFFFF" strokeWidth="0.6" opacity="0.6"/>
      </svg>
    </div>
  );
}

// Export all
Object.assign(window, {
  Plane, Sailboat, Pine, Island,
  HeroScene, AboutScene, AppsScene, HobbiesScene,
  HelpIllust, HelpFlight, HelpVoyage, HelpGrove,
  PaperPlane,
});
