/* Knotty — support & legal site
   Brand tokens mirror the app (src/COLORS.ts). Self-contained, no external fonts:
   a German site hot-linking Google Fonts leaks visitor IPs to Google (GDPR risk),
   so we use a system stack instead. */

:root {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --primary: #C0552A;
  --text: #2D2D2D;
  --text-muted: #7A7571;
  --border: #EAE5DF;
  --chip: #F3DFD6;
  --on-primary: #FFFBF7;
  --maxw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1A1A;
    --surface: #262626;
    --primary: #E1764B;
    --text: #ECE9E4;
    --text-muted: #9A9590;
    --border: #333333;
    --chip: rgba(225, 118, 75, 0.18);
    --on-primary: #FFFBF7;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 64px;
}
/* The homepage runs wider than the text-heavy legal/support pages so the
   hero and card grids have room to breathe. */
.wrap.home { max-width: 1080px; }
.section-block { margin: 92px 0; }

/* A contained tinted panel for sections that would otherwise sit on the
   same flat background as their neighbors — breaks up the scroll rhythm
   without the complexity of a full-viewport bleed. */
.section-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
}
.section-panel .steps { margin-bottom: 0; }

/* Header / brand */
.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.site-header img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex: none;
}
.site-header .brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.site-header a { text-decoration: none; color: inherit; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 20px 0 8px;
}
.hero-copy h1 { font-size: 40px; }
.hero-sub { color: var(--text-muted); font-size: 17px; margin-top: -4px; }
.hero-note { font-size: 14px; color: var(--text-muted); margin: 14px 0 0; }
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}
.hero-visual::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  background: var(--primary);
  opacity: 0.16;
  filter: blur(70px);
  border-radius: 50%;
  z-index: 0;
}

.hero-phone {
  position: relative;
  z-index: 1;
  width: 280px;
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; margin-top: 8px; }
  .store-links { justify-content: center; }
}

/* Trust / indie-ethos strip — a compact, left-aligned band rather than a
   centered card, so it reads as a quick aside instead of another feature
   section. */
.trust {
  background: var(--chip);
  border-radius: 16px;
  padding: 32px 32px;
  margin: 92px 0;
}
.trust h2 {
  margin: 0 0 18px;
  color: var(--primary);
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
}
.trust-pill {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex: 1 1 220px;
}
.trust-pill svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--primary);
}
.trust-pill strong { display: block; font-size: 14.5px; }
.trust-pill span { font-size: 13.5px; color: var(--text-muted); }

/* Who built this */
.founder {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
  margin: 92px 0;
}
.founder-photo img {
  width: 100%;
  display: block;
  border-radius: 20px;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.3);
}
.founder-copy h2 { margin-top: 0; }
.founder-copy p { margin: 0 0 14px; }
.founder-copy p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .founder { grid-template-columns: 1fr; }
  .founder-photo { order: -1; }
}

/* Typography */
h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 8px;
}
h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 26px 0 8px;
}
p { margin: 0 0 16px; }
ul { margin: 0 0 16px; padding-left: 22px; }
li { margin: 0 0 8px; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration: none; }
strong { font-weight: 700; }
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.lede {
  font-size: 19px;
  color: var(--text);
}
.muted { color: var(--text-muted); }
.effective { color: var(--text-muted); font-size: 15px; }

/* Store download badges */
.store-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0 4px;
}
.store-links a {
  display: inline-flex;
  line-height: 0;
  border-radius: 12px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.store-links a:hover { opacity: 0.85; }
.store-badge {
  width: 168px;
  height: 54px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

/* How it works steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 32px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; font-size: 15px; color: var(--text-muted); }
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
}

/* Feature grid on the home page */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0 0 8px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--chip);
  color: var(--primary);
  margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; font-size: 15px; color: var(--text-muted); }
@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* Email / contact chip */
.chip {
  display: inline-block;
  background: var(--chip);
  color: var(--primary);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
}

/* FAQ accordion */
.faq-list { margin: 0 0 8px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  padding: 18px 2px;
  margin: 0;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.faq-chevron {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--primary);
  transition: transform 0.25s ease;
}
.faq-item.open .faq-chevron { transform: rotate(90deg); }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; }
.faq-answer-inner p { font-size: 15px; color: var(--text-muted); margin: 0 2px 14px; }
.faq-answer-inner p:last-child { margin-bottom: 20px; }

/* Legal link list */
.legal-links { list-style: none; padding: 0; }
.legal-links li { margin: 0 0 10px; }
.legal-links a { font-weight: 700; }

/* Footer nav — present on every page so the Impressum is always one click away (§5 DDG) */
.site-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 15px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 14px;
}
.site-footer nav a { color: var(--text-muted); text-decoration: none; font-weight: 700; }
.site-footer nav a:hover { color: var(--primary); }
.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.social-links { display: flex; gap: 14px; }
.social-links a { color: var(--text-muted); display: inline-flex; }
.social-links a:hover { color: var(--primary); }
.social-links svg { width: 26px; height: 26px; }

/* Back-to-top / home link on subpages */
.backlink {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 700;
  text-decoration: none;
}
.backlink:hover { text-decoration: underline; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 26px; }
  .hero-copy h1 { font-size: 28px; }
  .wrap { padding: 20px 16px 48px; }
  .trust { padding: 28px 20px; }
  .section-panel { padding: 28px 20px; }
  .section-block, .trust, .founder { margin: 64px 0; }
}
