/* brettlanier.com: shared styles for every page */
:root {
  --bg:        #000000;
  --bg-2:      #0f0f0f;
  --ink:       #ffffff;
  --ink-soft:  #b8b8b8;
  --ink-faint: #8a8a8a;
  --rule:      #262626;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  /* Width of the home photo (60% of the screen's height at its 2400x1827 shape, at most 1040px).
     The header menu uses it too, to line up with the photo's edges. */
  --photo-w: min(calc(60vh * 2400 / 1827), 1040px);
}
@supports (height: 1svh) { :root { --photo-w: min(calc(60svh * 2400 / 1827), 1040px); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header: Home, the three page links and SteelTune in one centred row, evenly spaced,
   with space between that grows with the window ---------- */
.site-header { padding: 20px 0; }
/* Halfway between the first header's gap (22vw, up to 440px) and the tighter one (9vw, up to 200px),
   held back on mid-size windows so the five never wrap onto a second row */
.site-header { --nav-gap: clamp(28px, min(15.5vw, (100vw - 480px) / 4), 320px); }
.site-header .wrap { display: flex; justify-content: center; align-items: baseline; column-gap: var(--nav-gap); max-width: none; }
.nav { display: flex; justify-content: center; column-gap: var(--nav-gap); }
.nav a, .nav-home, .nav-app { font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"],
.nav-home:hover, .nav-home[aria-current="page"],
.nav-app:hover, .nav-app[aria-current="page"] { color: var(--ink); }
.nav .narrow { display: none; }
/* A phone: still one row and evenly spaced; "Steel guitar repair" is the one too long to fit, so it shortens */
@media (max-width: 640px) {
  .site-header .wrap { justify-content: space-evenly; column-gap: 0; padding: 0 8px; }
  .nav { display: contents; }
  .nav a, .nav-home, .nav-app { font-size: 13px; }
  .nav .wide { display: none; }
  .nav .narrow { display: inline; }
}

/* ---------- Home: the whole photo framed on black, name underneath ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(28px, 7vh, 80px) var(--gutter) clamp(48px, 8vh, 96px);
}
.hero img { height: auto; width: min(100%, var(--photo-w)); }
.hero-text { margin-top: clamp(20px, 3.5vh, 40px); }
.hero h1 + .eyebrow { margin: 18px 0 0; }   /* the small line of what he does, under the name */
.eyebrow { font: 600 12px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 14px; }
/* The name: Spectral Light (loaded on the home page only), a little smaller and drawn 6% wider than normal */
.hero h1 {
  font: 300 clamp(2.5rem, 4.45vw, 4.45rem)/.95 Spectral, var(--serif);
  letter-spacing: .015em; transform: scaleX(1.06);
  width: fit-content; margin: 0 auto;   /* the box hugs the name, so the widening can't push past the page edge */
}
@media (max-width: 760px) {
  .hero { align-items: stretch; text-align: left; }
  .hero img { width: 100%; }
  .hero h1 { margin: 0; transform-origin: left; }  /* widen from the left edge, so the name stays lined up with the photo */
  .hero h1 + .eyebrow { letter-spacing: .1em; }   /* keeps the four words on one line on a phone */
}

/* ---------- Page body: title left, content right ---------- */
section.block { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--rule); }
.page > section.block:first-child { border-top: 0; padding-top: clamp(32px, 6vw, 72px); }
section.block > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 20px clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 760px) { section.block > .wrap { grid-template-columns: 1fr; } }
/* A page with no visible title: one centred column of text instead of title-left, content-right */
section.block > .wrap.solo { display: block; max-width: calc(900px + 2 * var(--gutter)); }
.solo .bio { border-top: 0; padding-top: 0; }
.solo .page-title { margin-bottom: clamp(20px, 3vw, 32px); }   /* the SteelTune pages: room between the title and the text */
.page-title, h2 {
  font: 400 clamp(1.9rem, 3.4vw, 2.6rem)/1.05 var(--serif);
  letter-spacing: -.015em; margin: 0;
}

/* A short bio: every paragraph the same size, weight and colour */
.bio { padding-top: 18px; border-top: 1px solid var(--rule); }
.bio p { font: 300 clamp(17px, 1.6vw, 19px)/1.6 var(--serif); color: var(--ink); margin: 0 0 1em; }
.bio p:last-child { margin-bottom: 0; }
.nw { white-space: nowrap; }   /* keeps hyphenated names like all-pull on one line */

/* Small-print lists (instruments, credits): three newspaper-style columns under a small label.
   Each column flows on its own, so a name that wraps onto two lines leaves no hole beside it. */
.compact {
  list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--rule);
  column-count: 3; column-gap: 28px;
}
.compact li { font: 300 18px/1.45 var(--serif); margin-bottom: 8px; break-inside: avoid; }
@media (max-width: 560px) { .compact { column-count: 2; } }
.compact + .eyebrow { margin-top: 40px; }

/* ---------- Extra photos: one row that scrolls sideways, lined up with the page's left edge ---------- */
.photos { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--rule); }
.strip {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none;
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
.strip::-webkit-scrollbar { display: none; }
.strip img { flex: none; width: auto; max-width: none; height: clamp(220px, min(52vh, 62vw), 520px); scroll-snap-align: start; }
.strip figure { flex: none; width: min-content; margin: 0; scroll-snap-align: start; }  /* a captioned photo; the caption wraps to the photo's width */
.strip figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.strip-tall img { height: clamp(300px, min(60vh, 110vw), 560px); }  /* portrait photos need the extra height */
.strip-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.strip-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule);
  background: none; color: var(--ink); font: 400 18px/1 var(--sans); cursor: pointer;
}
.strip-nav button:hover:not(:disabled) { border-color: var(--ink); }
.strip-nav button:disabled { opacity: .3; cursor: default; }

/* ---------- A few photos in one row that fits the page, no scrolling (home, Sessions). Each photo's
   flex-grow is its width ÷ height, so all of them come out the same height and fill the row exactly. ---------- */
.photo-row { display: flex; align-items: flex-start; gap: 12px; }
.photo-row img { flex-shrink: 1; flex-basis: 0; min-width: 0; height: auto; }
/* Sessions: the row lines up with the edges of the text column above it */
.photo-row.match-text { max-width: calc(900px + 2 * var(--gutter)); }
/* Home, on phones and small tablets: the wide first photo on its own row, the other two sharing the next */
@media (max-width: 760px) {
  .photo-row.first-wide { flex-wrap: wrap; }
  .photo-row.first-wide img:first-child { flex-basis: 100%; }
}

/* ---------- For the Listen and Links pages, once there are videos and links ---------- */
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 680px) { .media-grid { grid-template-columns: 1fr; } }
.yt {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px;
  background: var(--bg-2) center / cover no-repeat;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt .play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.4);
  display: grid; place-items: center; transition: background .15s ease;
}
.yt:hover .play { background: var(--ink); }
.yt .play::before { content: ""; margin-left: 5px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--ink); }
.yt:hover .play::before { border-left-color: var(--bg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border: 1px solid var(--rule); border-radius: 10px;
  text-decoration: none; font-weight: 500; transition: border-color .15s ease, background .15s ease;
}
.links a:hover { border-color: var(--ink); background: var(--bg-2); }
.links a::after { content: "↗"; color: var(--ink-soft); }

/* ---------- Photo viewer: any photo opens large on black ---------- */
main img { cursor: zoom-in; }
html.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: var(--bg);
}
.lightbox img {
  width: auto; height: auto; cursor: zoom-out;
  max-width: calc(100vw - 32px); max-height: calc(100vh - 128px);
}
@supports (height: 1dvh) { .lightbox img { max-height: calc(100dvh - 128px); } }
.lightbox button {
  position: absolute; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--rule); background: rgba(0, 0, 0, .6);
  color: var(--ink); font: 400 20px/1 var(--sans); cursor: pointer;
}
.lightbox button:hover { border-color: var(--ink); }
.lb-close { top: 16px; right: 16px; }
.lb-prev, .lb-next { bottom: 16px; }
.lb-prev { left: calc(50% - 52px); }
.lb-next { left: calc(50% + 8px); }

footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: 14px; color: var(--ink-faint); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.footer-home { color: inherit; text-decoration: none; }
.footer-mail { color: var(--ink); font-size: 15px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.footer-mail:hover { border-bottom-color: var(--ink); }
