/* ============================================================
   American History Archive — Stylesheet
   Retro late-90s educational site aesthetic.
   Intentional design choices are intentional.
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --navy:       #000080;
  --red:        #ff0000;
  --silver:     #c0c0c0;
  --light-gray: #f0f0f0;
  --mid-gray:   #d0d0d0;
  --white:      #ffffff;
  --black:      #000000;
  --text-muted: #555555;
  --text-fine:  #777777;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 20px;
  font-family: "Times New Roman", Times, serif;
  background-color: var(--silver);
  color: var(--black);
  /* Intentionally no min-height: let the page feel sparse */
}

/* --- Layout Container ------------------------------------- */

.container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--white);
  border: 3px solid var(--black);
}

/* --- Header ----------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  padding: 10px;
}

.site-header .banner-img {
  display: block;
  width: 80px;
  height: 80px;
  border: 2px solid var(--white);
  flex-shrink: 0;
  /* image-rendering keeps pixel art sharp; SVG ignores it gracefully */
  image-rendering: pixelated;
}

.site-header .banner-title {
  flex-grow: 1;
  color: var(--white);
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 2px;
  line-height: 1.3;
  padding: 0 12px;
}

.site-header .banner-subtitle {
  display: block;
  font-size: 11px;
  font-family: Arial, sans-serif;
  font-weight: normal;
  letter-spacing: 1px;
  color: #aac4ff;
  margin-top: 4px;
}

/* --- Main Content ----------------------------------------- */

.site-main {
  padding: 22px;
  background: var(--light-gray);
  border-top: 3px solid var(--black);
}

.site-main h1 {
  font-size: 28px;
  text-decoration: underline;
  margin: 0 0 16px;
  color: var(--black);
  font-weight: bold;
}

.site-main p {
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 14px;
  color: var(--black);
}

.site-main p:last-of-type {
  margin-bottom: 20px;
}

/* --- Download Box ----------------------------------------- */

.download-box {
  background: var(--white);
  border: 2px dashed var(--black);
  padding: 18px;
  text-align: center;
  margin-bottom: 18px;
}

.download-box .version-label {
  margin: 0 0 4px;
  font-size: 15px;
}

.download-box .meta {
  margin: 0 0 4px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  color: var(--text-muted);
}

.download-box .meta:last-of-type {
  margin-bottom: 14px;
}

.download-btn {
  display: inline-block;
  padding: 10px 26px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  border: 2px solid var(--black);
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  /* No border-radius. None. */
  transition: background 0.1s ease;
}

.download-btn:hover {
  background: var(--red);
}

.download-btn:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.download-note {
  margin: 12px 0 0;
  font-size: 11px;
  font-family: Arial, sans-serif;
  color: #888888;
  line-height: 1.6;
}

/* --- Disclaimer ------------------------------------------- */

.disclaimer {
  border-top: 1px solid #cccccc;
  padding-top: 14px;
}

.disclaimer p {
  font-size: 12px;
  font-family: Arial, sans-serif;
  color: var(--text-fine);
  line-height: 1.7;
  margin: 0;
}

/* --- Footer ----------------------------------------------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--mid-gray);
  border-top: 2px solid var(--black);
  padding: 8px 16px;
  font-size: 11px;
  font-family: Arial, sans-serif;
  color: var(--text-muted);
}

/* --- No-JS Notice ----------------------------------------- */

.noscript-notice {
  background: #ffffcc;
  border: 1px solid #999900;
  padding: 8px 12px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  margin-bottom: 14px;
  color: #333300;
}

/* --- Reduced Motion ---------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .download-btn {
    transition: none;
  }
}

/* --- Minimal Responsiveness --------------------------------
   The site is designed at 900px. On narrow viewports we allow
   it to reflow rather than enforcing a fixed width — the 90s
   feel is preserved, just slightly compressed.
   ---------------------------------------------------------- */

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .container {
    border-left: none;
    border-right: none;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .site-header .banner-title {
    font-size: 16px;
    letter-spacing: 1px;
    order: -1;
    width: 100%;
    padding: 0;
  }

  .site-header .banner-img {
    width: 56px;
    height: 56px;
  }

  .site-main h1 {
    font-size: 22px;
  }

  .site-footer {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}
