/* ============================================================
   VALENTINE SINGS JAZZ
   Measurements are taken from the 1920×1080 reference screens
   and expressed in vw / svh so the composition holds at any size.
   ============================================================ */

@font-face {
  font-family: "Instrument Sans";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* colour — sampled from the supplied glyphs and reference screens */
  --pink: #fc2a69;
  --black: #111110;
  --cream: #f7f3df;        /* hero paper */
  --paper: #fffef6;        /* content plane */
  --paper-shade: #efe9cf;  /* placeholders only */

  /* type — swap the first family when the licensed face arrives */
  --font-sans: "Neue Haas Grotesk Text", "Helvetica Neue", Helvetica, "Instrument Sans", Arial, sans-serif;

  --size-body: clamp(15px, 1.13vw, 22px);
  --size-nav: clamp(19px, 1.62vw, 32px);
  --size-caption: clamp(15px, 1.2vw, 23px);
  --size-small: clamp(12px, 0.8vw, 15px);

  --peek: 0px;                         /* content plane = exactly one full viewport; hero fully out of view */
  /* portrait width — keep in sync with COMPOSITION.figure in data/composition.js */
  --img-w: min(57svh, 78vw);
  --img-aspect: 1.27485;               /* portrait height ÷ width (986 × 1257) */
  /* microphone box, in portrait widths (COMPOSITION.mic) */
  --mic-x: 0.192; --mic-y: 0.348; --mic-w: 0.136;
  --gutter: 9vw;                       /* text margin */
  --square: clamp(26px, 1.8vw, 36px);  /* social squares */
  --stage-bottom: 6.5svh;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
}
@supports not (height: 1svh) {
  :root { --stage-bottom: 6.5vh; --img-w: min(57vh, 78vw); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--pink); color: var(--paper); padding: 8px 12px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------ HERO */

.hero {
  position: relative;
  height: 100vh;                       /* exactly one viewport; svh ignores mobile browser chrome */
  height: 100svh;
  background: var(--cream) url("../img/background.jpg") center / cover no-repeat;
  overflow: clip;
}
@supports (background-image: image-set(url("a.avif") type("image/avif"))) {
  .hero {
    background-image: image-set(
      url("../img/background.avif") type("image/avif"),
      url("../img/background.webp") type("image/webp"),
      url("../img/background.jpg") type("image/jpeg"));
  }
}

.hero__portrait-wrap {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 50%;
  width: var(--img-w);
  aspect-ratio: 1 / var(--img-aspect); /* reserves the box before the image arrives: no CLS */
  transform: translateX(-50%);
}
.hero__portrait {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* the microphone: fixed to the viewport, in front of Valentine, under the content plane */
.hero__mic-wrap {
  position: fixed;
  z-index: 2;
  left: calc(50vw - var(--img-w) / 2 + var(--img-w) * var(--mic-x));
  top: calc(100svh - var(--img-w) * var(--img-aspect) + var(--img-w) * var(--mic-y));
  width: calc(var(--img-w) * var(--mic-w));
  pointer-events: none;
}
@supports not (height: 1svh) { .hero__mic-wrap { top: calc(100vh - var(--img-w) * var(--img-aspect) + var(--img-w) * var(--mic-y)); } }
.hero__mic { width: 100%; height: auto; }
.hero__mic-wrap.is-offstage { visibility: hidden; }

.hero__tagline {
  position: absolute;
  z-index: 1;
  right: 8.6vw;
  bottom: 4.6svh;
  font-size: clamp(15px, 1.45vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* the hanging word */
.letters { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hero .letters--world { z-index: 2; }
.letters--world { overflow: hidden; }
.letters--fixed { position: fixed; }
.letters--fixed:empty { display: none; }
.glyph {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  will-change: transform;
  fill: var(--pink);
  overflow: visible;
}
.glyph--fade { transition: opacity .32s ease; }
.glyph--hidden { opacity: 0; }

/* ------------------------------------------------------------ CONTENT PLANE */

.stage {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--peek));
  min-height: calc(100svh - var(--peek));
  padding-bottom: max(var(--stage-bottom), env(safe-area-inset-bottom));
  background: var(--paper);
  outline: none;
}

.stage__nav {
  display: flex;
  justify-content: center;
  padding-top: 6.2svh;
  font-size: var(--size-nav);
  font-weight: 500;
  letter-spacing: -0.025em;
}
.stage__nav a {
  display: block;
  min-width: 9.6vw;
  padding: 6px 1.2vw;
  text-align: center;
  text-decoration: none;
  transition: color .18s ease, transform .25s var(--ease-out);
}
.stage__nav a:hover { color: var(--pink); transform: translateY(-2px); }
.stage__nav a[aria-current="page"] { color: var(--pink); }

.stage__panels { flex: 1; position: relative; }
.panel { animation: panel-in .38s var(--ease-out) both; }
.panel[hidden] { display: none; }
.panel.is-leaving { animation: panel-out .14s ease-in both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes panel-out { to { opacity: 0; transform: translateY(-6px); } }

/* ABOUT */
.panel--about { padding: 19.5svh var(--gutter) 12svh; }
.bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 5.1vw;
}
.bio p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.bio p + p { margin-top: 1.3em; }
.hl { font-style: normal; color: var(--pink); }

/* PINK SQUARES — one component for the social links, the carousel arrows and the modal close */
.square {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--square);
  height: var(--square);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--pink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  transition: transform .28s var(--ease-out), opacity .2s ease;
}
.square svg { width: 60%; height: 60%; display: block; }
.square:hover, .square:focus-visible { transform: translate(-1px, -3px) rotate(-5deg); }
.square:active { transform: translateY(1px) rotate(0); transition-duration: .1s; }
.square:disabled { opacity: .35; cursor: default; transform: none; }
.square__label {
  position: absolute;
  left: 50%; bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--black);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s var(--ease-out);
}
.square:hover .square__label, .square:focus-visible .square__label { opacity: 1; transform: translate(-50%, 0); }
.square:disabled .square__label { display: none; }

.socials {
  display: flex;
  gap: calc(var(--square) * .34);
  margin: auto 0 0;
  padding: 0 0 0 8.9vw;
  list-style: none;
}
.socials li:nth-child(2) .square:hover, .socials li:nth-child(2) .square:focus-visible { transform: translateY(-4px) rotate(4deg); }
.socials li:nth-child(3) .square:hover, .socials li:nth-child(3) .square:focus-visible { transform: translate(1px, -3px) rotate(-3deg); }

/* MUSIC */
.panel--music { padding-top: 15svh; padding-bottom: 7svh; }
.carousel { --card-w: 39vw; --gap: 1.25vw; --inset: 7.25vw; }
.carousel__track {
  display: flex;
  gap: var(--gap);
  margin: 0;
  padding: 0 var(--inset);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--inset);
  scrollbar-width: none;
  cursor: grab;
  outline-offset: 6px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.carousel__track.is-animating { scroll-snap-type: none; }
.carousel__item { flex: 0 0 var(--card-w); scroll-snap-align: start; }

.card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-shade);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
  -webkit-user-drag: none;
  user-select: none;
}
.card:hover .card__media img { transform: scale(1.02); }
.card__placeholder {
  position: absolute; inset: 0;
  display: none;
  align-content: end;
  justify-items: start;
  padding: 14px 16px;
  gap: 2px;
  font-size: var(--size-small);
  color: rgba(17, 17, 16, .55);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(17,17,16,.035) 14px 15px),
    var(--paper-shade);
}
.card__media.is-missing img { display: none; }
.card__media.is-missing .card__placeholder { display: grid; }
.card__play {
  position: absolute;
  left: 50%; top: 50%;
  width: clamp(48px, 4.1vw, 80px);
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(38, 38, 36, .42);
  transform: translate(-50%, -50%);
  transition: background-color .2s ease, transform .3s var(--ease-out);
}
.card__play svg { width: 34%; fill: var(--paper); margin-left: 6%; }
.card:hover .card__play, .card:focus-visible .card__play { background: var(--pink); transform: translate(-50%, -50%) scale(1.06); }
.card__title {
  display: block;
  margin-top: 1.55vw;
  padding-left: 3px;
  font-size: var(--size-caption);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.card:hover .card__title { color: var(--pink); }

.carousel__controls {
  position: absolute;
  right: 13.6vw;
  bottom: calc(-1 * var(--square));
  display: flex;
  gap: calc(var(--square) * .34);
}
.carousel__btn[data-dir="1"]:hover, .carousel__btn[data-dir="1"]:focus-visible { transform: translate(1px, -3px) rotate(4deg); }

/* CONTACT */
.panel--contact { padding: 16svh 6vw 6svh; }
.enquiry { width: min(100%, max(34vw, 560px)); margin: 0 auto; }
.enquiry__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--black);
  border-left: 1px solid var(--black);
}
.field { position: relative; }
.enquiry__grid .field {
  display: flex;
  flex-direction: column;
  min-height: 62px;
  padding: 9px 12px 8px;
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  background: transparent;
  transition: background-color .2s ease;
}
.enquiry__grid .field::after {       /* the rule turns pink on focus */
  content: "";
  position: absolute; left: -1px; right: -1px; bottom: -1px;
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.enquiry__grid .field:focus-within::after { transform: scaleX(1); }
.enquiry__grid .field:focus-within label { color: var(--pink); }
.field--half { grid-column: span 2; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: var(--size-small);
  font-weight: 500;
  letter-spacing: .01em;
  transition: color .2s ease;
}
.field .opt { opacity: .45; font-weight: 400; margin-left: .3em; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 30px;
  margin-top: 2px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: clamp(15px, 1.05vw, 19px);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field input[type="date"] { min-height: 30px; }
.field input::-webkit-date-and-time-value { text-align: left; }
.field textarea { resize: vertical; min-height: 7.5em; line-height: 1.35; }
.field select { cursor: pointer; padding-right: 22px; }
.field select:invalid { color: rgba(17, 17, 16, .45); }
.field--select::before {
  content: "";
  position: absolute;
  right: 14px; bottom: 21px;
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
  transition: transform .3s var(--ease-out), color .2s ease;
}
.field--select:focus-within::before { transform: translateY(4px) rotate(225deg); color: var(--pink); }

.field__msg {
  min-height: 0;
  font-size: var(--size-small);
  color: var(--pink);
  line-height: 1.25;
}
.field__msg:empty { display: none; }
.field.is-invalid label { color: var(--pink); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
  margin-top: 18px;
  font-size: var(--size-small);
  line-height: 1.4;
}
.consent .field__msg { grid-column: 2; }
.consent a { color: inherit; text-underline-offset: 2px; }
.consent a:hover { color: var(--pink); }
.consent input {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  margin: 1px 0 0;
  border: 1px solid var(--black);
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.consent input::after {
  content: "";
  width: 5px; height: 9px;
  margin-top: -2px;
  border-right: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(45deg) scale(0);
  transition: transform .22s var(--ease-out);
}
.consent input:checked { background: var(--pink); border-color: var(--pink); }
.consent input:checked::after { transform: rotate(45deg) scale(1); }
.consent label { cursor: pointer; }

.enquiry__status { margin-top: 16px; font-size: var(--size-small); text-align: center; }
.enquiry__status:empty { display: none; }
.enquiry__status a { color: var(--pink); }

.enquiry__send {
  display: block;
  margin: 3.4vw auto 0;
  padding: .02em .36em .1em;
  border: 0;
  border-radius: 0;
  background: var(--pink);
  color: var(--paper);
  font-size: clamp(20px, 1.62vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 3px 0 var(--black);
}
.enquiry__send:hover { transform: translateY(-1px) rotate(-1.5deg); box-shadow: 0 4px 0 var(--black); }
.enquiry__send:active { transform: translateY(3px); box-shadow: 0 0 0 var(--black); }
.enquiry__send[aria-busy="true"] { opacity: .6; pointer-events: none; }

.thanks { text-align: center; padding-top: 4svh; outline: none; }
.thanks__big {
  font-size: clamp(44px, 5vw, 96px);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--pink);
  animation: thanks-in .7s var(--ease-out) both;
}
.thanks__heart { display: inline-block; animation: heart 1.4s ease-in-out .5s 2; }
.thanks p + p { margin-top: .4em; font-size: var(--size-nav); font-weight: 500; }
@keyframes thanks-in { from { opacity: 0; transform: translateY(14px) rotate(-3deg); } }
@keyframes heart { 50% { transform: scale(1.18) rotate(8deg); } }

/* ------------------------------------------------------------ VIDEO MODAL */

.video-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 5vw; }
.video-modal[hidden] { display: none; }
.video-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(247, 243, 223, .96);
  animation: fade .25s ease both;
}
.video-modal__dialog {
  position: relative;
  width: min(100%, calc((100svh - 10vw - 64px) * 16 / 9), 1400px);
  animation: modal-in .35s var(--ease-out) both;
}
.video-modal__frame { position: relative; aspect-ratio: 16 / 9; background: var(--black); }
.video-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-modal__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.video-modal__title { font-size: var(--size-caption); font-weight: 500; }
.video-modal__close { flex: none; width: 44px; height: 44px; }
.video-modal__close svg { width: 50%; height: 50%; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: square; fill: none; }
.video-modal__close:hover, .video-modal__close:focus-visible { transform: rotate(90deg); }
html.modal-open { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }

/* ------------------------------------------------------------ RESPONSIVE */

@media (max-width: 1024px) {
  .carousel { --card-w: 56vw; --gap: 2vw; --inset: 6vw; }
  .carousel__controls { right: 6vw; }
  .card__title { margin-top: 12px; }
}

@media (max-width: 700px) {
  :root {
    --gutter: 6vw; --stage-bottom: 5svh;
    --img-w: min(62svh, 112vw);              /* COMPOSITION.mobile.figure */
    --mic-x: 0.220; --mic-y: 0.411; --mic-w: 0.127;
  }
  .hero__tagline {
    right: 0; left: 0; bottom: auto;
    top: max(3.2svh, env(safe-area-inset-top));
    text-align: center;
    font-size: clamp(17px, 5vw, 21px);
  }
  .stage__nav { padding-top: 4.5svh; }
  .stage__nav a { width: auto; min-width: 0; padding: 10px 4.5vw; }
  .panel--about { padding-top: 9svh; padding-bottom: 8svh; }
  .bio { grid-template-columns: 1fr; row-gap: 1.3em; }
  .bio p { text-align: left; }
  .socials { padding-left: 6vw; }
  .panel--music { padding-top: 8svh; }
  .carousel { --card-w: 84vw; --gap: 3vw; --inset: 6vw; }
  .panel--contact { padding: 7svh 5vw 4svh; }
  .enquiry { width: 100%; }
  .enquiry__grid { grid-template-columns: 1fr 1fr; }
  .field--half { grid-column: 1 / -1; }
  .field input, .field select, .field textarea { min-height: 36px; font-size: 16px; } /* 16px stops iOS zoom */
  .consent input { width: 22px; height: 22px; }
  .enquiry__send { margin-top: 28px; min-height: 48px; padding: 0 .6em; }
  .video-modal { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .glyph--fade { transition-duration: .45s !important; }
  html { scroll-behavior: auto; }
}
