@font-face {
  font-family: Anton;
  src: url("./assets/anton.ttf") format("truetype");
  font-display: swap;
}

:root {
  font-family: system-ui, sans-serif;
  color-scheme: dark;
  color: #f2f3f5;
  background: #090b0e;
  --muted: #b0bac5;
  --blue: #79bdf1;
  --surface: #151a20;
}

* { box-sizing: border-box; }

body { margin: 0; }

.shell {
  max-width: 1480px;
  padding: clamp(20px, 3vw, 40px) clamp(22px, 5vw, 74px) 44px;
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: block;
  width: clamp(130px, 14vw, 176px);
  height: auto;
  mix-blend-mode: screen;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(34px, 6vw, 88px);
  margin-top: clamp(40px, 6.5vw, 100px);
}

h1 {
  margin: 0;
  font: 400 clamp(48px, 6.2vw, 94px) / 1.1 Anton, Impact, sans-serif;
}

h1 span { color: var(--blue); }

.intro, .note, .drop-hint {
  color: var(--muted);
  line-height: 1.55;
}

.intro {
  margin: 14px 0 0;
  font-size: clamp(17px, 1.5vw, 20px);
}

#upload-form {
  max-width: 450px;
  margin-top: 30px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 20px;
}

button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:focus-visible, .drop:focus-within, #pin:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}

.upload {
  padding-inline: 18px;
  color: #090b0e;
  background: var(--blue);
}

.upload:hover:not(:disabled) { background: #f2f3f5; }
.upload:disabled { background: var(--muted); cursor: default; }

.manage {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.manage:hover { color: var(--blue); }

header .manage {
  font-size: 15px;
  white-space: nowrap;
}

.note {
  margin: 10px 0 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.drop {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 96px;
  padding: 18px clamp(16px, 3vw, 24px);
  background: var(--surface);
  cursor: pointer;
}

.upload-icon {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--blue);
}

.choose {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.drop:hover .choose, .drop:focus-within .choose, .drop.dragging .choose {
  color: var(--blue);
}

.drop:has(input:disabled) { cursor: default; }

.drop-hint {
  display: block;
  font-size: 14px;
}

#selection { color: inherit; margin-top: 16px; }
#upload { margin-top: 10px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

progress {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-top: 14px;
  accent-color: var(--blue);
}

[hidden] { display: none !important; }

dialog {
  width: min(380px, calc(100% - 36px));
  padding: 26px;
  border: 0;
  color: inherit;
  background: var(--surface);
}

dialog::backdrop { background: #090b0e; }

dialog h2 { margin: 0 0 18px; font-size: 26px; }
dialog label { display: block; }

#pin {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  background: #090b0e;
  color: inherit;
  font: inherit;
}

#pin-status {
  color: var(--muted);
  line-height: 1.5;
}

figure { margin: 0; }

.mats {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 54%;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  main { grid-template-columns: 1fr; }
  #upload-form { margin-top: 24px; }
  .mats { aspect-ratio: 16 / 9; }
}
