/* Arusami download page. Black ink and crimson, like the loader: the heading and the key field
   in the middle of the page. No inline styles or scripts anywhere (the sites send a strict
   Content-Security-Policy). */

@font-face { font-family: "Manrope"; src: url("fonts/Manrope-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/Manrope-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/Manrope-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --bg: #121113;
  --field: #19181b;
  --line: #2e2c32;
  --text: #edebef;
  --mid: #b9b5bd;
  --dim: #85818a;
  --crimson: #c8102e;
  --crimson-hover: #d81a39;
  --danger: #f0596a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- top: the badge and the name; the language ---- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.2px;
}
.badge { width: 34px; height: 34px; display: block; animation: stamp 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; }
.lang button {
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--dim);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 11px;
  cursor: pointer;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { color: var(--text); background: #232126; }

/* ---- the stage: the panel in the middle of the page ---- */
.stage {
  flex: 1;
  width: 100%;
  padding: 24px 40px 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel { width: 100%; max-width: 520px; text-align: center; animation: rise 0.5s ease-out 0.15s both; }
h1 {
  margin: 0 0 34px;
  font-weight: 800;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: -0.8px;
}

form { text-align: left; }
label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 9px; }
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 6px 6px 6px 18px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: border-color 0.15s ease;
}
.field:focus-within { border-color: var(--crimson); }
.field.bad { border-color: var(--danger); }
input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
input::placeholder { color: #4f4c54; letter-spacing: 1.6px; }
#go {
  position: relative;
  height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: var(--crimson);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
#go:hover { background: var(--crimson-hover); }
#go:disabled { cursor: default; background: #a30d26; }
#go.busy { color: transparent; }
#go.busy::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: turn 0.7s linear infinite;
}
.note { min-height: 22px; margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--mid); }
.note.bad { color: var(--danger); }
.note a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.note a:hover { color: #fff; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: scale(1.35); } to { opacity: 1; transform: none; } }
@keyframes turn { to { transform: rotate(360deg); } }

/* ---- phones: the button under the field ---- */
@media (max-width: 760px) {
  .top { padding: 18px 16px; }
  .stage { padding: 12px 16px 40px; }
  h1 { font-size: 34px; }
  h1 { margin-bottom: 24px; }
  .field { flex-direction: column; align-items: stretch; height: auto; padding: 6px; gap: 6px; }
  input { height: 48px; padding: 0 12px; font-size: 16px; }
  #go { height: 48px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .badge, .panel { animation: none; }
}
