/* style.css */

/* ===== Base & tokens ===== */
@font-face {
  font-family: 'CopperplateGothic';
  src: url('fonts/copperplategothic.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap; /* avoid invisible text on load */
}

:root{
  --bg1: #cce7ff;
  --bg2: #99ccff;
  --ink: #333;
  --brand: #003366;
  --nav1: #003366;
  --nav2: #0066cc;
  --link: #0044cc;
  --link-hover: #111;
  --gold: #ffcc00;
  --panel-top: #ffffff;
  --panel-bot: #f0f4ff;
  --border: #aaa;
  --shadow: rgba(0,0,0,0.15);
  --sidebar-top: 16px; /* gap from top when sticking */
}

/* small reset */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: auto; }       /* allow window scrolling */
body {
  background: linear-gradient(145deg, var(--bg1), var(--bg2));
  font-family: 'CopperplateGothic', Verdana, Tahoma, sans-serif; /* match name exactly */
  color: var(--ink);
  margin: 20px;
  line-height: 1.6;
  overflow: auto;                   /* sticky needs window scroll */
}

/* accessible skip-link */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 16px; top: 16px; z-index: 1000;
  background: #fff; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 6px;
}

/* ===== Header & nav ===== */
header {
  text-align: center;
  padding: 20px;
  border-bottom: 2px solid #ccc;
  margin-bottom: 30px;
  overflow: visible;                /* don't clip sticky */
}

h1 {
  font-size: 3em;
  letter-spacing: 2px;
  color: var(--brand);
  margin-bottom: 10px;
  text-shadow: 1px 1px 0px #fff, 2px 2px 6px #00ccff; /* subtle Y2K glow */
}

h2 {
  margin-top: 40px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ccc;
  text-transform: uppercase;
  font-size: 1.3em;
  letter-spacing: 1px;
  color: #444;
}

nav {
  margin-top: 15px;
  padding: 10px;
  background: linear-gradient(to right, var(--nav1), var(--nav2));
  border-radius: 6px;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.2);
}

/* Desktop: horizontal nav row */
nav ul {
  display: flex;
  flex-wrap: nowrap;                /* single line on desktop */
  justify-content: center;
  align-items: center;
  gap: 0 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav li { margin: 0; padding: 0; }
nav a {
  display: inline-block;
  padding: 8px 6px;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  transition: color .2s ease, border-bottom .2s ease;
}
nav a:hover {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
}

/* ===== Layout & panels ===== */
.container {
  max-width: 900px;
  margin: 60px auto;
  padding: 0;
  overflow: visible;                /* don't clip sticky */
}

.section {
  margin-bottom: 40px;
  padding: 25px 30px;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot));
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0px 2px 6px var(--shadow);
}

/* Two-column layout: LEFT (sidebar) + RIGHT (content) */
.layout {
  display: flex;
  flex-wrap: nowrap;                /* keep columns side-by-side */
  align-items: flex-start;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  overflow: visible;
}

/* RIGHT: content fills remaining space */
.main-content {
  flex: 1 1 0;
  min-width: 0;                     /* prevent overflow on long lines */
  border-left: 1px solid rgba(0,0,0,0.12); /* subtle divider */
  padding-left: 24px;
}

/* LEFT: sidebar that follows while scrolling */
.sidebar {
  flex: 0 0 280px;                  /* fixed column width (wider to fit links) */
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot));
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0px 2px 6px var(--shadow);

  position: sticky;                 /* follow down the page */
  top: var(--sidebar-top);
  height: max-content;              /* shrink-wrap contents */
  overflow: visible;
}
.sidebar ul {
  margin: 0;
  padding-left: 1.1em;              /* keep bullets/links inside the box */
}

/* ===== Type & media ===== */
a {
  color: var(--link);
  font-weight: bold;
  text-decoration: none;
  transition: color .2s ease, border-bottom .2s ease;
}
a:hover {
  color: var(--link-hover);
  border-bottom: 2px solid var(--link);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 15px auto;
  border: 2px solid #66ccff;
  border-radius: 8px;
}

/* prevent text/URLs from spilling out of cards */
.section,
.sidebar,
.main-content {
  overflow-wrap: anywhere;
  word-break: break-word;           /* legacy fallback */
  min-width: 0;
}

.street-accent {
  font-family: 'CopperplateGothic', Impact, sans-serif;
  color: #ff3399;
  text-transform: uppercase;
  letter-spacing: 2px;
}

hr {
  border: none;
  height: 3px;
  background: linear-gradient(to right, #999, #fff, #999);
  margin: 40px 0;
}

/* ===== Changelogs ===== */
.changelog-entry {
  margin-bottom: 30px;
  padding: 15px 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.1);
}
.changelog-entry h3 {
  margin-top: 0;
  font-size: 1.1em;
  color: var(--brand);
}
.changelog-entry img {
  margin-top: 10px;
  border: 2px solid #666;
  border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* Nav: allow wrapping + comfy taps */
  nav ul {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  nav a {
    padding: 8px 10px;
    border-radius: 6px;
  }

  /* Columns: stack */
  .layout {
    flex-direction: column;
    gap: 16px;
    margin: 16px auto;
    padding: 0 12px;
  }

  .sidebar {
    position: static; top: auto;
    width: 100%; flex-basis: auto;
  }

  .main-content {
    border-left: none;
    padding-left: 0;
    min-width: 0;
  }

  header { padding: 12px 12px 16px; margin-bottom: 16px; }
  h1 { font-size: 2rem; letter-spacing: 1px; }
  h2 { font-size: 1.1rem; margin-top: 24px; }
}
