/* ==========================================================================
   Rachel Del Rio — styles
   Palette taken from the wardrobe: ink black (lace dress, blazers),
   bone and butter (fringed skirt, yellow shirt, gold bag), tomato (boots).
   ========================================================================== */

:root {
  --ink:        #14120f;
  --ink-soft:   #2a2621;
  --bone:       #f3efe6;
  --paper:      #fbf9f4;
  --smoke:      #6d6558;
  --butter:     #e6c052;
  --tomato:     #b23a2f;
  --rule:       rgba(20, 18, 15, 0.14);

  --display: "Bodoni Moda", "Didot", "Playfair Display", Georgia, serif;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --measure: 62ch;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;   /* the sticky nav's height, so jumps land below it */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--butter); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--tomato);
  outline-offset: 3px;
}

/* --- shared type ---------------------------------------------------------- */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--smoke);
  margin: 0 0 18px;
}

.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}

.lede {
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  color: var(--smoke);
  max-width: var(--measure);
  margin: 0 0 8px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bone);
  padding: 12px 18px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* hidden on screen, still read by screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- nav ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  background: rgba(251, 249, 244, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.nav__name {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  align-items: center;
}

.nav__links a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  color: var(--smoke);
  padding: 9px 0 6px;          /* 32px-tall tap target */
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav__links a:hover,
.nav__links a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }

/* phones: all four links fit once "Newsletter" shortens to "Join" */
.nav__short { display: none; }
@media (max-width: 560px) {
  .nav { gap: 10px; }
  .nav__links { gap: 14px; }
  .nav__links a { letter-spacing: 0.12em; }
  .nav__long { display: none; }
  .nav__short { display: inline; }
}
/* the narrowest phones (320–360px): a little tighter still */
@media (max-width: 360px) {
  .nav { padding-left: 16px; padding-right: 16px; }
  .nav__name { font-size: 0.95rem; }
  .nav__links { gap: 10px; }
  .nav__links a { letter-spacing: 0.06em; }
}

/* --- hero ----------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(92vh, 900px);
}

.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}

.hero__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 8.2vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0;
}
.hero__name em {
  font-style: italic;
  display: block;
}

.hero__rule {
  width: 84px;
  height: 1px;
  background: var(--ink);
  margin: 28px 0;
}

.hero__tagline {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  margin: 0 0 6px;
  font-weight: 500;
}

.hero__line {
  font-size: 1.05rem;
  color: var(--smoke);
  margin: 0 0 34px;
  max-width: 34ch;
}

.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__media {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__media { order: -1; aspect-ratio: 4 / 5; }
  .hero__text { padding-top: 40px; padding-bottom: 56px; }
}

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--tomato); border-color: var(--tomato); color: #fff; }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }

.btn--small { padding: 9px 16px; font-size: 11px; }

.btn--butter {
  background: var(--butter);
  border-color: var(--butter);
  color: var(--ink);
}
.btn--butter:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* --- sections ------------------------------------------------------------- */

.section { padding: clamp(64px, 9vw, 130px) var(--gutter); }
.section--dark { background: var(--ink); color: var(--bone); }
.section--dark .eyebrow,
.section--dark .lede { color: rgba(243, 239, 230, 0.66); }
.section--bone { background: var(--bone); }

.section__head { max-width: var(--measure); margin-bottom: clamp(36px, 5vw, 56px); }
.section__head--wide { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }

.prose p { max-width: var(--measure); margin: 0 0 1em; }

/* --- music ---------------------------------------------------------------- */

.music__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}
@media (max-width: 900px) { .music__grid { grid-template-columns: 1fr; } }

.album-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--butter);
  border: 1px solid rgba(230, 192, 82, 0.4);
  padding: 9px 16px;
  margin-top: 8px;
}
.album-note::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--butter);
}

.shows { margin: 0; padding: 0; list-style: none; }

.show {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid rgba(243, 239, 230, 0.16);
}
.show:last-child { border-bottom: 1px solid rgba(243, 239, 230, 0.16); }

.show__date {
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.1;
  white-space: nowrap;
}
.show__date span {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, 0.55);
  margin-top: 4px;
}
.show__venue { font-size: 1.05rem; font-weight: 500; }
.show__meta {
  display: block;
  font-size: 13px;
  color: rgba(243, 239, 230, 0.6);
  margin-top: 3px;
}

@media (max-width: 560px) {
  .show { grid-template-columns: 1fr; gap: 6px; }
  .show__cta { margin-top: 10px; }
}

.shows__empty {
  border-top: 1px solid rgba(243, 239, 230, 0.16);
  border-bottom: 1px solid rgba(243, 239, 230, 0.16);
  padding: 30px 0;
  color: rgba(243, 239, 230, 0.7);
  font-style: italic;
  font-family: var(--display);
  font-size: 1.15rem;
}

.video-wrap {
  margin-top: 44px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(243, 239, 230, 0.16);
}
.video-wrap iframe { width: 100%; height: 100%; border: 0; }
.video-caption { font-size: 13px; color: rgba(243, 239, 230, 0.6); margin-top: 10px; }

/* --- style grid ----------------------------------------------------------- */

/* Flex rather than a fixed grid so the last row always fills the width,
   whatever number of photos is in content.js. A lone final photo centres. */
.looks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
}

.look {
  position: relative;
  display: block;
  flex: 1 1 clamp(240px, 26%, 340px);
  max-width: 50%;
  height: clamp(340px, 38vw, 600px);
  overflow: hidden;
  background: #ded7c8;
  color: var(--bone);
  /* it is a <button>: drop the default button look */
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
.look:disabled { cursor: default; }
.look img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (hover: hover) {
  .look:hover img { transform: scale(1.04); }
}

@media (max-width: 900px) {
  .look { flex-basis: 40%; height: 58vw; }
}
@media (max-width: 520px) {
  .look { flex-basis: 44%; height: 62vw; }
}

.look__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 18px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(20, 18, 15, 0.78));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
}
.look:hover .look__caption,
.look:focus-visible .look__caption { opacity: 1; transform: none; }

/* phones and tablets: no hover, so the captions just show */
@media (hover: none) {
  .look__caption { opacity: 1; transform: none; padding: 32px 12px 10px; font-size: 11px; }
}

/* placeholder shown when a photo file is not in the images/ folder yet */
.look.is-missing,
.hero__media.is-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, #e6dfd0 0 12px, #ded7c8 12px 24px);
}
.look.is-missing img, .hero__media.is-missing img { display: none; }
.look.is-missing::after,
.hero__media.is-missing::after {
  content: attr(data-placeholder);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--smoke);
  text-align: center;
  padding: 0 14px;
}
.hero__media.is-missing { background-color: #e6dfd0; }

.looks__footer {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* --- writing -------------------------------------------------------------- */

.posts { display: grid; gap: 2px; }

.post {
  display: block;
  text-decoration: none;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.post:last-child { border-bottom: 1px solid var(--rule); }
.post > * { transition: transform 0.25s ease; }
@media (hover: hover) {
  .post:hover > * { transform: translateX(10px); }
}
.post__arrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.6em;
  margin-left: 0.35em;
  vertical-align: 0.3em;
  color: var(--smoke);
  transition: transform 0.25s ease, color 0.2s;
}
.post:hover .post__arrow { color: var(--tomato); transform: translate(2px, -2px); }

.post__title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.16;
  margin: 0 0 8px;
}
.post:hover .post__title { color: var(--tomato); }
.post__blurb { color: var(--smoke); max-width: var(--measure); margin: 0; }
.post__date {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--smoke);
  margin: 0 0 10px;
}

/* --- newsletter ----------------------------------------------------------- */

.signup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 860px) { .signup { grid-template-columns: 1fr; } }

.signup__form { display: flex; flex-wrap: wrap; gap: 10px; }

.signup__form input[type="email"] {
  flex: 1 1 240px;
  font-family: var(--sans);
  font-size: 16px;
  padding: 13px 16px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}
.signup__form input[type="email"]::placeholder { color: var(--smoke); }

.signup__note { font-size: 13px; color: var(--smoke); margin: 14px 0 0; }

/* --- footer --------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: rgba(243, 239, 230, 0.7);
  padding: 56px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer a { color: var(--bone); text-decoration: none; }
.footer a:hover { color: var(--butter); }

.footer__social { display: flex; gap: 6px; align-items: center; margin-left: -11px; }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
.footer__social svg { width: 22px; height: 22px; }

.footer__legal {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer__legal a { display: inline-block; padding: 8px 0; }

/* --- photo viewer --------------------------------------------------------- */

html.has-lightbox { overflow: hidden; }   /* page behind stays put */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--ink);       /* solid: the page behind would compete with the photo */
  color: var(--bone);
  display: none;
  grid-template-rows: 1fr auto;
  overscroll-behavior: contain;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: transparent; }

.lightbox__stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 72px 8px;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__img.is-loaded { opacity: 1; }

.lightbox__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px 22px;
  padding: 14px var(--gutter) max(20px, env(safe-area-inset-bottom));
  text-align: center;
}
.lightbox__caption {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.25rem;
}
.lightbox__count {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(243, 239, 230, 0.66);
}
.lightbox__ig {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--butter);
  text-decoration: none;
  padding: 6px 0;
}
.lightbox__ig:hover { text-decoration: underline; }

/* controls: 48px targets, quiet until hovered */
.lightbox__close,
.lightbox__nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bone);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 50%;
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
}
.lightbox__close:hover,
.lightbox__nav:hover { opacity: 1; background: rgba(243, 239, 230, 0.1); }
.lightbox__close svg,
.lightbox__nav svg {
  width: 26px; height: 26px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.lightbox__close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 10px;
  z-index: 2;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }

/* phones: photo uses the full width, arrows sit low over it, swipe also works */
@media (max-width: 640px) {
  .lightbox__stage { padding: 60px 0 0; }
  .lightbox__nav {
    top: auto;
    bottom: 10px;
    transform: none;
    background: rgba(20, 18, 15, 0.55);
  }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
}

/* --- entrance ------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.8s ease; }

/* printing (or saving as PDF) never scrolls, so nothing would fade in:
   show everything, and drop the parts that make no sense on paper */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .nav, .lightbox, .signup__form, .hero__ctas, .looks__footer { display: none !important; }
  .section--dark, .footer { background: #fff !important; color: #000 !important; }
}
