/* ───────────────────────────────────────────────────────────────
   Passwortgenerator — Info-Seite
   Ästhetik wie Reinschrift: Tinte auf Papier. Cremefarben,
   gesetzte Typo, Kugelschreiber-blau, roter Bleistift für die
   Crack-Zeit, ein ordentlicher grüner Haken.
   ─────────────────────────────────────────────────────────────── */

/* Schriften lokal ausgeliefert (SIL Open Font License), keine
   Anfragen an Dritte. Latin-Subset von Google Fonts. */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/instrument-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2");
}

:root {
  --paper: #f5efe2;
  --paper-deep: #ede5d3;
  --ink: #211d16;
  --ink-soft: #5c5547;
  --blue: #1a5fb4;
  --blue-soft: #99c1f1;
  --red: #a8321a;
  --green: #26a269;
  --teal: #1f7a72;
  --dark: #26221b;
  --dark-ink: #efe7d6;
  --rule: rgba(33, 29, 22, 0.16);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", "Cantarell", sans-serif;
  --mono: "IBM Plex Mono", "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* paper grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--blue-soft); color: var(--ink); }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.05em 0.3em;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* ── header ───────────────────────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
}

header img { width: 34px; height: 34px; }

header .brand {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
header .brand:hover { color: var(--ink); }

header nav {
  margin-left: auto;
  display: flex;
  gap: 1.4rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.8rem;
}
header nav a { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
header nav a:hover { color: var(--blue); }

/* ── hero ─────────────────────────────────────────────────────── */

.hero { padding: 5rem 0 4rem; position: relative; }

.kicker {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.kicker::before { content: "§ "; color: var(--red); }

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 7.5vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 16ch;
}
h1 em {
  font-style: italic;
  color: var(--blue);
  /* hand-drawn underline under the em */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 6 Q 30 1 60 4 T 118 3' fill='none' stroke='%231a5fb4' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat bottom / 100% 0.14em;
  padding-bottom: 0.16em;
}

.hero .lede {
  margin-top: 1.8rem;
  max-width: 36rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.hero .lede strong { color: var(--ink); font-weight: 600; }

.cta-row {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.cta-row .flathub img { height: 52px; display: block; }

.cmd {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: none;
  cursor: pointer;
  box-shadow: 2px 3px 0 rgba(33, 29, 22, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  max-width: 100%;
}
.cmd:hover { transform: translate(-1px, -1px); box-shadow: 3px 4px 0 rgba(33, 29, 22, 0.3); }
.cmd::before { content: "$"; color: var(--green); }
.cmd .copied { color: var(--green); font-size: 0.72rem; }
.cmd { white-space: nowrap; overflow-x: auto; }

/* ── das Fenster und die Stärke-Karte ─────────────────────────── */

.desk {
  margin-top: 4.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 2.5rem;
  align-items: start;
}

.app-card {
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: 12px;
  box-shadow: 6px 8px 0 rgba(33, 29, 22, 0.18);
  transform: rotate(-0.6deg);
  overflow: hidden;
}
.file-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: rgba(239, 231, 214, 0.6);
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(239, 231, 214, 0.12);
}
.file-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(239, 231, 214, 0.25); }
.file-bar .name { margin-left: 0.4rem; }

.app-lines {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2.6vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 2.1;
  padding: 1.4rem 1.2rem 1rem;
  white-space: pre;
  overflow-x: auto;
}
.app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1.2rem 1.2rem;
}

.typed-wrap { display: inline-flex; align-items: baseline; }
.typed {
  display: inline-block;
  overflow: hidden;
  white-space: pre;
  max-width: 0;
  animation: type 2.2s steps(19, end) 0.9s forwards;
}
.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  transform: translateY(0.18em);
  background: var(--dark-ink);
  animation: blink 0.9s steps(1) infinite;
}
@keyframes type { to { max-width: 20ch; } }
@keyframes blink { 50% { opacity: 0; } }

/* die Stärke-Karte rückt rein, wenn das Passwort "geschrieben" ist */
.strength-card {
  background: #fffdf7;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.2rem 1.3rem;
  box-shadow: 5px 7px 0 rgba(33, 29, 22, 0.12);
  transform: rotate(1deg) translateY(14px);
  opacity: 0;
  animation: appear 0.55s cubic-bezier(0.2, 0.8, 0.3, 1.1) 3.6s forwards;
  position: relative;
}
.strength-card::before {
  content: "Stärke-Anzeige ↑";
  position: absolute;
  top: -1.7rem;
  left: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}
@keyframes appear { to { opacity: 1; transform: rotate(1deg) translateY(0); } }

.strength-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.chip.blue { color: var(--blue); }
.chip.green { color: var(--green); }
.chip.red { color: var(--red); }
.chip.dim { color: rgba(239, 231, 214, 0.6); }

/* Easter egg: der „Kopiert“-Chip kopiert wirklich */
button.chip {
  background: none;
  line-height: inherit;
  cursor: pointer;
}
button.chip:hover { background: rgba(38, 162, 105, 0.12); }

.strength-note {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ── section scaffolding ──────────────────────────────────────── */

section { padding: 4.5rem 0 1rem; }

.sec-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.sec-label::after { content: ""; height: 1px; background: var(--rule); flex: 1; }
.sec-label b { color: var(--red); font-weight: 400; }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.15;
  max-width: 26ch;
  margin-bottom: 1rem;
}

.sec-intro { color: var(--ink-soft); max-width: 38rem; }

/* ── screenshots ──────────────────────────────────────────────── */

.shots {
  margin: 2.5rem 0 3rem;
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.shot {
  position: relative;
  transform: rotate(-1.1deg);
}
/* screenshots carry the native window shadow and rounded corners */
.shot img {
  width: 100%;
  display: block;
}
/* tape strips */
.shot::before, .shot::after {
  content: "";
  position: absolute;
  width: 6.5rem; height: 1.7rem;
  background: rgba(214, 196, 156, 0.55);
  box-shadow: 0 1px 2px rgba(33, 29, 22, 0.12);
  z-index: 2;
}
.shot::before { top: -0.8rem; left: -1.6rem; transform: rotate(-38deg); }
.shot::after { bottom: -0.7rem; right: -1.4rem; transform: rotate(-35deg); }

.shot-small { transform: rotate(1.6deg); }
.shot-small::after { display: none; }
.shot-small::before { top: -0.6rem; left: 50%; margin-left: -3.25rem; transform: rotate(2deg); }

/* ── features ─────────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.feature {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 1.4rem 1.7rem;
  position: relative;
  transition: background 0.2s ease;
}
.feature:hover { background: rgba(255, 253, 247, 0.85); }
.feature .check {
  font-family: var(--mono);
  color: var(--green);
  font-size: 0.95rem;
}
.feature h3 {
  display: inline;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  margin-left: 0.35rem;
}
.feature p { margin-top: 0.55rem; color: var(--ink-soft); font-size: 0.92rem; }

/* ── sicherheit ───────────────────────────────────────────────── */

.sec-grid {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.7rem 3rem;
}
.sec-item h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  margin-bottom: 0.3rem;
}
.sec-item h3 .no {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--red);
  vertical-align: 0.5em;
  margin-right: 0.5rem;
}
.sec-item p { color: var(--ink-soft); font-size: 0.97rem; }

.terminal {
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.9;
  padding: 0;
  margin-top: 2.2rem;
  white-space: pre;
  overflow-x: auto;
  box-shadow: 4px 6px 0 rgba(33, 29, 22, 0.18);
  transform: rotate(0.5deg);
}
.terminal .file-bar { border-radius: 10px 10px 0 0; }
.terminal pre {
  padding: 1rem 1.2rem 1.2rem;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow-x: auto;
}

.sec-report {
  margin-top: 1.4rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

/* ── install ──────────────────────────────────────────────────── */

.install-grid {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.6rem;
}
.install-card {
  background: #fffdf7;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.6rem 1.5rem;
  box-shadow: 4px 6px 0 rgba(33, 29, 22, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.install-card:nth-child(2) { transform: rotate(0.4deg); }
.install-card:nth-child(1) { transform: rotate(-0.4deg); }
.install-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; }
.install-card p { color: var(--ink-soft); font-size: 0.92rem; flex: 1; }
.install-card .cmd { align-self: flex-start; }
.install-card .flathub img { height: 48px; display: block; }
.install-card .alt { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); }
.install-card .alt a { color: inherit; }

/* ── footer ───────────────────────────────────────────────────── */

footer {
  margin-top: 5rem;
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
footer .meaning {
  width: 100%;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
  max-width: 44rem;
}
footer .meaning b { color: var(--blue); font-weight: 400; }
footer nav { display: flex; flex-wrap: wrap; gap: 1.6rem; font-family: var(--mono); font-size: 0.78rem; }
footer nav.langs { gap: 0.4rem 1.2rem; }
footer nav.langs a[aria-current] { color: var(--ink); text-decoration: none; font-weight: 500; }

header nav a.lang-link {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* Japanisch: keine schräggestellten CJK-Zeichen, Umbruch an Phrasen */
:lang(ja) em { font-style: normal; }
:lang(ja) h1, :lang(ja) h2 { word-break: auto-phrase; letter-spacing: 0; }
:lang(ja) h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); line-height: 1.25; max-width: 13em; }
:lang(ja) h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.4; max-width: 22em; }

/* ── reveal on scroll ─────────────────────────────────────────── */

/* hidden only when JS is present (body.js), so content never disappears without it */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .typed { animation-duration: 0.01s; animation-delay: 0s; }
  .strength-card { animation-duration: 0.01s; animation-delay: 0.2s; }
  .caret { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── responsive ───────────────────────────────────────────────── */

@media (max-width: 52rem) {
  .desk { grid-template-columns: 1fr; }
  .strength-card { transform: rotate(0deg); max-width: 26rem; }
  .shots { grid-template-columns: 1fr; }
  .shot-small { width: 70%; max-width: 19rem; justify-self: center; }
  .sec-grid { grid-template-columns: 1fr; }
  header nav a.gh { display: none; }
  header nav { gap: 0.9rem; }
  .hero { padding-top: 3.2rem; }
}

@media (max-width: 30rem) {
  header nav a[href="#features"], header nav a[href="#security"] { display: none; }
}
