@font-face {
  font-family: Anton;
  src: url('/fonts/farewell/anton.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: Caveat;
  src: url('/fonts/farewell/caveat.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
}

:root {
  color-scheme: dark;
  --ink: #121212;
  --paper: #f7f3ee;
  --muted: #c4bcb3;
  --soft: #aaa198;
  --accent: #e85d3f;
  background: var(--ink);
  color: var(--paper);
  font-family: Arial,Helvetica,sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

main {
  overflow: clip;
}

a {
  color: inherit;
  text-decoration-thickness: .0625rem;
  text-underline-offset: .35em;
}

a:focus-visible {
  outline: .125rem solid var(--accent);
  outline-offset: .375rem;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure,
p {
  margin: 0;
}

::selection {
  color: var(--ink);
  background: var(--paper);
}

.arrow {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  filter: invert(1);
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 1rem;
  left: 1rem;
  padding: 1rem;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.opening {
  position: relative;
  isolation: isolate;
  height: 100svh;
  min-height: 48rem;
  max-height: 83rem;
  background: #10100f;
}

.scene-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('/img/farewell/guest-ranya.jpg') center 35%/cover no-repeat;
  opacity: .055;
  filter: blur(.2rem) saturate(.55);
  pointer-events: none;
}

.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.brand {
  display: block;
  width: 21.4%;
  max-width: 23rem;
  background: var(--paper);
  padding: 1.8vw 3.65vw 1.4vw;
  color: var(--ink);
  text-decoration: none;
  transform: rotate(-1.4deg);
  transform-origin: left top;
}

.brand img {
  width: 100%;
  filter: brightness(0);
}

.brand span {
  display: block;
  font-size: clamp(.625rem,.8vw,.875rem);
  line-height: 1.5;
  letter-spacing: .21em;
  text-transform: uppercase;
  margin-top: .625rem;
}

h1 {
  position: absolute;
  z-index: 4;
  left: 10.3%;
  top: 15.1%;
  margin: 0;
  white-space: nowrap;
  font-family: Anton,Impact,sans-serif;
  font-weight: 400;
  font-size: 13.5vw;
  line-height: .96;
  letter-spacing: 0;
  transform: rotate(-2.3deg) scaleY(1.13);
  transform-origin: center;
  pointer-events: none;
}

.photo-plane {
  position: absolute;
  transform: translate3d(0,var(--drift,0rem),0) rotate(var(--angle));
  transform-origin: center;
  will-change: transform;
}

.photo-plane>img {
  width: 100%;
  box-shadow: 0 1.5rem 4rem #0005;
}

.photo-plane figcaption {
  padding: .6rem .3rem 0;
  font-size: .6875rem;
  color: var(--muted);
  line-height: 1.5;
}

.photo-plane figcaption a {
  text-decoration: none;
}

.photo-plane figcaption a:hover {
  text-decoration: underline;
}

.cup {
  z-index: 3;
  left: 55.4%;
  top: 28.2%;
  width: 43%;
  height: 55.5%;
  --angle: -4.4deg;
}

.cup>img {
  height: 100%;
  object-fit: cover;
  object-position: center 49%;
}

.cup figcaption {
  position: absolute;
  bottom: 1rem;
  left: 1.1rem;
  padding: .25rem .4rem;
  background: #121212b8;
  color: var(--paper);
}

.farewell-copy {
  position: absolute;
  z-index: 7;
  left: 3.65%;
  top: 80.2%;
  max-width: 40%;
  font-size: clamp(1rem,1.47vw,1.5rem);
  line-height: 1.48;
}

.farewell-copy:after {
  content: '';
  display: block;
  width: 2.5rem;
  margin-top: 1.15rem;
  border-top: .2rem solid var(--accent);
}

.signature {
  font-family: Caveat,cursive;
  font-weight: 400;
  font-size: clamp(2.5rem,4.3vw,5rem);
  line-height: 1;
  transform: rotate(-7deg);
  color: #e2d5c5;
  white-space: nowrap;
}

.opening-frame>.signature {
  position: absolute;
  z-index: 7;
  right: 3.2%;
  top: 87.4%;
}

.scene-colophon {
  position: absolute;
  left: 3.65%;
  bottom: 4%;
  font-size: .625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--soft);
}

.eyebrow {
  font-size: .6875rem;
  line-height: 1.6;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--muted);
}

.epilogue h2 {
  font-family: Anton,Impact,sans-serif;
  font-weight: 400;
  font-size: clamp(5rem,10vw,10rem);
  line-height: .96;
  letter-spacing: -.025em;
  margin: 2rem 0;
}

.epilogue {
  padding: 8rem 6vw 9rem;
  text-align: center;
  background: #191917;
}

.epilogue h2 {
  font-size: clamp(3.5rem,7.5vw,8rem);
  margin-block: 3rem;
  line-height: 1.03;
}

.epilogue h2 span {
  color: #9e978e;
}

.thanks {
  font-size: 1.125rem;
  line-height: 1.6;
}

.future-copy {
  font-size: .9375rem;
  line-height: 1.65;
  margin: 2rem auto 3rem;
  color: var(--muted);
}

.epilogue .signature {
  display: inline-block;
  font-size: clamp(2.5rem,4.5vw,4.5rem);
}

@media (prefers-reduced-motion: no-preference) {
  .epilogue h2 {
    animation: arrive linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }

  @keyframes arrive {
    from {
      opacity: .3;
      translate: 0 3rem;
    }

    to {
      opacity: 1;
      translate: 0 0;
    }
  }
}

@media (max-width: 66rem) and (min-width: 48.01rem) {
  .opening {
    height: 68rem;
    min-height: 100svh;
  }

  .brand {
    width: 25%;
    padding: 1.5rem 2rem;
  }

  .brand span {
    font-size: .5625rem;
  }

  h1 {
    top: 17%;
    font-size: 14.5vw;
    left: 7%;
  }

  .cup {
    top: 30%;
    left: 58%;
    width: 39%;
    height: 42%;
  }

  .farewell-copy {
    top: 77%;
    max-width: 60%;
    font-size: 1.125rem;
  }

  .opening-frame>.signature {
    top: 86%;
    right: 5%;
    font-size: 3rem;
  }
}

@media (max-width: 48rem) {
  .opening {
    height: auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 3rem;
  }

  .brand {
    width: 11.5rem;
    max-width: 51%;
    padding: 1.25rem 1.5rem 1rem;
  }

  .brand span {
    font-size: .5625rem;
    margin-top: .5rem;
    letter-spacing: .16em;
  }

  h1 {
    position: relative;
    left: auto;
    top: auto;
    margin: 2.6rem 5vw 1.4rem;
    font-size: 23vw;
    line-height: 1;
    letter-spacing: -.035em;
    transform: rotate(-3deg);
    white-space: normal;
  }

  h1 span {
    display: block;
  }

  h1 span:last-child {
    font-size: 1.52em;
    line-height: 1;
  }

  .photo-plane {
    position: relative;
    left: auto;
    top: auto;
    height: auto;
    will-change: auto;
  }

  .cup {
    width: 84%;
    margin: 0 auto 2rem;
    --angle: 2deg;
    z-index: 3;
    height: auto;
  }

  .cup>img {
    height: auto;
    object-fit: contain;
  }

  .cup figcaption {
    bottom: .75rem;
    left: .75rem;
    font-size: .625rem;
  }

  .photo-plane figcaption {
    font-size: .625rem;
  }

  .farewell-copy {
    position: relative;
    top: auto;
    left: auto;
    max-width: none;
    margin: 2.75rem 7vw 0;
    font-size: 1rem;
    line-height: 1.55;
  }

  .farewell-copy p br {
    display: none;
  }

  .farewell-copy p span {
    display: block;
    margin-bottom: .35rem;
  }

  .farewell-copy:after {
    margin-top: 1rem;
    width: 2rem;
  }

  .opening-frame>.signature {
    position: relative;
    top: auto;
    right: auto;
    font-size: clamp(1.8rem,9vw,2.4rem);
    text-align: right;
    margin: 2rem 7vw 2.75rem;
  }

  .scene-colophon {
    position: relative;
    left: auto;
    bottom: auto;
    margin: 0 7vw;
    font-size: .5625rem;
  }

  .scene-backdrop {
    background-position: center top;
    background-size: auto 100svh;
    opacity: .1;
  }

  .epilogue {
    padding: 5rem 5vw 5.5rem;
  }

  .epilogue .eyebrow {
    font-size: .5625rem;
  }

  .epilogue h2 {
    font-size: 10vw;
    margin: 2rem 0;
  }

  .thanks {
    font-size: 1rem;
  }

  .future-copy {
    font-size: .875rem;
    max-width: 19rem;
  }
}

@media (max-width: 48rem) {
  h1 span:first-child {
    font-size: .75em;
    white-space: nowrap;
  }

  .farewell-copy {
    margin: 2rem 7vw 3rem;
  }
}

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

  .photo-plane {
    --drift: 0rem!important;
    will-change: auto;
  }

  *,
  *::before,
  *::after {
    animation: none!important;
    transition: none!important;
  }
}
