/* Domain-Verkaufssystem · Styles (keine externen Ressourcen, kein JavaScript noetig) */

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #15191f;
  --muted: #56606e;
  --line: #dcd8ce;
  --field-line: #8a8f98;
  --accent: #0b5d5a;
  --accent-strong: #084744;
  --accent-ink: #ffffff;
  --accent-soft: #e4efee;
  --error: #a3261d;
  --error-soft: #fbeceb;
  --warn-bg: #fff4d6;
  --warn-ink: #5c4300;
  --shadow: 0 1px 2px rgba(21, 25, 31, 0.05), 0 18px 48px rgba(21, 25, 31, 0.09);
  --radius: 14px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1316;
    --surface: #171c21;
    --ink: #eceff2;
    --muted: #a6b0bb;
    --line: #2a323a;
    --field-line: #77828e;
    --accent: #63c7c0;
    --accent-strong: #86d8d2;
    --accent-ink: #06201f;
    --accent-soft: #15302f;
    --error: #ffa094;
    --error-soft: #3a1b18;
    --warn-bg: #3b2f0b;
    --warn-ink: #ffe7a3;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 10px 16px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 8px;
  font-weight: 600;
}

.skip:focus {
  top: 16px;
  color: var(--accent-ink);
}

.draft {
  margin: 0;
  padding: 8px 20px;
  color: var(--warn-ink);
  background: var(--warn-bg);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* --- Kopf mit Sprachumschalter ------------------------------------------------------------ */

.lang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 14px;
  width: min(1120px, 100% - 40px);
  margin: 18px auto 0;
}

.lang__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.lang__icon {
  flex: none;
}

.lang__list {
  display: inline-flex;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--surface);
  list-style: none;
}

.lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 650;
  text-decoration: none;
}

a.lang__item:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.lang__item.is-active {
  color: var(--accent-ink);
  background: var(--accent);
}

/* --- Seitenraster ------------------------------------------------------------------------- */

.page {
  flex: 1 0 auto;
  display: grid;
  gap: 40px;
  width: min(1120px, 100% - 40px);
  margin: 0 auto;
  padding: 36px 0 56px;
}

.page--narrow {
  width: min(760px, 100% - 40px);
  align-content: start;
}

@media (min-width: 960px) {
  .page:not(.page--narrow) {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 64px;
    align-items: start;
    padding: 72px 0 96px;
  }

  .hero {
    position: sticky;
    top: 48px;
  }
}

/* --- Hero --------------------------------------------------------------------------------- */

.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.domain {
  margin: 0 0 22px;
  font-size: clamp(2rem, 1.1rem + 4.6vw, 4.1rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.domain__tld {
  color: var(--accent);
}

/* Lange Domainnamen (seit 1.1.1): Die Klasse .domain--wNN nennt die geschaetzte Breite des Namens in
   halben em (aus lib.php, domain_width_class). Die Schrift wird so weit verkleinert, dass der Name in
   die Spalte passt (100cqi = Breite von .hero) - nie groesser als bisher, nie kleiner als 1.25rem.
   Browser ohne Container-Einheiten ignorieren die Regel und zeigen den Namen wie bisher. */
.hero {
  container-type: inline-size;
}

.domain[class*="domain--w"] {
  font-size: max(1.25rem, min(clamp(2rem, 1.1rem + 4.6vw, 4.1rem), calc(100cqi / var(--dw))));
}

.domain--w12 { --dw: 6; } .domain--w13 { --dw: 6.5; } .domain--w14 { --dw: 7; } .domain--w15 { --dw: 7.5; }
.domain--w16 { --dw: 8; } .domain--w17 { --dw: 8.5; } .domain--w18 { --dw: 9; } .domain--w19 { --dw: 9.5; }
.domain--w20 { --dw: 10; } .domain--w21 { --dw: 10.5; } .domain--w22 { --dw: 11; } .domain--w23 { --dw: 11.5; }
.domain--w24 { --dw: 12; } .domain--w25 { --dw: 12.5; } .domain--w26 { --dw: 13; } .domain--w27 { --dw: 13.5; }
.domain--w28 { --dw: 14; } .domain--w29 { --dw: 14.5; } .domain--w30 { --dw: 15; } .domain--w31 { --dw: 15.5; }
.domain--w32 { --dw: 16; } .domain--w33 { --dw: 16.5; } .domain--w34 { --dw: 17; } .domain--w35 { --dw: 17.5; }
.domain--w36 { --dw: 18; } .domain--w37 { --dw: 18.5; } .domain--w38 { --dw: 19; } .domain--w39 { --dw: 19.5; }
.domain--w40 { --dw: 20; } .domain--w41 { --dw: 20.5; } .domain--w42 { --dw: 21; } .domain--w43 { --dw: 21.5; }
.domain--w44 { --dw: 22; } .domain--w45 { --dw: 22.5; } .domain--w46 { --dw: 23; } .domain--w47 { --dw: 23.5; }
.domain--w48 { --dw: 24; } .domain--w49 { --dw: 24.5; } .domain--w50 { --dw: 25; } .domain--w51 { --dw: 25.5; }
.domain--w52 { --dw: 26; }

h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
}

.lead {
  max-width: 34em;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.12rem;
}

.price {
  margin: 0 0 26px;
  font-size: 1.05rem;
}

.price__label {
  color: var(--muted);
}

.price__value {
  font-size: 1.5rem;
  font-weight: 750;
  white-space: nowrap;
}

.price--offer {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin: 0 0 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 26px;
  border: 0;
  border-radius: 10px;
  color: var(--accent-ink);
  background: var(--accent);
  font: inherit;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  color: var(--accent-ink);
  background: var(--accent-strong);
}

.btn:active {
  transform: translateY(1px);
}

.btn--full {
  width: 100%;
}

.link {
  font-weight: 600;
}

.facts {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

@media (min-width: 560px) {
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.facts li {
  display: grid;
  gap: 4px;
  align-content: start;
}

.facts strong {
  font-size: 0.98rem;
}

.facts span {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

/* --- Karte / Formular --------------------------------------------------------------------- */

.card {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}

.card:focus {
  outline: none;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  line-height: 1.3;
}

.card__domain {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.card__intro {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.card--message h1 {
  margin-bottom: 14px;
}

.card--message p {
  margin: 0 0 18px;
}

.card--message .actions {
  margin: 26px 0 0;
}

.field {
  margin: 0 0 18px;
}

.field label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.96rem;
  font-weight: 650;
}

.req {
  color: var(--error);
}

.opt {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--field-line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  line-height: 1.4;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field__hint,
.field__error {
  margin: 6px 0 0;
  font-size: 0.88rem;
}

.field__hint {
  color: var(--muted);
}

.field__error {
  color: var(--error);
  font-weight: 600;
}

.has-error input,
.has-error textarea {
  border-color: var(--error);
  border-width: 2px;
}

.alert {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-left: 4px solid var(--error);
  border-radius: 8px;
  color: var(--ink);
  background: var(--error-soft);
  font-size: 0.95rem;
}

.alert p {
  margin: 0 0 6px;
  font-weight: 650;
}

.alert ul {
  margin: 0;
  padding-left: 20px;
}

.alert a {
  color: var(--error);
}

.privacy {
  margin: 4px 0 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Honeypot: fuer Menschen und Hilfstechnik unsichtbar, fuer Bots ein normales Feld */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 0.95rem;
}

.notice p {
  margin: 0 0 6px;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice a {
  font-weight: 650;
}

.notice--plain {
  border-left-color: var(--line);
  color: var(--muted);
  background: transparent;
  padding-left: 14px;
}

.page--narrow > .alert,
.page--narrow > .notice {
  margin-bottom: 0;
}

/* --- Rechtstexte -------------------------------------------------------------------------- */

.prose h1 {
  margin-bottom: 22px;
}

.prose h2 {
  margin: 28px 0 8px;
  font-size: 1.08rem;
}

.prose p {
  margin: 0 0 12px;
  overflow-wrap: break-word;
  hyphens: auto;
}

.prose__note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

mark {
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--warn-ink);
  background: var(--warn-bg);
}

/* --- Fuss --------------------------------------------------------------------------------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  width: min(1120px, 100% - 40px);
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.foot__note {
  margin: 0;
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.foot__nav a {
  display: inline-block;
  padding: 6px 0;
  color: var(--muted);
}

.foot__lang {
  font-weight: 650;
}

.foot__nav a:hover {
  color: var(--ink);
}

/* --- Bewegung: dezentes Einblenden, abschaltbar ------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .hero,
  .card {
    animation: rise 0.5s ease-out both;
  }

  .card {
    animation-delay: 0.08s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

@media print {
  .lang,
  .skip,
  .draft,
  .actions,
  form {
    display: none;
  }

  body {
    background: #fff;
  }

  .card {
    border: 0;
    box-shadow: none;
  }
}
