/*
 * Royce Magic: site styles.
 *
 * The idea: Royce's own brand is a red flaming spade on black, and the act is close-up card
 * magic. So the hero is the black studio portrait, the four show formats are drawn as
 * playing cards (suit + starting price in the corner index, the same index turned upside
 * down in the opposite corner), and everything else stays quiet white. The card-table green
 * appears once, on the booking band.
 */

@font-face {
  font-family: "Bodoni Moda";
  src: url("/static/fonts/bodoni-moda.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("/static/fonts/work-sans.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --black: #000000;
  --ink: #1c1b1a;
  --muted: #5d5a55;
  --paper: #ffffff;
  --rule: #ddd9d2;
  --red: #c70000;      /* sampled from Royce's spade logo */
  --red-dark: #9e0000;
  --felt: #1d5640;     /* close-up mat green; used only on the booking band */

  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 4vw, 2.75rem);
  --step-4: clamp(2.6rem, 5.4vw, 4.5rem);

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --wrap: 74rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}

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

a {
  color: var(--red);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--red-dark);
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
}

.skip-link:focus {
  top: 1rem;
}

.plain-list {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}

.plain-list li + li {
  margin-top: 0.35em;
}

.prose {
  max-width: 38rem;
}

.section-title {
  margin-bottom: 0.9rem;
  font-size: var(--step-3);
}

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--red);
  border-radius: 6px;
  background: var(--red);
  color: var(--paper);
  font: 500 var(--step-0) / 1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
  color: var(--paper);
}

/* Ghost buttons take their colour from the surrounding text, so one class works on the black hero and on white pages. */
.button--ghost,
.button--ghost-light {
  border-color: currentColor;
  background: transparent;
  color: inherit;
}

.button--ghost:hover,
.button--ghost-light:hover {
  border-color: currentColor;
  background: rgb(127 127 127 / 0.15);
  color: inherit;
}

.button--light {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--felt);
}

.button--light:hover {
  border-color: #e9efe9;
  background: #e9efe9;
  color: var(--felt);
}

.button--small {
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  font-size: var(--step--1);
}

/* ---------------------------------------------------------------- header */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0.75rem var(--gutter);
}

.brand img {
  width: auto;
  height: 3.25rem;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--red);
  text-decoration: underline;
}

@media (max-width: 47.99rem) {
  .site-header__inner .button--small {
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-top: 0.6rem;
    border-top: 1px solid var(--rule);
    gap: 1.25rem;
    font-size: var(--step--1);
  }
}

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

.hero {
  position: relative;
  display: grid;
  background: var(--black);
  color: var(--paper);
  overflow: hidden;
}

.hero__photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 38% 30%;
}

.hero__text {
  padding: 1.5rem var(--gutter) 3rem;
}

.hero__title {
  max-width: 15ch;
  margin-bottom: 1.25rem;
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.hero__lede {
  max-width: 34rem;
  margin-bottom: 2rem;
  color: #d6d3ce;
  font-size: var(--step-1);
  line-height: 1.5;
}

.hero :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--paper);
}

@media (min-width: 56rem) {
  /* The portrait's background is pure black, so the photo dissolves into the section with no visible edge. */
  .hero {
    grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, 40rem) minmax(0, 34rem) minmax(var(--gutter), 1fr);
    min-height: min(46rem, 82vh);
    align-items: center;
  }

  .hero__photo {
    position: absolute;
    inset: 0 0 0 auto;
    width: 72%;
    height: 100%;
    aspect-ratio: auto;
    object-position: 30% 35%;
  }

  .hero__text {
    position: relative;
    grid-column: 2;
    padding: 4rem 0;
  }
}

/* ---------------------------------------------------------------- clients */

.clients {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.clients__heading {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 500;
}

.clients__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem 2.25rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.clients__logos img {
  width: auto;
  height: 2rem;
  filter: grayscale(1);
  opacity: 0.75;
}

/* These two marks carry small text under a symbol, so they need more height to read at the same visual weight. */
.clients__logos .logo--tall {
  height: 3rem;
}

.clients__more {
  margin: 0;
  font-size: var(--step--1);
}

/* ---------------------------------------------------------------- show cards */

.shows {
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.shows--page {
  padding-top: 1rem;
}

.shows .section-title {
  margin-bottom: 2.5rem;
}

.suits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.suit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 3.75rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.04), 0 18px 30px -22px rgb(0 0 0 / 0.45);
}

.suit-card--red {
  --suit: var(--red);
}

.suit-card--black {
  --suit: var(--black);
}

/* Corner index, as on a real card: value stacked over the suit pip. */
.suit-card__index {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: flex-start;
  margin: 0 0 0.75rem;
  color: var(--suit);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}

.suit-card__pip {
  margin-top: 0.15rem;
  font-family: var(--font-body);
  font-size: 1.35rem;
}

.suit-card__index--turned {
  position: absolute;
  right: 1.25rem;
  bottom: 1rem;
  margin: 0;
  transform: rotate(180deg);
}

.suit-card__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 1.1rem;
  border-radius: 8px;
  object-fit: cover;
}

.suit-card__title {
  margin-bottom: 0.5rem;
  font-size: var(--step-2);
}

.suit-card p {
  font-size: 1rem;
}

.suit-card__link {
  margin-top: auto;
  font-weight: 500;
}

/* On wide screens the four cards sit as a hand fanned slightly from the middle; a card straightens when you reach for it. */
@media (min-width: 72rem) {
  .suits {
    grid-template-columns: repeat(4, 1fr);
  }

  .suit-card {
    transform-origin: 50% 120%;
    transition: transform 220ms ease-out;
  }

  .suit-card:nth-child(1) { transform: rotate(-2.5deg) translateY(0.75rem); }
  .suit-card:nth-child(2) { transform: rotate(-0.8deg); }
  .suit-card:nth-child(3) { transform: rotate(0.8deg); }
  .suit-card:nth-child(4) { transform: rotate(2.5deg) translateY(0.75rem); }

  .suit-card:hover,
  .suit-card:focus-within {
    transform: rotate(0) translateY(-0.5rem);
  }
}

.suits__note {
  max-width: 40rem;
  margin: 2.75rem 0 0;
  color: var(--muted);
  font-size: var(--step--1);
}

/* ---------------------------------------------------------------- photo band */

.moments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--black);
}

.moments img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.moments__wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9 !important; /* beats the band's square default, which applies to every other tile */
}

@media (min-width: 56rem) {
  .moments {
    grid-template-columns: 2fr 1fr 1fr;
    height: 30rem;
  }

  .moments img,
  .moments__wide {
    aspect-ratio: auto !important;
  }

  .moments__wide {
    grid-column: auto;
  }
}

/* ---------------------------------------------------------------- intro / about */

.intro {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.intro__inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.intro__photo {
  width: min(100%, 24rem);
  border-radius: 8px;
}

@media (min-width: 56rem) {
  .intro__inner {
    grid-template-columns: 24rem 1fr;
    gap: 4rem;
  }
}

.page-head {
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
}

.page-title {
  margin-bottom: 1rem;
  font-size: var(--step-4);
}

.page-lede {
  max-width: 40rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

.about {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 4rem;
}

.about .section-title {
  margin-top: 0.5rem;
}

.about .prose p + .section-title {
  margin-top: 2.25rem;
}

.about__photos {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.about__photos img {
  border-radius: 8px;
}

@media (min-width: 56rem) {
  .about {
    grid-template-columns: 1fr 22rem;
    gap: 4rem;
  }
}

.credentials {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--rule);
}

.credentials__intro {
  max-width: 40rem;
  color: var(--muted);
}

.credentials__list {
  margin: 2rem 0 0;
  padding: 0;
  columns: 3 17rem;
  column-gap: 2.5rem;
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.45;
}

.credentials__list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
}

/* ---------------------------------------------------------------- rates page */

.rates-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2.5rem 4rem;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.rates-notes .section-title {
  font-size: var(--step-2);
}

/* ---------------------------------------------------------------- gallery */

.gallery {
  margin: 0 0 4rem;
  padding: 0;
  columns: 3 18rem;
  column-gap: 1rem;
  list-style: none;
}

.gallery li {
  margin-bottom: 1rem;
  break-inside: avoid;
}

.gallery-link {
  display: block;
  border-radius: 6px;
  overflow: hidden;
}

.gallery-link img {
  width: 100%;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: rgb(0 0 0 / 0.94);
  color: var(--paper);
}

.lightbox[open] {
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  align-items: center;
  gap: 0.75rem;
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 0.8);
}

.lightbox__image {
  max-width: 100%;
  max-height: calc(100dvh - 9rem);
  width: auto;
  object-fit: contain;
}

.lightbox__caption {
  margin: 0;
  color: #d6d3ce;
  text-align: center;
}

.lightbox__controls {
  display: flex;
  gap: 0.75rem;
}

.lightbox__button {
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  border: 2px solid currentColor;
  border-radius: 6px;
  background: transparent;
  color: var(--paper);
  font: 500 1rem var(--font-body);
  cursor: pointer;
}

.lightbox :focus-visible {
  outline-color: var(--paper);
}

/* ---------------------------------------------------------------- contact form */

.contact {
  display: grid;
  gap: 3rem;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

@media (min-width: 60rem) {
  .contact {
    grid-template-columns: minmax(0, 40rem) 1fr;
    gap: 5rem;
  }
}

.inquiry {
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.field legend {
  padding: 0;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #8f8a82;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--red);
  outline-offset: 1px;
}

.field [aria-invalid="true"] {
  border-color: var(--red);
  border-width: 2px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.25rem;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.4rem;
}

.choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

.choice-row input {
  width: 1.2rem;
  min-height: 1.2rem;
  accent-color: var(--red);
}

.form-error {
  margin: 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--red);
  background: #fbeaea;
  color: var(--red-dark);
}

.contact__direct .section-title {
  font-size: var(--step-2);
}

/* ---------------------------------------------------------------- booking band + footer */

.cta {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  background: var(--felt);
  color: var(--paper);
}

.cta__inner p {
  max-width: 36rem;
  margin-bottom: 2rem;
  color: #dbe7df;
  font-size: var(--step-1);
}

.cta__title {
  margin-bottom: 1rem;
  font-size: var(--step-4);
}

.site-footer {
  padding: 3.5rem 0 2rem;
  background: var(--black);
  color: #c9c5bf;
  font-size: var(--step--1);
}

.site-footer a {
  color: var(--paper);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem 3rem;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-footer__brand img {
  width: 2.5rem;
  height: auto;
  margin-bottom: 1rem;
}

.site-footer__heading {
  margin-bottom: 0.75rem;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 500;
}

.site-footer__legal {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid #2e2d2b;
}

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