/* ─── Fonts ────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400&family=Montserrat:wght@400;500&display=swap');

/* Brandon Grotesque → Josefin Sans (closest free match) */
/* Proxima Nova → Montserrat */

/* ─── Base ─────────────────────────────────────────────────────────────── */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: brandon-grotesque, 'Josefin Sans', -apple-system, sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  color: rgb(65, 65, 65);
  background: #fff;
}

a {
  color: rgb(13, 94, 186);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3 {
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-weight: 300;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: rgb(50, 50, 50);
}

h3 {
  font-size: 1.15rem;
  font-weight: 400;
}

p {
  margin-bottom: 1.2rem;
}

/* ─── Header / Nav ─────────────────────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  transition: transform 0.3s ease;
}

header.hidden {
  transform: translateY(-100%);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-name {
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-size: 33px;
  font-weight: 300;
  color: rgb(50, 50, 50);
}

.site-name:hover {
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
}

nav a {
  font-family: proxima-nova, 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: rgb(0, 0, 0);
  padding: 0 30px;
}


nav a:hover,
nav a.active {
  color: rgb(112, 157, 209);
  text-decoration: none;
}

/* Mobile nav controls — hidden on desktop, revealed in mobile media query */
.menu-toggle,
.nav-close,
.nav-backdrop {
  display: none;
}

/* ─── Main content ─────────────────────────────────────────────────────── */

/* Page transition: fade out on nav click, fade in on load */
.page-content {
  animation: page-enter 0.5s ease-out 0.15s both;
}

.page-content.leaving {
  animation: page-leave 0.25s ease-out forwards;
}

@keyframes page-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes page-leave {
  to { opacity: 0; }
}

.content {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  max-width: 980px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.hero img {
  width: 100%;
}

/* Fade-in hero: page title shows briefly, then image fades in over it */
.home-hero,
.fade-hero {
  position: relative;
}

.home-hero {
  margin-bottom: 0;
}

.home-hero img,
.fade-hero img {
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: hero-fade-in 1.8s ease-out 1.2s forwards;
}

@keyframes hero-fade-in {
  to { opacity: 1; }
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-size: 32px;
  font-weight: 300;
  color: rgb(65, 65, 65);
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.hero-full {
  max-width: none;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.hero-full img {
  max-height: 70vh;
  width: 100%;
  object-fit: cover;
}

.intro,
.outro {
  max-width: 680px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.outro {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.film-hero {
  position: relative;
}

.film-hero img {
  max-height: none;
  height: 85vh;
  min-height: 560px;
}

.film-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 70%);
  aspect-ratio: 16 / 9;
  border: none;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

/* Blue intro band (used on gallery pages without a hero, e.g. Recent Work) */
.intro-band {
  position: relative;
  background: rgb(112, 157, 209);
  padding: 4.5rem 1.5rem;
}

.scroll-fade {
  transition: opacity 0.2s linear;
}

.intro-band-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
  font-size: 20px;
  line-height: 1.6;
}

.intro-band-inner p {
  margin-bottom: 1.4rem;
}

.intro-band-inner p:last-child {
  margin-bottom: 0;
}

.intro-band-inner a {
  color: #fff;
  text-decoration: underline;
}

.intro-band-inner a:hover {
  opacity: 0.85;
}

/* Translation page: large ES > / > EN flanking the intro text */
.translation-band .intro-band-inner {
  position: relative;
  z-index: 2;
  max-width: 470px;
}

.es-en {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 860px;
  max-width: calc(100% - 3rem);
  display: flex;
  justify-content: space-between;
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-size: 80px;
  font-weight: 300;
  line-height: 1;
  color: rgb(65, 65, 65);
  pointer-events: none;
}

.scroll-cue {
  text-align: center;
  color: rgb(100, 100, 100);
  padding: 2rem 0;
}

.scroll-cue svg {
  display: inline-block;
}

/* ─── Home page: blue bio band ─────────────────────────────────────────── */

.bio-band {
  background: rgb(112, 157, 209);
  margin-top: 5rem;
  padding: 5rem 1.5rem;
}

.bio-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.portrait {
  flex-shrink: 0;
}

.portrait img {
  width: 232px;
}

.portrait:hover img {
  opacity: 0.92;
}

.bio-text {
  flex: 1;
  color: #fff;
  font-size: 18px;
  line-height: 1.5;
}

.bio-text p {
  margin-bottom: 1.5rem;
}

/* Site-wide: **bold** in text.md renders as Regular, not heavy Bold */
strong {
  font-weight: 400;
}

.bio-text a {
  color: #fff;
  text-decoration: underline;
}

.bio-text a:hover {
  opacity: 0.85;
}

/* ─── Image grid ───────────────────────────────────────────────────────── */

.image-grid {
  max-width: 980px;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
}

.grid-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.grid-item:hover img {
  transform: scale(1.03);
}

/* ─── Lightbox ───────────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 3rem;
  gap: 2rem;
}

.lightbox[hidden] {
  display: none;
}

body:has(.lightbox:not([hidden])) header {
  visibility: hidden;
}

.lightbox.no-caption {
  justify-content: center;
}

.lightbox.no-caption .lb-caption {
  display: none;
}

.lightbox.no-caption .lb-image {
  flex: 0 1 75%;
}

.lb-image {
  flex: 0 1 55%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lb-caption {
  flex: 0 1 28%;
  max-width: 320px;
}

.lb-title {
  font-size: 30px;
  font-weight: 300;
  line-height: 1.3;
  color: rgb(50, 50, 50);
  margin-bottom: 1.2rem;
}

.lb-materials {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
  color: rgb(100, 100, 100);
  margin-bottom: 0;
}

.lb-close,
.lb-prev,
.lb-next {
  background: none;
  border: none;
  cursor: pointer;
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-weight: 100;
  color: rgb(80, 80, 80);
  padding: 0.5rem;
  line-height: 1;
}

.lb-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 56px;
}

.lb-prev,
.lb-next {
  font-size: 72px;
  flex-shrink: 0;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  color: rgb(30, 30, 30);
}

/* ─── Translation / books ──────────────────────────────────────────────── */

.books {
  max-width: 780px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
  row-gap: 5rem;
}

.book {
  text-align: center;
}

.book-cover {
  position: relative;
  margin-bottom: 2.7rem;
}

.book-cover img {
  width: 100%;
  display: block;
}

.more {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, calc(100% - 10px));
  background: rgb(126, 204, 197);
  color: #fff;
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-size: 17px;
  font-weight: 300;
  padding: 6px 0;
  width: 135px;
}

.more:hover {
  text-decoration: none;
  background: rgb(110, 188, 181);
}

.book h3 {
  font-size: 25px;
  font-weight: 400;
  color: #000;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.book .author {
  font-size: 17px;
  font-weight: 300;
  color: #000;
  margin-bottom: 0.7rem;
}

.book .quote {
  font-size: 15px;
  font-weight: 300;
  color: rgb(84, 84, 84);
  max-width: 270px;
  margin: 0 auto 0.3rem;
}

.book .quote-source {
  font-size: 15px;
  font-weight: 400;
  color: rgb(84, 84, 84);
  margin-bottom: 0;
}

/* ─── Contact ────────────────────────────────────────────────────────────── */

.contact {
  max-width: 980px;
  margin: 8rem auto 0;
  padding: 0 1.5rem;
  position: relative;
}

/* Circular portrait + Hello bubble, overlapping top of panels */
.contact-portrait {
  position: absolute;
  left: 50%;
  top: -90px;
  transform: translateX(-50%);
  z-index: 3;
}

.contact-portrait > img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1);
}

.hello-bubble {
  position: absolute;
  left: -100px;
  top: -30px;
  width: 113px;
  height: 63px;
}

.hello-bubble svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hello-bubble span {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 28px;
  font-weight: 300;
}

/* Two-panel block: photo left, blue form right */
.contact-panels {
  position: relative;
  display: flex;
  height: 529px;
}

.contact-photo {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.contact-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.contact-overlay h1 {
  font-size: 35px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.8rem;
}

.contact-overlay .underline {
  display: inline-block;
  width: 40px;
  border-top: 3px solid #fff;
}

.contact-blue {
  flex: 1;
  background: rgb(112, 157, 209);
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Gray speech-bubble SVG behind the form (flipped so tail points down-left) */
.form-bubble {
  position: absolute;
  top: 55px;
  left: 28px;
  width: 426px;
  height: 413px;
  transform: scaleX(-1);
}

.contact-form {
  position: relative;
  z-index: 2;
  width: 370px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 80px;
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row input {
  flex: 1;
  min-width: 0;
}

.contact-form input,
.contact-form textarea {
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  padding: 8px 12px;
  border: none;
  background: #fff;
  color: #000;
}

.contact-form input {
  height: 34px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgb(65, 65, 65);
}

.contact-form textarea {
  height: 153px;
  resize: none;
  line-height: 1.4;
}

.contact-form button {
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-size: 17px;
  font-weight: 300;
  width: 185px;
  height: 40px;
  background: rgb(65, 65, 65);
  color: #fff;
  border: none;
  cursor: pointer;
}

.contact-form button:hover {
  background: rgb(50, 50, 50);
}

/* ? badge at bottom, mirroring the portrait */
.contact-q {
  position: absolute;
  left: 50%;
  bottom: -70px;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  z-index: 3;
}

.contact-q > svg {
  width: 100%;
  height: 100%;
}

.q-inner {
  position: absolute;
  left: 19px;
  top: 11px;
  width: 102px;
  height: 112px;
}

.q-inner svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.q-inner span {
  position: absolute;
  left: 50%;
  top: 25%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 25px;
  font-weight: 300;
}

/* Staggered entrance: panels immediate, then portrait → Hello → ? badge → form bubble */
@keyframes contact-enter {
  to { opacity: 1; }
}

.contact-portrait > img,
.hello-bubble,
.contact-q,
.form-bubble,
.contact-form {
  opacity: 0;
  animation: contact-enter 0.5s ease-out forwards;
}

.contact-portrait > img { animation-delay: 0.3s; }
.hello-bubble           { animation-delay: 0.7s; }
.contact-q              { animation-delay: 1.1s; }
.form-bubble,
.contact-form           { animation-delay: 1.5s; }

.contact-email {
  margin-top: 6rem;
  text-align: center;
  color: rgb(120, 120, 120);
  font-size: 0.9rem;
}

/* ─── Footer ───────────────────────────────────────────────────────────── */

footer {
  max-width: 980px;
  margin: 2rem auto 0;
  padding: 2rem 1.5rem;
  text-align: center;
}

.back-to-top {
  display: inline-block;
  background: rgb(112, 157, 209);
  color: #fff;
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-size: 15px;
  font-weight: 300;
  padding: 0.7rem 1.8rem;
  border-radius: 0;
}

.back-to-top:hover {
  text-decoration: none;
  opacity: 0.9;
}

.back-to-top span {
  font-size: 0.8em;
  margin-left: 0.3em;
}

.copyright {
  font-family: brandon-grotesque, 'Josefin Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgb(65, 65, 65);
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #eee;
  text-align: right;
}

/* ─── Mobile ───────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
  }

  .site-name {
    font-size: 28px;
  }

  /* Hamburger: three staggered lines */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    width: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    height: 2px;
    background: #000;
    border-radius: 1px;
  }

  .menu-toggle span:nth-child(1) { width: 55%; }
  .menu-toggle span:nth-child(2) { width: 100%; }
  .menu-toggle span:nth-child(3) { width: 75%; align-self: flex-start; }

  /* Drawer slides in from right */
  nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 65%;
    max-width: 320px;
    padding: 5rem 1.5rem 2rem;
    background: #fff;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  body.nav-open nav {
    transform: translateX(0);
  }

  nav a {
    font-size: 20px;
    padding: 0;
  }

  .nav-close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 36px;
    font-weight: 300;
    line-height: 1;
    color: #000;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  h1 {
    font-size: 1.6rem;
  }

  .hero-overlay {
    font-size: 22px;
    white-space: normal;
    padding: 0 1rem;
  }

  .bio-band {
    margin-top: 4rem;
    padding: 3rem 1.5rem;
  }

  .bio-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .bio-text {
    order: -1;
  }

  .portrait {
    align-self: center;
  }

  .portrait img {
    width: 200px;
  }

  .es-en {
    display: none;
  }

  .books {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-template-rows: none !important;
  }

  .image-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact {
    margin-top: 0;
  }

  .contact-portrait,
  .contact-q,
  .hello-bubble {
    display: none;
  }

  .contact-panels {
    flex-direction: column;
    height: auto;
  }

  .contact-photo {
    height: 320px;
  }

  .contact-blue {
    padding: 1.25rem;
  }

  .form-bubble {
    display: none;
  }

  .contact-form {
    width: 100%;
    margin-top: 0;
  }

  .form-row {
    flex-direction: column;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
    padding: 12px 14px;
  }

  .lightbox {
    flex-direction: column;
    padding: 4rem 1.5rem 2rem;
    gap: 1.5rem;
  }

  .lb-image {
    flex: 0 1 60%;
    width: 100%;
  }

  .lb-caption {
    flex: none;
    max-width: none;
    text-align: center;
  }

  .lb-title {
    font-size: 22px;
  }

  .lb-materials {
    font-size: 16px;
  }

  .lb-prev,
  .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
  }

  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
}
