/* Gran Teatro Pavón, the case page (cases/gran-teatro-pavon.html).

   The portfolio's voice in the theatre's colours and forms. David's: the bold line with a cushion, Neue
   Haas for what he says, Satoshi for reading, the orange close. The theatre's: stage black, marquee gold,
   curtain orange and programme paper, poster capitals in Bebas Neue and Staatliches, square corners,
   tickets shaped like tickets, the weekly timetable with dotted rows and the history's huge pale years.
   The odd couple: the art deco tower of the theatre, on a puffy cushion. */

.case--gran-teatro-pavon {
  --gtp-black: #1c1c1c;
  --gtp-gold: #f0c35b;
  --gtp-orange: #c63d00; /* the theatre's #d14100, a shade deeper so the paper text on it reaches 4.5:1 */
  --gtp-orange-deep: #a83400;
  --gtp-paper: #fff8ec;
  --gtp-poster: "Bebas Neue", "Staatliches", sans-serif;
  --gtp-stamp: "Staatliches", "Bebas Neue", sans-serif;
  --gtp-text: "Poppins", var(--font-body);
}

.case--gran-teatro-pavon [data-theme="dark"] {
  --bg: var(--gtp-black);
  --fg: var(--gtp-paper);
  --fg-muted: rgb(255 248 236 / 0.7);
  --room: var(--gtp-black);
}

.case--gran-teatro-pavon [data-theme="light"],
.case--gran-teatro-pavon [data-theme="gold"] {
  --bg: var(--gtp-paper);
  --fg: var(--gtp-black);
  --fg-muted: rgb(28 28 28 / 0.7);
  --room: var(--bg);
  background: var(--bg);
  color: var(--fg);
}

.case--gran-teatro-pavon [data-theme="gold"] {
  --bg: var(--gtp-gold);
  --fg-muted: rgb(28 28 28 / 0.76);
}

.case--gran-teatro-pavon ::selection {
  background: var(--gtp-gold);
  color: var(--gtp-black);
}

.case--gran-teatro-pavon :focus-visible {
  outline-color: var(--gtp-orange);
  border-radius: 0;
}

.gtp-section {
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(5rem, 10vw, 9rem) var(--gutter);
}

.gtp-title {
  margin: 0 0 clamp(2.5rem, 5vw, 4.5rem);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.gtp-title span {
  display: block;
  color: var(--gtp-orange);
}

/* A ticket: notched at both ends, a perforation before the icon. The theatre's buttons look like this */
.gtp-ticket {
  --notch: 0.5rem;
  display: inline-flex;
  align-items: stretch;
  min-height: 48px;
  background: var(--gtp-orange);
  color: var(--gtp-paper);
  font-family: var(--gtp-stamp);
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  mask:
    radial-gradient(circle at 0 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
  transition: background-color 0.2s var(--ease-out), translate 0.3s var(--ease-out);
}

.gtp-ticket span {
  display: flex;
  align-items: center;
  padding: 0.6em 1.1em 0.55em 1.35em;
}

.gtp-ticket svg {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  align-self: center;
  padding: 0 1.1em 0 0.95em;
  border-left: 2px dashed rgb(255 248 236 / 0.55);
}

.gtp-ticket:hover {
  background: var(--gtp-orange-deep);
  translate: 0 -2px;
}

.gtp-ticket--gold {
  background: var(--gtp-gold);
  color: var(--gtp-black);
}

.gtp-ticket--gold svg {
  border-left-color: rgb(28 28 28 / 0.4);
}

.gtp-ticket--gold:hover {
  background: #e4b44a;
}

/* ------------------------------------------------------------------ 1. The opening */

.gtp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.25rem, 2.4vw, 2.25rem);
  padding-top: clamp(6.5rem, 11vw, 9.5rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.gtp-crumbs {
  display: flex;
  gap: 0.6em;
  color: var(--fg-muted);
  font-family: var(--gtp-stamp);
  font-size: 0.9375rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gtp-crumbs a {
  color: var(--gtp-gold);
  transition: color 0.2s var(--ease-out);
}

.gtp-crumbs a:hover {
  color: var(--fg);
}

.gtp-hero__name {
  margin-top: clamp(0.25rem, 1.5vw, 1.25rem);
}

.cushion--gtp svg {
  width: 72%;
  height: 72%;
}

.gtp-hero__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem var(--gutter);
  align-items: start;
}

.gtp-hero__lead {
  grid-column: 1 / 8;
  display: grid;
  justify-items: start;
  gap: clamp(1.5rem, 2.6vw, 2.25rem);
}

.gtp-hero__statement {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.6vw, 4.125rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.gtp-hero__statement span:last-child {
  color: var(--gtp-gold);
}

.gtp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* The facts as the weekly timetable: gold panel, a title in poster capitals, dotted rows */
.gtp-timetable {
  grid-column: 8 / 13;
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
  background: var(--gtp-gold);
  color: var(--gtp-black);
}

.gtp-timetable__title {
  margin: 0 0 1rem;
  font-family: var(--gtp-poster);
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.gtp-timetable dl {
  margin: 0;
}

.gtp-timetable div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 2px dotted rgb(28 28 28 / 0.35);
}

.gtp-timetable dt {
  font-family: var(--gtp-stamp);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gtp-timetable dd {
  margin: 0;
  font-family: var(--gtp-text);
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: right;
}

.gtp-timetable a {
  text-decoration: underline;
  text-decoration-color: var(--gtp-orange);
  text-underline-offset: 0.2em;
}

.gtp-timetable a:hover {
  color: var(--gtp-orange-deep);
}

/* The home page under a spotlight on the stage */
.gtp-cover {
  margin: clamp(1.5rem, 4vw, 3.5rem) 0 0;
}

.gtp-cover__stage {
  position: relative;
  padding: clamp(1.5rem, 5vw, 5rem) clamp(1.25rem, 10vw, 10rem) clamp(2.5rem, 6vw, 6rem) clamp(1.25rem, 5vw, 5rem);
  background:
    radial-gradient(45% 70% at 40% 0%, rgb(240 195 91 / 0.28), transparent 70%),
    #121212;
  border-top: 6px solid var(--gtp-orange);
}

.gtp-screen {
  box-shadow: 0 2.5rem 4.5rem -2rem rgb(0 0 0 / 0.8);
}

.gtp-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.gtp-screen--desktop {
  width: 90%;
  border: 1px solid rgb(255 248 236 / 0.12);
}

.gtp-screen--phone {
  position: absolute;
  right: clamp(1rem, 5vw, 5rem);
  bottom: clamp(1.25rem, 3vw, 3rem);
  width: clamp(5.5rem, 17%, 13rem);
  border: 0.35rem solid var(--gtp-black);
  outline: 1px solid rgb(255 248 236 / 0.16);
}

.gtp-cover figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 0.9rem;
  font-family: var(--gtp-stamp);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gtp-cover figcaption span + span {
  color: var(--fg-muted);
}

/* ------------------------------------------------------------------ 2. The brief */

.gtp-brief {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2.5rem var(--gutter);
  align-items: center;
}

/* "Antes. Durante. Después.": three poster lines, the middle one in orange and pushed in */
.gtp-brief__stack {
  grid-column: 1 / 7;
  display: grid;
  margin: 0;
  font-family: var(--gtp-poster);
  font-size: clamp(3.5rem, 8.4vw, 9.5rem);
  font-weight: 400;
  line-height: 0.88;
  text-transform: uppercase;
}

.gtp-brief__stack span:nth-child(2) {
  padding-left: 0.6em;
  color: var(--gtp-orange);
}

.gtp-brief__text {
  grid-column: 8 / 13;
  display: grid;
  gap: 1rem;
  padding-left: clamp(1rem, 2.4vw, 2.5rem);
  border-left: 1px solid rgb(28 28 28 / 0.2);
}

.gtp-brief__label {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.gtp-brief__text p:not([class]) {
  max-width: 50ch;
  margin: 0;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------------ 3. What I did */

.gtp-did {
  padding-top: 0;
}

.gtp-timeline {
  display: grid;
  gap: clamp(3.5rem, 8vw, 7rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each entry over a huge pale word, as the years of the history page */
.gtp-entry {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem var(--gutter);
  align-items: center;
}

.gtp-entry::before {
  content: attr(data-word);
  position: absolute;
  top: -0.42em;
  right: 0;
  z-index: 0;
  font-family: var(--gtp-poster);
  font-size: clamp(5rem, 15vw, 15rem);
  line-height: 1;
  text-transform: uppercase;
  color: rgb(240 195 91 / 0.32);
  pointer-events: none;
}

.gtp-entry:nth-child(even)::before {
  right: auto;
  left: 0;
}

.gtp-entry img {
  position: relative;
  grid-column: 1 / 7;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgb(28 28 28 / 0.12);
  box-shadow: 0 1.75rem 3.5rem -1.75rem rgb(0 0 0 / 0.45);
}

.gtp-entry > div {
  position: relative;
  grid-column: 8 / 13;
}

.gtp-entry:nth-child(even) img {
  grid-column: 7 / 13;
  grid-row: 1;
}

.gtp-entry:nth-child(even) > div {
  grid-column: 1 / 6;
  grid-row: 1;
}

.gtp-entry h3 {
  margin: 0 0 0.75rem;
  font-family: var(--gtp-poster);
  font-size: clamp(2.25rem, 3.6vw, 3.5rem);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
}

.gtp-entry h3::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.75rem;
  background: var(--gtp-orange);
}

.gtp-entry p {
  max-width: 46ch;
  margin: 0;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------------ 4. Cartelera */

.gtp-bill__head {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.gtp-bill__title {
  margin: 0;
  font-family: var(--gtp-poster);
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 400;
  line-height: 0.85;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ 5. The result */

.gtp-result {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2.5rem var(--gutter);
  align-items: center;
}

.gtp-result__text {
  grid-column: 1 / 7;
}

.gtp-result .gtp-title span {
  color: var(--gtp-gold);
}

.gtp-result__text p {
  max-width: 48ch;
  margin: 0 0 1rem;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.2vw, 1.1875rem);
  line-height: 1.6;
}

.gtp-result__text .gtp-result__note {
  padding-top: 1rem;
  border-top: 1px solid rgb(255 248 236 / 0.16);
  font-size: 0.9375rem;
}

/* The orange box of "Aforo hasta 200", holding the century */
.gtp-result__box {
  grid-column: 8 / 13;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  background: var(--gtp-orange);
  color: var(--gtp-paper);
}

.gtp-result__small {
  margin: 0;
  font-family: var(--gtp-stamp);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gtp-result__figure {
  margin: 0;
  font-family: var(--gtp-poster);
  font-size: clamp(8rem, 18vw, 17rem);
  line-height: 0.82;
}

.gtp-result__caption {
  margin: 0.5rem 0 0;
  font-family: var(--gtp-poster);
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  line-height: 1;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ 6. Next project, as a ticket */

.gtp-stub {
  --notch: 1.1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  max-width: 70rem;
  margin: 0 auto;
  background: var(--gtp-gold);
  color: var(--gtp-black);
  mask:
    radial-gradient(circle at 0 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
  transition: translate 0.4s var(--ease-out), background-color 0.3s var(--ease-out);
}

.gtp-stub:hover {
  translate: 0 -4px;
  background: #f4cd70;
}

/* The stub, with the perforation along its edge */
.gtp-stub__side {
  display: grid;
  gap: 0.5rem;
  align-self: stretch;
  align-content: center;
  padding: 1.5rem clamp(1.5rem, 3vw, 2.75rem);
  border-right: 3px dashed rgb(28 28 28 / 0.4);
  font-family: var(--gtp-stamp);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  rotate: 180deg;
  border-right: 0;
  border-left: 3px dashed rgb(28 28 28 / 0.4);
}

.gtp-stub__side span:first-child {
  color: #8a2c00;
}

.gtp-stub__main {
  display: grid;
  gap: 0.6rem;
  padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 3rem);
}

.gtp-stub__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 8.5rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.gtp-stub__line {
  max-width: 40ch;
  font-family: var(--gtp-text);
  font-size: 0.9375rem;
  color: rgb(28 28 28 / 0.75);
}

.gtp-stub__arrow {
  width: clamp(2rem, 4vw, 3.5rem);
  height: clamp(2rem, 4vw, 3.5rem);
  margin-right: clamp(1.75rem, 4vw, 3.5rem);
  transition: translate 0.3s var(--ease-out);
}

.gtp-stub:hover .gtp-stub__arrow {
  translate: 0.25rem 0;
}

@media (max-width: 960px) {
  .gtp-hero__lead,
  .gtp-timetable,
  .gtp-brief__stack,
  .gtp-brief__text,
  .gtp-result__text,
  .gtp-result__box {
    grid-column: 1 / -1;
  }

  .gtp-timetable {
    max-width: 34rem;
  }
}

@media (max-width: 700px) {
  .gtp-hero__statement {
    font-size: 8.4vw;
  }

  .gtp-ticket {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .gtp-screen--phone {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 27%;
    border-width: 0.2rem;
  }

  .gtp-entry img,
  .gtp-entry > div,
  .gtp-entry:nth-child(even) img,
  .gtp-entry:nth-child(even) > div {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  /* The huge pale word sits above each entry: room for it under the heading */
  .gtp-timeline {
    gap: 4.5rem;
    padding-top: 2.5rem;
  }

  .gtp-entry::before,
  .gtp-entry:nth-child(even)::before {
    top: -0.55em;
    left: auto;
    right: 0;
    font-size: 21vw;
  }

  .gtp-brief__text {
    padding-left: 0;
    border-left: 0;
  }

  .gtp-stub {
    --notch: 0.7rem;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .gtp-stub__side {
    grid-column: 1 / -1;
    writing-mode: horizontal-tb;
    rotate: none;
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-left: 0;
    border-bottom: 3px dashed rgb(28 28 28 / 0.4);
  }

  .gtp-stub__main {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .gtp-stub__arrow {
    margin-right: 1.5rem;
  }
}

/* Body copy without a word left alone on its last line */
.case--gran-teatro-pavon p {
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ More of the site, as one still sheet

   The history page large and four more around it, framed in black like the theatre's posters; labels as its
   orange tickets in Staatliches */
.mosaic--gtp {
  --mosaic-border: 1px solid var(--gtp-black);
  --mosaic-ground: var(--gtp-paper);
  --mosaic-shadow: 0 1.5rem 3rem -1.75rem rgb(0 0 0 / 0.45);
  --mosaic-chip-bg: var(--gtp-orange);
  --mosaic-chip-fg: var(--gtp-paper);
  --mosaic-chip-radius: 0;
  /* the pages are landscape: the tiles keep close to their shape, so nothing is cut at the sides */
  --mosaic-row-small: 7rem;
  --mosaic-first-rows-small: 2;
}

.mosaic--gtp .mosaic__label {
  padding: 0.4em 0.9em 0.35em;
  font-family: var(--gtp-stamp);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  mask:
    radial-gradient(circle at 0 50%, transparent 0.3rem, #000 calc(0.3rem + 0.5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent 0.3rem, #000 calc(0.3rem + 0.5px)) right / 51% 100% no-repeat;
}

@media (min-width: 701px) {
  .mosaic--gtp {
    --mosaic-cols: repeat(4, minmax(0, 1fr));
    --mosaic-areas: "a a b c" "a a d e";
    --mosaic-row: clamp(9rem, 13vw, 13.5rem);
  }

  .mosaic--gtp .mosaic__tile:nth-child(1) { grid-area: a; }
  .mosaic--gtp .mosaic__tile:nth-child(2) { grid-area: b; }
  .mosaic--gtp .mosaic__tile:nth-child(3) { grid-area: c; }
  .mosaic--gtp .mosaic__tile:nth-child(4) { grid-area: d; }
  .mosaic--gtp .mosaic__tile:nth-child(5) { grid-area: e; }
}
