/* site.css — shared style guide for johnshaworth.uk, matching the Book Editor's
   Penguin aesthetic: warm paper, orange (#EA5B0C) accent, an old-style book
   serif for reading, a Gill-Sans-ish humanist sans for labels and furniture,
   black Penguin rules, and the badger colophon. System fonts only (no CDN). */

:root {
  --paper: #fbf9f3;
  --cream: #f4eee1;
  --ink: #1a1712;
  --ink-soft: #4a4236;
  --muted: #8a8172;
  --rule: #ddd6c8;
  --rule-strong: #cfc7b8;
  --penguin: #EA5B0C;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Gill Sans", "Gill Sans MT", Futura, "Trebuchet MS", Avenir, -apple-system, system-ui, sans-serif;

  --max-w: 1100px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-y: scroll; }  /* always reserve the scrollbar so centred content doesn't shift between pages */
body {
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul { list-style: none; }
a { color: inherit; }

/* ── Nav (orange) ────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--penguin);
  border-bottom: 2px solid var(--ink);
  height: var(--nav-h);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; height: 100%;
  display: flex; align-items: center; justify-content: flex-end;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0.01em;
  text-decoration: none; color: #fff;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-link {
  position: relative; font-family: var(--sans);
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: rgba(255, 255, 255, 0.86); padding: 0.25rem 0;
  transition: color 0.2s ease;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 50%; right: 50%;
  height: 2px; background: #fff; transition: left 0.25s ease, right 0.25s ease;
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { left: 0; right: 0; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.4rem; color: #fff; padding: 0.5rem; line-height: 1; }

.nav-overlay {
  display: none; position: fixed; inset: 0; background: var(--penguin); z-index: 200;
  flex-direction: column; align-items: center; justify-content: center;
}
.nav-overlay.is-open { display: flex; }
.nav-overlay ul { text-align: center; }
.nav-overlay li { margin: 1.25rem 0; }
/* mobile menu uses the desktop heading font */
.nav-overlay .nav-link { font-family: var(--sans); font-weight: 500; font-size: clamp(1.4rem, 5.5vw, 2rem); letter-spacing: 0.12em; text-transform: uppercase; color: #fff; }
.overlay-close { position: absolute; top: 1.25rem; right: 1.5rem; background: none; border: none; font-size: 1.75rem; cursor: pointer; color: #fff; line-height: 1; padding: 0.5rem; }

/* ── Home hero: flower photo ─────────────────────────────────────────────── */
.banner {
  position: relative; aspect-ratio: 16 / 6;
  background: #45484b url('/flower.jpeg?v=6') center / cover no-repeat;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-bottom: 2px solid var(--ink);
}
.banner::before { content: ''; position: absolute; inset: 0; background: rgba(20, 22, 24, 0.34); }
.banner-inner { position: relative; z-index: 1; text-align: center; padding: 1rem 2rem; }
.banner-tagline {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.2;
  color: #fff; margin: 0;
}

/* ── Main / sections ─────────────────────────────────────────────────────── */
main { max-width: var(--max-w); margin: 0 auto; padding: 4rem 2rem; }
.page-header { margin-bottom: 3rem; }
.section-rule { border: none; border-top: 1px solid var(--rule); margin: 3rem 0; }
.section-label { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--penguin); margin: 0 0 0.75rem; }

h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; line-height: 1.15; margin: 0 0 1.5rem; }
h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 500; line-height: 1.2; margin: 0 0 1.5rem; }
h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; line-height: 1.3; margin: 0 0 0.5rem; }
p { font-size: 1.02rem; line-height: 1.8; margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.dropcap::first-letter { font-family: var(--serif); font-size: 4.4em; font-weight: 600; color: var(--ink); float: left; line-height: 0.78; margin: 0.02em 0.12em 0 0; }
.col-text { column-count: 2; column-gap: 3rem; column-rule: 1px solid var(--rule); margin-top: 2.5rem; }

/* ── Project cards ───────────────────────────────────────────────────────── */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.project-card { border: 1px solid var(--rule-strong); background: var(--paper); padding: 1.75rem; display: flex; flex-direction: column; }
.project-card h3 { color: var(--ink); }
.project-card p { font-family: var(--serif); font-size: 0.94rem; color: var(--ink-soft); flex: 1; margin: 0.5rem 0 1.5rem; line-height: 1.6; }
.project-card a { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--penguin); text-decoration: none; align-self: flex-start; }
.project-card a::after { content: ' \2192'; }

/* ── Inspiration list ────────────────────────────────────────────────────── */
article > h2 { margin-top: 2.6rem; }
.inspo-list { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.inspo { padding: 1.05rem 0; border-top: 1px solid var(--rule); }
.inspo:first-child { border-top: none; }
.inspo-link { font-family: var(--serif); font-size: 1.18rem; font-weight: 500; color: var(--ink); text-decoration: none; }
a.inspo-link:hover { color: var(--penguin); }
.inspo-host { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-left: 0.6rem; white-space: nowrap; }
.inspo-note { display: block; margin-top: 0.3rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }

/* ── Underlined links (view-all, home-link) ──────────────────────────────── */
.view-all, .home-link {
  display: inline-block; font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--penguin);
  text-decoration: none; position: relative; padding: 0.25rem 0;
}
.view-all::after, .home-link::after { content: ''; position: absolute; bottom: -2px; left: 50%; right: 50%; height: 2px; background: var(--penguin); transition: left 0.25s ease, right 0.25s ease; }
.view-all:hover::after, .home-link:hover::after { left: 0; right: 0; }

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.error-code { font-family: var(--serif); font-size: clamp(5rem, 15vw, 10rem); font-weight: 500; color: var(--rule-strong); line-height: 1; margin: 0 0 1rem; }

/* ── Footer with badger colophon ─────────────────────────────────────────── */
footer { border-top: 2px solid var(--ink); padding: 2.4rem 2rem; text-align: center; }
footer p { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); margin: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) { .nav-links { display: none; } .nav-toggle { display: block; } }
@media (max-width: 900px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .col-text { column-count: 1; }
  .project-grid { grid-template-columns: 1fr; }
  main { padding: 2.5rem 1.25rem; }
  .nav-inner { padding: 0 1.25rem; }
  .banner-inner { padding: 2rem 1rem; }
}
