/* Andrew A. Watts: site styles
   Look: off-white page, black Futura-style caps for the name, letter-spaced
   Futura-style navigation, justified body copy with open tracking.
   Fonts are loaded from Google Fonts in each page's <head> (Jost ~ Futura,
   Figtree ~ Proxima Nova). To use Futura / Proxima Nova from Adobe Fonts
   instead, change the two --font-* values below. */

:root {
  --bg: #fbfbfb;
  --ink: #111111;
  --body: #222222;
  --muted: #6b6b6b;
  --rule: #dcdcdc;
  --tile: #efefef;
  --font-display: "Jost", "Futura", "Futura PT", "Century Gothic", "Trebuchet MS", sans-serif;
  --font-body: "Figtree", "Proxima Nova", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 4.3vw, 84px);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 clamp(15.5px, 1.08vw, 22px) / 1.73 var(--font-body);
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute; left: var(--pad); top: -120px;
  background: var(--ink); color: var(--bg);
  padding: 0.6em 1em; z-index: 200; text-decoration: none;
}
.skip:focus { top: 12px; }

.page {
  max-width: 2000px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-top: clamp(26px, 3.9vw, 76px);
}

.logo {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font: 700 clamp(26px, 3.4vw, 68px) / 1.03 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(14px, 1.7vw, 32px);
  padding-top: 0.45em;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: clamp(18px, 2.1vw, 42px);
  font: 400 clamp(15px, 1.2vw, 24px) / 1.2 var(--font-display);
  letter-spacing: 0.07em;
}

.menu a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0.2em 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.menu a[aria-current="page"],
.menu .is-current > a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.menu a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }

.has-sub { position: relative; }

.menu .plus { display: inline-block; margin-right: 0.35em; }

.sub {
  list-style: none;
  margin: 0;
  padding: 1em 1.5em;
  position: absolute;
  top: 100%;
  left: -1.5em;
  z-index: 30;
  display: none;
  flex-direction: column;
  gap: 0.6em;
  background: var(--bg);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
}

.has-sub:hover > .sub,
.has-sub:focus-within > .sub { display: flex; }

.social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(16px, 1.55vw, 30px);
}

.social a { display: block; color: var(--ink); }
.social a:hover { opacity: 0.6; }

.social svg {
  display: block;
  width: clamp(20px, 1.7vw, 34px);
  height: clamp(20px, 1.7vw, 34px);
  fill: currentColor;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5em 0;
  color: var(--ink);
  font: 400 1rem / 1 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- Main ---------- */

main {
  padding-block: clamp(44px, 8.9vw, 170px) clamp(64px, 8vw, 150px);
}

.page-title {
  margin: 0 0 clamp(30px, 3.4vw, 64px);
  text-align: center;
  color: var(--ink);
  font: 400 clamp(15px, 1.2vw, 24px) / 1.3 var(--font-display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.strip {
  width: 68%;
  margin: 0 auto clamp(40px, 4.7vw, 90px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 1.4%;
}

.strip img {
  display: block;
  object-position: var(--pos, center);
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--tile);
}

/* Photos that open in the full-size viewer (Bio, Composer OverTime) */
a.zoom { display: block; cursor: zoom-in; }
a.zoom img { transition: opacity 0.2s; }
a.zoom:hover img { opacity: 0.92; }
a.zoom:focus-visible { outline-offset: 3px; }

.prose,
.works,
.cindex,
.contact {
  width: 56%;
  margin-inline: auto;
}

.events,
.episodes {
  width: 64%;
  margin-inline: auto;
}

.prose { text-align: justify; }
.prose p { margin: 0 0 1.55em; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose ul { margin: 0 0 1.5em; padding-left: 1.3em; text-align: left; }
.prose li { margin: 0 0 0.5em; }
.prose a { text-underline-offset: 0.2em; }

/* ---------- Works ---------- */

.work {
  padding-block: clamp(22px, 2.3vw, 44px);
  border-top: 1px solid var(--rule);
}
.work:first-child { border-top: 0; padding-top: 0; }

.work-title {
  margin: 0 0 0.3em;
  color: var(--ink);
  font: 700 1.06em / 1.4 var(--font-body);
}
.work-title .yr { font-weight: 700; }
.work-title .dur { margin-left: 0.4em; font-weight: 400; color: var(--muted); }

.work p { margin: 0 0 0.5em; text-align: left; }
.work-meta { color: var(--body); }
.work-links { color: var(--muted); }
.work-links a { color: var(--ink); text-underline-offset: 0.2em; }
.work:target .work-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }

.embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1em 0;
  background: var(--tile);
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Composition overview ---------- */

.cindex section { padding-block: clamp(18px, 2vw, 36px); border-top: 1px solid var(--rule); }
.cindex section:first-child { border-top: 0; padding-top: 0; }
.cindex h2 { margin: 0 0 0.7em; font: 500 1.08em / 1.3 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; }
.cindex h2 a { color: var(--ink); text-decoration: none; }
.cindex h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.cindex ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2.4em; }
.cindex li { margin: 0 0 0.45em; break-inside: avoid; line-height: 1.5; }
.cindex li a { text-decoration: none; }
.cindex li a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.cindex .yr { color: var(--muted); }

/* ---------- Composer OverTime ---------- */

.ot-top {
  width: 56%;
  margin: 0 auto clamp(26px, 3vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1.78fr;
  gap: 1.6%;
  align-items: stretch;
}
.ot-top img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--tile); }
.ot-top .logo-img { object-fit: contain; background: #fff; }
.ot-top a.zoom { min-height: 0; }
.ot-social { text-align: center !important; }
.ot-social a { margin: 0 0.15em; }

.episodes { margin-top: clamp(30px, 3.4vw, 64px); }
.episode {
  display: grid;
  grid-template-columns: minmax(0, 12em) minmax(0, 1fr);
  gap: 0.8em 2em;
  padding-block: clamp(20px, 2.2vw, 40px);
  border-top: 1px solid var(--rule);
}
.episode:first-child { border-top: 0; }
.episode figure { margin: 0; }
.episode img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 25%; background: var(--tile); }
.episode h3 { margin: 0 0 0.6em; color: var(--ink); font: 500 1.08em / 1.35 var(--font-display); letter-spacing: 0.06em; }
.episode p { margin: 0; text-align: justify; }

/* ---------- Events ---------- */

.events { list-style: none; padding: 0; }
.events li {
  display: grid;
  grid-template-columns: 13em minmax(0, 1fr);
  gap: 0.4em 2em;
  padding-block: clamp(16px, 1.7vw, 30px);
  border-top: 1px solid var(--rule);
}
.events li:first-child { border-top: 0; padding-top: 0; }
.events .when { color: var(--muted); font: 400 0.95em / 1.5 var(--font-display); letter-spacing: 0.06em; }
.events .when b { display: block; color: var(--ink); font-weight: 500; }
.events h3 { margin: 0 0 0.35em; color: var(--ink); font: 700 1em / 1.45 var(--font-body); }
.events h3 em { font-weight: 400; }
.events p { margin: 0; text-align: left; }
.events a { text-underline-offset: 0.2em; overflow-wrap: anywhere; }

/* ---------- Contact ---------- */

.contact { text-align: justify; }
.contact p { margin: 0 0 1.2em; }
.contact .logo-block { margin: 1.8em 0 2.2em; text-align: center; }
.contact .logo-block img { display: inline-block; width: min(100%, 520px); height: auto; }

.cform {
  width: 65%;
  margin: 2.4em auto 0;
  text-align: left;
}
.cform fieldset { border: 0; margin: 0 0 1.6em; padding: 0; min-width: 0; }
.cform legend { padding: 0; margin: 0 0 0.35em; color: var(--ink); }
.cform .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4%; }
.cform .field { margin: 0 0 1.6em; }
.cform fieldset .field { margin: 0; }
.cform label { display: block; margin: 0 0 0.35em; color: var(--ink); }
.cform fieldset label { font-size: 0.85em; }
.cform .req { margin-left: 0.4em; color: var(--muted); font-size: 0.85em; }
.cform input[type="text"],
.cform input[type="email"],
.cform textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.7em 0.8em;
  border: 1px solid #6b6b6b;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  line-height: 1.4;
  appearance: none;
}
.cform textarea { min-height: 8.5em; resize: vertical; }
.cform input:focus-visible,
.cform textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cform .actions { text-align: center; margin-top: 0.4em; }
.cform .go {
  display: inline-block;
  padding: 1.05em 3.4em;
  border: 0;
  border-radius: 0;
  background: #222;
  color: #fff;
  cursor: pointer;
  font: 700 0.9em / 1 var(--font-body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.cform .go:hover { background: #000; }
.cform .form-note { margin: 1.4em 0 0; text-align: center; color: var(--muted); font-size: 0.92em; }
/* spam trap: real visitors never see or fill this in */
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thanks { text-align: center; }

/* ---------- Placeholder note (delete once real content is in) ---------- */

.todo {
  margin: 0 0 1.5em;
  padding: 1.1em 1.4em;
  border: 1px dashed #b5b5b5;
  color: var(--muted);
  font-size: 0.92em;
  text-align: left;
}

/* ---------- Landing pages (Composition, Photography) ---------- */

.tiles {
  width: min(100%, 1120px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 2.6vw, 48px) clamp(14px, 1.6vw, 30px);
}

.tile-card { display: block; color: var(--ink); text-decoration: none; }
.tile-card .thumb { display: block; aspect-ratio: 4 / 3; background: var(--tile); overflow: hidden; }
.tile-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.tile-card:hover img { opacity: 0.88; }
.tile-card small { display: block; margin-top: 0.9em; color: var(--muted); font: 400 0.8em / 1.2 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; }
.tile-card strong { display: block; margin-top: 0.2em; font: 500 1.05em / 1.3 var(--font-display); letter-spacing: 0.08em; }
.tile-card:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 0 clamp(28px, 3vw, 56px);
  text-align: center;
  color: var(--muted);
  font-size: 0.82em;
}

/* ---------- Photography ---------- */

.gallery {
  columns: 3;
  column-gap: clamp(10px, 1.2vw, 22px);
}

.gallery .tile {
  display: block;
  width: 100%;
  margin: 0 0 clamp(10px, 1.2vw, 22px);
  padding: 0;
  border: 0;
  background: var(--tile);
  cursor: zoom-in;
  break-inside: avoid;
}

.gallery .tile img { display: block; width: 100%; height: auto; }
.gallery .tile.gone { display: none; }
.gallery .tile:hover img { opacity: 0.92; }
.gallery .todo { column-span: all; }

/* ---------- Lightbox ---------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1em;
  padding: clamp(56px, 6vw, 100px) clamp(16px, 6vw, 120px);
  background: rgba(251, 251, 251, 0.98);
}
.lb.open { display: flex; }

.lb-figure { margin: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.8em; width: 100%; }
.lb-figure img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; display: block; transition: opacity 0.2s; }
.lb.is-loading .lb-figure img { opacity: 0.35; }
.lb-figure figcaption { color: var(--muted); font-size: 0.9em; text-align: center; min-height: 1.4em; }

.lb button {
  position: absolute;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: 400 1.1rem / 1 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.9em 1em;
}
.lb button:hover { opacity: 0.55; }
.lb .lb-close { top: 8px; right: 8px; }
.lb .lb-prev, .lb .lb-next { top: 50%; transform: translateY(-50%); font-size: 1.6rem; }
.lb .lb-prev { left: 4px; }
.lb .lb-next { right: 4px; }
.lb .lb-count { position: absolute; left: clamp(16px, 2vw, 40px); top: 18px; color: var(--muted); font-size: 0.85em; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1280px) {
  .prose, .works, .cindex, .contact { width: 70%; }
  .events, .episodes, .ot-top { width: 82%; }
  .strip { width: 82%; }
}

@media (max-width: 860px) {
  .site-header { flex-wrap: wrap; align-items: center; }
  .nav-toggle { display: block; }
  .nav-wrap {
    display: none;
    width: 100%;
    align-items: flex-start;
    padding: 0.6em 0 0;
    gap: 1.4em;
    order: 3;
  }
  .site-header.nav-open .nav-wrap { display: flex; }
  .menu { flex-direction: column; justify-content: flex-start; gap: 0.8em; font-size: 1.15rem; width: 100%; }
  .sub {
    display: flex;
    position: static;
    box-shadow: none;
    padding: 0.7em 0 0.2em 1.4em;
    background: transparent;
  }
  .gallery { columns: 2; }
}

@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .prose, .works, .cindex, .contact, .events, .episodes, .ot-top, .strip { width: 100%; }
  .cform { width: 100%; }
  .cform .row { grid-template-columns: 1fr; gap: 1em 0; }
  .contact { text-align: left; }
  .strip { grid-template-columns: repeat(2, 1fr); row-gap: 3%; column-gap: 3%; }
  .prose, .work p { text-align: left; }
  .events li { grid-template-columns: 1fr; }
  .episode { grid-template-columns: 1fr; }
  .episode figure { max-width: 11em; }
  .cindex ul { columns: 1; }
  .lb .lb-prev, .lb .lb-next { top: auto; bottom: 6px; transform: none; }
}

@media (max-width: 460px) {
  .gallery { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
