/* ==========================================================================
   Shared stylesheet for musclebiplane.org pages.
   Lives in the site's existing root-level /css/ folder and is linked from
   pages with an absolute path (href="/css/site.css"), so the same tag
   works unchanged no matter how deep a page sits in the folder structure.

   Structure:
   1. Reset + base element styles
   2. Per-page color themes (add one block per page as you migrate pages
      over to this shared file)
   2a. The two site-wide themes: theme-night and theme-clouds
   3. Layout rules for the MuscleBiplane FAST page (mbopen2.php)
   4. Layout rules for the Engines & Propellers links page
   5. Layout rules for the BlackEagle540 Motor article page
   6. Cover page (splash/index1.htm)
   7. Unlimited Sequence video page (splash/flashopen2.html)
   8. Splash page (index.html at the site root)
   9. The six section doors (shared; used on mbopen2.php)
   ========================================================================== */

/* ---------- 1. Reset + base ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 1.5rem 1rem;
  font-family: Verdana, Arial, Helvetica, sans-serif;
}

a { color: var(--link-color); }
a:visited { color: var(--link-visited); }
a:active { color: var(--link-active); }

/* ---------- 2. Per-page color themes ---------- */

/* MuscleBiplane FAST page (mbopen2.php) */
body.page-fast {
  --bg-color: #000032;
  --text-color: #ffffcc;
  --link-color: #ffffcc;
  --link-visited: #ccffcc;
  --link-active: #ff3333;
  background: var(--bg-color);
  color: var(--text-color);
}

/* Splash / entry page theme (splash/index1.htm) */
body.page-home {
  --bg-color: #000020;
  --text-color: #ffffcc;
  --link-color: #66ff66;
  --link-visited: #ffff33;
  --link-active: #ff6666;
  background: var(--bg-color) url("/image1/rivet2.jpg") repeat;
  color: var(--text-color);
  font-family: Arial, Helvetica, sans-serif;
}

/* Engines & Propellers links page */
body.page-links {
  --bg-color: #000000;
  --text-color: #ffffff;
  --link-color: #ffff00;
  --link-visited: #33ff33;
  --link-active: #ff0000;
  background: var(--bg-color) url("/image2/bg1.gif") fixed;
  color: var(--text-color);
}

/* BlackEagle540 Motor article page */
body.page-motor-article {
  --bg-color: #330066;
  --text-color: #ffffff;
  --link-color: #ffff00;
  --link-visited: #00ff00;
  --link-active: #ff0000;
  background: var(--bg-color) url("/image1/mainbg.gif") fixed;
  color: var(--text-color);
}

/* ---------- 2a. The two site-wide themes ----------
   Every page picks ONE of these on its body tag, plus its own page class
   for layout, e.g. <body class="theme-night page-fast">.
     theme-night  : dark night-sky navy (optional rivet texture: add "riveted")
     theme-clouds : blue sky with clouds; text sits on dark see-through panels
                    (six skies to choose from: sky-puffy, sky-cumulus, sky-cirrus,
                    sky-streaks, sky-tile, sky-above)
   Wrap a page's main content in <div class="panel"> so it stays readable
   on either theme. */

body.theme-night,
body.theme-clouds {
  --bg-color: #000032;
  --panel-bg: rgba(0, 0, 40, 0.88);
  --panel-border: #4a5a9c;
  --text-color: #ffffcc;
  --heading-color: #ffff33;
  --link-color: #ffff33;
  --link-visited: #ccffcc;
  --link-active: #ff6666;
  color: var(--text-color);
  font-family: Verdana, Arial, Helvetica, sans-serif;
}

body.theme-night { background: var(--bg-color); }
body.theme-night.riveted { background: var(--bg-color) url("/image1/rivet2.jpg") repeat; }

body.theme-clouds {
  background: #2a5aa8 url("/image1/clouds02.jpg") center top / cover no-repeat fixed;
}

/* Pick a different sky by adding ONE of these next to theme-clouds,
   e.g. <body class="theme-clouds sky-cumulus page-...">. All from /image1.
   The photos stay still while the page scrolls; the two "tile" skies
   repeat seamlessly, which suits very long pages. */
body.theme-clouds.sky-puffy    { background-image: url("/image1/clouds02.jpg"); }  /* puffy white on deep blue (default) */
body.theme-clouds.sky-cumulus  { background-image: url("/image1/Clouds03.jpg"); }  /* towering cumulus */
body.theme-clouds.sky-cirrus   { background-image: url("/image1/Clouds14.jpg"); }  /* wispy cirrus */
body.theme-clouds.sky-streaks  { background-image: url("/image1/clouds15.jpg"); }  /* fall-streak cirrus */
body.theme-clouds.sky-tile,
body.theme-clouds.sky-above {
  background-size: auto;
  background-repeat: repeat;
  background-position: 0 0;
}
body.theme-clouds.sky-tile     { background-color: #9db4e6; background-image: url("/image1/clouds07.jpg"); }  /* pale sky, tiled */
body.theme-clouds.sky-above    { background-color: #c9d3dc; background-image: url("/image1/clouds.jpg"); }    /* above the clouds, tiled */

body.theme-night h1, body.theme-night h2, body.theme-night h3,
body.theme-clouds h1, body.theme-clouds h2, body.theme-clouds h3 { color: var(--heading-color); }

.panel {
  max-width: 960px;
  margin: 0 auto 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel-bg);
  line-height: 1.6;
}
.panel img { max-width: 100%; height: auto; }

@media (max-width: 600px) {
  .panel { padding: 1rem; border-radius: 6px; }
}

/* ---------- 3. MuscleBiplane FAST page layout ---------- */

.fast-grid {
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  grid-template-areas:
    "title    .        tagline"
    ".        spell     .      "
    "lead     lead      lead   "
    "sections sections  sections"
    "navleft  hero      navright"
    ".        contact   .      "
    ".        copyright .      ";
  gap: 1rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.fast-header-left  { grid-area: title; }
.fast-header-right { grid-area: tagline; }
.fast-subtitle     { grid-area: spell; }
.fast-lead         { grid-area: lead; margin: 0; font-size: 0.95rem; line-height: 1.5; }
.fast-sections     { grid-area: sections; }
.fast-nav-col-left  { grid-area: navleft; }
.fast-hero          { grid-area: hero; justify-self: center; }
.fast-nav-col-right { grid-area: navright; }
.fast-contact       { grid-area: contact; }
.fast-copyright     { grid-area: copyright; }

.fast-header-left,
.fast-header-right {
  margin: 0;
  font-weight: normal;
}
.fast-header-left b,
.fast-header-right { font-size: 0.95rem; }
.fast-header-left b { font-size: 1.1rem; }

.fast-subtitle {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.5em;
}

.fast-nav-col-left,
.fast-nav-col-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fast-nav-col-left img,
.fast-nav-col-right img { display: block; }

.fast-hero img { display: block; max-width: 100%; height: auto; }

.fast-contact {
  font-size: 0.9rem;
  font-weight: bold;
}

.fast-copyright {
  font-size: 0.75rem;
}
.fast-copyright p { margin: 0; }

.fast-footer-note {
  max-width: 900px;
  margin: 1rem auto 0;
  text-align: right;
  font-size: 0.75rem;
  color: #ff0000;
}

/* Stack everything into one column on narrow screens, and let the two
   12-icon nav lists wrap into a compact grid instead of one long column. */
@media (max-width: 680px) {
  .fast-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "tagline"
      "spell"
      "lead"
      "sections"
      "hero"
      "navleft"
      "navright"
      "contact"
      "copyright";
  }
  .fast-nav-col-left,
  .fast-nav-col-right {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Text menu buttons (replaced the old l1-l12 / r1-r12 GIF buttons) */
.fast-nav { margin: 0; }
.fast-subtitle { font-weight: normal; }
.fast-nav h2 {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #9fb4ff;
}
.fast-nav ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fast-btn {
  display: block;
  min-height: 30px;
  padding: 6px 8px;
  box-sizing: border-box;
  border: 1px solid #4a5a9c;
  border-radius: 4px;
  background: linear-gradient(#14207a, #0a1150);
  color: var(--text-color);
  font-size: 0.78rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.fast-btn:visited { color: var(--link-visited); }
.fast-btn:hover,
.fast-btn:focus-visible {
  background: #ffffcc;
  border-color: #ffffcc;
  color: #000032;
  outline: none;
}
.fast-btn:active { color: var(--link-active); }
.fast-nav-left  { grid-area: navleft; }
.fast-nav-right { grid-area: navright; }
@media (max-width: 680px) {
  .fast-nav ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .fast-btn { display: flex; align-items: center; justify-content: center; }
}

/* ---------- 4. Engines & Propellers links page layout ---------- */

.links-page {
  max-width: 1100px;
  margin: 0 auto;
}

.links-title {
  text-align: right;
  font-size: 1.5rem;
  font-weight: normal;
  margin: 0 0 0.5rem;
}

.links-jumpnav {
  text-align: center;
  font-size: 0.8rem;
  margin: 0 0 2rem;
}
.links-jumpnav a { margin: 0 0.15rem; }

.links-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.links-column {
  flex: 1 1 260px;
  min-width: 240px;
}

.links-column section { margin-bottom: 2rem; }

.links-column h2 {
  font-size: 0.95rem;
  text-decoration: underline;
  font-weight: bold;
  margin: 0 0 0.5rem;
}

.links-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  font-weight: bold;
  line-height: 1.5;
}

.links-back {
  text-align: center;
  margin-top: 2rem;
}
.links-back img { display: inline-block; max-width: 100%; height: auto; }

/* ---------- 5. BlackEagle540 Motor article page layout ---------- */

.article-page {
  max-width: 1100px;
  margin: 0 auto;
}

.article-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}
.article-hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}
.article-hero .subtitle {
  color: #00ff00;
  font-weight: bold;
  margin: 0.25rem 0;
}
.article-hero .byline {
  font-size: 0.8rem;
  margin: 0.5rem 0 0;
}

.article-divider {
  border: 0;
  border-top: 2px solid #ffffff55;
  max-width: 700px;
  margin: 2rem auto;
}

.article-prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.7;
}
.article-prose h2 {
  text-align: center;
  text-decoration: underline;
  font-size: 1.4rem;
  margin-top: 2.5rem;
}
.article-prose h3 {
  font-size: 1.05rem;
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
}
.article-prose .subtitle-line {
  text-align: center;
  font-weight: bold;
  margin: 0.25rem 0;
}

.accent-green { color: #00ff00; }
.accent-red   { color: #ff0000; }
.accent-white { color: #ffffff; }
.accent-yellow { color: #ffff33; }

.article-figure {
  max-width: 950px;
  margin: 2.5rem auto;
  text-align: center;
}
.article-figure figcaption {
  color: #ffff00;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.article-figure img {
  display: block;
  width: 100%;
  max-width: 950px;
  height: auto;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.article-footer-nav {
  text-align: center;
  font-size: 0.85rem;
  color: #ffff33;
  font-weight: bold;
  margin-top: 1rem;
}
.article-footer-nav a { margin: 0 0.3rem; }
.article-footer-nav p { margin: 0.5rem 0; }

.article-end {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: bold;
}
.article-end a { color: #ff0000; }

/* ---------- 6. Cover page layout (splash/index1.htm) ---------- */

body.page-home { text-align: center; }

.cover-header { margin: 0 auto 1.25rem; max-width: 720px; }

.site-title {
  margin: 0;
  font-weight: normal;
  line-height: 1.15;
}
.site-title .eyebrow,
.site-title .tagline {
  display: block;
  font-size: 0.9rem;
}
.site-title .name {
  display: block;
  font-size: 2.2rem;
  font-weight: bold;
  margin: 0.15rem 0;
}

/* Three cockpit hatches; what is behind each one shows only on hover */
.hatches {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  max-width: 640px;
  margin: 0 auto;
}
.hatches a { flex: 1 1 0; max-width: 200px; min-width: 0; }
.hatches img { display: block; width: 100%; height: auto; }
.hatches a:focus-visible { outline: 2px solid var(--link-visited); outline-offset: 3px; }
.hatches a, .hatches a:visited { color: var(--link-color); }

.hatches { margin-bottom: 0.75rem; }

/* Two bolt heads under the hatches, also hidden doors */
.bolts {
  display: flex;
  justify-content: space-between;
  max-width: 640px;
  margin: 0 auto;
}
.bolts a { flex: 0 1 80px; }
.bolts img { display: block; width: 100%; height: auto; }

.site-footer {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  margin-top: 2rem;
}
.site-footer p { margin: 0.35rem 0; }
.site-footer .domain { font-size: 0.75rem; }
.site-footer .contact-link { font-size: 0.85rem; }

@media (max-width: 600px) {
  .site-title .name { font-size: 1.7rem; }
  .hatches { gap: 0.4rem; }
}

/* ---------- 7. Unlimited Sequence video page (splash/flashopen2.html) ---------- */

body.page-sequence {
  --text-color: #ffffff;
  --link-color: #ffffcc;
  --link-visited: #ccffcc;
  --link-active: #ff9999;
  background: #000000;
  color: var(--text-color);
  text-align: center;
}

.seq-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: normal;
  letter-spacing: 0.3em;
}

.seq-stage {
  max-width: 660px;
  margin: 0 auto;
}
.seq-stage video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}
.seq-stage video[hidden] { display: none; }

.seq-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.2rem;
  margin: 1rem 0 0;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
}
.seq-controls button {
  padding: 0.45rem 1rem;
  font: inherit;
  color: #000;
  background: var(--link-color);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.seq-controls a { align-self: center; }


/* ---------- 8. Splash page (index.html at the site root) ---------- */

/* The lettering build: MUSCLE / BIPLANE in red, yellow, white, then larger
   red, blue, and finally big red. Old <font size> 4/5/6/7 = 18/24/32/48 px. */
body.page-splash {
  --link-color: #ffff00;
  --link-visited: #33ff33;
  --link-active: #33ccff;
  background: #000000;
  color: #ffff00;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.letters {
  margin: 0;
  padding-top: 9rem;
  font-weight: normal;
  word-spacing: 0.6em;
  line-height: 1.2;
  min-height: 15rem;
}
.step-0, .step-1, .step-2 { color: #ff0000; font-size: 18px; }
.step-3, .step-4          { color: #ffff00; font-size: 18px; }
.step-5, .step-6          { color: #ffffff; font-size: 18px; }
.step-7, .step-8          { color: #ff0000; font-size: 24px; padding-top: 4.5rem; }
.step-9                   { color: #0000ff; font-size: 32px; padding-top: 4.5rem; }
.step-10                  { color: #ff0000; font-size: 48px; padding-top: 5.5rem; font-weight: bold; }

/* Nearly invisible "enter" in the top right corner: goes straight to
   the FAST page (mbopen2.php), skipping the cover. */
.splash-skip {
  position: fixed;
  top: 6px;
  right: 10px;
  font-size: 10px;
  color: #1a1a1a;
  text-decoration: none;
}
.splash-skip:visited { color: #1a1a1a; }
.splash-skip:hover,
.splash-skip:focus-visible { color: #555555; }

@media (max-width: 600px) {
  .letters { padding-top: 5rem; word-spacing: 0.3em; }
  .step-10 { font-size: 32px; }
}


/* ---------- 9. The six section doors (shared; used on mbopen2.php) ---------- */

.sections { margin: 0 auto; }
.sections h2 {
  margin: 0 0 0.6rem;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #9fb4ff;
}
.sections ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.sections a,
.section-soon {
  display: block;
  height: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #4a5a9c;
  border-radius: 6px;
  background: linear-gradient(#14207a, #0a1150);
  color: #ffffcc;
  text-decoration: none;
}
.sections a:hover,
.sections a:focus-visible { border-color: #ffff33; outline: none; background: #0a1150; }
.section-name {
  display: block;
  margin-bottom: 0.25rem;
  color: #ffff33;
  font-weight: bold;
  font-size: 0.95rem;
}
.section-text { display: block; font-size: 0.8rem; line-height: 1.4; }
.section-soon { opacity: 0.65; }
