/*
Theme Name: paul batchelor
Theme URI: https://paulbatchelor.de/
Author: Paul Batchelor
Description: Minimal theme for paulbatchelor.de – photo, five menu bars, artist text, concerts. No external fonts, scripts or trackers.
Version: 1.3.1
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: paulbatchelor
Update URI: false
*/


/* Lato, as used for the menu on the old WordPress site. Self-hosted (fonts/), not loaded from Google. */
@font-face {
  font-family: "Lato";
  src: url("assets/fonts/lato-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --lato: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #ffffff;
  --bg-raised: #f2f2f2;
  --text: #000000;
  --muted: #666666;
  --line: rgba(0, 0, 0, 0.12);
  --accent: #000000;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 1.25rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ───────────── Home ───────────── */

.pb-home {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  max-width: 34rem;
  margin: 0 auto;
}

/* top third: photo */
.hero {
  position: relative;
  flex: 1 1 0; /* photo = top third, menu (flex: 2) = bottom two thirds */
  min-height: 0;
  overflow: hidden;
  background: #000;
}

.hero picture { display: contents; } /* lets the img size against .hero */

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* phone: the whole artist photo at its natural shape (about a third of
   the screen on most phones); the bars take the rest */
@media (max-width: 899px) {
  .hero { flex: none; aspect-ratio: var(--photo-ratio, 1.4); } /* ratio of the uploaded photo, set in front-page.php */
  .pb-home .menu { flex: 1 1 0; } /* .pb-home raises specificity over the base .menu rule further down */
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(11, 11, 11, 0.85) 100%);
  pointer-events: none;
}

.hero-title {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0.9rem;
  z-index: 1;
  margin: 0;
  text-align: center;
  text-indent: 0.2em; /* balances the letter-spacing after the last letter, so it looks truly centred */
  font-family: var(--lato); /* as on the old site: Lato, uppercase, wide spacing */
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff; /* sits on the dark photo, so it stays light */
}

.hero-title small {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: #ddd4b3; /* header colour from the old WordPress theme */
}

/* bottom two thirds: navigation bars */
.menu {
  flex: 2 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.menu ul {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu li {
  flex: 1;
  display: flex;
  border-top: 1px solid var(--line);
}

.menu li a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0 var(--gutter);
  text-decoration: none;
  font-family: var(--lato);
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  transition: background-color 0.2s, color 0.2s;
}

.menu li a:hover,
.menu li a:active { background: var(--bg-raised); }

.menu .hint {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu .arrow {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--muted);
}

/* ───────────── Legal footer (everywhere) ───────────── */

.legal {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.7rem var(--gutter) calc(0.7rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.legal a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
}

.legal a:hover { color: var(--text); }

/* ───────────── Subpages ───────────── */

.pb-page {
  max-width: 40rem;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* back-to-home bar: stays pinned at the top while scrolling */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0 var(--gutter);
  text-decoration: none;
  font-family: var(--lato);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar a .back-arrow {
  font-size: 1.2rem;
  letter-spacing: 0;
  line-height: 1;
}

.topbar a:hover { color: var(--accent); }

.content {
  flex: 1;
  padding: 2rem var(--gutter) 3rem;
}

.content h1 {
  margin: 0 0 1.5rem;
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 1.15;
}

.content h2 {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.content p { margin: 0 0 1.1rem; }

.content a { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.content a:hover { color: var(--accent); }

.de { color: var(--muted); font-style: italic; }

/* artist */
.portrait {
  width: 100%;
  height: auto; /* natural shape on every screen */
  margin-bottom: 1.75rem;
}

/* concerts */
.gig {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.gig:last-child { border-bottom: 1px solid var(--line); }

.gig-date {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.gig-title {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.gig p { margin: 0; color: var(--muted); }
.gig p + p { margin-top: 0.15rem; }

.badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.45rem;
  border: 1px solid var(--muted);
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  vertical-align: 0.15em;
}

.past { opacity: 0.75; }

/* contact */
.email, .content .email a {
  display: inline-block;
  font-size: clamp(1.3rem, 6.5vw, 1.9rem);
  word-break: break-all;
}

/* legal pages: denser, smaller */
.legal-text { font-family: var(--sans); font-size: 0.88rem; line-height: 1.65; color: var(--text); }
.legal-text h1 { font-family: var(--serif); color: var(--text); }
.legal-text h3 { margin: 1.75rem 0 0.4rem; font-size: 0.95rem; color: var(--text); }
.legal-text ul { padding-left: 1.2rem; }
.legal-text a { word-break: break-word; }

/* ───────────── Laptop / PC (wide screens) ─────────────
   Photo is the star: full width, about two thirds of the height.
   The five bars sit side by side in one row below it.
   Impressum / Datenschutz small in the bottom-right corner. */

@media (min-width: 900px) {
  .pb-home { max-width: none; }

  .hero { flex: 68 1 0; }                        /* ~68 % photo */
  .menu { flex: 32 1 0; position: relative; }    /* ~32 % menu row */

  .hero img { object-position: 50% 25%; }         /* normal photo, cropped to the band */
  .hero--wide img { object-position: 57% 0; }    /* optional wide photo: keep the whole hat */

  .hero-title { font-size: 2.4rem; bottom: 1.6rem; }
  .hero-title small { font-size: 0.8rem; }

  .menu ul { flex-direction: row; }
  .menu li { border-top: 0; }
  .menu li + li { border-left: 1px solid var(--line); }

  .menu li a { font-size: 1.6rem; padding: 0 0.5rem; }

  .menu .legal {
    position: absolute;
    right: var(--gutter);
    bottom: 0.4rem;
    padding: 0;
    border-top: 0;
  }
}

/* ───────────── WordPress extras ───────────── */

/* the pinned back bar must sit below the admin bar when Paul is logged in */
.admin-bar .topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .topbar { top: 46px; } }

/* concert details: one paragraph per line */
.gig-details p { margin: 0; color: var(--muted); }

.no-gigs { color: var(--muted); font-style: italic; }

/* images inserted in the editor */
.content img { height: auto; }
.content figure { margin: 0 0 1.5rem; }
