/* ============================================================
   UDSSHR — bold, eigenständig, drei OS gleichberechtigt
   ============================================================ */

:root {
  --bg: #f0ece2;
  --fg: #14140f;
  --fg-dim: #4a4a44;
  --fg-muted: #908d83;
  --line: rgba(20, 20, 15, 0.16);
  --accent: #ff5722;
  --serif: "Instrument Serif", "Cormorant Garamond", "Times New Roman", serif;
  --display: "Fraunces", "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: none; color: inherit; cursor: pointer; padding: 0; }

::selection { background: var(--accent); color: white; }

.app {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
  transition: background 0.4s, color 0.4s;
  overflow: hidden;
}

.app.invert {
  --bg: #131316;
  --fg: #f0ede5;
  --fg-dim: #b8b5ad;
  --fg-muted: #6a6760;
  --line: rgba(240, 237, 229, 0.18);
}

/* Grain overlay */
.app.with-noise::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}

.app.invert.with-noise::before {
  mix-blend-mode: screen;
  opacity: 0.06;
}

/* ============================================================
   Background marquees
   ============================================================ */
.mq-band {
  position: absolute;
  left: -10%;
  right: -10%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.mq-band-1 {
  top: 8%;
  transform: rotate(-4deg);
  height: 12vw;
}
.mq-band-2 {
  bottom: 4%;
  transform: rotate(3deg);
  height: 10vw;
}

.mq {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.mq-track {
  display: flex;
  white-space: nowrap;
  animation: mq-scroll 70s linear infinite;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(60px, 10vw, 140px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--fg-dim);
  text-stroke: 1.2px var(--fg-dim);
  opacity: 0.5;
}
.mq-rev .mq-track { animation-direction: reverse; }
.mq-track > span { padding-right: 0.4em; }

@keyframes mq-scroll {
  to { transform: translateX(-50%); }
}

/* ============================================================
   Corner UI
   ============================================================ */
.corner {
  position: fixed;
  z-index: 20;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.corner-tl { top: 24px; left: 24px; }
.corner-tr { top: 24px; right: 24px; }
.corner-bl { bottom: 24px; left: 24px; }
.corner-br { display: none; }

.corner-tag { white-space: nowrap; }
.corner-blink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: normal;
  text-align: right;
}
.blink-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.18);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.lang-toggle { display: inline-flex; align-items: center; gap: 6px; }
.lang-toggle button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 2px 4px;
  text-transform: uppercase;
}
.lang-on { color: var(--fg); font-weight: 600; }
.lang-off { color: var(--fg-muted); }
.lang-off:hover { color: var(--fg-dim); }
.lang-sep { color: var(--fg-muted); }

/* ============================================================
   Stage
   ============================================================ */
.stage {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 88px 32px 88px;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 32px;
}

.kicker-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ============================================================
   Wordmark
   ============================================================ */
.wordmark-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 56px;
}

.wordmark {
  position: relative;
  font-family: var(--display);
  font-size: clamp(108px, 22vw, 320px);
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.04em;
  line-height: 0.86;
  margin: 0;
  color: var(--fg);
  z-index: 2;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.wm-ch {
  display: inline-block;
  animation: wm-drift 6s ease-in-out infinite;
}

.wm-ch-accent {
  font-style: italic;
  font-weight: 800;
}

@keyframes wm-drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-4px) rotate(-0.6deg); }
  75%      { transform: translateY(3px)  rotate(0.5deg); }
}

.wordmark-tag {
  position: absolute;
  top: -6px;
  right: -8px;
  transform: rotate(8deg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  padding: 6px 10px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--bg);
  z-index: 4;
}

@media (max-width: 760px) {
  .wordmark-tag {
    top: -28px;
    right: 50%;
    transform: translateX(50%) rotate(-6deg);
  }
}

/* ============================================================
   Pick row
   ============================================================ */
.pick-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 1100px;
}

.pick-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}

.pick-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ============================================================
   Download grid — three OS, equal weight
   ============================================================ */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 1100px;
}

.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 26px;
  background: var(--fg);
  color: var(--bg);
  border: 1.5px solid var(--fg);
  border-radius: 18px;
  font-family: var(--sans);
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 32px -10px rgba(20, 20, 15, 0.4);
  overflow: hidden;
  min-height: 200px;
}

.dl-card-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  color: inherit;
  text-decoration: none;
  width: 100%;
}

.dl-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--fg-dim);
  opacity: 0.4;
}

.dl-card-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 18px 48px -10px rgba(255, 87, 34, 0.45);
  transform: translateY(-4px);
}

.dl-card-primary::before {
  background: white;
  opacity: 0.4;
}

.dl-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 22px 56px -8px rgba(20, 20, 15, 0.55);
}

.dl-card-primary:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 26px 64px -8px rgba(255, 87, 34, 0.6);
}

.dl-card-os {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.dl-card-os-label { font-weight: 600; }

.dl-card-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--display);
  font-style: italic;
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: auto;
}

.dl-card-cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-family: var(--mono);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
}

.dl-card:hover .dl-card-cta-arrow {
  transform: translateY(2px);
  background: rgba(255, 255, 255, 0.28);
}

.dl-card-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0.65;
  text-transform: lowercase;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dl-card-meta-dot { opacity: 0.5; }

.dl-card-flag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 8px;
  border-radius: 999px;
}

.dl-card-alt-toggle {
  background: none;
  border: 0;
  padding: 0;
  margin: 4px 0 0;
  color: inherit;
  opacity: 0.65;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: stretch;
}
.dl-card-alt-toggle:hover {
  opacity: 1;
}
.dl-card-alt-toggle .caret {
  display: inline-block;
  transition: transform 160ms ease;
}
.dl-card-alt-toggle[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

.dl-card-alt-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  width: 100%;
}
.dl-card-alt-list li { margin: 0; padding: 0; }
.dl-card-alt-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  padding-top: 6px;
}
.dl-card-alt-list a:hover {
  opacity: 1;
}
.dl-card-alt-list .alt-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.dl-card-alt-list .alt-filename {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.65;
  word-break: break-all;
}

.footnote {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: lowercase;
}
.footnote-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.18);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (max-width: 880px) {
  .dl-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .dl-card { min-height: 0; }
  .mq-band-1 { top: 28%; }
  .mq-band-2 { bottom: 22%; }
}

@media (max-width: 640px) {
  .corner-tl, .corner-bl { left: 16px; }
  .corner-tr, .corner-br { right: 16px; }
  .corner-tl, .corner-tr { top: 16px; }
  .corner-bl, .corner-br { bottom: 16px; max-width: 200px; }
  .stage { padding: 72px 20px 88px; }
  .wordmark-wrap { margin-bottom: 64px; }
  .dl-card-cta { font-size: 28px; }
}

/* ============================================================
   Login screen
   ============================================================ */

html.login-doc, html.login-doc body {
  background: #131316;
}

.login-app {
  background: radial-gradient(
    ellipse at top,
    rgba(255, 87, 34, 0.18) 0%,
    rgba(255, 87, 34, 0.04) 22%,
    transparent 56%
  ), #131316;
}

.login-app::after {
  content: "";
  position: fixed;
  inset: -12% -12% auto -12%;
  height: 60vh;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 87, 34, 0.2), transparent 38%),
    radial-gradient(circle at 82% 8%, rgba(255, 87, 34, 0.12), transparent 42%);
  filter: blur(28px);
  animation: login-glow-drift 22s ease-in-out infinite alternate;
  opacity: 0.9;
}

@keyframes login-glow-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.04); }
  100% { transform: translate3d(-2%, 1%, 0) scale(0.98); }
}

.login-stage {
  padding: 96px 32px 96px;
  gap: 0;
}

.login-wordmark {
  font-size: clamp(72px, 14vw, 180px);
}

.login-form {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  margin-top: 12px;
  padding: 32px 30px 28px;
  background: rgba(20, 20, 23, 0.62);
  border: 1px solid rgba(240, 237, 229, 0.1);
  border-radius: 18px;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 87, 34, 0.08) inset;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form:focus-within {
  border-color: rgba(255, 87, 34, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 87, 34, 0.18) inset,
    0 0 30px -6px rgba(255, 87, 34, 0.4);
}

@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(4px); }
}

.login-form-shake { animation: login-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

.login-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.login-label-text { white-space: nowrap; }
.login-label-line { flex: 1; height: 1px; background: var(--line); }

.login-input-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1.5px solid rgba(240, 237, 229, 0.18);
  padding: 6px 0 8px;
  transition: border-color 0.2s;
}

.login-input-wrap:focus-within {
  border-color: var(--accent);
}

.login-input-prompt {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
  user-select: none;
}

.login-input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.32em;
  padding: 6px 0;
  width: 100%;
}

.login-input::placeholder {
  color: rgba(240, 237, 229, 0.22);
  letter-spacing: 0.45em;
}

.login-input:disabled { opacity: 0.4; }

.login-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--accent);
  color: #131316;
  border: 0;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 8px 22px -8px rgba(255, 87, 34, 0.6);
}

.login-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(255, 87, 34, 0.8); }
.login-submit:active { transform: translateY(0); }
.login-submit:disabled { opacity: 0.55; cursor: progress; }

.login-submit-arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

.login-submit:hover .login-submit-arrow {
  transform: translateX(3px);
}

.login-error {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #ff8a73;
  text-transform: lowercase;
}

.login-error-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5252;
  box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.18);
  animation: blink 1.4s ease-in-out infinite;
}

.login-footnote {
  margin-top: 30px;
  max-width: 520px;
  text-align: center;
  line-height: 1.6;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 640px) {
  .login-stage { padding: 80px 18px 96px; }
  .login-form { padding: 24px 22px 22px; }
  .login-input { font-size: 17px; }
  .login-submit { padding: 8px 14px; font-size: 11px; }
}
