:root {
  --color-brand: #e0217e;
  --color-ink: #1d1d1b;
  --color-bone: #f3e3e8;
  --color-sky: #7dd9de;
  --color-yellow: #f9de00;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --font-display: Georgia, "Times New Roman", serif;
  --font-text: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--color-bone);
  color: var(--color-ink);
  cursor: url("../img/flamingo-star-cursor.png") 24 24, auto;
  font-family: var(--font-text);
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    linear-gradient(105deg, rgba(224, 33, 126, 0.09) 0 31%, rgba(243, 227, 232, 0.2) 31% 48%, rgba(125, 217, 222, 0.12) 48% 100%),
    var(--color-bone);
}

a,
button {
  cursor: url("../img/flamingo-star-cursor.png") 24 24, pointer;
}

a {
  color: inherit;
}

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

.coming-soon {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  height: 100svh;
  min-height: 34rem;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: clamp(0.75rem, 2vw, 1.5rem) clamp(0.85rem, 3vw, 2rem);
  text-align: center;
}

.coming-soon > * {
  min-width: 0;
}

.projector {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(29, 29, 27, 0.035) 0 1px, transparent 1px 8px);
  mix-blend-mode: multiply;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(100%, 75rem);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(0.35rem, 1.4vh, 1rem);
  animation: topbarEnter 620ms cubic-bezier(0.2, 0.74, 0.14, 1) 80ms both;
}

.nav-logo {
  display: inline-flex;
  width: clamp(6.2rem, 12vw, 9.5rem);
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  width: 100%;
}

.headline {
  z-index: 2;
  display: grid;
  justify-items: center;
  width: 100%;
  min-width: 0;
  margin-top: 0;
}

.eyebrow {
  margin: 0 0 clamp(0.32rem, 1vh, 0.72rem);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: eyebrowFromTitle 760ms cubic-bezier(0.2, 0.74, 0.14, 1) 420ms both;
  transform-origin: center bottom;
}

h1 {
  max-width: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8.8vw, 7.5rem);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: 0;
  white-space: nowrap;
  animation: titleReveal 720ms cubic-bezier(0.2, 0.74, 0.14, 1) 220ms both;
  transform-origin: center center;
}

.portfolio-stage {
  position: relative;
  z-index: 3;
  width: min(100%, 58rem);
  margin-top: clamp(2.3rem, 6vh, 4rem);
  animation: portfolioEnter 760ms cubic-bezier(0.2, 0.74, 0.14, 1) 760ms both;
}

.portfolio-tabs {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  margin-bottom: 0.55rem;
  padding: 0.24rem;
  border: 2px solid var(--color-ink);
  background: var(--color-bone);
  box-shadow: 0.34rem 0.34rem 0 var(--color-brand);
}

.portfolio-tab {
  min-height: 2.15rem;
  padding: 0.45rem 0.78rem;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font-family: var(--font-text);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-tab.is-active {
  background: var(--color-yellow);
}

.portfolio-tab:focus-visible {
  outline: 3px solid var(--color-sky);
  outline-offset: 2px;
}

.contact-sheet {
  position: relative;
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: clamp(0.56rem, 1vw, 0.82rem);
  border: 2px solid var(--color-ink);
  background: var(--color-ink);
  color: var(--color-bone);
  box-shadow: 0.65rem 0.65rem 0 var(--color-yellow), 1rem 1rem 0 var(--color-brand);
  transform: perspective(900px) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  transform-origin: center;
  transition: transform 180ms ease;
}

.contact-sheet::before,
.contact-sheet::after {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  z-index: 1;
  height: 0.55rem;
  content: "";
  background: repeating-linear-gradient(90deg, var(--color-bone) 0 0.55rem, transparent 0.55rem 1.35rem);
  opacity: 0.22;
  pointer-events: none;
}

.contact-sheet::before {
  top: 0.55rem;
}

.contact-sheet::after {
  bottom: 0.55rem;
}

.film-strip {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding-block: clamp(0.85rem, 1.6vh, 1rem);
}

.work-card[hidden] {
  display: none;
}

.work-card {
  position: relative;
  min-width: 0;
  min-height: clamp(8.2rem, 14vw, 12rem);
  overflow: hidden;
  border: 1px solid rgba(243, 227, 232, 0.28);
  background: var(--color-ink);
  text-align: left;
  text-decoration: none;
  isolation: isolate;
  animation: cardCue 520ms cubic-bezier(0.2, 0.74, 0.14, 1) both;
}

.work-card:nth-child(2) {
  animation-delay: 80ms;
}

.work-card:nth-child(3) {
  animation-delay: 160ms;
}

.work-card:nth-child(4) {
  animation-delay: 80ms;
}

.work-card:nth-child(5) {
  animation-delay: 160ms;
}

.work-card:nth-child(6) {
  animation-delay: 240ms;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
  transition:
    filter 220ms ease,
    transform 220ms ease;
}

.work-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, transparent 43%, rgba(0, 0, 0, 0.84));
}

.work-card span {
  position: absolute;
  inset: auto 0.65rem 0.65rem;
  z-index: 2;
  font-size: clamp(0.72rem, 0.95vw, 0.92rem);
  font-weight: 850;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.work-card:hover img,
.work-card:focus-visible img {
  filter: saturate(1.12) contrast(1.14);
  transform: scale(1.055);
}

.work-card:focus-visible {
  outline: 4px solid var(--color-sky);
  outline-offset: 4px;
}

.work-modal {
  width: min(68rem, calc(100vw - 2rem));
  max-width: none;
  height: min(42rem, calc(100vh - 2rem));
  height: min(42rem, calc(100dvh - 2rem));
  max-height: none;
  padding: 0;
  border: 2px solid var(--color-ink);
  background: var(--color-ink);
  color: var(--color-bone);
  box-shadow: 0.65rem 0.65rem 0 var(--color-yellow), 1rem 1rem 0 var(--color-brand);
}

.work-modal::backdrop {
  background: rgba(29, 29, 27, 0.62);
  backdrop-filter: blur(0.18rem);
}

.work-modal__frame {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
}

.work-modal__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.82rem;
  border-bottom: 2px solid rgba(243, 227, 232, 0.18);
  text-align: left;
}

.work-modal__bar h2 {
  margin: 0;
}

.work-modal__bar h2 {
  color: var(--color-yellow);
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-modal__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.work-modal__close {
  display: inline-flex;
  min-height: 2.3rem;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-bone);
  background: var(--color-brand);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.work-modal__close {
  min-width: 2.3rem;
  padding: 0.5rem 0.72rem;
}

.work-modal__close:hover {
  background: var(--color-yellow);
  color: var(--color-ink);
}

.work-modal__close:focus-visible {
  outline: 3px solid var(--color-sky);
  outline-offset: 3px;
}

.work-modal__screen {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@keyframes topbarEnter {
  from {
    opacity: 0;
    transform: translateY(-0.85rem);
  }

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

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes eyebrowFromTitle {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(2.05rem) scale(0.96);
  }

  58% {
    opacity: 1;
  }

  to {
    opacity: 1;
    clip-path: inset(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes portfolioEnter {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }

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

@keyframes cardCue {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

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

.signal-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  min-height: 3.25rem;
  padding: 0.62rem 0.8rem 0.62rem 0.66rem;
  border: 2px solid var(--color-ink);
  background: var(--color-yellow);
  color: var(--color-ink);
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0.45rem 0.45rem 0 var(--color-brand);
  transform: rotate(-1.5deg);
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.signal-link:hover {
  background: var(--color-bone);
  box-shadow: 0.58rem 0.58rem 0 var(--color-brand);
  transform: rotate(0deg) translate(-0.08rem, -0.08rem);
}

.signal-link:focus-visible {
  outline: 4px solid var(--color-sky);
  outline-offset: 5px;
}

.signal-link__star {
  width: 1.75rem;
  aspect-ratio: 1;
  background: url("../img/flamingo-star.png") center / contain no-repeat;
  flex: 0 0 auto;
}

.signal-link strong,
.signal-link small {
  display: block;
}

.signal-link strong {
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
}

.signal-link small {
  margin-top: 0.22rem;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  line-height: 1;
}

@media (max-width: 68rem) {
  .coming-soon {
    min-height: 32rem;
    padding: 0.85rem;
  }

  .topbar {
    margin-bottom: clamp(0.55rem, 1.2vh, 0.85rem);
  }

  .headline {
    margin-top: 0;
  }

  .eyebrow {
    margin-bottom: 0.45rem;
  }

  h1 {
    font-size: clamp(2.35rem, 10vw, 4.6rem);
    line-height: 0.9;
  }

  .portfolio-stage {
    width: calc(100vw - 2rem);
    margin-top: clamp(2.2rem, 6vh, 3.2rem);
  }

  .portfolio-tabs {
    margin-bottom: 0.45rem;
  }

  .contact-sheet {
    width: 100%;
    margin-bottom: 0;
    padding: 0.65rem;
    transform: none;
  }

  .film-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .work-card {
    grid-column: auto;
    min-height: clamp(6.45rem, 17vh, 8.25rem);
  }

  .signal-link {
    padding-right: 0.68rem;
  }
}

@media (max-width: 40rem) {
  body {
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .coming-soon {
    height: 100vh;
    height: 100dvh;
    min-height: 31rem;
    min-height: max(31rem, 100dvh);
    overflow: hidden;
    padding: 0.72rem;
    padding-bottom: calc(1.15rem + env(safe-area-inset-bottom));
  }

  .topbar {
    align-items: flex-start;
    gap: 0.65rem;
  }

  .nav-logo {
    width: clamp(5.8rem, 29vw, 7rem);
  }

  h1 {
    font-size: clamp(2.15rem, 11.2vw, 2.65rem);
  }

  .contact-sheet {
    width: 100%;
    padding: 0.5rem;
    box-shadow: 0.45rem 0.45rem 0 var(--color-yellow), 0.72rem 0.72rem 0 var(--color-brand);
  }

  .portfolio-stage {
    max-width: 22.5rem;
    margin-top: clamp(1.9rem, 6.4vh, 3.4rem);
  }

  .portfolio-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.22rem;
    margin-bottom: 0.56rem;
    padding: 0.18rem;
  }

  .portfolio-tab {
    min-height: 1.9rem;
    padding: 0.34rem 0.26rem;
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }

  .film-strip {
    display: flex;
    gap: 0.42rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-block: 0.85rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .film-strip::-webkit-scrollbar {
    display: none;
  }

  .work-card {
    flex: 0 0 clamp(11rem, 69vw, 15rem);
    min-height: clamp(8.2rem, 23vh, 10.65rem);
    scroll-snap-align: start;
  }

  .work-card.is-featured {
    grid-column: auto;
    min-height: clamp(8.2rem, 23vh, 10.65rem);
  }

  .work-card span {
    inset-inline: 0.5rem;
    bottom: 0.5rem;
    font-size: 0.68rem;
  }

  .signal-link {
    gap: 0.5rem;
    min-height: 2.55rem;
    padding: 0.5rem 0.62rem 0.48rem 0.58rem;
  }

  .signal-link:hover {
    transform: rotate(0deg) translate(-0.08rem, -0.08rem);
  }

  .signal-link__star {
    width: 1.35rem;
  }

  .signal-link strong {
    font-size: 0.72rem;
  }

  .signal-link small {
    font-size: 0.62rem;
  }

  .work-modal {
    position: fixed;
    inset: 0.62rem;
    width: auto;
    height: auto;
    margin: 0;
    overflow: hidden;
  }

  .work-modal__frame {
    position: relative;
    grid-template-rows: minmax(0, 1fr);
  }

  .work-modal__bar {
    position: absolute;
    left: 0.62rem;
    right: 0.62rem;
    bottom: calc(0.62rem + env(safe-area-inset-bottom));
    z-index: 5;
    align-items: flex-start;
    border: 2px solid var(--color-bone);
    background: rgba(29, 29, 27, 0.92);
    box-shadow: 0.32rem 0.32rem 0 var(--color-brand);
    padding: 0.56rem;
  }

  .work-modal__bar > div:first-child {
    min-width: 0;
  }

  .work-modal__bar h2 {
    max-width: 11rem;
    font-size: 0.82rem;
  }

  .work-modal__actions {
    flex: 0 0 auto;
    gap: 0.35rem;
  }

  .work-modal__close {
    min-height: 2rem;
    padding: 0.42rem 0.5rem;
    font-size: 0.58rem;
  }

  .work-modal__screen {
    height: 100%;
  }

}

@media (max-width: 23rem) {
  h1 {
    font-size: 2.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .contact-sheet {
    transform: none;
  }
}
