/* DanDaDan website: the pop-up's "Dusk Ink" materials, at page scale. */
@font-face {
  font-family: "Manrope";
  src: url("./Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --win-0: #131219;
  --win-1: #191820;
  --bay: #23212a;
  --bay-hi: #2a2932;
  --raised: #34323d;
  --raised-hi: #3e3d48;
  --well: #0c0b11;
  --t1: #f0eff5;
  --t2: #b7b6c2;
  --t3: #8c8a98;
  --t4: #63616e;
  --peach-rgb: 232 180 147;
  --peri-rgb: 163 181 237;
  --sage-rgb: 159 210 182;
  --rose-rgb: 226 150 154;
  --sand-rgb: 226 204 145;
  --ink: #1b1923;
  --shadow-rgb: 6 5 12;
  --accent-rgb: var(--sage-rgb);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: var(--win-0);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 40px;
  font-family: "Manrope", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--t1);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(70% 45% at 15% -5%, rgb(176 160 235 / 0.12), transparent 65%),
    radial-gradient(60% 40% at 95% 105%, rgb(232 180 147 / 0.07), transparent 65%),
    linear-gradient(180deg, var(--win-1), var(--win-0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.025em;
  color: var(--t1);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--raised-hi), var(--raised));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    inset 0 -1px 0 rgb(0 0 0 / 0.3),
    0 8px 16px -8px rgb(var(--shadow-rgb) / 0.9);
}

.card {
  width: 100%;
  max-width: 440px;
  padding: 34px 32px 30px;
  border-radius: 26px;
  background:
    radial-gradient(100% 60% at 10% -10%, rgb(176 160 235 / 0.08), transparent 60%),
    linear-gradient(180deg, var(--bay-hi), var(--bay) 45%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.08),
    inset 0 0 0 1px rgb(255 255 255 / 0.04),
    0 2px 4px rgb(var(--shadow-rgb) / 0.5),
    0 40px 80px -30px rgb(var(--shadow-rgb) / 0.95);
  animation: rise 520ms var(--ease-out) backwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}

.steps span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.08);
}

.steps span[data-on] {
  background: linear-gradient(90deg, rgb(var(--peach-rgb)), rgb(var(--peri-rgb)));
}

h1 {
  font-size: 27px;
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lead {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 520;
  color: var(--t2);
}

.lead strong {
  color: var(--t1);
  font-weight: 700;
  overflow-wrap: anywhere;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 26px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--t2);
}

input {
  height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 560;
  color: var(--t1);
  background: var(--well);
  box-shadow:
    inset 0 2px 5px rgb(0 0 0 / 0.7),
    inset 0 0 0 1px rgb(255 255 255 / 0.05),
    0 1px 0 rgb(255 255 255 / 0.06);
  outline: none;
  caret-color: rgb(var(--accent-rgb));
}

input:focus {
  box-shadow:
    inset 0 2px 5px rgb(0 0 0 / 0.7),
    inset 0 0 0 1px rgb(var(--accent-rgb) / 0.65),
    0 0 0 4px rgb(var(--accent-rgb) / 0.14);
}

input[aria-invalid="true"] {
  box-shadow:
    inset 0 2px 5px rgb(0 0 0 / 0.7),
    inset 0 0 0 1px rgb(var(--rose-rgb) / 0.7);
}

input.code {
  text-align: center;
  font-size: 26px;
  font-weight: 720;
  letter-spacing: 0.4em;
  font-variant-numeric: tabular-nums;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.btn {
  position: relative;
  height: 52px;
  border-radius: 16px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f6fb, #d8d6e3);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgb(0 0 0 / 0.16),
    0 1px 1px rgb(var(--shadow-rgb) / 0.6),
    0 14px 26px -14px rgb(240 239 245 / 0.3);
  transition:
    transform 140ms var(--ease-out),
    filter 140ms;
}

.btn:hover {
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn[aria-busy="true"] {
  color: transparent;
  pointer-events: none;
}

.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgb(27 25 35 / 0.2);
  border-top-color: var(--ink);
  animation: spin 700ms linear infinite;
}

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

.link {
  font-size: 14px;
  font-weight: 650;
  color: var(--t1);
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.25);
  text-underline-offset: 3px;
}

.row-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--t2);
}

.note {
  display: none;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 580;
  line-height: 1.45;
  color: rgb(var(--rose-rgb));
  background: rgb(var(--rose-rgb) / 0.11);
  box-shadow: inset 0 0 0 1px rgb(var(--rose-rgb) / 0.26);
}

.note[data-show] {
  display: block;
}

.note[data-tone="info"] {
  color: var(--t2);
  background: rgb(255 255 255 / 0.045);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.done-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  border-radius: 18px;
  color: rgb(var(--sage-rgb));
  background: linear-gradient(160deg, var(--raised-hi), var(--raised));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    inset 0 0 0 1px rgb(var(--sage-rgb) / 0.45),
    0 0 30px -4px rgb(var(--sage-rgb) / 0.35);
}

.done-mark.neutral {
  color: var(--t1);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    inset 0 -1px 0 rgb(0 0 0 / 0.3),
    0 8px 16px -8px rgb(var(--shadow-rgb) / 0.9);
}

.next {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 18px;
  list-style: none;
  counter-reset: n;
  background: rgb(255 255 255 / 0.035);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}

.next li {
  display: flex;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 560;
  color: var(--t1);
  counter-increment: n;
}

.next li::before {
  content: counter(n);
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 760;
  color: var(--ink);
  background: linear-gradient(140deg, rgb(var(--peach-rgb)), rgb(var(--peri-rgb)));
}

.foot {
  margin-top: 28px;
  font-size: 13px;
  color: var(--t3);
  text-align: center;
}

.foot a {
  color: var(--t2);
}

[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  body {
    padding-top: 28px;
  }
  .card {
    padding: 28px 22px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
