/* Media Arts Lawyers - announcement page
   Values mirror the source Automatic.css / Bricks tokens (root font-size 62.5%). */

@font-face {
  font-family: "Proxima Nova";
  font-weight: 400;
  font-display: swap;
  src: url("./assets/Proxima-Nova-Font.ttf") format("truetype");
}
@font-face {
  font-family: "Univers 49 Light Ultra Condensed";
  font-weight: 400;
  font-display: swap;
  src: url("./assets/Univers-49-Light-Ultra-Condensed.ttf") format("truetype");
}

:root {
  /* #CA181E multiplied over #E6E6E6, as rendered in the source */
  --red: #b6161b;
  --grey: #e6e6e6;          /* neutral-semi-light, page background */
  --neutral: #d9d9d9;       /* heading tint */
  --white: #e6e6e6;
  --base: #242424;

  --text-m: clamp(1.6rem, calc(0.2083333333vw + 1.5333333333rem), 1.8rem);
  --text-s: 1.55rem;
  --h2: clamp(3.1990336rem, calc(1.5762808333vw + 2.6946237333rem), 4.7122632rem);
  --space-xs: clamp(1.1459461772rem, calc(-0.271882512vw + 1.4939557926rem), 1.4069533888rem);
  --space-m: clamp(2.5rem, calc(0.5208333333vw + 2.3333333333rem), 3rem);
  --space-l: clamp(3.3325rem, calc(1.5848958333vw + 2.8253333333rem), 4.854rem);
  --space-xl: clamp(4.4422225rem, calc(3.5536973958vw + 3.3050393333rem), 7.853772rem);

  --font-body: "Proxima Nova", "Helvetica Neue", sans-serif;
  --font-head: "Univers 49 Light Ultra Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
  --focus: 3px solid var(--white);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--grey);
  color: var(--base);
  font-family: var(--font-body);
  font-size: var(--text-m);
  line-height: 1.45;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
main:focus { outline: none; }

.visually-hidden {
  position: absolute; 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: 1.6rem; top: 1.6rem; z-index: 100;
  padding: 1rem 1.6rem;
  background: var(--base); color: var(--white);
  font-size: 1.6rem; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline: 3px solid var(--red); outline-offset: 2px; }

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

/* ---------- Ticket ---------- */
.ticket { padding: var(--space-xl); }

.ticket__inner {
  display: flex;
  flex-direction: column;
  row-gap: var(--space-l);
  min-height: calc(100vh - var(--space-xl) * 2.5);
  padding: var(--space-xl) calc(var(--space-xl) * 1.7) var(--space-xl) var(--space-xl);
  background: var(--red);
  /* A single silhouette avoids XOR fringes at fractional box edges. */
  -webkit-mask-image: url("./assets/scalloped-edge.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: left center;
  -webkit-mask-size: calc(100% + 2px) 100%;
  mask-image: url("./assets/scalloped-edge.svg");
  mask-repeat: no-repeat;
  mask-position: left center;
  mask-size: calc(100% + 2px) 100%;
}
.ticket--short .ticket__inner { justify-content: center; }

.ticket__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-xl);
  width: 100%;
}

.ticket__logo {
  grid-column: span 2;
  max-width: 300px;
  display: flex;
  align-items: flex-end;
  align-self: start;
}
.ticket__logo img { width: 100%; object-fit: contain; object-position: 0 0; filter: brightness(0.902); }
.ticket__logo a { display: block; }

.ticket__content {
  grid-column: span 3;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  row-gap: var(--space-m);
  margin-bottom: -5px;
}

.ticket__date {
  font-family: var(--font-head);
  font-size: var(--h2);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--neutral);
}

.ticket__lede { color: var(--white); max-width: 60ch; }
.ticket__lede p + p { margin-top: 1em; }

.text-link { color: var(--white); text-underline-offset: 0.2em; }

/* ---------- Profiles ---------- */
.profiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-m);
  width: 100%;
}

.profile {
  display: flex;
  flex-direction: column;
  row-gap: var(--space-xs);
  min-width: 0;
}

.profile__photo { display: block; }
.profile__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.profile__text { display: grid; gap: calc(var(--space-xs) * 0.5); }

.profile__name {
  font-family: var(--font-head);
  font-size: calc(var(--h2) * 0.75);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  color: var(--neutral);
}

.profile__site {
  color: var(--neutral);
  font-size: inherit;
  text-decoration: none;
}
.profile__site:hover { color: var(--white); text-decoration: underline; }
.profile__site--long { overflow-wrap: anywhere; }

.profile__contacts { display: flex; flex-wrap: wrap; gap: 1em; font-size: 16px; }

.contact {
  position: relative;
  display: flex;
  color: var(--red);
  transition: color .3s ease-in-out;
}
/* invisible enlarged tap target, visual icon size unchanged */
.contact::after {
  content: "";
  position: absolute;
  inset: -6px;
}
.contact .icon {
  width: 2em;
  height: 2em;
  padding: .25em;
  background: var(--grey);
  transition: background-color .3s ease-in-out;
}
.contact:hover .icon { background: rgba(255, 255, 255, .5); color: #e51f26; }

/* ---------- Responsive (source breakpoints) ---------- */
@media (min-width: 1201px) and (max-height: 1000px) {
  /* Removing the scrollbar must not widen the portraits or shift columns. */
  html { scrollbar-gutter: stable; }
  .ticket:not(.ticket--short) {
    --desktop-inset: clamp(1.6rem, 2.5vh, 3.2rem);
    padding-block: var(--desktop-inset);
  }
  .ticket:not(.ticket--short) .ticket__inner {
    min-height: calc(100vh - var(--desktop-inset) * 2);
    padding-block: var(--desktop-inset);
    row-gap: clamp(1.6rem, 3vh, 2.8rem);
    justify-content: center;
  }
  .ticket:not(.ticket--short) .ticket__logo {
    /* Stop at 220px tall in short windows; allow scrolling instead of shrinking. */
    max-width: clamp(calc(22rem * 757 / 989), calc(28vh * 757 / 989), 300px);
  }
}

@media (max-width: 1200px) {
  .profiles { display: flex; flex-wrap: wrap; }
  .profile { min-width: 220px; width: 40%; }
  .profile__name { font-size: var(--h2); }
}

@media (max-width: 767px) {
  .ticket { padding: var(--space-m); }
  .ticket__inner {
    padding: var(--space-m);
    min-height: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .ticket__grid { display: flex; flex-direction: column; gap: var(--space-l); }
  .ticket__logo { max-width: 200px; }
  .ticket__content { width: 100%; }
  .profile { max-width: fit-content; }
}

@media (max-width: 478px) {
  .profile { width: 100%; max-width: none; min-width: 0; }
  .profile__photo img { aspect-ratio: 10 / 9; }
  .profile__name { font-size: calc(var(--h2) * 1.1); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
