/* =====================================================================
   Francisco Couto — site styles
   One stylesheet for every page. Colours and fonts live in :root below;
   change a value there and the whole site follows.
   ===================================================================== */

/* ---------- Fonts (self-hosted, see assets/fonts) ---------- */
@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Code Pro";
  src: url("../fonts/source-code-pro.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Colours carried over from the original site */
  --teal: #496566;          /* header, feature bands, headings */
  --teal-light: #63888a;    /* lighter teal, gradients */
  --sage: #94bd84;          /* hover / highlight */
  --sage-light: #cbe5bf;    /* sage text on teal (readable contrast) */
  --paper: #f3f3f2;         /* light sections */
  --paper-deep: #e4e4e2;    /* alternate light sections */
  --ink: #1d1e20;           /* body text on light */
  --ink-soft: #4a4c50;      /* secondary text on light */
  --white: #ffffff;
  --on-dark-soft: rgba(255, 255, 255, 0.78);
  --line-dark: rgba(255, 255, 255, 0.28);
  --line-light: rgba(29, 30, 32, 0.16);

  --font-body: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Source Code Pro", ui-monospace, Menlo, monospace;

  --page-width: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  min-height: 100vh; display: flex; flex-direction: column;
  line-height: 1.7;
  font-variant-numeric: lining-nums; /* Raleway's default old-style numbers look odd in dates */
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
strong, b, label, .button, .nav a { font-weight: 400; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 300; line-height: 1.15; margin: 0; letter-spacing: 0.01em; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--white); color: var(--ink); padding: 10px 16px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.section--paper :focus-visible, .section--deep :focus-visible { outline-color: var(--teal); }

.wrap { width: 100%; max-width: var(--page-width); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--teal { background: var(--teal); color: var(--white); }
.section--paper { background: var(--paper); }
.section--deep { background: var(--paper-deep); }
.section--contact { background: linear-gradient(88deg, #000 0%, var(--teal) 100%); color: var(--white); }

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-title--center { text-align: center; }
.section--teal .section-title,
.section--contact .section-title { color: var(--white); }

.eyebrow {
  display: block;
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 12px 40px;
  border: 1px solid currentColor;
  font: inherit; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--teal); background: transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.button:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }
.button--solid { background: var(--ink); border-color: var(--ink); color: var(--white); }
.button--solid:hover { background: var(--sage); border-color: var(--sage); color: var(--ink); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--teal); color: var(--white);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; gap: 24px;
}
.logo {
  font-family: var(--font-mono); font-weight: 300; font-size: 1.25rem;
  letter-spacing: 0.08em; text-decoration: none; white-space: nowrap;
}
.nav ul { display: flex; flex-wrap: wrap; gap: 8px 36px; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--sage-light); }
.nav a[aria-current="page"] { color: var(--sage-light); border-bottom-color: var(--sage-light); }

.nav-toggle {
  display: none; background: none; border: 0; color: inherit; cursor: pointer;
  padding: 10px; margin-right: -10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 24px; height: 1.5px; background: currentColor; position: relative;
  transition: transform .25s, background-color .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .js .nav-toggle { display: block; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--teal); border-top: 1px solid var(--line-dark);
    display: none;
  }
  .js .nav-open .nav { display: block; }
  .js .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .js .nav a { display: block; padding: 14px 0; font-size: 1rem; border-bottom: 0; }
  /* Without JavaScript the links simply wrap under the logo */
  html:not(.js) .site-header { position: static; }
  html:not(.js) .site-header .wrap { flex-direction: column; align-items: flex-start; padding-top: 16px; padding-bottom: 16px; }
}

/* ---------- Home: hero ---------- */
.hero { background: var(--teal); color: var(--white); padding: clamp(24px, 4vw, 48px) 0 clamp(64px, 9vw, 110px); }
.hero .wrap { display: grid; grid-template-columns: 5fr 7fr; align-items: start; }
.hero-photo { grid-column: 1; grid-row: 1; }
.hero-photo img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.hero-text {
  grid-column: 2; grid-row: 1;
  justify-self: stretch; text-align: right;
  margin-top: clamp(16px, 4vw, 48px);
  margin-left: clamp(-140px, -9vw, -48px); /* the name crosses the photo edge, as on the original site */
  position: relative; z-index: 1;
}
.hero-name {
  font-size: clamp(3rem, 8.4vw, 7rem); font-weight: 300; line-height: 1.05;
  text-transform: uppercase; letter-spacing: 0.01em; text-align: left;
}
.hero-name span { display: block; }
.hero-role {
  display: inline-block; margin-top: clamp(20px, 3vw, 36px);
  padding-top: clamp(14px, 2vw, 20px); border-top: 3px solid var(--white);
  min-width: min(400px, 60vw);
  font-size: clamp(1.1rem, 2vw, 1.6rem); letter-spacing: 0.12em; text-transform: uppercase;
}
.hero-tagline {
  margin-top: 28px; max-width: 30ch; margin-left: auto;
  color: var(--on-dark-soft); font-size: 0.95rem; line-height: 1.6;
}

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-text { grid-column: 1; grid-row: 2; justify-self: stretch; text-align: left; margin: 32px 0 0; }
  .hero-photo { max-width: 420px; }
  .hero-tagline { margin-left: 0; }
}

/* ---------- Home: biography teaser ---------- */
.split { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 7vw, 110px); align-items: center; }
.split-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.split-body { max-width: 34rem; }
.split-body .section-title { margin-bottom: 28px; }
.split-body .button { margin-top: 16px; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split-media { max-width: 420px; }
}

/* ---------- Home: release band ---------- */
.release { padding: clamp(40px, 6vw, 64px) 0; }
.release .wrap { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.release-title { font-size: clamp(1.6rem, 3vw, 2.2rem); text-transform: uppercase; color: var(--sage-light); margin-bottom: 18px; }
.release-meta { margin: 0; color: var(--on-dark-soft); font-size: 0.9rem; line-height: 1.6; }
.release-meta strong { display: block; color: var(--white); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.release iframe { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; }
.spotify-card {
  display: flex; align-items: center; gap: 20px; height: 152px; padding: 16px;
  background: rgba(0, 0, 0, .22); border-radius: 12px; text-decoration: none; color: var(--white);
  transition: background-color .2s;
}
.spotify-card:hover { background: rgba(0, 0, 0, .34); }
.spotify-card img { width: 120px; height: 120px; border-radius: 6px; flex: none; }
.spotify-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.spotify-title { font-size: 1.15rem; }
.spotify-sub { font-size: 0.85rem; color: var(--on-dark-soft); }
.spotify-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage-light); }
.spotify-play { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--sage-light); flex: none; }
.spotify-play::after { content: ""; position: absolute; left: 12px; top: 9px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--teal); }
@media (max-width: 420px) { .spotify-card img { width: 88px; height: 88px; } .spotify-card { gap: 14px; } }
@media (max-width: 760px) { .release .wrap { grid-template-columns: 1fr; } }

/* ---------- Videos (click to load) ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 32px); }
@media (max-width: 760px) { .video-grid { grid-template-columns: 1fr; } }
.video figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--ink-soft); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-frame > a:focus-visible { outline-offset: -4px; outline-color: var(--sage); }
.video-frame > a, .video-frame > button {
  position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0;
  background: #000; cursor: pointer; color: var(--white);
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .3s, transform .6s; }
.video-frame > *:hover img { opacity: 1; transform: scale(1.02); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .7);
  transition: background-color .2s, transform .2s;
}
.play::after {
  content: ""; position: absolute; left: 29px; top: 23px;
  border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff;
}
.video-frame > *:hover .play, .video-frame > *:focus-visible .play { background: var(--teal); transform: scale(1.06); }
.center-action { text-align: center; margin-top: clamp(40px, 5vw, 56px); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-intro p { color: var(--on-dark-soft); max-width: 28rem; }

.socials { display: flex; gap: 22px; list-style: none; margin: 28px 0 0; padding: 0; }
.socials a { display: block; color: var(--white); transition: color .2s, transform .2s; }
.socials a:hover { color: var(--sage); transform: translateY(-2px); }
.socials svg { width: 28px; height: 28px; display: block; }

.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: var(--on-dark-soft); }
.field label .req { color: var(--sage); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--white); border: 1px solid transparent; border-radius: 4px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--sage); outline-offset: 1px; }
.form .button { justify-self: start; }
.form-status { min-height: 1.5em; margin: 0; font-size: 0.95rem; }
.form-status[data-state="ok"] { color: var(--sage-light); }
.form-status[data-state="error"] { color: #ffd0bf; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- About ---------- */
.prose { max-width: 46rem; margin: 0 auto; }
.prose p { text-align: left; }
.bio-intro { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(28px, 5vw, 56px); align-items: start; margin-bottom: clamp(32px, 5vw, 56px); }
.bio-intro img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
@media (max-width: 640px) { .bio-intro { grid-template-columns: 1fr; } .bio-intro img { max-width: 360px; } }
.bio-figure { margin: clamp(40px, 6vw, 72px) auto; max-width: 40rem; }
.bio-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.credit { font-size: 0.8rem; color: var(--ink-soft); margin-top: 10px; }

.highlights {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px);
  margin: 0 0 clamp(48px, 7vw, 72px); padding: 0; list-style: none;
}
.highlights li { border-top: 1px solid var(--teal); padding-top: 14px; font-size: 0.92rem; line-height: 1.5; color: var(--ink-soft); }
.highlights strong { display: block; color: var(--teal); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
@media (max-width: 640px) { .highlights { grid-template-columns: 1fr; } }

/* ---------- Events ---------- */
.event-list { list-style: none; margin: 0 auto; padding: 0; max-width: 46rem; border-top: 1px solid var(--line-light); }
.event { display: grid; grid-template-columns: 7.5rem 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line-light); }
.event-date { color: var(--teal); line-height: 1.2; }
.event-date .day { display: block; font-size: 2.2rem; font-weight: 300; }
.event-date .month { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
.event .event-title { font-size: 1.25rem; font-weight: 400; margin-bottom: 6px; }
.event p { margin: 0; color: var(--ink-soft); }
.event .tag {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--line-light);
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; vertical-align: middle; color: var(--ink-soft);
}
.past-title { font-size: 1.4rem; text-transform: uppercase; color: var(--teal); text-align: center; margin: clamp(56px, 8vw, 88px) 0 28px; }
.event-empty { text-align: center; color: var(--ink-soft); padding: 26px 0; border-bottom: 1px solid var(--line-light); margin: 0; }
@media (max-width: 520px) { .event { grid-template-columns: 1fr; gap: 6px; } .event-date .day { display: inline; font-size: 1.6rem; margin-right: 8px; } }

/* ---------- Gallery ---------- */
.gallery { columns: 3 280px; column-gap: 16px; }
.gallery a { display: block; margin-bottom: 16px; break-inside: avoid; overflow: hidden; }
.gallery img { width: 100%; transition: transform .6s, opacity .3s; }
.gallery a:hover img { transform: scale(1.03); }

.lightbox {
  padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; color: var(--white);
}
.lightbox::backdrop { background: rgba(10, 12, 12, .97); }
html:has(dialog[open]) { overflow: hidden; }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 72px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox figcaption { margin-top: 14px; font-size: 0.85rem; color: var(--on-dark-soft); text-align: center; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--white); cursor: pointer;
  font: inherit; font-size: 2rem; line-height: 1; padding: 14px; opacity: .8;
}
.lightbox button:hover { opacity: 1; color: var(--sage); }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox figure { padding: 56px 12px; } .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; } }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(88deg, #000 0%, var(--teal) 100%); color: var(--white); padding: 32px 0; border-top: 1px solid var(--line-dark); font-size: 0.85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-footer .socials { margin: 0; }
.site-footer .socials svg { width: 24px; height: 24px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Text for screen readers only */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.event-list--past .tag { display: none; } /* "tbc" etc. is meaningless once the date has passed */

.nowrap { white-space: nowrap; }
