@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/montserrat-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/montserrat-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  background:
    radial-gradient(880px 460px at 115% -10%, rgba(131, 203, 59, 0.16), transparent 55%),
    radial-gradient(640px 480px at -15% 110%, rgba(13, 129, 202, 0.4), transparent 52%),
    #04284a;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-weight: 600;
}

main {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b7e38a;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.lede {
  margin: 10px 0 0;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.86);
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

input[type="text"],
input[type="file"] {
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  min-height: 48px;
}

input[type="text"] {
  padding: 0 14px;
}

input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

input[type="file"] {
  padding: 10px 12px;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: #04284a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

input[type="range"] {
  width: 100%;
  accent-color: #83cb3b;
  min-height: 32px;
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid #83cb3b;
  outline-offset: 2px;
}

#photo-error {
  margin: -8px 0 0;
  color: #ffd0c8;
  font-weight: 700;
}

figure {
  margin: 4px 0 0;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #0a4f92;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 16, 36, 0.35);
  touch-action: none;
  cursor: grab;
}

canvas:active {
  cursor: grabbing;
}

figcaption,
.hint {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  flex: 1 1 160px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#download {
  border: 0;
  background: #83cb3b;
  color: #10240a;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#share {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}

@media (min-width: 800px) {
  main {
    padding-top: 48px;
  }
}
