:root {
  --p-boxed: 4px 4px 0px 0px #01001a inset, 4px 4px 0px 0px #01001a;
  --c-gold: #ffd000;
  --c-gold-p3: color(display-p3 1 0.83 0);
}

.sessions li {
  view-transition-name: speaker-content;
}

::view-transition-old(speaker-content),
::view-transition-new(speaker-content) {
  animation-duration: 3000ms;
  animation-timing-function: ease-in-out;
}

::view-transition-old(speaker-content) {
  animation-name: slide-out-left;
}

::view-transition-new(speaker-content) {
  animation-name: slide-in-right;
}

@keyframes slide-out-left {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-20%);
    opacity: 0;
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(20%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

when-do:empty {
  display: none;
}

* {
  box-sizing: border-box;
  color: #01001a;
  color: color(display-p3 0.0039 0 0.0941);
  font-feature-settings: 'liga' on, 'clig' off;
  font-family: 'Funnel Display';
  font-style: normal;
  font-weight: 400;
  line-height: 1; /* 114.286% */
  padding: 0;
  margin: 0;
}

a {
  font-weight: inherit;
}

h1 {
  font-size: clamp(3.4rem, 26vw, 10rem);
  font-weight: 800;
  line-height: 100%;
}

p {
  font-size: clamp(1.1375rem, 2vw, 1.5rem);
  line-height: 1.4;
  font-weight: 500;
}

.strap {
  font-weight: 700;
  /* margin: 48px 0; */
  text-align: left;
  font-size: 32px;
  line-height: 32px;
  text-wrap: balance;
}

.logo {
  /* margin-bottom: 48px; */
  display: flex;
  flex-direction: column;
  align-items: center;

  time {
    font-weight: 800;
    font-size: clamp(1.5rem, 11vw, 4.1rem);
    line-height: 100%;
    white-space: nowrap;
  }
}

section {
  padding: 0 calc((100vw - 1248px) / 2);
}

.container {
  padding: 96px;
}

.boxed {
  background-color: #fff;
  box-shadow: var(--p-boxed);
}

a.boxed {
  transition: box-shadow 150ms;
}

a.boxed:hover {
  box-shadow: 4px 4px 0 0 #01001a inset, 20px 16px 0 0 #01001a,
    4px 4px 0 0 #01001a inset, 4px 4px 0 0 #01001a;
}

.hflex {
  display: flex;
  flex-direction: column; /* later it'll be row */
  gap: 24px;
}

body {
  background: var(--c-gold);
  background-color: var(--c-gold-p3);
}

#index body:before {
  content: '';
  background-image: url(/assets/sep2.svg);
  display: block;
  background-repeat: no-repeat;
  /* background-size: 100% auto; */
  background-size: 100% clamp(160px, 47vw, 344px);
  background-position: top center;
  width: 100vw;
  height: clamp(160px, 47vw, 344px);
  position: absolute;
  z-index: 0;
}

section.hero {
  position: relative;
  z-index: 1;
  background-image: url(/assets/floor.svg);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: contain;

  .container {
    padding: 96px 40px;
    gap: 48px;
  }
}

section._hero {
  background: var(--c-gold);
  background-color: var(--c-gold-p3);
  background-image: url(/assets/floor.svg), url(/assets/sep2.svg);
  background-repeat: no-repeat, no-repeat;
  background-position: bottom center, top center;
  /* background-size: 100% clamp(164px, 50vw, 300px), */
  /* 100% clamp(160px, 47vw, 256px); */
  background-size: contain;

  .container {
    padding: 96px 40px;
    gap: 48px;
  }
}

section.footer {
  background: white;
}

section {
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% clamp(164px, 50vw, 300px);
  background-size: contain;

  h2,
  h3 {
    font-size: clamp(2.5rem, 10vw, 72px);
    font-weight: 800;
    line-height: 1.4;
    text-align: left;
  }

  .container {
    padding: 40px;
    max-width: 1096px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
}

section.schedule {
  background-color: #6767ff;
  background-image: url(/assets/floor-schedule.svg);

  h2,
  h3 {
    color: white;
  }
}

section.speaker {
  background-color: #6767ff;
  background-image: url(/assets/floor-speaker.svg);
}

section.info {
  background-color: #ff8359;
  background-color: color(display-p3 1 0.51 0.349);
  background-image: url(/assets/floor-info.svg);
}

#logo {
  width: clamp(200px, 27vw, 400px);
}

#speaker {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  min-height: 100vh;

  a {
    color: white;
    font-weight: 800;
  }

  .speaker {
    padding: 0;
    min-height: 100vh;
  }

  .speaker-info-container {
    padding: clamp(12px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  img {
    width: 100%;
    object-fit: cover;
  }

  * {
    color: white;
    h1 {
      font-size: clamp(2rem, 10vw, 3rem);
    }

    h2,
    h3 {
      font-size: 1.5rem;
    }

    h3 {
      font-weight: 500;
      font-style: italic;
    }

    & > div:last-child {
      padding-bottom: 90px;
    }
  }
}

ffconf-card-holder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

ffconf-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  font-size: 26px;
  font-style: normal;
  font-weight: 700;
  line-height: 32px; /* 114.286% */
  gap: 16px;

  * {
    font-size: inherit;
    text-align: center;
  }
}

.sponsors {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: space-between;
  /* margin-top: 40px; */
  flex-wrap: wrap;

  .sponsor {
    padding: 32px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;

    em {
      text-decoration: underline;
    }

    span,
    img {
      display: block;
      font-size: 1.5rem;
    }

    img {
      /* align-content: space-between; */
      justify-self: center;
      min-height: calc(100% - 64px);
      width: 100%;
      object-fit: fill;
    }

    .title {
      color: #010018;
    }

    .description,
    em {
      color: #778083;
      line-height: 1.4;
      font-size: clamp(1rem, 4vw, 1.5rem);
    }
  }
}

.card-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;

  li {
    background: white;

    a {
      text-decoration: none;
      display: block;
      padding: clamp(32px, 4vw, 40px) clamp(32px, 5vw, 56px);

      span {
        display: block;
        line-height: 1.4;
      }

      .title {
        font-size: clamp(1.13rem, 3vw, 1.5rem);
        font-weight: 500;
      }

      .description {
        text-decoration: underline;
        font-size: clamp(1.75rem, 5vw, 2rem);
        font-weight: 800;
      }
    }
  }
}

.tickets {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.notice {
  border: 4px solid black;
  padding: 16px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-content: center;
  justify-content: center;
  min-height: 140px;
  background: var(--c-gold);
  background: var(--c-gold-p3);

  &.cta {
    background: black;
    color: var(--c-gold);
    color: var(--c-gold-p3);
    transition: box-shadow 150ms;
    display: flex;
    flex-direction: column;
    font-weight: bold;
    font-size: 2rem;
    line-height: 1.1;
    z-index: 10;

    &:hover {
      box-shadow: 15px 12px 0 0 #282100;
    }
  }

  p.heading {
    font-weight: bold;
    font-size: 2rem;
    line-height: 1.1;
    color: inherit;

    small {
      font-weight: inherit;
      font-size: 1.2rem;
    }
  }

  p {
    margin: 8px;
    font-size: clamp(1.125rem, 4vw, 1.5rem);
  }
}

.tags {
  font-size: 1.2rem;
  color: #778083;
}

.sessions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 3vw, 56px);

  li {
    display: grid;
    padding-top: 4px; /* clear the shadow */
    padding-left: 4px;
    align-items: center;
    grid-template-rows: 1fr auto;

    h3 a {
      font-size: clamp(1.75rem, 4vw, 2.5rem);
      font-weight: 800;
      text-wrap: balance;
      display: inline-block;
    }

    .speaker-name {
      color: #778083;
      font-weight: 500;
      font-size: clamp(1.13rem, 5vw, 1.5rem);
    }

    .details {
      padding: clamp(24px, 6vw, 56px);
      gap: clamp(32px, 3vw, 56px);
      display: flex;
      flex-direction: column;
    }

    .speaker-image {
      grid-column-start: 1;
      grid-row-start: 1;
      width: 100%;
      height: 100%;
      object-fit: contain;
      align-self: flex-start;

      /* via the wonderful Ana Tudor: https://ko-fi.com/anatudor */
      display: block;
      --pattern: linear-gradient(#848484, #000000) 0/ 1% 0.2em;

      div {
        position: relative;
        height: 100%;
        height: 260px;
        background: var(--img), var(--pattern);
        background-repeat: repeat;
        background-size: 256px;
        filter: contrast(2);
        background-blend-mode: color-dodge;
        --img: var(--p-image-url) 50% / cover;
      }
    }
  }
}

[data-speaker='hannah'] {
  --p-image-url: url(/assets/speakers/hannah-duo.jpg);
}

[data-speaker='hellen'] {
  --p-image-url: url(/assets/speakers/hellen-duo.jpg);
}

[data-speaker='serges'] {
  --p-image-url: url(/assets/speakers/serges-duo.jpg);
}

[data-speaker='jessica-eda'] {
  --p-image-url: url(/assets/speakers/jessica-eda-duo.jpg);
}

footer {
  font-size: 1.5rem;

  a {
    font-weight: 800;
  }

  ul {
    list-style: none;
  }

  li {
    margin: 16px 0;
    line-height: 1.7;
  }
}

@media screen and (min-width: 768px) {
  .tickets {
    flex-direction: row;
    .notice {
      &:first-child {
        margin-bottom: 40px;
      }

      &:last-child {
        margin-left: -40px;
        margin-top: 40px;
      }
    }
  }
  .sessions li .speaker-image div {
    width: 260px;
    height: 100%;
  }

  #speaker {
    flex-direction: row-reverse;
    /* align-items: stretch; */
    align-items: center;
    justify-content: start;

    img {
      object-fit: cover;
      position: fixed;
      top: 0;
      right: 0;
      position: fixed;
      height: 100vh;
      width: 45vw;
    }

    .speaker-info-container {
      width: 55vw;
    }

    & > div:first-of-type {
      overflow-y: auto;
      min-height: 100vh;
    }
  }

  ffconf-card-holder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .sponsors {
    flex-direction: row;

    .sponsor {
      padding: 40px 56px;
      flex: 0.5;

      &:not(&:has(img)) {
        background: #fff url(/assets/ext.svg) no-repeat calc(100% - 56px)
          calc(100% - 40px);
      }
    }
  }

  .card-links a {
    background: url(/assets/ext.svg) no-repeat calc(100% - 56px) 50%;
  }

  .hflex {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    margin: clamp(40px, 10vw, 96px) 0;

    h2 {
      line-height: 1;
    }

    p {
      flex: 0.7;
    }
  }

  .sessions {
    display: flex;
    flex-direction: column;
    gap: 32px;

    li:not(.info) {
      grid-template-columns: 1fr 260px;
      grid-template-rows: 1fr;

      .speaker-image {
        grid-column-start: 2;
      }
    }
  }
}

@media screen and (min-width: 864px) {
  section.hero {
    padding: 100px 96px;
    .container {
      gap: 96px;
    }
  }
  ffconf-card-holder {
    grid-template-columns: 1fr 1fr 1fr;
  }

  ffconf-card {
    padding: 48px;
  }

  .strap {
    /* margin: 96px 0; */
    font-size: 2.5rem;
    line-height: 1;
  }

  section .container {
    padding: 96px 40px;
  }

  .sponsors .sponsor {
    height: 360px;
    flex: 0.5;
  }
}

@media screen and (min-width: 1024px) {
  .logo {
    flex-direction: row-reverse;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  section .container > h2 {
    margin: 80px 0;
  }
}
