/* ONEART · Website-Entwurf in 30 Sekunden – baut auf styles.css (Farben, Schriften, Felder) und termin.css (Fehler, Honeypot) auf. */
.ew-hero {
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem);
  overflow: clip;
}

.ew-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.ew-copy h1 {
  max-width: 14ch;
}

.ew-copy .lead {
  max-width: 54ch;
}

/* Formular */
.ew-card {
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.8);
}

.ew-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 1.25rem;
}

.ew-card .field select {
  appearance: none;
  padding-right: 1.6rem;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311100f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.1rem center / 16px;
  cursor: pointer;
}

.ew-card .field select:invalid,
.ew-card .field input::placeholder {
  color: #8a837a;
}

.ew-more {
  margin: 0.9rem 0 0.4rem;
  border-top: 1px solid var(--line-light);
}

.ew-more summary {
  padding: 0.9rem 0 0.3rem;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  list-style: none;
}

.ew-more summary::-webkit-details-marker {
  display: none;
}

.ew-more summary::before {
  content: "+";
  display: inline-block;
  width: 1.2rem;
  color: var(--signal);
  font-weight: 800;
}

.ew-more[open] summary::before {
  content: "–";
}

.ew-hint {
  margin: 0.6rem 0 0;
  color: #6d675f;
  font-size: 0.8rem;
}

.ew-card .privacy-field label {
  color: var(--text-dark);
}

.button--signal {
  border-color: var(--signal);
  background: var(--signal);
  color: #fff;
}

.button--signal:hover {
  border-color: var(--ink);
  background: var(--ink);
}

.ew-submit {
  width: 100%;
  margin-top: 0.6rem;
  gap: 0.6rem;
  min-height: 3.6rem;
  font-size: 0.95rem;
}

.ew-submit svg,
.ew-result svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ew-submit[disabled] {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.ew-fineprint {
  margin: 0.8rem 0 0;
  color: #6d675f;
  font-size: 0.78rem;
  text-align: center;
}

/* Ergebnis */
.ew-result {
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.04);
  outline: 0;
  animation: ew-rise 520ms var(--ease-out) both;
}

.ew-result__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  color: #7ad69a;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ew-result__text {
  margin: 0 0 1.3rem;
  color: #e8dfd5;
  line-height: 1.6;
}

.ew-result__text strong {
  color: #fff;
}

.ew-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.ew-result__share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 1.3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-dark);
}

.ew-result__share a,
.ew-result__share button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0;
  border: 0;
  background: none;
  color: #e8dfd5;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.ew-result__share a:hover,
.ew-result__share button:hover {
  color: #fff;
}

.ew-result__share [data-ew-again] {
  color: var(--muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Handy mit Live-Vorschau */
.ew-stage {
  position: sticky;
  top: 6.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ew-phone {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 390 / 800;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(145deg, #2c2a27, #0b0a09);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 60px 90px -40px rgba(0, 0, 0, 0.9), 0 0 120px -30px rgba(197, 16, 36, 0.35);
}

.ew-phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 36px;
  background: #fff;
}

.ew-phone__bar {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 12px;
  font-weight: 800;
}

.ew-phone__bar i {
  width: 22px;
  height: 10px;
  border: 1.5px solid #111;
  border-radius: 3px;
}

.ew-phone iframe {
  position: absolute;
  top: 34px;
  left: 0;
  width: 390px;
  border: 0;
  transform-origin: 0 0;
  background: #fff;
  transition: opacity 260ms ease;
}

.ew-phone iframe.is-loading {
  opacity: 0.35;
}

.ew-build {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 16, 15, 0.86);
  backdrop-filter: blur(6px);
  color: #fff;
}

.ew-build__inner {
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
}

.ew-build__spinner {
  width: 46px;
  height: 46px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--signal);
  border-radius: 50%;
  animation: ew-spin 900ms linear infinite;
}

.ew-build ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.ew-build li {
  opacity: 0.35;
  transition: opacity 260ms ease;
}

.ew-build li::before {
  content: "○ ";
  color: var(--muted);
}

.ew-build li.is-done {
  opacity: 1;
}

.ew-build li.is-done::before {
  content: "✓ ";
  color: #7ad69a;
}

.ew-stage__label {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.ew-stage__label strong {
  color: #fff;
}

/* Ablauf und Fragen */
.ew-info {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--paper);
  color: var(--ink);
}

.ew-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}

.ew-steps > div {
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}

.ew-steps span {
  color: var(--signal);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ew-steps h2 {
  margin: 0.5rem 0 0.6rem;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  letter-spacing: -0.03em;
}

.ew-steps p {
  margin: 0;
  color: var(--text-dark);
  line-height: 1.6;
}

.ew-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.ew-faq details {
  border-top: 1px solid var(--line-light);
}

.ew-faq summary {
  padding: 1.1rem 0;
  cursor: pointer;
  font-weight: 800;
}

.ew-faq p {
  margin: 0 0 1.2rem;
  color: var(--text-dark);
  line-height: 1.65;
}

.ew-faq a {
  color: var(--signal);
  font-weight: 700;
}

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

@keyframes ew-rise {
  from { opacity: 0; transform: translateY(14px); }
}

@media (max-width: 960px) {
  .ew-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ew-stage {
    position: static;
    order: -1;
  }

  .ew-hero.is-done .ew-stage {
    order: 0;
  }

  .ew-phone {
    width: min(78vw, 330px);
  }

  .ew-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .ew-fields,
  .ew-faq,
  .ew-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .ew-stage {
    display: none;
  }

  .ew-hero.is-done .ew-stage {
    display: flex;
  }

  .ew-result__actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ew-result,
  .ew-build__spinner {
    animation: none;
  }
}
