/* hxxps.de: dieselbe Sprache wie when's best („Papier & Tinte“, tokens.css + base.css). Eigenes hier nur:
   das x in Marken-Tinte (wie der Apostroph von when's best), der Federstrich über tt und die Seitenteile. */

body.hx { padding-bottom: 0; display: flex; flex-direction: column; }
.hx main { flex: 1; outline: none; }
.hx-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.hx-mark .hx-x { color: var(--drop); font-style: italic; }
.hx-small { font-size: 15px; line-height: 1.5; color: var(--quiet); }
code.hx-ioc { padding: 1px 6px; border-radius: 6px; background: var(--sunk); font: 500 0.92em/1.4 var(--sans); white-space: nowrap; }

/* ---------- Sprache: EN | DE, wie das Segment von when's best ---------- */
.hx-lang { display: inline-flex; padding: 3px; border-radius: var(--pill); background: var(--sunk); }
.hx-lang a { min-width: 40px; padding: 5px 10px; border-radius: var(--pill); font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; color: var(--quiet); transition: color 150ms ease, background-color 150ms ease; }
.hx-lang a[aria-current] { background: var(--raised); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .hx-lang a:not([aria-current]):hover { color: var(--ink); } }

/* ---------- Kopf: https.de wird mit einem Federstrich zu hxxps.de ---------- */
.hx-hero { padding-top: 56px; padding-bottom: 64px; }
@media (min-width: 900px) { .hx-hero { padding-top: 104px; padding-bottom: 112px; } }
.hx-title { font: 300 clamp(68px, 21vw, 208px)/0.9 var(--serif); letter-spacing: -0.045em; white-space: nowrap; }
.hx-word { display: inline-block; }
.hx-swap { position: relative; display: inline-grid; margin: 0 0.02em; }
.hx-swap > span { grid-area: 1 / 1; justify-self: center; }
.hx-swap .hx-t { opacity: 0; }
.hx-swap .hx-x { color: var(--drop); font-style: italic; }
/* Der Federstrich: eine Linie in Marken-Tinte, leicht schräg, wie von Hand. */
.hx-swap::after { content: ''; position: absolute; left: -0.06em; right: -0.06em; top: 50%; height: 0.05em; border-radius: 1em; background: var(--drop); opacity: 0; transform: rotate(-14deg) scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.hx-lead { margin-top: 28px; max-width: 30em; font-size: clamp(18px, 1.1vw + 14px, 22px); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

.hx-anim .hx-word { animation: rise 640ms var(--ease-out) 80ms both; }
.hx-anim .hx-lead { animation: rise 640ms var(--ease-out) 220ms both; }
.hx-anim .hx-swap::after { animation: hx-strike 760ms var(--ease-out) 760ms both; }
.hx-anim .hx-swap--2::after { animation-delay: 850ms; }
.hx-anim .hx-swap .hx-t { animation: hx-t-out 260ms var(--ease-out) 1160ms both; }
.hx-anim .hx-swap--2 .hx-t { animation-delay: 1250ms; }
.hx-anim .hx-swap .hx-x { animation: hx-x-in 460ms var(--ease-out) 1220ms both; }
.hx-anim .hx-swap--2 .hx-x { animation-delay: 1310ms; }
@keyframes hx-strike {
  0% { opacity: 1; transform: rotate(-14deg) scaleX(0); }
  45% { opacity: 1; transform: rotate(-14deg) scaleX(1); }
  70% { opacity: 1; transform: rotate(-14deg) scaleX(1); }
  100% { opacity: 0; transform: rotate(-14deg) scaleX(1); }
}
@keyframes hx-t-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(0.08em) scale(0.96); } }
@keyframes hx-x-in { from { opacity: 0; transform: translateY(-0.12em) rotate(-8deg) scale(0.96); } }

/* ---------- Einblendungen (hx.js setzt is-in einmal pro Abschnitt) ---------- */
.hx-anim:not(.hx-shown) [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(18px); }
[data-reveal] { transition: opacity 560ms var(--ease-out), transform 560ms var(--ease-out); }
.hx-cards [data-reveal]:nth-child(2) { transition-delay: 80ms; }

/* ---------- Warum xx statt tt ---------- */
.hx-why { background: var(--raised); }
.hx-why-in { display: grid; gap: 18px 64px; padding-top: 56px; padding-bottom: 60px; }
@media (min-width: 900px) { .hx-why-in { grid-template-columns: 5fr 7fr; padding-top: 88px; padding-bottom: 92px; } }
.hx-why h2, .hx-try h2 { font: 400 clamp(32px, 3vw + 18px, 48px)/1.05 var(--serif); letter-spacing: -0.025em; text-wrap: balance; }
.hx-why-text { display: grid; gap: 14px; max-width: 36em; font-size: 18px; line-height: 1.6; }

/* ---------- Selbst entschärfen ---------- */
.hx-try { background: var(--sunk); }
.hx-try-in { display: grid; gap: 12px; padding-top: 52px; padding-bottom: 56px; }
@media (min-width: 900px) { .hx-try-in { padding-top: 80px; padding-bottom: 84px; } }
.hx-try-in > .hx-small { max-width: 34em; }
.hx-try-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 14px; }
.hx-input { grid-column: 1 / -1; width: 100%; min-height: 54px; padding: 0 18px; border: 2px solid transparent; border-radius: var(--r); background: var(--raised); font-size: 17px; transition: border-color 150ms ease; }
.hx-input:focus-visible { outline: none; border-color: var(--accent); }
.hx-out { display: flex; align-items: center; min-height: 54px; padding: 12px 18px; border-radius: var(--r); background: var(--ground); font: 500 clamp(17px, 0.6vw + 14px, 21px)/1.35 var(--sans); overflow-wrap: anywhere; word-break: break-word; }
.hx-out.is-empty { color: var(--quiet); font-weight: 400; }
.hx-out mark { background: none; color: var(--drop); font-weight: 700; }
@media (max-width: 520px) { .hx-try-form { grid-template-columns: 1fr; } }

/* ---------- Zwei Karten ---------- */
.hx-cards { display: grid; gap: 12px; padding-top: 48px; padding-bottom: 20px; }
@media (min-width: 760px) { .hx-cards { grid-template-columns: 1fr 1fr; padding-top: 72px; } }
.hx-card { display: grid; align-content: start; gap: 12px; padding: 28px 26px 30px; border-radius: var(--r); background: var(--raised); }
.hx-card h2 { font: 400 clamp(28px, 1.4vw + 20px, 36px)/1.08 var(--serif); letter-spacing: -0.02em; }
.hx-card p { max-width: 32em; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.hx-card--ink { background: #1E3A8A; color: #F2F0EA; }
.hx-card--ink p { color: #CFD8F2; }
.hx-card--ink .hx-mail { color: #F2F0EA; font-weight: 600; white-space: nowrap; }
.hx-card-btn { justify-self: start; margin-top: 8px; background: #F2F0EA; color: #1E3A8A; }
@media (hover: hover) and (pointer: fine) { .hx-card-btn:hover { background: #FFFFFF; } }
:root[data-scheme="dark"] .hx-card--ink { background: #16295F; }
@media (prefers-color-scheme: dark) { :root:not([data-scheme="light"]) .hx-card--ink { background: #16295F; } }

/* Vorher nachsehen: Kurzlink mit Plus, darunter das Ziel. */
.hx-peek { display: grid; gap: 6px; margin-top: 10px; padding: 16px 18px; border-radius: var(--r); background: var(--ground); font-size: 16px; }
.hx-peek-in { font-weight: 600; }
.hx-peek-in b { display: inline-block; color: var(--drop); font-weight: 700; }
.hx-peek-out { color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-peek-out::before { content: '→ '; color: var(--drop); }
.hx-anim .hx-card:not(.is-in) .hx-peek-out { opacity: 0; transform: translateX(-8px); }
.hx-peek-out { transition: opacity 420ms var(--ease-out) 560ms, transform 420ms var(--ease-out) 560ms; }
.hx-anim .hx-card.is-in .hx-peek-in b { animation: hx-plus 420ms var(--ease-out) 360ms both; }
@keyframes hx-plus { from { opacity: 0; transform: scale(0.6) rotate(-45deg); } }

.hx-privacy { padding-top: 28px; padding-bottom: 8px; max-width: 46em; font-size: 15px; color: var(--quiet); }

/* ---------- Fuß ---------- */
.hx-foot { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-top: 36px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--quiet); }
.hx-foot a { display: inline-block; padding: 8px 0; text-decoration: none; }
.hx-foot span { padding: 8px 0; }
@media (hover: hover) and (pointer: fine) { .hx-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; } }

/* ---------- Zustands-, Hinweis- und Vorschauseite (wie gone.html bei when's best) ---------- */
.hx-plain-main { display: grid; align-content: center; gap: 16px; max-width: 680px; padding-top: 40px; padding-bottom: 40px; }
.hx-plain-main h1 { font: 300 clamp(38px, 10vw, 60px)/1.02 var(--serif); letter-spacing: -0.03em; text-wrap: balance; }
.hx-plain-main > p:not(.hx-small) { color: var(--ink-soft); max-width: 38ch; }
.hx-plain .hx-foot { padding-top: 0; }
.hx-message { font: italic 400 clamp(20px, 1vw + 16px, 24px)/1.4 var(--serif); color: var(--ink); max-width: 30em; }
.hx-target { padding: 16px 18px; border-radius: var(--r); background: var(--raised); font: 500 18px/1.4 var(--sans); overflow-wrap: anywhere; word-break: break-word; }
.hx-short { font: 500 20px/1.3 var(--sans); }
.hx-plain-main > .hx-small { margin-top: 4px; }
.hx-plain-main form, .hx-go { justify-self: start; margin-top: 8px; }

/* Hinweisseite: die Adresse erscheint entschärft, wird durchgestrichen und dann scharf (gate.js). */
.hx-arm { position: relative; }
.hx-arm .on { display: none; }
.hx-arm .off { position: relative; color: var(--quiet); }
.hx-arm .off::after { content: ''; position: absolute; left: -0.08em; right: -0.08em; top: 55%; height: 2px; border-radius: 2px; background: var(--drop); transform: rotate(-10deg) scaleX(0); transform-origin: 0 50%; transition: transform 240ms var(--ease-out); }
.is-striking .hx-arm .off::after { transform: rotate(-10deg) scaleX(1); }
.is-armed .hx-arm .off { display: none; }
.is-armed .hx-arm .on { display: inline-block; color: var(--drop); font-weight: 700; animation: hx-on 520ms var(--ease-out) both; }
@keyframes hx-on { from { opacity: 0; transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .hx-peek-out, .hx-input { transition: none; }
  .is-armed .hx-arm .on { animation: none; }
}
