/* ScribbiNote-Webseite: Farben der Marke, eigene Schrift, keine fremden
   Quellen (Content-Security-Policy im Caddyfile). */

@font-face {
  font-family: "ScribbiNote";
  src: url("/fonts/ScribbiNote-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "ScribbiNote";
  src: url("/fonts/ScribbiNote-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #072752;
  --green: #0cb685;
  --paper: #ffffff;
  --desk: #f2f5fa;
  --line: #c9daf2;
  --text: #1c2433;
  --muted: #55607a;
  --card: #ffffff;
  --shadow: 0 6px 24px rgba(7, 39, 82, 0.08);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #f7f9fc;
    --desk: #0d1626;
    --line: #c9daf2;
    --text: #e6ecf5;
    --muted: #a9b5c9;
    --card: #142139;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--desk);
  color: var(--text);
  font: 17px/1.55 system-ui, "Segoe UI", Roboto, sans-serif;
}

a {
  color: inherit;
}

h1,
h2,
h3,
.brand {
  font-family: "ScribbiNote", system-ui, sans-serif;
  font-weight: 700;
  text-wrap: balance;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-left));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.5rem;
}

.brand img {
  border-radius: 10px;
}

.scribbi {
  color: var(--navy);
}

.note {
  color: var(--green);
}

@media (prefers-color-scheme: dark) {
  .scribbi {
    color: #e6ecf5;
  }
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left));
}

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

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--navy);
}

@media (prefers-color-scheme: dark) {
  h1 {
    color: #e6ecf5;
  }
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34em;
}

.button {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--green);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.05);
}

.button.disabled {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

/* Ein Blatt mit Linien, wie in der App */
.paper {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 47px,
      var(--line) 47px,
      var(--line) 48px
    ),
    var(--paper);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 22px 28px 10px;
  transform: rotate(-1.5deg);
  min-height: 260px;
}

.line {
  height: 48px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 6px;
  color: #1c2433;
  font-size: 1.2rem;
}

.handwritten {
  font-family: "ScribbiNote", cursive;
  font-size: 1.6rem;
  color: #2340a8;
}

.handwritten.green {
  color: #0a8f69;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 56px;
}

.features article,
.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.features h2 {
  font-size: 1.3rem;
  margin: 0 0 6px;
}

.features p,
.card p {
  margin: 0;
  color: var(--muted);
}

.download h2,
.secure h2 {
  font-size: 2rem;
  margin: 0 0 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.card .small {
  margin-top: 8px;
  font-size: 0.9rem;
}

.secure {
  padding: 56px 0;
}

.secure ul {
  margin: 0;
  padding-left: 1.2em;
  max-width: 48em;
}

.secure li {
  margin-bottom: 10px;
}

/* Konto anlegen */
.howto {
  padding-bottom: 56px;
}

.howto h2 {
  font-size: 2rem;
  margin: 0 0 18px;
}

.howto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 32px;
  align-items: start;
}

.steps {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.video {
  margin: 0;
  max-width: 100%;
}

.video video {
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
  background: var(--card);
}

.video figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

.howto .small {
  color: var(--muted);
  font-size: 0.95rem;
}

.card .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Preise */
.prices h2 {
  font-size: 2rem;
  margin: 0 0 6px;
}

.prices > p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 48em;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.tier {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  text-align: center;
}

.tier .size {
  font-size: 1.5rem;
  font-weight: 700;
}

.tier .price {
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 700;
}

.tier .month {
  color: var(--muted);
  font-size: 0.9rem;
}

.prices .small {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Rechtstexte */
.legal h3 {
  margin: 28px 0 8px;
  font-size: 1.25rem;
}

.legal p,
.legal ul {
  max-width: 48em;
}

.note-draft {
  display: inline-block;
  background: var(--card);
  border-left: 4px solid var(--green);
  padding: 8px 12px;
  color: var(--muted);
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

.legal table {
  border-collapse: collapse;
  margin: 8px 0 12px;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

.legal th,
.legal td {
  text-align: left;
  padding: 8px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
  vertical-align: top;
}

.legal div.table-wrap,
.legal .table-scroll {
  overflow-x: auto;
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 32px 16px 48px;
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .hero,
  .features,
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .howto-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal table {
    display: block;
    overflow-x: auto;
  }

  .hero {
    padding-top: 24px;
  }

  nav {
    gap: 12px;
  }
}
