@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  --ink: #111;
  --paper: #fff;
  --pink-paper: #fff7fb;
  --pink: #f68fc5;
  font-family: "Inter Tight", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

html,
body { min-width: 320px; min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--paper);
  font-weight: 400;
  letter-spacing: -.045em;
}

body.is-locked,
body.is-storming { overflow: hidden; }

button,
input { font: inherit; }

button { color: inherit; }
a { color: inherit; }

.password-gate {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
  padding: 20px 26px 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 17% 88%, rgba(246, 143, 197, .13), transparent 33%),
    radial-gradient(circle at 88% 12%, rgba(202, 239, 221, .34), transparent 30%),
    var(--pink-paper);
  transition: opacity .48s ease, visibility .48s ease;
}

.password-gate::after {
  content: "";
  position: absolute;
  right: clamp(-85px, -5vw, -30px);
  bottom: clamp(-70px, -4vw, -20px);
  width: clamp(180px, 24vw, 390px);
  aspect-ratio: 1;
  background: url("pink-cloud-davide.png") center / contain no-repeat;
  opacity: .075;
  filter: blur(1px);
  transform: rotate(-8deg);
  pointer-events: none;
}

.password-gate.is-leaving {
  visibility: hidden;
  opacity: 0;
}

.gate-wordmark,
.wordmark {
  margin: 0;
  width: max-content;
  font-size: clamp(1.5rem, 2.5vw, 2.8rem);
  font-weight: 350;
  letter-spacing: -.05em;
  line-height: .95;
  text-decoration: none;
  white-space: nowrap;
}

.gate-wordmark em,
.wordmark em { font-style: italic; font-weight: inherit; }

.password-form {
  align-self: center;
  width: min(100%, 680px);
  margin: -7vh auto 0;
}

.password-form label {
  display: block;
  margin: 0 0 clamp(1.4rem, 3vw, 2.5rem);
  font-size: clamp(2.9rem, 7vw, 7.25rem);
  font-weight: 400;
  letter-spacing: -.075em;
  line-height: .83;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.password-row input {
  min-width: 0;
  padding: .2rem 0 .35rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 350;
  letter-spacing: .02em;
}

.password-row input:focus { border-bottom-width: 2px; }

.password-row button,
.wind-toggle {
  appearance: none;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.password-row button {
  padding: .65rem 1.05rem .58rem;
  font-size: .78rem;
  font-weight: 450;
  letter-spacing: .01em;
  line-height: 1;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease;
}

.password-row button:hover,
.password-row button:focus-visible {
  color: var(--paper);
  background: var(--ink);
}

.password-message {
  min-height: 1.2em;
  margin: .72rem 0 0;
  color: #c45b88;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: -.015em;
}

.password-form.is-wrong { animation: gate-shake .32s ease both; }

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  28% { transform: translateX(-7px); }
  62% { transform: translateX(5px); }
}

.sticker-page {
  min-height: 100dvh;
  opacity: 0;
  transition: opacity .6s ease;
}

.sticker-page.is-visible { opacity: 1; }

.topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 26px 18px;
}

.wordmark a,
.home-link { text-decoration: none; }

.home-link { font-size: 1rem; line-height: 1; }
.home-link::before { content: "← "; color: #f02d21; }

.pack-stage {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: calc(100dvh - 72px);
  place-items: center;
  padding: 16px 26px 54px;
  text-align: center;
}

.pack-trigger {
  appearance: none;
  width: min(49vw, 500px);
  min-width: 245px;
  margin-top: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 16px 20px rgba(31, 28, 30, .13));
  transform: rotate(-1.25deg);
  transition: filter .32s ease, transform .32s cubic-bezier(.2, .75, .25, 1.3), opacity .45s ease;
}

.pack-trigger img {
  display: block;
  width: 100%;
  height: auto;
}

.pack-trigger:hover,
.pack-trigger:focus-visible {
  filter: drop-shadow(0 22px 28px rgba(31, 28, 30, .19));
  transform: translateY(-7px) rotate(1deg) scale(1.018);
}

.pack-trigger:focus-visible { outline: 2px solid #263cff; outline-offset: 8px; }

.pack-note {
  position: absolute;
  right: 26px;
  bottom: 20px;
  margin: 0;
  color: #aaa;
  font-size: .72rem;
  font-style: italic;
  letter-spacing: -.01em;
}

body.is-storming .pack-trigger { opacity: .55; transform: scale(.96) rotate(-2deg); }

.storm-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease, visibility .7s ease;
  contain: strict;
}

.storm-layer.is-active {
  visibility: visible;
  opacity: 1;
}

.storm-sky {
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, .24), transparent 30%),
    radial-gradient(circle at 15% 85%, rgba(238, 162, 202, .34), transparent 36%),
    linear-gradient(128deg, rgba(55, 47, 58, .38), rgba(255, 239, 248, .32) 42%, rgba(73, 72, 79, .38));
  opacity: 0;
  animation: storm-sky 7s ease-in-out infinite alternate;
  transition: opacity 1.2s ease;
}

.storm-layer.is-active .storm-sky { opacity: 1; }

@keyframes storm-sky {
  0%, 32% { filter: brightness(.86) saturate(.82); }
  37% { filter: brightness(1.17) saturate(.92); }
  43%, 100% { filter: brightness(.9) saturate(.88); }
}

.storm-cloud {
  position: absolute;
  z-index: var(--cloud-z, 2);
  top: 0;
  left: 0;
  display: block;
  max-width: none;
  height: auto;
  opacity: 0;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform, filter, opacity;
}

.wind-toggle {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: 17px;
  padding: .58rem .85rem .52rem;
  border-color: rgba(17, 17, 17, .45);
  background: rgba(255, 247, 251, .74);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  font-size: .68rem;
  font-weight: 450;
  letter-spacing: .01em;
  line-height: 1;
  text-transform: uppercase;
}

.wind-toggle:hover,
.wind-toggle:focus-visible { border-color: var(--ink); background: rgba(255, 255, 255, .94); }

.noscript-note {
  position: fixed;
  z-index: 300;
  right: 18px;
  bottom: 18px;
  margin: 0;
  font-size: .78rem;
}

.second-gate {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: clamp(32px, 6vw, 76px);
  border: 1px solid rgba(255,255,255,.8);
  color: var(--ink);
  background: radial-gradient(circle at 88% 12%, #dfefe654, transparent 45%), #fff7fbf5;
  box-shadow: 0 18px 80px #53223a1a;
}
.second-gate::backdrop { background: #fff5fa42; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.second-gate[open] { animation: question-arrive .7s ease both; }
.second-gate .password-form { margin: 0; width: 100%; }
.second-gate .password-form label { max-width: none; font-size: clamp(38px, 6vw, 68px); line-height: .98; }
.gate-close { position: absolute; top: 10px; right: 16px; padding: 4px 8px; border: 0; background: none; font-size: 28px; font-weight: 300; cursor: pointer; }
.question-toggle { position: fixed; bottom: 17px; left: 18px; z-index: 120; padding: .58rem .85rem; border: 1px solid #1117; border-radius: 999px; background: #fff7fbc9; cursor: pointer; font-size: .75rem; }
@keyframes question-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media(prefers-reduced-motion: reduce) { .second-gate[open] { animation: none; } }

@media (max-width: 680px) {
  .password-gate { padding: 16px 14px 20px; }
  .gate-wordmark,
  .wordmark { font-size: clamp(1.45rem, 7vw, 2.1rem); }
  .password-form { margin-top: -4vh; }
  .password-form label { max-width: 8ch; font-size: clamp(3.35rem, 16vw, 5.7rem); }
  .topline { padding: 16px 14px 18px; }
  .home-link { font-size: .9rem; }
  .pack-stage { min-height: calc(100dvh - 64px); padding: 12px 14px 44px; }
  .pack-trigger { width: min(82vw, 430px); }
  .pack-note { right: 14px; bottom: 14px; }
  .wind-toggle { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .password-gate,
  .sticker-page,
  .pack-trigger,
  .storm-layer { transition-duration: .01ms; }
  .storm-sky { animation: none; }
}
