:root {
  --blue: #1b3df5;
  --link-blue: #0c51fa;
  --border-blue: #0953fa;
  --light-blue: #dce6ff;
  --ink: #0e1430;
  --page-background: #e9e6df;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
}

button {
  font: inherit;
}

.page-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 40px;
}

.summit-frame {
  position: relative;
  flex: none;
  width: 1280px;
  height: 800px;
}

.summit-card {
  position: relative;
  width: 1280px;
  height: 800px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 18px 44px rgba(20, 19, 16, 0.14);
  transform-origin: top left;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 36px;
  border-bottom: 1px solid #0a52fa;
}

.rainfall-logo-link {
  display: inline-grid;
  width: 96px;
  height: 40px;
  align-items: center;
  text-decoration: none;
}

.rainfall-logo-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.rainfall-logo-animation,
.rainfall-logo-fallback {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
}

.rainfall-logo-animation {
  overflow: visible;
  opacity: 0;
}

.rainfall-logo-fallback {
  object-fit: contain;
}

.rainfall-logo-link.is-ready .rainfall-logo-animation {
  opacity: 1;
}

.rainfall-logo-link.is-ready .rainfall-logo-fallback {
  opacity: 0;
}

.rainfall-logo-animation svg {
  overflow: visible;
}

.rainfall-logo-animation svg path {
  fill: var(--blue) !important;
}

.invite-label {
  margin: 0;
  padding: 6px 0;
  color: var(--link-blue);
  font-family: "Anton", sans-serif;
  font-size: 30px;
  font-weight: 400;
  text-transform: uppercase;
}

/* Main event area */

.event-hero {
  position: absolute;
  top: 68px;
  bottom: 112px;
  left: 0;
  width: 880px;
}

.hero-photo {
  position: absolute;
  z-index: 1;
  top: 236px;
  right: 36px;
  bottom: 24px;
  left: 36px;
  overflow: hidden;
  background: #c9c4b8;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.035);
  transform-origin: 50% 50%;
  will-change: transform;
}

.event-title {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 36px;
  margin: 0;
  color: var(--blue);
  font-family: "Anton", sans-serif;
  font-size: 150px;
  font-weight: 400;
  line-height: 0.88;
  text-transform: uppercase;
}

.event-details {
  position: absolute;
  z-index: 2;
  top: 30px;
  right: 40px;
  width: 210px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #0951f9;
  color: #0d4ef9;
}

.event-day,
.event-location {
  font-family: "Instrument Serif", serif;
  font-size: 20px;
  font-weight: 400;
}

.event-day {
  margin: 0;
  font-style: italic;
  letter-spacing: 0.5px;
}

.event-date {
  display: block;
  margin-top: 2px;
  font-family: "Anton", sans-serif;
  font-size: 38px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.event-location {
  margin-top: 12px;
  line-height: 1.3;
  letter-spacing: 0.3px;
  font-style: normal;
}

.event-location-link {
  position: relative;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.event-location-link::after {
  position: absolute;
  right: -22px;
  bottom: 1px;
  opacity: 0;
  content: "↗";
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 14px;
  font-style: normal;
  transform: translate(-5px, 5px);
  transition:
    opacity 0.2s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.event-location-link:hover::after,
.event-location-link:focus-visible::after {
  opacity: 1;
  transform: translate(0, 0);
}

.event-location-link:focus-visible {
  border-radius: 2px;
  outline: 1.5px solid currentColor;
  outline-offset: 3px;
}

.invite-sticker {
  position: absolute;
  z-index: 3;
  top: 264px;
  right: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 190px;
  gap: 15px;
  margin: 0;
  border-radius: 50%;
  background: var(--white);
  transform: rotate(-14deg);
}

.invite-sticker img {
  display: block;
  width: 72px;
  height: auto;
  margin-top: 2px;
}

.invite-sticker p {
  margin: 0;
  color: #0a50f9;
  font-family: "Anton", sans-serif;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.2px;
  text-align: center;
  text-transform: uppercase;
}

/* RSVP panel */

.rsvp-panel {
  position: absolute;
  top: 68px;
  right: 0;
  bottom: 112px;
  display: flex;
  flex-direction: column;
  width: 400px;
  overflow: hidden;
  padding: 40px 38px;
  background: linear-gradient(180deg, var(--blue), #005efd);
  isolation: isolate;
}

.rsvp-panel::before {
  position: absolute;
  z-index: 0;
  top: -20%;
  bottom: -20%;
  left: -150%;
  width: 130%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 32px,
      rgba(255, 255, 255, 0.09) 33px,
      transparent 35px 72px
    ),
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 48%,
      transparent 100%
    );
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: skewX(-8deg);
  will-change: left, opacity;
}

.rsvp-panel > * {
  position: relative;
  z-index: 1;
}

.summit-description {
  margin: 0;
  color: var(--white);
  font-family: "Anton", sans-serif;
  font-size: 33px;
  line-height: 1.14;
  text-transform: uppercase;
}

.summit-description span {
  border-bottom: 3px solid var(--white);
}

.rsvp-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.rsvp-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 21px 22px;
  border: 0;
  background: var(--white);
  color: var(--link-blue);
  box-shadow: 0 8px 20px rgba(6, 26, 90, 0.28);
  cursor: pointer;
  font-family: "Anton", sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  isolation: isolate;
  transition:
    box-shadow 0.28s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rsvp-button::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: var(--light-blue);
  content: "";
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rsvp-button span {
  position: relative;
  z-index: 1;
}

.rsvp-button:hover {
  box-shadow: 0 11px 24px rgba(6, 26, 90, 0.34);
  transform: translateY(-3px);
}

.rsvp-button:hover::before {
  transform: scaleX(1);
  transform-origin: left center;
}

.rsvp-button:active {
  box-shadow: 0 3px 10px rgba(6, 26, 90, 0.25);
  transform: translateY(1px);
  transition-duration: 0.06s;
}

.rsvp-button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 4px;
}

.rsvp-arrow {
  display: inline-block;
  font-size: 19px;
  font-weight: 500;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rsvp-button:hover .rsvp-arrow {
  transform: translateX(7px);
}

.rsvp-note {
  margin: 0;
  color: var(--light-blue);
  font-family: "Instrument Serif", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.rsvp-note em span {
  font-style: normal;
  font-weight: 400;
}

/* Footer */

.event-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 112px;
  padding: 0 44px;
  border-top: 1px solid var(--border-blue);
}

.weather {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weather-icon {
  display: block;
  flex: none;
  width: 66px;
  height: 66px;
  background-color: var(--link-blue);
  -webkit-mask: url("sun-mask.png") center / contain no-repeat;
  mask: url("sun-mask.png") center / contain no-repeat;
  transform-origin: center;
}

.weather img {
  display: none;
}

.weather p,
.footer-location {
  margin: 0;
  color: var(--link-blue);
  font-family: "Instrument Serif", serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
}

.weather p {
  letter-spacing: 0.1px;
}

.footer-date {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  color: var(--blue);
  font-family: "Anton", sans-serif;
  font-size: 60px;
  line-height: 1;
  text-transform: uppercase;
}

.date-arrow {
  display: inline-block;
  font-size: 34px;
  transform-origin: left center;
}

.footer-location {
  letter-spacing: 0.02em;
}

/* Motion */

.motion-ready .hero-photo img {
  animation: heroDrift 14s ease-in-out infinite alternate;
}

.motion-ready .rsvp-panel::before {
  animation: rainfallSweep 10s ease-in-out 1.4s infinite;
}

.motion-ready .weather-icon {
  animation: sunTurn 22s linear infinite;
}

.motion-ready .date-arrow {
  animation: arrowDraw 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.75s both;
}

.motion-ready .footer-location {
  animation: footerLocationIn 0.7s ease-out 1.05s both;
}

@keyframes heroDrift {
  from {
    transform: scale(1.035) translate3d(-0.4%, 0.2%, 0);
  }

  to {
    transform: scale(1.085) translate3d(0.8%, -0.6%, 0);
  }
}

@keyframes rainfallSweep {
  0%,
  70% {
    left: -150%;
    opacity: 0;
  }

  76% {
    opacity: 0.45;
  }

  92% {
    opacity: 0.2;
  }

  100% {
    left: 120%;
    opacity: 0;
  }
}

@keyframes sunTurn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes arrowDraw {
  from {
    opacity: 0;
    transform: scaleX(0);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes footerLocationIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Mobile layout */

@media (max-width: 900px) {
  .page-shell {
    display: block;
    min-height: 100vh;
    padding: 16px;
  }

  .summit-frame {
    width: 100%;
    height: auto;
  }

  .summit-card {
    width: 100%;
    height: auto;
    overflow: hidden;
    transform: none;
  }

  .site-header {
    height: 58px;
    padding: 0 20px;
  }

  .rainfall-logo-link {
    width: 86px;
    height: 34px;
  }

  .invite-label {
    font-size: 23px;
  }

  .event-hero {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-areas:
      "title"
      "details"
      "photo";
    width: 100%;
    height: auto;
    gap: 18px;
    padding: 22px 20px 20px;
  }

  .hero-photo {
    position: relative;
    inset: auto;
    grid-area: photo;
    height: clamp(250px, 78vw, 430px);
  }

  .event-title {
    position: relative;
    inset: auto;
    grid-area: title;
    font-size: clamp(66px, 23vw, 130px);
  }

  .event-details {
    position: relative;
    inset: auto;
    grid-area: details;
    width: 100%;
  }

  .event-date {
    font-size: 34px;
  }

  .invite-sticker {
    position: relative;
    inset: auto;
    align-self: center;
    justify-self: end;
    grid-area: photo;
    width: 132px;
    height: 132px;
    gap: 8px;
    margin-right: 18px;
  }

  .invite-sticker img {
    width: 48px;
  }

  .invite-sticker p {
    font-size: 23px;
  }

  .rsvp-panel {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 390px;
    padding: 32px 24px;
  }

  .summit-description {
    font-size: clamp(30px, 9vw, 42px);
  }

  .rsvp-content {
    margin-top: 64px;
  }

  .event-footer {
    position: relative;
    inset: auto;
    flex-direction: column;
    height: auto;
    gap: 22px;
    padding: 28px 20px 30px;
  }

  .footer-date {
    order: -1;
    justify-content: center;
    gap: 14px;
    font-size: clamp(40px, 12vw, 58px);
  }

  .date-arrow {
    font-size: 28px;
  }

  .weather {
    justify-content: center;
  }

  .weather-icon {
    width: 52px;
    height: 52px;
  }

  .footer-location {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-button,
  .rsvp-button::before,
  .rsvp-arrow,
  .event-location-link::after {
    transition-duration: 0.01ms;
  }

  .motion-ready .hero-photo img,
  .motion-ready .rsvp-panel::before,
  .motion-ready .weather-icon,
  .motion-ready .date-arrow,
  .motion-ready .footer-location {
    animation: none;
  }
}
