/* ------------------------------------------------------------------
   Creature Double Feature Roundup: shared site styles
   Used by every page (home, blog, films, search, store, contact).

   Files this stylesheet expects in the same folder:
     cdf-logo-mask.png   the logo lettering (the colour comes from CSS)

   To change a page's colour, set data-section on its <body>:
     home (yellow)  blog (green)  films (cyan)  search (blue)
     store (magenta)  contact (red)
   ------------------------------------------------------------------ */

:root {
  --bg: #0b0b1e;
  --panel: #13132e;
  --line: #2b2b5a;
  --text: #eef0f8;
  --muted: #a9aecb;
  --accent: #ff5c93;
  --on-accent: #0b0b1e;
  --time: #46d3e3;
  --focus: #46d3e3;
  --btn: #222250;

  --c-yellow: #fcc216;
  --c-green: #3ddc84;
  --c-cyan: #46d3e3;
  --c-blue: #5b8cff;
  --c-magenta: #ff4fc3;
  --c-red: #ff5a4f;

  --head-font: "Bowlby One", "Arial Black", Impact, sans-serif;
  --body-font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

body { --section: var(--c-yellow); }
body[data-section="blog"]    { --section: var(--c-green); }
body[data-section="films"]   { --section: var(--c-cyan); }
body[data-section="search"]  { --section: var(--c-blue); }
body[data-section="store"]   { --section: var(--c-magenta); }
body[data-section="contact"] { --section: var(--c-red); }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.5 var(--body-font);
}
a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1 {
  margin: 1.75rem 0 .5rem;
  font: 400 clamp(2rem, 7vw, 4rem)/1.05 var(--head-font);
}
h2 { margin: 2rem 0 .5rem; font: 400 clamp(1.4rem, 4vw, 2rem)/1.15 var(--head-font); }

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem 2rem; }

/* ---------- header: colour bars, logo, navigation ---------- */
.bars {
  height: 14px;
  background: linear-gradient(90deg,
    #c4c4c4 0 14.28%, #c4c400 0 28.57%, #00c4c4 0 42.85%, #00c400 0 57.14%,
    #c400c4 0 71.42%, #c40000 0 85.71%, #0000c4 0 100%);
}
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.site-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem;
  max-width: 62rem; margin: 0 auto; padding: .6rem 1.25rem 0;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
  padding-bottom: .6rem; color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-name { font-weight: 700; line-height: 1.15; max-width: 9rem; }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .15rem; }
.site-nav a {
  padding: .8rem .85rem .75rem;
  color: var(--muted); font-weight: 700; text-decoration: none;
  box-shadow: inset 0 -3px 0 transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -3px 0 var(--section); }

/* ---------- the logo: one image, any colour ---------- */
.logo {
  display: block;
  aspect-ratio: 591 / 749;
  background-color: var(--logo, var(--section));
  -webkit-mask: url("cdf-logo-mask.png") center / contain no-repeat;
          mask: url("cdf-logo-mask.png") center / contain no-repeat;
}
.brand .logo { height: 3.6rem; }
.logo-hero { width: min(24rem, 80vw); margin: 2rem auto 1rem; }

/* ---------- footer ---------- */
.site-footer {
  max-width: 62rem; margin: 3rem auto 0; padding: 1.5rem 1.25rem 3rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem;
}

@media (max-width: 40rem) {
  .brand-name { display: none; }
  .site-nav { margin-left: 0; flex-basis: 100%; }
  .site-nav a { padding: .6rem .7rem .55rem; }
}
