@font-face {
  font-family: 'Barriecito';
  src: url('fonts/Barriecito-Regular.ttf') format('truetype');
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bayon';
  src: url('fonts/Bayon-Regular.ttf') format('truetype');
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Special Gothic Condensed One';
  src: url('fonts/SpecialGothicCondensedOne-Regular.ttf') format('truetype');
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Blackout Two AM';
  src:
    url('fonts/blackout_two_am-webfont.woff') format('woff'),
    url('fonts/blackout_two_am-webfont.ttf') format('truetype');
  font-weight: normal;
  font-display: swap;
}

::placeholder {
  text-align: center;
  color: rgba(0, 0, 0, 0.5);

  @media (min-width: 720px) {
    text-align: left;
  }
}

::selection {
  background: var(--black);
  color: var(--white);
}

header,
#schedule,
#locations,
footer {
  ::selection {
    background: var(--white);
    color: var(--black);
  }
}

a {
  color: inherit;
}

li a {
  text-decoration-thickness: 2px;
}

:root {
  --black: #000;
  --white: #fff;
  --inner: clamp(329px, 10vw 700px);
  --pad: clamp(16px, 3vw, 32px);
  --font-display: 'Barriecito', cursive;
  --font-body: 'Bayon', sans-serif;
  --font-label: 'Blackout Two AM', sans-serif;
  --font-special: 'Special Gothic Condensed One', sans-serif;
  --high-contrast: 0;
}

@media (prefers-contrast: more) {
  :root {
    --high-contrast: 1;
  }
  #high_contrast {
    display: none;
  }
}

body:has(#high_contrast input:checked) {
  --high-contrast: 1;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-repeat: repeat;
  background-size: auto;
  color: var(--white);
  font-family: var(--font-body);
  background: var(--black);
  margin: 0 auto;
  overflow-x: hidden;
  position: relative;
  /* width: 100vw; */
}

a:hover {
  z-index: 100;
  position: relative;
}

.inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;

  @media (min-width: 720px) {
    max-width: 1100px;
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: normal;
  line-height: 1;
  margin-bottom: 40px;
  text-transform: uppercase;
  z-index: 20;
  position: relative;
  text-align: center;
}

#paper-filter {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    url(/images/vintage-speckles.avif), url(/images/lined-paper-2.png),
    url(/images/photo-stone-texture-pattern-2.avif);
  background-size: auto, auto, auto, 50%;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 20;
  /* display: none; */
}

header {
  @media (min-width: 720px) {
    max-width: 1100px;
    margin: 0 auto;
  }
}
.hero-black {
  padding: 48px clamp(1rem, 2vw, 2rem) 40px;
  padding: var(--pad);
  text-align: center;
  background: var(--black);

  @media (min-width: 720px) {
    display: grid;
    grid-template-areas: 'logo tickets' 'copy copy';
    max-width: 1100px;

    .inner {
      max-width: revert;
      margin: 0;
    }
  }
}

.hero-headline {
  font-size: clamp(56px, 18vw, 72px);
  font-weight: normal;
  /* line-height: 1; */
  color: var(--white);
  margin-bottom: 32px;
  rotate: -3deg;
  letter-spacing: -2px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-headline .ffconf {
  font-family: var(--font-label);
  text-transform: uppercase;
  display: block;
  font-size: clamp(4rem, 9vw, 10rem);
  text-align: left;
}

.hero-headline .date {
  font-family: var(--font-display);
  text-transform: uppercase;
  display: block;
  font-size: clamp(3rem, 6.3vw, 7rem);
  white-space: nowrap;
  text-align: left;
  font-weight: 400;
}

.hero-ctas {
  max-width: 299px;
  margin: 0 auto 32px;

  @media (min-width: 720px) {
    align-self: anchor-center;
    margin-bottom: 0;
    position: relative;
  }
}

.hero-ctas a:not(.info) {
  rotate: 2deg;
  display: block;
  width: calc(100% - 32px);
  font-family: var(--font-body);
  font-size: 40px;
  text-decoration: none;
  background: var(--white);
  color: var(--black);
  text-align: center;
  line-height: 1;
  white-space: nowrap;

  @media (min-width: 720px) {
    width: fit-content;
  }
}

.hero-ctas a.btn-buy {
  /* padding: 16px 12px; */
  padding: 16px 32px;
  margin-bottom: 12px;
  margin-left: 32px;
}

.btn-buy .alt {
  font-family: var(--font-display);
}

.hero-ctas a.btn-price {
  padding: 12px 32px;
  background: transparent;
  color: var(--white);
  border: 4px solid var(--white);

  @media (min-width: 720px) {
    margin-left: -8px;
  }
}

.btn-price .alt {
  font-family: var(--font-display);
}

.hero-keyinfo {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 3vw, 2.8rem);
  line-height: clamp(1.5rem, 3.5vw, 3.4rem);
  color: var(--white);
  max-width: var(--inner);
  margin: 0 auto;
  text-align: justify;
  text-wrap: pretty;
  z-index: 101;
  position: relative;
  /* margin-top: 120px; */

  a {
    color: inherit;
    text-wrap: inherit;
    justify-content: inherit;
    white-space: nowrap;
  }

  @media (min-width: 720px) {
    grid-area: copy;
    max-width: 100%;
    margin-top: 0;
  }
}

.hero-white {
  background: var(--black);
  color: var(--black);
  /* padding: 40px 0; */
  position: relative;
  margin-top: 40px;

  .inner {
    /* padding: 40px var(--pad); */
    background: var(--white);
    z-index: 12;
    position: relative;

    overflow-x: clip;
    max-width: 100%;
    padding: 40px clamp(40px, 10vw, 11.25rem);

    @media (min-width: 720px) {
      display: grid;
      grid-template-areas: 'text' 'newsletter';
      max-width: 1000px;
    }

    &:before,
    &:after {
      content: '';
      display: block;
      position: absolute;
      width: 100vw;
      background: var(--white);
      rotate: 4deg;
      height: 104%;
      z-index: 11;

      @media (min-width: 720px) {
        max-width: 700px;
        rotate: 3deg;
        height: 110%;
      }
    }

    &:before {
      left: -310px;
      box-shadow: 8px -12px 10px var(--white);
      top: -10px;
      @media (min-width: 720px) {
        top: 0;
        left: -85px;
      }
    }

    &:after {
      left: 100px;
      box-shadow: 8px 12px 10px var(--white);
      top: -12px;

      @media (min-width: 720px) {
        left: 410px;
      }
    }
  }
}

.hero-description {
  font-family: var(--font-special);
  font-size: 26px;
  line-height: 1.5;
  margin-bottom: 48px;
  text-align: center;
  grid-area: text;
  z-index: 100;
  position: relative;

  @media (min-width: 720px) {
    margin: 48px;
  }
}

.hero-description .hl {
  font-family: var(--font-display);
}

.newsletter {
  display: flex;
  flex-direction: column;
  gap: 16px;
  grid-area: newsletter;
  z-index: 100;
  position: relative;

  @media (min-width: 720px) {
    flex-direction: row;
  }
}

.newsletter input,
.newsletter button {
  font-family: var(--font-body);
  font-size: 24px;
  padding: 16px var(--pad);
  width: 100%;
  border: 4px solid var(--black);
  background: transparent;
  color: var(--black);
  appearance: none;
  border-radius: 0;
  text-align: left;
}

input:focus {
  background: rgba(255, 255, 255, 0.75);
  z-index: 100;
}

.newsletter button {
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;

  &:hover {
    z-index: 30;
    position: relative;
  }
}

.newsletter button .alt {
  font-family: var(--font-display);
}

.btn-outline-dark {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 24px;
  text-decoration: none;
  padding: 14px 28px;
  border: 2px solid var(--black);
  color: var(--black);
  line-height: 1;

  &.solid {
    background: var(--black);
    color: var(--white);
  }
}

.btn-outline-light {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 24px;
  text-decoration: none;
  padding: 14px 28px;
  border: 2px solid var(--white);
  color: var(--white);
  line-height: 1;

  &.solid {
    background: var(--white);
    color: var(--black);
  }
}

.btn-outline-dark .alt,
.btn-outline-light .alt {
  font-family: var(--font-display);
}

.btn {
  transition: transform 50ms ease-out;

  &:hover {
    transform: rotate(-3deg) scale(1.05);
  }
}

/* Section dividers */
.section-divider {
  display: block;
  width: 100%;
  z-index: 10;
  position: relative;
  height: 0px;
  background: none;
  overflow-x: clip;
}
.section-divider:after {
  content: ' ';
  --n: clamp(32px, 10vw, 80px);
  margin: 0 auto;
  user-select: none;
  rotate: -2deg;
  height: clamp(32px, 10vw, 80px);
  position: absolute;
  top: 0;
  left: 0;
  width: 110vw;
  z-index: 1000;
  padding: 0;
  background-image: url(/images/cut.svg);
  background-repeat: repeat-x;
  background-size: contain;
  margin-left: -20px;
  /* overflow: clip; */
  display: block;
}

#schedule {
  padding: 72px 0;
  padding-bottom: 34px;
  background: var(--black);
  z-index: 10;
  position: relative;
}

#schedule {
  @media (min-width: 720px) {
    .inner {
      display: grid;
      /* this bullshit is because Safari treats `auto` as zero 🤦 */
      --i: clamp(3.5rem, 10vw, 7rem);
      grid-template-columns: var(--i) 1fr;
    }
    position: relative;

    /* I've left this in because it was how I was trying to do the rotate,
       then Ana Tudor comes along and absolutely shows me the best way of
       solving it - writing-mode: vertical-lr. */

    /*
    h2 {
      --margin: clamp(3.5rem, 12vw, 8rem);
      --y: calc(clamp(3.5rem, 10vw, 7rem) + var(--margin));
      --x: calc(var(--y) * -1);
      height: 60px;
      transform-origin: 50%;
      transform: translate(var(--x), var(--y)) rotate(-90deg);
      width: fit-content;
      margin: 0;
    }
      */

    h2 {
      writing-mode: vertical-lr;
      rotate: 180deg;
    }
  }
}

.schedule-group {
  margin-bottom: 40px;

  @media (min-width: 720px) {
    margin-left: clamp(3.5rem, 8vw, 5rem);
  }
}

.schedule-group-title {
  font-family: var(--font-body);
  font-size: 40px;
  font-weight: normal;
  margin-bottom: 8px;
}

.schedule-list {
  list-style: none;
}

.schedule-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-special);
  font-size: clamp(1.5rem, 2vw, 2rem);
  gap: 8px;
  padding: 10px 0;

  &:after {
    content: ' ';
    order: 2;
    display: inline-block;
    width: 100%;
    border-bottom: 2px dotted var(--white);
  }

  :first-child {
    order: 1;
    white-space: nowrap;
  }

  :last-child {
    order: 3;
  }
}

li:has(span) {
  &:after {
    content: ' ';
    order: 2;
    display: inline-block;
    width: 100%;
    border-bottom: 2px dotted var(--white);
  }

  :first-child {
    order: 1;
    white-space: nowrap;
  }

  :last-child {
    order: 3;
  }
}

.schedule-time {
  white-space: nowrap;
  font-variant: tabular-nums;
}

#speakers {
  background: var(--white);
  color: var(--black);
  padding: 72px 0;
  padding-top: 144px;
  overflow: hidden;
}

.speaker-card {
  position: relative;
  margin-bottom: 8px;

  &:after {
    content: ' ';
    display: inline-block;
    width: 100%;
    border-bottom: 2px dotted var(--black);
  }

  @media (min-width: 720px) {
    clear: both;

    --offset: 400px;
    --offset-with-padding: calc(var(--offset) + 40px);

    img {
      position: relative;
      top: revert;
      right: revert;
      width: var(--offset);
      height: var(--offset);
    }

    &:nth-child(odd of .speaker-card) {
      img {
        float: left;
      }
      & > :not(img) {
        margin-left: var(--offset-with-padding);
      }
    }

    &:nth-child(even of .speaker-card) {
      img {
        float: right;
      }
      & > div,
      & > p {
        margin-right: var(--offset-with-padding);
      }
    }
  }
}

/* The top portion of the card: name + headshot float upper-right */
.speaker-card-header {
  position: relative;
  margin-bottom: 16px;
}

.speaker-headshot {
  position: relative;
  @media (min-width: 720px) {
    position: absolute;
    top: -75px;
    right: -71px;
  }
  width: 240px;
  height: 240px;
  object-fit: contain;
  object-position: bottom;
  opacity: 0.8;
  z-index: 30;
  pointer-events: none;
}

@media (max-width: 720px) {
  img {
    float: right;
    margin-right: -71px;
  }

  [data-id='cyd'] img {
    shape-outside: polygon(
      32px 155px,
      24.1% 128px,
      23.76% 32.2%,
      34.72% 9.41%,
      76.5% 1.74%,
      93.87% 21.61%,
      93.04% 88.92%,
      1.53% 88.44%,
      13px 75%
    );
  }

  [data-id='dees'] img {
    shape-outside: polygon(
      43px 160px,
      24.1% 128px,
      23.76% 32.2%,
      34.72% 9.41%,
      76.5% 1.74%,
      93.87% 21.61%,
      93.04% 88.92%,
      24.61% 89.27%,
      29px 77.08%
    );
  }

  [data-id='niels'] img {
    shape-outside: polygon(
      32px 155px,
      24.1% 128px,
      23.76% 32.2%,
      34.72% 9.41%,
      76.5% 1.74%,
      93.87% 21.61%,
      93.04% 88.92%,
      1.53% 88.44%,
      13px 75%
    );
  }

  [data-id='lena'] img {
    shape-outside: polygon(
      43px 164px,
      37.71% 130px,
      33.82% 38.03%,
      50.1% 17.74%,
      88.93% 10.07%,
      106.3% 23.28%,
      105.63% 90.15%,
      82.83% 100.94%,
      26.18% 89.33%,
      1.53% 88.44%,
      13px 75%
    );
  }

  [data-id='next'] img {
    shape-outside: polygon(
      36px 140px,
      37.71% 130px,
      33.82% 38.03%,
      50.1% 17.74%,
      78.87% 10.9%,
      106.3% 35.36%,
      99.55% 92.25%,
      54.19% 97.19%,
      9px 72.08%
    );
  }
}

.speaker-name {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: normal;
  padding-top: 4px;
  max-width: 55%;
  z-index: 10;
  position: relative;
}

.speaker-title {
  font-family: var(--font-body);
  font-size: 40px;
  font-weight: normal;
  line-height: 1.2;
  margin: 16px 0;
  position: relative;
  z-index: 10;

  /* remove when wider */
  /* margin-right: 30px; */
}

.speaker-bio {
  font-family: var(--font-special);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.5;
  margin-bottom: 16px;
}

.speaker-bio a {
  color: inherit;
}

.speaker-socials {
  font-family: var(--font-label);
  font-size: clamp(1rem, 5.5vw, 1.5rem);
  display: flex;
  /* justify-content: space-between; */
  gap: clamp(8px, 4vw, 16px);
  align-items: flex-start;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.speaker-socials a {
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
}

.speaker-separator {
  font-family: var(--font-special);
  font-size: 24px;
  overflow: hidden;
  margin: 24px 0;
  height: 0px;
  border: 0;
  z-index: 20;
  position: relative;
}

.speakers-cta {
  text-align: center;
  margin-top: 56px;
}

.section-transition {
  display: block;
  line-height: 0;
  margin-bottom: -1px;
}

.section-transition img {
  width: 100%;
  display: block;
  height: clamp(100px, 10vw, 400px);
  float: none;
}

#locations {
  padding: 72px 0;
  background: var(--black);

  @media (min-width: 720px) {
    padding-top: 0;

    .inner {
      display: grid;
      gap: 20px;

      & > div {
        grid-row-start: 1;
      }
    }

    h2 {
      writing-mode: vertical-lr;
      grid-column-start: 2;
      rotate: 180deg;
      align-self: self-start;
    }
  }
}

.location-group {
  margin-bottom: 40px;

  @media (min-width: 720px) {
    margin-right: 0;
  }
}

.location-group-title {
  font-family: var(--font-body);
  font-size: 40px;
  font-weight: normal;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.location-list {
  list-style: none;
}

.location-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-special);
  font-size: clamp(1.25rem, 2vw, 2rem);
  padding: 10px 0;
  gap: 8px;
}

.location-tag {
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}

.locations-cta {
  text-align: center;
  margin-top: 56px;
}

.apply-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;

  a {
    display: block;
    text-transform: uppercase;
    text-align: center;
    font-size: clamp(2rem, 10vw, 2.5rem);
    max-width: 75vw;
    rotate: -2deg;

    &:hover {
      z-index: 100;
      position: relative;
    }

    &:last-of-type {
      align-self: end;
    }
  }

  @media (min-width: 720px) {
    flex-direction: row;

    a {
      max-width: 50%;
      width: 50%;
      align-self: center;
    }
  }
}

#locations + .section-divider:after {
  --n: clamp(32px, 10vw, 80px);
  rotate: 2deg;
}

#sponsors {
  background: var(--white);
  color: var(--black);
  padding: 72px 0;
  padding-top: 144px;

  ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  @media (min-width: 720px) {
    h2 {
      text-align: center;
    }

    ul {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      grid-auto-rows: 1fr;
      gap: 32px;
    }
  }
}

.clip-edge {
  background: var(--white);
  height: clamp(32px, 6vw, 72px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 45% 0%, -1000% 0%);
}

.sponsor-intro {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 2rem;
  margin-bottom: 48px;

  @media (min-width: 720px) {
    --i: clamp(2rem, 6vw, 5rem);
    text-align: center;
    margin: var(--i) 8%;
  }
}

.sponsor-category {
  margin-bottom: 32px;
  /* margin: clamp(16px, 5vw, 64px); */

  & > div {
    /* Auto layout */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 24px;
    gap: 8px;
    background: rgba(255, 255, 255, 0.75);
    background-blend-mode: luminosity;
    box-shadow: 8px 12px 10px rgba(255, 255, 255, 0.75);

    /* Inside auto layout */
    align-self: stretch;
    z-index: 25;
    position: relative;
    filter: saturate(0);
    height: 168px;

    a {
      width: 100%;
      height: 100%;
      min-height: 100%;
      display: flex;

      &.request-sponsor-pack {
        max-height: fit-content;
        min-height: revert;
        height: revert;
        width: revert;
      }
    }
  }
}

.sponsor-category-label {
  font-family: var(--font-label);
  font-size: 24px;
  margin-bottom: 32px;
  line-height: 1;
}

.sponsor-logo {
  display: block;
  width: 100%;
  height: auto;
}

.sponsors-cta {
  text-align: center;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.request-sponsor-pack {
  text-transform: uppercase;
  font-size: clamp(1.3rem, 2vw, 5rem);
  rotate: -4deg;
}

footer {
  padding: 56px 0 48px;
  text-align: center;
}

footer nav {
  ul {
    list-style: none;
  }
}

footer nav a {
  font-family: var(--font-body);
  font-size: 26px;
  color: var(--white);
  line-height: 1.7;
  display: inline;
}

footer nav a:hover {
  text-decoration: underline;
}

#high_contrast {
  display: flex;
  align-items: center;
  z-index: 10;
  position: absolute;
  top: 0;
  right: 8px;
  cursor: pointer;
  user-select: none;
}

@container style(--high-contrast: 1) {
  #paper-filter {
    opacity: 0;
  }

  .hero-white {
    margin-top: 0;
  }

  .hero-black {
    margin: 0 auto;
  }

  header {
    padding-bottom: 40px;
    @media (min-width: 720px) {
      margin: 0;
      max-width: 100%;
      display: flex;
      flex-direction: column;
    }
  }

  footer,
  body,
  header {
    background: var(--black);
  }

  .sponsor-category > div {
    filter: none;
  }
}

.hero-ctas {
  position: relative;
}

.hero-ctas:has(when-do[do='show'][style$='contents']):after {
  content: '';
  display: block;
  background: url(/images/ring-black.avif) no-repeat;
  position: absolute;
  background-size: contain;
  z-index: 100;
  pointer-events: none;
  width: 142%;
  left: -60px;
  top: -50px;
  aspect-ratio: 1;
  transform: scaleX(-1);
}

.tickets-close {
  position: absolute;
  object-fit: contain;
  left: 50px;
  z-index: 1000;
  width: 200px;
  margin-top: 16px;
  rotate: -4deg;

  &:hover {
    position: absolute;
    rotate: -5deg;
    z-index: 1000;
  }
}
