/* overfitted.xyz, Variante D: Strategie als Sammelkarte. Vorn die Idee in Worten, hinten die ehrliche Statistik. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --ground: #e9ebe4;
  --ink: #1f2a23;
  --muted: #46524a;
  --faint: #868f87;
  --accent: #2f6a4e;
  --rule: rgb(31 42 35 / 0.13);
  --line: rgb(31 42 35 / 0.24);
  --hover: rgb(31 42 35 / 0.05);
  --stock: #faf9f4;
  --tint: #eef2ea;
  --gum: #e3e6dd;
  --pile: #d3d8cf;
  --print: #25302a;
  --brand: #2f6a4e;
  --brand-soft: #d5e6d9;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-turn: cubic-bezier(0.2, 0.75, 0.2, 1);
  --font-sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #18201b;
    --ink: #e8ece4;
    --muted: #b5beb5;
    --faint: #727d74;
    --accent: #8cc4a2;
    --rule: rgb(232 236 228 / 0.11);
    --line: rgb(232 236 228 / 0.22);
    --hover: rgb(232 236 228 / 0.06);
    --pile: #2c3830;
    color-scheme: dark;
  }
}

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100svh;
  margin: 0;
  padding: clamp(28px, 6vh, 72px) 16px calc(18px + env(safe-area-inset-bottom));
  overflow-x: clip;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--ground);
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "intro pack"
    "more pack";
  align-self: center;
  gap: 0 clamp(40px, 8vw, 128px);
  width: min(1120px, 100%);
  margin: 0 auto;
}

/* Links: Name, Versprechen, Status. */
.intro {
  grid-area: intro;
  align-self: end;
}
.name {
  margin: 0;
  font-size: clamp(52px, 7.4vw, 104px);
  font-weight: 900;
  font-stretch: 112%;
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.claim {
  max-width: 24ch;
  margin: 22px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 750;
  font-stretch: 110%;
}
.soon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Rechts: Stapel, Karte, Wendeknopf. */
.pack {
  --cw: min(372px, 80vw);
  grid-area: pack;
  display: grid;
  justify-items: center;
  gap: 26px;
}
.stack,
.deal {
  grid-area: 1 / 1;
  width: var(--cw);
  aspect-ratio: 63 / 88;
}
.stack {
  position: relative;
}
.stack span {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--cw) * 0.045);
  background: var(--pile);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 18px 36px -18px rgb(0 0 0 / 0.4);
  animation: fan 1000ms var(--ease-out) 380ms both;
}
.stack span:first-child {
  --fan: translate(-22px, 16px) rotate(-8deg);
  transform: var(--fan);
}
.stack span:last-child {
  --fan: translate(18px, 10px) rotate(5deg);
  transform: var(--fan);
}

/* Austeilen am Wrapper: Eine Deckkraft-Animation an der Karte selbst würde den 3D-Raum beim Wenden plattdrücken. */
.deal {
  perspective: 1600px;
  animation: deal 950ms var(--ease-out) 120ms both;
}
.card {
  position: relative;
  height: 100%;
  container-type: inline-size;
  rotate: -2deg;
  transform-style: preserve-3d;
  transition: transform 800ms var(--ease-turn);
  cursor: pointer;
}
.card.flipped {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 4.5cqi;
  padding: 4.2cqi;
  backface-visibility: hidden;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.05), 0 1px 2px rgb(0 0 0 / 0.16), 0 26px 54px -22px rgb(0 0 0 / 0.45);
}
/* Lichtkante, die beim Wenden einmal über die Karte läuft. */
.face::before {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  background: linear-gradient(104deg, transparent 38%, rgb(255 255 255 / 0.42) 50%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  pointer-events: none;
  transition: background-position 800ms var(--ease-turn);
}
.flipped .face::before {
  background-position: -30% 0;
}

.front {
  background: var(--stock);
  color: var(--print);
}
.frame {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 0.6cqi solid var(--brand);
  border-radius: 1.6cqi;
  background: var(--tint);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(rgb(26 26 24 / 0.1) 0.7px, transparent 0.9px) 0 0 / 3px 3px;
  pointer-events: none;
}
.set {
  position: absolute;
  z-index: 1;
  top: 2.6cqi;
  left: 3.2cqi;
  color: var(--print);
  font-size: max(11px, 4.2cqi);
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}
.pos {
  position: absolute;
  z-index: 1;
  top: 10.5cqi;
  left: 3.2cqi;
  display: grid;
  place-items: center;
  width: 14cqi;
  height: 14cqi;
  border: 0.8cqi solid var(--stock);
  border-radius: 50%;
  background: var(--brand);
  color: var(--stock);
  font-size: max(11px, 3.9cqi);
  font-weight: 800;
  font-stretch: 78%;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}
.portrait {
  display: block;
  width: 100%;
  height: 100%;
}
.portrait .grid-line {
  stroke: rgb(26 26 24 / 0.08);
  stroke-width: 1;
}
.portrait .band {
  fill: rgb(47 106 78 / 0.13);
}
.portrait .band-edge {
  stroke: var(--brand);
  stroke-width: 1;
  stroke-dasharray: 2 2;
  opacity: 0.6;
}
.portrait .wick {
  stroke: var(--print);
  stroke-width: 1.2;
}
.portrait .up {
  fill: var(--stock);
  stroke: var(--print);
  stroke-width: 1.2;
}
.portrait .down {
  fill: var(--print);
  stroke: var(--print);
  stroke-width: 1.2;
}
.portrait .entry {
  stroke: var(--brand);
  stroke-width: 1.4;
  stroke-dasharray: 4 3;
}
.portrait .stop {
  stroke: var(--print);
  stroke-width: 1.2;
  stroke-dasharray: 2 3;
  opacity: 0.45;
}
.portrait .dot {
  fill: var(--brand);
  stroke: var(--tint);
  stroke-width: 1.6;
}
.portrait text {
  fill: var(--print);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
}
.portrait text.red {
  fill: var(--brand);
  font-weight: 800;
}
.portrait .k {
  animation: rise 520ms var(--ease-out) both;
}

.banner {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin: -4.6cqi 0 0 -1.2cqi;
  padding: 2.4cqi 4.5cqi 2.3cqi 3.2cqi;
  background: var(--brand);
  color: var(--stock);
  font-size: max(12px, 4.7cqi);
  font-weight: 900;
  font-stretch: 116%;
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 3cqi) 100%, 0 100%);
}
.quote {
  margin: 3.4cqi 0 0;
  font-size: max(12px, 4.1cqi);
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}
.tag {
  margin: auto 0 0;
  padding-top: 2cqi;
  color: #62625d;
  font-size: max(11px, 2.9cqi);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Ecke „Kommt bald“ wie die Rookie-Ecke einer Sammelkarte. */
.flag {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  width: 36cqi;
  height: 36cqi;
  overflow: hidden;
  border-top-right-radius: 4.5cqi;
}
.flag span {
  position: absolute;
  top: 8.2cqi;
  right: -11cqi;
  width: 50cqi;
  padding: 1.6cqi 0;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: max(11px, 3.5cqi);
  font-weight: 900;
  font-stretch: 112%;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(45deg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.28);
}

.back {
  gap: 2.4cqi;
  background: var(--gum);
  color: var(--print);
  transform: rotateY(180deg);
}
.bhead h2 {
  margin: -4.2cqi -4.2cqi 0;
  padding: 3.2cqi 4.2cqi 3cqi;
  background: var(--brand);
  color: var(--stock);
  font-size: max(13px, 5.4cqi);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  text-transform: uppercase;
}
.bhead p {
  margin: 2.4cqi 0 0;
  font-size: max(11px, 3.2cqi);
  font-weight: 500;
  line-height: 1.35;
}
.grid {
  width: 100%;
  border-collapse: collapse;
  font: 500 max(10.5px, 3.2cqi) / 1.6 var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.grid caption {
  padding-bottom: 1.2cqi;
  font: 750 max(11px, 3cqi) / 1.2 var(--font-sans);
  text-align: left;
}
.grid th {
  padding: 0.6cqi 0.9cqi;
  border-bottom: 1.5px solid var(--print);
  font-weight: 700;
  text-align: left;
}
.grid td {
  padding: 0.3cqi 0.9cqi;
  border-bottom: 1px solid rgb(28 28 26 / 0.16);
}
.grid tbody tr:nth-child(odd) td {
  background: rgb(255 255 255 / 0.24);
}
.grid .skip td {
  background: none;
  text-align: center;
  letter-spacing: 0.4em;
}
.count {
  margin: 0;
  font-size: max(11px, 3cqi);
  font-weight: 700;
  line-height: 1.3;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6cqi;
  margin: 0;
}
.facts div {
  padding: 1.6cqi 1.8cqi;
  border: 1.5px solid var(--print);
  border-radius: 1cqi;
}
.facts dt {
  font-size: max(10px, 2.6cqi);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.facts dd {
  margin: 0.6cqi 0 0;
  font-size: max(10.5px, 3cqi);
  font-weight: 500;
  line-height: 1.28;
}

.turn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: 650 14px/1 var(--font-sans);
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.turn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 500ms var(--ease-turn);
}
.turn:hover {
  background: var(--hover);
}
.turn:active {
  transform: scale(0.97);
}
.turn[data-back] svg {
  transform: rotate(180deg);
}

/* Links unten: Pointe, Checkliste, Kontakt. */
.more {
  grid-area: more;
  align-self: start;
  max-width: 460px;
  margin-top: 44px;
}
.pun {
  margin: 0 0 14px;
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 700;
  font-stretch: 106%;
}
.check {
  margin: 0;
  padding: 0;
  list-style: none;
}
.check li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}
.check li:last-child {
  border-bottom: 1px solid var(--rule);
}
.check li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.4 8.4 6.6 11.4 12.8 4.4' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.4 8.4 6.6 11.4 12.8 4.4' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.contact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 22px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.contact svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms var(--ease-out);
}
.contact:hover svg {
  transform: translate(1px, -1px);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 22px;
  width: min(1120px, 100%);
  margin: 48px auto 0;
  color: var(--faint);
  font-size: 13px;
  font-weight: 500;
}
.foot nav {
  display: flex;
  gap: 18px;
}
.foot a {
  color: inherit;
  text-underline-offset: 3px;
}
.foot a:hover,
.beta-open:hover {
  color: var(--ink);
}
.beta-open {
  all: unset;
  cursor: pointer;
  text-underline-offset: 3px;
  text-decoration: underline;
}
.beta-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.disclaimer {
  margin: 0 0 0 auto;
  font-size: 12px;
}

/* Impressum und Datenschutz. */
.legal {
  width: min(680px, 100%);
  margin: 0 auto;
}
.home {
  display: inline-block;
  margin-bottom: clamp(40px, 9vh, 96px);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.legal h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.legal p {
  max-width: 60ch;
  color: var(--muted);
}
.legal h2 {
  margin: 32px 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.legal ul {
  max-width: 60ch;
  padding-left: 1.2em;
  color: var(--muted);
}
.legal code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  color: var(--ink);
}
.legal p a,
.legal li a {
  color: var(--ink);
}
.placeholder {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.legal + .foot {
  width: min(680px, 100%);
}
.foot a[aria-current] {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

@keyframes deal {
  from {
    opacity: 0;
    translate: 0 70px;
    rotate: -9deg;
  }
}
@keyframes fan {
  from {
    opacity: 0;
    transform: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 6px;
  }
}

/* Schmale Karte: zwei Rasterzeilen weniger, damit die Rückseite nicht überläuft. */
@container (max-width: 340px) {
  .grid tbody tr:nth-child(5),
  .grid tbody tr:nth-child(6) {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  .face {
    filter: brightness(0.94);
  }
}

@media (max-width: 860px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "pack"
      "more";
    gap: 0;
  }
  .pack {
    margin-top: 40px;
  }
  .more {
    margin-top: 40px;
  }
  .disclaimer {
    flex-basis: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deal,
  .stack span,
  .portrait .k {
    animation: none;
  }
  .card {
    transition: none;
  }
  .face::before {
    display: none;
  }
}

/* Versteckte Vorschau-Freischaltung (App, nur im Coming-Soon-Modus): der Punkt am Ende des Hinweises. */
.key {
  all: unset;
  cursor: text;
}
.key:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.unlock,
.gate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-size: 13px;
}
.unlock[hidden],
.gate[hidden] {
  display: none;
}
.unlock input,
.gate input {
  width: 180px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.unlock button,
.gate button {
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--ground);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.unlock-msg,
.gate-msg {
  color: var(--muted);
}
