/* ==========================================================
   abatanado.net: stylesheet
   One file styles every page. Change a colour or size here
   and the whole site updates.
   ========================================================== */


/* ----------------------------------------------------------
   1. COLOURS AND SIZES (the "settings" of the site)
   These are CSS variables. Everywhere else we write var(--name)
   instead of a raw colour, so to re-colour the site you only
   edit this block. Try changing --accent and refresh the page.
   ---------------------------------------------------------- */
:root {
  --paper:  #231a16;  /* page background: dark roast brown (warmer than black) */
  --card:   #2f241e;  /* slightly lighter brown, for boxes/photo placeholders */
  --ink:    #f1e6d6;  /* main text: cream (not pure white, softer on the eyes) */
  --muted:  #bfae9c;  /* secondary text: footer, dates, captions */
  --line:   #4a3b31;  /* thin divider lines */
  --accent: #e8935f;  /* light terracotta: hover colour, small highlights.
                         Lighter than before because dark backgrounds need
                         a brighter accent to stay readable. */

  /* Tells the browser this is a dark page, so built-in things like
     scrollbars and form fields also go dark. */
  color-scheme: dark;

  --max-width: 44rem; /* how wide the text column gets on big screens */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}


/* ----------------------------------------------------------
   2. BASICS (applies to the whole page)
   ---------------------------------------------------------- */

/* Makes width/height include padding, which makes sizing predictable */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--serif);  /* one font for the whole site: serif */
  font-size: 1.125rem;        /* about 18px: serifs read a bit smaller, so slightly bigger */
  line-height: 1.7;           /* generous space between lines */
  color: var(--ink);
  background: var(--paper);

  /* The site is all lowercase. The text in the HTML is already
     lowercase, and this line is a safety net so anything you type
     later with capitals is shown lowercase anyway. */
  text-transform: lowercase;

  /* Keep the footer at the bottom even on short pages (see "footer") */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Headings inherit the serif font from body, so they only need weight and spacing */
h1, h2, h3 {
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 6vw, 3rem); }  /* clamp = min, flexible, max */
h2 { font-size: 1.5rem; }

p { margin: 0 0 1.25rem; }

/* Links are always underlined (not only coloured), so they are
   recognisable without relying on colour. */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25em;
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}


/* ----------------------------------------------------------
   3. HEADER: site name on the left, menu on the right
   On narrow phones the menu wraps onto a second line.
   ---------------------------------------------------------- */
header {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;            /* allow wrapping on small screens */
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.site-name {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

nav a {
  padding: 0.5rem 0;          /* bigger tap area on phones */
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* The page you are on: bold + underlined.
   (The HTML marks it with aria-current="page".) */
nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--ink);
  text-decoration-thickness: 2px;
}


/* ----------------------------------------------------------
   4. MAIN: the content of each page
   "flex: 1" makes it take all spare height, which pushes the
   footer to the bottom.
   ---------------------------------------------------------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* The small intro line under a big heading */
.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 30em;
}


/* ----------------------------------------------------------
   5. FOOTER
   ---------------------------------------------------------- */
footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p { margin: 0; }


/* ----------------------------------------------------------
   6. MUSIC: 3x3 album mosaic (filled in by music.html)
   ---------------------------------------------------------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 2rem 0 1.5rem;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: var(--card);
  overflow: hidden;
  text-decoration: none;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Album + artist name appear on hover/focus */
.tile span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.5rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.3;
  background: rgba(35, 26, 22, 0.88);
  opacity: 0;
  transition: opacity 0.15s;
}

.tile:hover span,
.tile:focus-visible span {
  opacity: 1;
}

.status {
  color: var(--muted);
  font-size: 0.95rem;
}


/* ----------------------------------------------------------
   7. KINO: 3x3 film posters with captions (filled in by kino.html)
   Uses .mosaic for the grid. Captions are always visible so the
   star rating never depends on hover or colour.
   ---------------------------------------------------------- */
.film {
  display: block;
  text-decoration: none;
}

.film img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  background: var(--card);
}

.film-info {
  display: block;
  padding-top: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.film-info span {
  display: block;
  color: var(--muted);
}
