*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #502379;
  --surface: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.2);
  --border-focus: rgba(255, 255, 255, 0.6);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);
  --lime: #D6FF1D;
  --purple-text: #502379;
}

html {
  font-size: 16px;
  background-color: #28113D;
  overscroll-behavior-y: none;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #4E236E 0%, #28113D 100%);
  background-attachment: fixed;
  background-color: #4E236E;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overscroll-behavior-y: none;
}

/* ── Layout ── */

.container {
  flex: 1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px 40px;
}

#view-sticker, #view-nervkrams {
  max-width: 480px;
  margin: 0 auto;
}

@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

#view-landing, #view-sticker, #view-nervkrams {
  animation: fadeUpIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Logo ── */

.logo {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 80px;
}

/* ── Tagline ── */

.tagline {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 35px;
}

/* ── Form ── */

#stickerForm {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.file-drop-area {
  background: #ffffff;
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.file-drop-area:hover {
  opacity: 0.95;
}

.file-drop-area .file-icon {
  width: 28px;
  height: 28px;
  color: #8C6AA8;
}

.file-drop-area .file-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple-text);
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 16px 18px;
  background: #ffffff;
  border: none;
  border-radius: 0;
  color: var(--purple-text);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
  transition: opacity 0.15s;
  margin-bottom: 8px;
  -webkit-appearance: none;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder {
  color: rgba(80, 35, 121, 0.85);
  font-weight: 700;
}

input[type="email"]:focus,
input[type="text"]:focus {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
  opacity: 1;
}

/* PLZ + Stadt row */

.row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.row input {
  margin-bottom: 0;
}

.plz {
  flex: 0 0 35%;
}

.stadt {
  flex: 1;
}

/* Checkbox */

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 5px;
  margin-bottom: 40px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  background: #ffffff;
  border: none;
  border-radius: 0;
  cursor: pointer;
  position: relative;
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--purple-text);
  font-size: 11px;
  font-weight: 900;
}

.checkbox-label span {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #ffffff;
  font-weight: 500;
}

.inline-link {
  color: #ffffff;
  text-decoration: none !important;
  font-weight: 500;
  transition: opacity 0.15s;
}

.inline-link:hover {
  opacity: 0.85;
}

/* Error message */

.error-msg {
  background: rgba(255, 60, 60, 0.2);
  border: 1px solid rgba(255, 60, 60, 0.5);
  border-radius: 0;
  color: #ffb3b3;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 18px;
  margin-bottom: 24px;
}

/* ── Landing view ── */

#view-landing .logo {
  margin-bottom: 20px;
}

#view-nervkrams .logo,
#view-sticker .logo {
  margin-bottom: 24px;
}

#view-nervkrams .tagline,
#view-sticker .tagline {
  margin-bottom: 20px;
}

.btn-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin-top: 20px;
}

.btn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  flex: 1;
}

.btn-item .tagline {
  margin-bottom: 0;
  text-align: center;
}

@media (min-width: 600px) {
  .btn-group {
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 80px;
  }
}

/* Submit + action buttons */

button[type="submit"],
button[type="button"] {
  position: relative;
  align-self: center;
  width: auto;
  white-space: nowrap;
  padding: 16px 44px;
  background: var(--lime);
  color: var(--purple-text);
  font-family: 'Nunito', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transform: rotate(-3deg);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.25);
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

#nervkramsForm button[type="submit"] {
  display: block;
  margin: 15px auto 0;
}

button[type="submit"]:hover,
button[type="button"]:hover {
  filter: brightness(1.05);
  transform: rotate(-3deg) scale(1.02) translateY(-2px);
  box-shadow: 6px 6px 0px rgba(0,0,0,0.15);
}

button[type="submit"]:active,
button[type="button"]:active {
  transform: rotate(-3deg) scale(0.98) translateY(2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.3);
}

/* ── Success state ── */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.success-state {
  text-align: center;
  padding: 40px 0;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--lime);
  color: var(--purple-text);
  font-size: 2rem;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.success-state h2 {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.success-state p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* ── Footer ── */

footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px 16px;
}

footer a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  transition: color 0.15s;
}

footer a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ── Mobile tweaks ── */

@media (max-width: 600px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 24px 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .logo {
    max-width: 220px;
    margin-bottom: 48px;
  }

  #view-nervkrams .logo,
  #view-sticker .logo {
    max-width: 160px;
    margin-bottom: 32px;
  }

  .tagline {
    font-size: 0.95rem;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
  }

  .btn-group {
    width: 100%;
    gap: 32px;
  }

  .btn-item {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    gap: 16px;
  }

  .btn-item .tagline {
    font-size: 0.9rem;
  }

  button[type="submit"],
  button[type="button"] {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.05rem;
    transform: rotate(-2deg);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.25);
  }

  button[type="submit"]:hover,
  button[type="button"]:hover {
    transform: rotate(-2deg) scale(1.01) translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.15);
  }

  button[type="submit"]:active,
  button[type="button"]:active {
    transform: rotate(-2deg) scale(0.98) translateY(2px);
    box-shadow: 1px 1px 0px rgba(0,0,0,0.3);
  }

  .file-drop-area {
    padding: 20px 16px;
    gap: 8px;
  }

  .file-drop-area .file-icon {
    width: 24px;
    height: 24px;
  }

  .file-drop-area .file-text {
    font-size: 0.85rem;
  }

  input[type="email"],
  input[type="text"] {
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .row {
    gap: 10px;
    margin-bottom: 10px;
  }

  .checkbox-label {
    margin-bottom: 24px;
  }

  footer {
    padding: 16px;
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 380px) {
  html {
    font-size: 14px;
  }

  .logo {
    max-width: 180px;
    margin-bottom: 30px;
  }

  button[type="submit"],
  button[type="button"] {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}
