/* Connect Cards · /card
   Eigenständiges Stylesheet, lädt nichts von fremden Domains. */

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/card/fonts/inter-tight-800.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/card/fonts/inter-tight-500.woff2") format("woff2");
}

:root {
  --ground: #080B0A;
  --surface: #0F1412;
  --line: #1F2926;
  --text: #DCE5E2;
  --muted: #9AA8A3;
  --mint: #3FE0A0;
  --mint-soft: rgba(63, 224, 160, 0.14);
  --radius: 14px;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */

.cc {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(40px, env(safe-area-inset-bottom));
  display: grid;
  gap: 24px;
}

@media (min-width: 960px) {
  .cc {
    max-width: 1080px;
    padding-top: 48px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    grid-template-areas:
      "stage head"
      "stage panel"
      "wall  wall";
    grid-template-rows: auto 1fr auto;
    column-gap: 56px;
    align-items: start;
  }
  .cc-head { grid-area: head; }
  .cc-stage { grid-area: stage; }
  .cc-panel { grid-area: panel; }
  .cc-wall { grid-area: wall; }
}

/* ---------- Kopf ---------- */

.cc-head { display: grid; gap: 8px; }

.cc-brand {
  justify-self: start;
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.cc-brand:hover { color: var(--mint); }

.cc-eyebrow {
  margin: 0;
  color: var(--mint);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cc-title {
  margin: 0;
  color: #FFFFFF;
  font-weight: 800;
  font-size: clamp(32px, 8vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.cc-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 17px;
}

/* ---------- Vorschau ---------- */

.cc-stage { display: grid; gap: 12px; }

.cc-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 1350;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ground);
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, 0.5);
}

.cc-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Deckt exakt die Fotofläche der Karte ab (x 238–842, y 365–973 von 1080 × 1350). */
.cc-photo {
  position: absolute;
  left: 22.0370%;
  top: 27.0370%;
  width: 55.9259%;
  height: 45.0370%;
  border-radius: 3.6%;
  outline: none;
  cursor: pointer;
}

.cc[data-state="ready"] .cc-photo {
  cursor: grab;
  touch-action: none;
}
.cc[data-state="ready"] .cc-photo.is-dragging { cursor: grabbing; }
.cc[data-state="ready"] .cc-photo:focus-visible { box-shadow: 0 0 0 2px var(--mint); }

/* Hilfslinie bei 42 % der Fotohöhe */
.cc-guide {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  height: 0;
  border-top: 1px solid var(--mint);
  opacity: 0.85;
  pointer-events: none;
  display: none;
}
.cc[data-state="ready"] .cc-guide { display: block; }

.cc-guide-label {
  position: absolute;
  right: 8px;
  bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(8, 11, 10, 0.72);
  color: var(--mint);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cc-privacy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Bedienung ---------- */

.cc-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.cc-btn:hover { border-color: var(--mint); }
.cc-btn:focus-visible,
.cc-pick:focus-within { outline: 2px solid var(--mint); outline-offset: 2px; }
.cc-btn:disabled { opacity: 0.5; cursor: progress; }

.cc-btn--primary {
  border-color: var(--mint);
  background: var(--mint);
  color: var(--ground);
}
.cc-btn--primary:hover { background: #5BE8B0; }


.cc-btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.cc-btn--ghost:hover { color: var(--text); border-color: var(--line); }

/* Datei-Input bleibt bedienbar, ist aber unsichtbar; der Label-Rahmen ist der Button. */
.cc-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.cc-pick { position: relative; width: 100%; }
.cc[data-state="loading"] .cc-pick { opacity: 0.5; pointer-events: none; }

.cc-status {
  margin: 0;
  min-height: 0;
  color: var(--mint);
  font-size: 15px;
}
.cc-status:empty { display: none; }

.cc-zoom {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.cc-zoom-label {
  font-weight: 800;
  font-size: 15px;
}

/* Schieberegler in den Kartenfarben */
.cc-range {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.cc-range:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; border-radius: 4px; }
.cc-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line); }
.cc-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.cc-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--mint); }
.cc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border: 0;
  border-radius: 50%;
  background: var(--mint);
}
.cc-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--mint);
}

/* ---------- Speichern ----------
   Zwei Buttons untereinander (Feed 4:5 in Mint, Story 9:16 neutral), darunter ein Hinweis.
   Beschriftung und Verhalten (Download oder Teilen → „Bild sichern“) setzt card.js je Gerät. */

.cc-save { display: grid; gap: 10px; }

.cc-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cc-downloads {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.cc-outro {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.cc-outro p { margin: 0; }
.cc-outro-lead {
  color: var(--text);
  font-weight: 800;
  font-size: 17px;
}
.cc-outro-tags {
  color: var(--muted);
  font-size: 15px;
}
.cc-outro-tags strong { color: var(--mint); font-weight: 800; }

/* ---------- Texte für LinkedIn ---------- */

.cc-posts { display: grid; gap: 4px; }

.cc-posts-title {
  margin: 8px 0 0;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
}

.cc-posts-sub {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
}

.cc-post-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cc-post {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.cc-post-text {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
}

.cc-post .cc-btn {
  justify-self: start;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}
.cc-post .cc-btn.is-copied {
  border-color: var(--mint);
  color: var(--mint);
}

/* ---------- Connect Wall ---------- */

.cc-wall {
  display: grid;
  gap: 32px;
  margin-top: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.cc-wall-head { display: grid; gap: 8px; max-width: 640px; }

.cc-wall-title {
  margin: 0;
  color: #FFFFFF;
  font-weight: 800;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.cc-wall-sub {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.cc-wall-group { display: grid; gap: 14px; }

.cc-wall-group-title {
  margin: 0;
  color: var(--mint);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cc-wall-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) { .cc-wall-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 960px) { .cc-wall-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; } }

.cc-wall-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 1350;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

/* ---------- Zustände: vor der Fotoauswahl nur „Foto wählen" ---------- */

.cc[data-state="empty"] .cc-zoom,
.cc[data-state="empty"] .cc-save,
.cc[data-state="empty"] #cc-reset,
.cc[data-state="empty"] .cc-outro,
.cc[data-state="empty"] .cc-posts,
.cc[data-state="loading"] .cc-posts,
.cc[data-state="loading"] .cc-zoom,
.cc[data-state="loading"] .cc-save,
.cc[data-state="loading"] #cc-reset,
.cc[data-state="loading"] .cc-outro,
.cc[data-state="ready"] .cc-pick {
  display: none;
}

.cc-zoom.is-fixed { opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
  .cc-btn { transition: none; }
}

/* Dezenter Textlink zur Ticketseite unter der Wall */
.cc-wall-foot {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.cc-wall-foot a {
  color: var(--mint);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cc-wall-foot a:hover { color: #5BE8B0; }

/* ---------- Footer: Impressum und Datenschutz (Pflicht auf jeder Seite) ---------- */

.cc-footer {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.cc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.cc-footer-links a {
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.cc-footer-links a:hover { color: var(--mint); text-decoration: underline; }

.cc-footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 959px) {
  .cc-footer { max-width: 560px; }
}
