:root {
  --color-white: #ffffff;
  --color-orange: #f90;
  --color-orange-deep: #e68a00;
  --color-blue: #09099c;
  --color-surface: #ebeff2;
  --color-ink: #151735;
  --color-muted: #5b6276;
  --shadow-soft: 0 14px 34px rgba(9, 9, 156, 0.1);
  --shadow-strong: 0 8px 24px rgba(249, 153, 0, 0.32);
  --radius: 22px;
  --header-h: 58px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  color: var(--color-ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.70) 0%, rgba(255,255,255,0.52) 50%, rgba(235,239,242,0.65) 100%),
    image-set(
      url('/assets/branding/hintergrund_odr.webp') type('image/webp'),
      url('/assets/branding/hintergrund_odr.jpg') type('image/jpeg')
    ) center center / cover no-repeat;
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--header-h);
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(9, 9, 156, 0.07);
  box-shadow: 0 2px 12px rgba(9, 9, 156, 0.06);
}

.brand-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* ── App Shell ───────────────────────────────────────── */

.app-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.intro {
  display: grid;
  gap: 10px;
  padding: 0 0 28px;
}

h1 {
  margin: 0;
  max-width: 860px;
  color: var(--color-blue);
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.event-tag {
  margin: 0;
  display: inline-block;
  padding: 5px 14px;
  background: rgba(255, 153, 0, 0.14);
  border-radius: 100px;
  color: var(--color-orange-deep);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.intro-copy {
  max-width: 680px;
  margin: 0;
  color: var(--color-muted);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.45;
}

.intro-copy a {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
}

/* ── Workbench ───────────────────────────────────────── */

.workbench {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.control-panel,
.result-panel {
  border: 1px solid rgba(9, 9, 156, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-soft);
}

.control-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 14px);
}

/* ── Form Fields ─────────────────────────────────────── */

.field {
  display: grid;
  gap: 8px;
  color: var(--color-blue);
  font-weight: 700;
}

.field span {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.field input {
  width: 100%;
  min-height: 54px;
  border: 1.5px solid rgba(9, 9, 156, 0.14);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--color-ink);
  background: var(--color-white);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.16);
}

/* ── Upload Card ─────────────────────────────────────── */

.upload-card {
  display: grid;
  gap: 10px;
  min-height: 200px;
  align-content: center;
  justify-items: center;
  padding: 24px;
  border: 2px dashed rgba(9, 9, 156, 0.2);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 153, 0, 0.05), rgba(9, 9, 156, 0.03));
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s, background 0.18s;
}

.upload-card:hover {
  border-color: var(--color-orange);
  background: linear-gradient(160deg, rgba(255, 153, 0, 0.1), rgba(9, 9, 156, 0.04));
}

.upload-card input {
  display: none;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-orange), #ffc15c);
  color: var(--color-white);
  font-size: 2.2rem;
  font-weight: 700;
  box-shadow: var(--shadow-strong);
}

.upload-title {
  color: var(--color-blue);
  font-size: 1.08rem;
  font-weight: 900;
}

.upload-copy {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* ── Buttons ─────────────────────────────────────────── */

.primary-button,
.orange-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  font-size: 1.04rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
}

.primary-button {
  width: 100%;
  color: var(--color-blue);
  background: linear-gradient(135deg, var(--color-orange-deep), var(--color-orange) 55%, #ffb833);
  box-shadow: var(--shadow-strong);
  letter-spacing: 0.01em;
}

.primary-button:not(:disabled):active {
  transform: scale(0.98);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.orange-button {
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-orange-deep), var(--color-orange) 55%, #ffb833);
  box-shadow: var(--shadow-strong);
  border: 0;
}

.orange-button:not(.is-disabled):active {
  transform: scale(0.98);
}

.blue-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  font-size: 1.04rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
  color: var(--color-white);
  background: linear-gradient(135deg, #07077a, var(--color-blue) 55%, #1a1ab8);
  box-shadow: 0 8px 24px rgba(9, 9, 156, 0.32);
}

.blue-button:not(.is-disabled):active {
  transform: scale(0.98);
}

.empty-icon {
  color: rgba(9, 9, 156, 0.25);
}

/* ── Result Panel ────────────────────────────────────── */

.result-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.preview-frame {
  position: relative;
  overflow: hidden;
  height: 360px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(9, 9, 156, 0.05), rgba(255, 153, 0, 0.08)),
    var(--color-surface);
}

.preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--color-surface);
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 32px;
  color: var(--color-muted);
  text-align: center;
}

.empty-state strong {
  color: var(--color-blue);
  font-size: 1.2rem;
  font-weight: 900;
}

.empty-state span {
  max-width: 300px;
  font-size: 1rem;
  line-height: 1.48;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.spinner {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 5px solid rgba(9, 9, 156, 0.1);
  border-top-color: var(--color-orange);
  border-right-color: var(--color-blue);
  animation: spin 0.85s linear infinite;
}

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

/* ── Status Box ──────────────────────────────────────── */

.status-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(9, 9, 156, 0.04), rgba(255, 153, 0, 0.06));
  border: 1px solid rgba(9, 9, 156, 0.08);
  color: var(--color-blue);
  font-weight: 700;
}

.status-box p {
  margin: 0;
}

.status-secondary {
  margin-top: 5px !important;
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.48;
}

/* ── Action Row ──────────────────────────────────────── */

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.button-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 1.05rem;
  line-height: 1;
}

.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

/* ── Page Scene ──────────────────────────────────────── */

.page-scene {
  flex: 1; /* pushes footer to bottom (sticky footer) */
}

/* ── ODRi – Mobile (peeks above footer edge) ─────────── */

.odri-mobile {
  display: none;
  position: absolute;
  top: -62px;
  right: 16px;
  width: 150px;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

@media (max-width: 900px) {
  .odri-mobile {
    display: block;
  }
}

/* ── ODRi – Desktop (fixed, left margin) ─────────────── */

.odri-deco {
  display: none;
  position: fixed;
  bottom: 0;
  left: max(8px, calc(50vw - 660px));
  width: clamp(120px, 10vw, 200px);
  z-index: 5;
  pointer-events: none;
  user-select: none;
}

/* Tablet: hide (no room on either side) */
@media (min-width: 601px) and (max-width: 1299px) {
  .odri-deco {
    display: none;
  }
}

/* Desktop: larger, in left margin */
@media (min-width: 1300px) {
  .odri-deco {
    left: max(8px, calc(50vw - 660px));
    width: clamp(120px, 10vw, 200px);
  }
}


/* ── Footer ──────────────────────────────────────────── */

.site-footer {
  margin-top: 16px;
  padding: 28px 0 36px;
  background: var(--color-white);
  border-top: 1px solid rgba(9, 9, 156, 0.07);
  position: relative;
  z-index: 20;
}

.footer-inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.social-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-blue);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.social-links a:hover {
  background: var(--color-orange);
  color: var(--color-white);
}

.footer-website-link {
  color: var(--color-blue);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.footer-website-link:hover {
  opacity: 1;
  color: var(--color-orange);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.legal-links a {
  color: var(--color-muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s;
}

.legal-links a:hover {
  color: var(--color-blue);
}

.footer-copy {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ── Responsive: Tablet ──────────────────────────────── */

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 24px, 680px);
    padding-top: 20px;
  }

  .intro {
    padding-bottom: 20px;
  }

  h1 {
    font-size: 3rem;
  }

  .intro-copy {
    font-size: 1.05rem;
  }

  .workbench {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }

  .preview-frame {
    height: 400px;
  }

}

/* ── Responsive: Mobile ──────────────────────────────── */

@media (max-width: 560px) {
  :root {
    --header-h: 52px;
  }

  .site-header {
    padding: 0 16px;
  }

  .brand-logo {
    height: 28px;
  }

  .app-shell {
    width: calc(100% - 24px);
    padding-top: 18px;
    padding-bottom: 32px;
  }

  .intro {
    gap: 8px;
    padding-bottom: 16px;
  }

  h1 {
    font-size: 2.6rem;
    letter-spacing: -0.035em;
  }

  .intro-copy {
    font-size: 0.97rem;
  }

  .control-panel,
  .result-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .upload-card {
    min-height: 164px;
    padding: 20px;
  }

  .preview-frame {
    height: 260px;
  }

  .action-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .primary-button,
  .orange-button {
    min-height: 54px;
    font-size: 1rem;
  }

  .legal-links {
    gap: 14px;
  }
}
