@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  color: #f4eddd;
  background: #0b0d0c;
  font-family: 'DM Sans', sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

.download-page {
  align-items: center;
  display: grid;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: 24px;
  place-items: center;
  position: relative;
}

.grid {
  background-image: linear-gradient(rgba(244, 237, 221, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 237, 221, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  inset: 0;
  mask-image: radial-gradient(circle, black 0%, transparent 72%);
  opacity: 0.55;
  position: absolute;
  z-index: -2;
}

.password-panel,
.download-panel {
  max-width: 560px;
  padding: 32px;
  position: relative;
  text-align: center;
  width: 100%;
  z-index: 1;
}

.password-panel {
  animation: panel-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.is-hidden {
  display: none !important;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
}

.eyebrow,
.file-note {
  color: #b8ffcf;
  font: 11px 'IBM Plex Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(48px, 8vw, 86px);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.95;
  margin: 32px 0 20px;
}

.description {
  color: #a8b0a5;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto 36px;
}

.password-form {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto;
  max-width: 290px;
}

.password-form input {
  background: rgba(244, 237, 221, 0.04);
  border: 1px solid rgba(184, 255, 207, 0.32);
  color: #f4eddd;
  font: 700 28px 'IBM Plex Mono', monospace;
  letter-spacing: 0.3em;
  min-height: 64px;
  padding: 0 18px 0 26px;
  text-align: center;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  width: 100%;
}

.password-form input::placeholder {
  color: rgba(244, 237, 221, 0.28);
}

.password-form input:focus {
  border-color: #b8ffcf;
  box-shadow: 0 0 0 4px rgba(184, 255, 207, 0.08), 0 0 32px rgba(184, 255, 207, 0.12);
  outline: none;
  transform: translateY(-2px);
}

.unlock-button {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(244, 237, 221, 0.28);
  color: #f4eddd;
  cursor: pointer;
  display: inline-flex;
  font: 500 12px 'IBM Plex Mono', monospace;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 18px;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.unlock-button:hover,
.unlock-button:focus-visible {
  background: #b8ffcf;
  border-color: #b8ffcf;
  color: #0b0d0c;
  outline: none;
  transform: translateY(-2px);
}

.password-status {
  color: #ff8c65;
  font: 10px 'IBM Plex Mono', monospace;
  min-height: 16px;
  margin: 18px 0 0;
}

.shake {
  animation: shake 360ms ease;
}

.download-button {
  align-items: center;
  background: #b8ffcf;
  border: 1px solid #b8ffcf;
  color: #0b0d0c;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  gap: 16px;
  justify-content: center;
  min-height: 64px;
  overflow: hidden;
  padding: 0 22px;
  position: relative;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  width: min(100%, 290px);
}

.download-button::before {
  background: #f4eddd;
  content: '';
  inset: 0;
  position: absolute;
  transform: translateX(-105%);
  transition: transform 280ms ease;
}

.download-button:hover,
.download-button:focus-visible {
  box-shadow: 0 0 32px rgba(184, 255, 207, 0.22);
  outline: none;
  transform: translateY(-3px);
}

.download-button:hover::before,
.download-button:focus-visible::before {
  transform: translateX(0);
}

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

.button-icon {
  font-size: 24px;
  line-height: 1;
}

.button-arrow {
  color: #ff6b35;
  font-size: 20px;
}

.file-note {
  color: #778278;
  font-size: 9px;
  margin: 28px 0 0;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  20% {
    transform: translateX(-7px);
  }
  40% {
    transform: translateX(7px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@media (max-width: 520px) {
  .download-page {
    align-items: start;
    min-height: 100svh;
    overflow: hidden;
    padding: 22vh 16px 24px;
  }

  .password-panel,
  .download-panel {
    max-width: 292px;
    padding: 16px 0;
  }

  .eyebrow,
  .file-note {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  h1 {
    font-size: clamp(42px, 12vw, 52px);
    line-height: 0.98;
    margin: 24px 0 16px;
  }

  .description {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 28px;
  }

  .password-form {
    max-width: 100%;
  }

  .password-form input {
    font-size: 22px;
    min-height: 58px;
  }

  .unlock-button {
    min-height: 50px;
  }

  .file-note {
    margin-top: 22px;
  }
}

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