/* ==========================================================================
   Firepit Comedy — site styles
   Brand law: ../../BRAND.md  (charcoal dominates, cream carries type,
   ember is the recognition colour and is used sparingly, leaf is restrained.)
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "Lora Firepit";
  src: url("../fonts/lora-bold.woff2") format("woff2"),
       url("../fonts/Lora-Firepit-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lora Firepit";
  src: url("../fonts/lora-semibold.woff2") format("woff2"),
       url("../fonts/Lora-Variable.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Google serves one variable latin file covering 600–700. */
@font-face {
  font-family: "Archivo Narrow";
  src: url("../fonts/archivo-narrow.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  --charcoal:      #17130F;
  --charcoal-lift: #1F1913;   /* one step up, for quiet section separation */
  --cream:         #F3E8D0;
  --ember:         #F36B2B;
  --leaf:          #65734A;

  --cream-70: rgba(243, 232, 208, 0.70);
  --cream-45: rgba(243, 232, 208, 0.45);
  --cream-16: rgba(243, 232, 208, 0.16);

  --display: "Lora Firepit", Lora, Georgia, "Times New Roman", serif;
  --info: "Archivo Narrow", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.5rem, 5vw, 5.5rem);
  --measure: 62rem;
  --gap: clamp(0.5rem, 1.1vw, 1rem);
  --section-space: clamp(4rem, 8vw, 7rem);
}

/* --- Base ----------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, picture { display: block; max-width: 100%; }

a { color: var(--ember); text-decoration: none; }

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

::selection { background: var(--ember); color: var(--charcoal); }

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

/* --- Type ----------------------------------------------------------------- */

.display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-transform: lowercase;
  margin: 0;
  text-wrap: balance;
}

.display--hero  { font-size: clamp(2.9rem, 9vw, 7.4rem); }
.display--section { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 0.95; }
.display--date  { font-size: clamp(2.6rem, 8vw, 6rem); }

/* Information type: Archivo Narrow, uppercase, tracked slightly open. */
.info {
  font-family: var(--info);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.4;
  font-size: 0.78rem;
}

.info--sm { font-size: 0.68rem; letter-spacing: 0.18em; }

.eyebrow {
  font-family: var(--info);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--ember);
  margin: 0 0 clamp(1rem, 2.5vw, 1.75rem);
}

/* --- Shell ---------------------------------------------------------------- */

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

.section { padding-block: var(--section-space); }

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(100svh, 62rem);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The 16:9 crop is already framed on the subject: the comic's head sits ~5%
     down, the base of the firepit ~76%, and the pair spans 33-75% across. A
     short, wide window crops height, so hold the top or it decapitates him;
     the fire has room to spare below. A tall window crops width, so centre on
     54% and both stay in. */
  object-position: 54% 15%;
}

/* Below 48rem <picture> has already swapped in the 9:16 crop, which is framed
   on the subject, so it wants a plain centre crop. */
@media (max-width: 48rem) {
  .hero__media img { object-position: 50% 50%; }
}

/* Charcoal treatment: a flat wash so the photo sits in the brand's night,
   plus a bottom fall-off so the page dissolves into the charcoal below. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to top,
      var(--charcoal) 0%,
      rgba(23, 19, 15, 0.88) 18%,
      rgba(23, 19, 15, 0.30) 52%,
      rgba(23, 19, 15, 0.62) 100%
    ),
    rgba(23, 19, 15, 0.22);
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2rem, 6vh, 4.5rem);
  padding-block: clamp(2rem, 5vh, 3.5rem) clamp(2.5rem, 6vh, 4rem);
  width: 100%;
  max-width: 92rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero__lockup {
  width: clamp(260px, 36vw, 520px);
  max-width: 82vw;
  height: auto;
}

.hero__foot {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.hero__kicker {
  margin: 0;
  color: var(--cream-70);
  font-family: var(--info);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(0.68rem, 1.1vw, 0.8rem);
  line-height: 1.7;
  max-width: 42ch;
}

.hero__kicker b {
  color: var(--cream);
  font-weight: 700;
}

/* --- Firepit rule (the front-facing pit and bonfire as a section marker) -- */

.rule {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--cream-16);
}

.rule img {
  width: 34px;
  height: 34px;
  opacity: 0.9;
  flex: none;
}

/* --- Next show ------------------------------------------------------------ */

.next {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 62rem) {
  .next { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.next__date {
  color: var(--cream);
}

.next__date .tba {
  color: var(--ember);
}

.next__facts {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr);
  column-gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--cream-16);
}

.next__facts dt {
  font-family: var(--info);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: var(--cream-45);
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--cream-16);
}

.next__facts dd {
  margin: 0;
  font-family: var(--info);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  color: var(--cream);
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--cream-16);
}

/* One line of context under the facts list, before the RSVP ring. */
.next__note {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  max-width: 34ch;
  color: var(--cream-70);
  text-transform: none;
  letter-spacing: normal;
}

/* Circular echo: the RSVP is a ring you step into. */
.rsvp {
  --size: clamp(8.5rem, 16vw, 11rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  width: var(--size);
  height: var(--size);
  border: 1px solid var(--cream-45);
  border-radius: 50%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.4rem;
  color: var(--cream);
  font-family: var(--info);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  transition: border-color 300ms ease, color 300ms ease;
}

.rsvp span {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--cream-45);
  transition: color 300ms ease;
}

.rsvp:hover,
.rsvp:focus-visible {
  border-color: var(--ember);
  color: var(--ember);
}

.rsvp:hover span,
.rsvp:focus-visible span { color: var(--ember); }

/* --- About ---------------------------------------------------------------- */

.about {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}

@media (min-width: 62rem) {
  .about { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
}

.about__body {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.1vw, 1.6rem);
  line-height: 1.62;
  color: var(--cream-70);
  max-width: 46ch;
}

.about__body strong {
  color: var(--cream);
  font-weight: 700;
}

.about__body + .about__body { margin-top: 1.4em; }

/* --- Gallery -------------------------------------------------------------- */

.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.gallery__row {
  display: flex;
  gap: var(--gap);
}

.shot {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--charcoal-lift);
  min-width: 0;
}

.shot picture {
  display: block;
  width: 100%;
  height: 100%;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 900ms ease;
}

.shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.shot:hover img { transform: scale(1.035); }
.shot:hover::after { transform: scaleX(1); }

/* Deterministic row heights: no layout shift, and the crops vary on purpose. */
.gallery__row { height: clamp(10rem, 30vw, 26rem); }
.gallery__row--tall  { height: clamp(11rem, 34vw, 30rem); }
.gallery__row--short { height: clamp(9rem, 26vw, 22rem); }

.g7 { flex: 7 1 0; }
.g6 { flex: 6 1 0; }
.g5 { flex: 5 1 0; }
.g4 { flex: 4 1 0; }

@media (max-width: 48rem) {
  .gallery__row,
  .gallery__row--tall,
  .gallery__row--short {
    flex-direction: column;
    height: auto;
  }
  /* Stacked: the flex ratios would otherwise apply to height and collapse. */
  .g7, .g6, .g5, .g4 { flex: 0 0 auto; }
  .shot { aspect-ratio: 16 / 9; }
  /* Portrait originals: a 16:9 crop of these takes off heads. */
  .shot--tall { aspect-ratio: 3 / 4; }
}

/* --- Footer --------------------------------------------------------------- */

.footer {
  padding-block: clamp(4rem, 9vw, 7rem) clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--cream-16);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 4rem);
}

.footer__mark { width: 56px; height: 56px; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links a {
  color: var(--cream);
  border-bottom: 1px solid var(--cream-16);
  padding-bottom: 0.35rem;
  transition: color 250ms ease, border-color 250ms ease;
}

.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--ember);
  border-color: var(--ember);
}

.footer__fine {
  width: 100%;
  color: var(--cream-45);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}

.footer__fine .leaf { color: var(--leaf); }

/* --- Motion --------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal,
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .shot img,
  .shot::after,
  .rsvp,
  .footer__links a {
    transition: none;
  }

  .shot:hover img { transform: none; }
}
