/*
 * Aussehen wie die iOS-App: Systemschrift, Systemfarben, gruppierte Listen,
 * Hell und Dunkel nach Systemeinstellung. Eine eigene Farbe hat nur die Gesprächskarte,
 * eine pro Gesprächsenergie (Werte aus `Social App/Theme/AppTheme.swift`).
 */

:root {
  color-scheme: light dark;

  --bg: #f2f2f7; /* systemGroupedBackground */
  --surface: #ffffff; /* secondarySystemGroupedBackground */
  --label: #000000;
  --secondary-label: rgba(60, 60, 67, 0.6);
  --tertiary-label: rgba(60, 60, 67, 0.3);
  --separator: rgba(60, 60, 67, 0.29);
  --fill: rgba(118, 118, 128, 0.12); /* tertiarySystemFill */
  --segment-selected: #ffffff;
  --shadow: rgba(0, 0, 0, 0.12);

  --casual: #ff9500;
  --deep: #8e8cff;
  --networking: #34c759;
  --sticker: #ff9f0a; /* Sticker im Video, hier der Punkt im Logo */

  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --label: #ffffff;
    --secondary-label: rgba(235, 235, 245, 0.6);
    --tertiary-label: rgba(235, 235, 245, 0.3);
    --separator: rgba(84, 84, 88, 0.65);
    --fill: rgba(118, 118, 128, 0.24);
    --segment-selected: #636366;
    --shadow: rgba(0, 0, 0, 0.5);

    --casual: #ff9f0a;
    --deep: #7d7aff;
    --networking: #30d158;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--label);
  outline-offset: 3px;
}

.wrap {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Textabschnitte: gleiche linke Kante wie der Rest, aber schmalere Zeilen */
.narrow > * {
  max-width: 680px;
}

h1,
h2 {
  text-wrap: balance;
}

h2 {
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

section + section {
  margin-top: 88px;
}

/* Kopf */

.top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.brand-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sticker);
}

.pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--secondary-label);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.top-link {
  margin-left: auto;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.top-link:hover {
  opacity: 0.6;
}

/* Buttons wie .primaryCapsule und .secondaryCapsule in der App */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.button:hover {
  opacity: 0.8;
}

.button:active {
  opacity: 0.6;
}

.button.primary {
  background: var(--label);
  color: var(--bg);
}

.button.secondary {
  background: var(--fill);
  color: var(--label);
}

.button.wide {
  width: 100%;
  margin-top: 24px;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-top: 48px;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 68px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  margin-top: 20px;
  max-width: 34em;
  font-size: clamp(19px, 2.2vw, 21px);
  line-height: 1.42;
  color: var(--secondary-label);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.footnote {
  margin-top: 14px;
  font-size: 13px;
  line-height: 18px;
  color: var(--secondary-label);
}

/* Segmentierte Auswahl wie der Picker im Match-Tab */

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2px;
  border-radius: 9px;
  background: var(--fill);
}

.segmented button {
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--label);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.segmented button[aria-checked="true"] {
  background: var(--segment-selected);
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
}

/* Die Gesprächskarte, wie in MatchResultView */

.card-slot {
  margin-top: 20px;
}

/* Alle Karten gleich gross, wie ein Kartendeck */
.card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 20px;
  border-radius: 26px;
  color: #000;
  box-shadow: 0 10px 30px var(--shadow);
  transition: background-color 0.3s;
  /* Die erste Karte wird "gezogen": kommt leicht schräg von unten, wie in der App */
  animation: draw 0.6s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.card.enter {
  animation: enter 0.45s cubic-bezier(0.2, 0.9, 0.25, 1);
}

@keyframes draw {
  from {
    transform: translateY(60px) rotate(-4deg);
    opacity: 0;
  }
}

@keyframes enter {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

.card.casual {
  background: var(--casual);
}

.card.deep {
  background: var(--deep);
}

.card.networking {
  background: var(--networking);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
}

.card-topic {
  margin-top: 44px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-reason {
  margin-top: auto;
  padding-top: 44px;
  font-size: 15px;
  line-height: 1.33;
  opacity: 0.75;
}

.hero-card figcaption,
.clip figcaption {
  margin-top: 14px;
  font-size: 13px;
  line-height: 18px;
  color: var(--secondary-label);
}

/* Idee */

.idea p {
  margin-top: 14px;
  color: var(--secondary-label);
}

.idea p.strong {
  margin-top: 20px;
  font-size: 21px;
  line-height: 1.38;
  font-weight: 600;
  color: var(--label);
}

.source {
  font-size: 13px;
  white-space: nowrap;
  color: var(--secondary-label);
}

/* Gruppierte Listen wie in iOS */

.list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}

.list > li {
  position: relative;
}

/* Trennlinie eingerückt, wie in iOS */
.list > li + li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  border-top: 0.5px solid var(--separator);
}

.list.plain > li {
  padding: 12px 16px;
}

/* So geht's */

.how-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 560px);
  gap: 64px;
  align-items: center;
  margin-top: 24px;
}

.steps {
  margin-top: 0;
}

.steps > li {
  display: flex;
  gap: 14px;
  padding: 16px;
}

.steps > li + li::before {
  left: 58px;
}

.step-number {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fill);
  font-size: 15px;
  font-weight: 600;
}

.steps h3 {
  font-size: 17px;
  line-height: 28px;
  font-weight: 600;
}

.steps p {
  margin-top: 2px;
  font-size: 15px;
  line-height: 20px;
  color: var(--secondary-label);
}

/* Clip aus dem Video */

.clip {
  max-width: 300px;
}

.clip video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  background: #000;
  box-shadow: 0 10px 30px var(--shadow);
}

/* Der Clip beginnt fast schwarz: auf Schwarz braucht er einen Rand, sonst fehlen die Ecken */
@media (prefers-color-scheme: dark) {
  .clip video {
    box-shadow: 0 0 0 1px var(--separator);
  }
}

/* Haltung: Text links, Zug-Clip rechts (umgekehrt zu „So geht’s“) */

.rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) 300px;
  gap: 64px;
  align-items: center;
}

.after-list {
  margin-top: 16px;
  color: var(--secondary-label);
}

/* Mitmachen */

.join > p {
  margin-top: 14px;
  color: var(--secondary-label);
}

.links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 60px;
  text-decoration: none;
}

.links a:hover {
  background: var(--fill);
}

.links a span {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.links strong {
  font-weight: 400;
}

.links small {
  font-size: 15px;
  line-height: 20px;
  color: var(--secondary-label);
}

.chevron {
  flex: none;
  width: 8px;
  height: 14px;
  fill: none;
  stroke: var(--tertiary-label);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Impressum und Datenschutz */

.legal {
  padding-top: 24px;
}

.legal h1 {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal h2 {
  margin-top: 48px;
  font-size: 22px;
  line-height: 1.27;
}

.legal h3 {
  margin-top: 24px;
  font-size: 17px;
  font-weight: 600;
}

.legal p {
  margin-top: 6px;
  color: var(--secondary-label);
}

.legal .list + p,
.legal h2 + p {
  margin-top: 14px;
}

.legal-date {
  margin-top: 32px;
  font-size: 13px;
}

/* Fuss */

footer {
  margin-top: 64px;
  padding-top: 20px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  font-size: 13px;
  line-height: 18px;
  color: var(--secondary-label);
}

/* Schmal */

@media (max-width: 820px) {
  .hero,
  .how-grid,
  .rules-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero {
    padding-top: 24px;
  }

  section + section {
    margin-top: 72px;
  }
}

@media (max-width: 480px) {
  .actions .button {
    flex: 1 1 100%;
  }

  .card-topic {
    font-size: 26px;
  }
}

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

  .card,
  .card.enter {
    transition: none;
    animation: none;
  }

  .button {
    transition: none;
  }
}
