/* rw-apps.de — shared styles for every page (DE + EN).
   Layout: one 1080px column, generous vertical rhythm, screenshots carry the colour.
   Palette: white/ink neutrals, the logo sun's orange as the only accent. */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --fg: #0a0a0b;
  --fg-2: #6e6e73;
  --fg-3: #8e8e93;
  --line: #e8e8ed;
  --phone: #d2d2d7;
  --accent: #e8822e;
  --field: #ffffff;
  --header-bg: rgba(255, 255, 255, .78);
  --tab-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  --shot-shadow: 0 1px 2px rgba(10, 10, 11, .04), 0 24px 60px -24px rgba(10, 10, 11, .18);
  --danger: #c4321f;
  --ok: #1f7a3d;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --w: 1080px;
  --w-text: 680px;
  --gutter: 24px;
  --section: 160px;
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c;
    --bg-2: #161618;
    --fg: #f5f5f7;
    --fg-2: #a1a1a6;
    --fg-3: #7c7c82;
    --line: #2a2a2e;
    --phone: #3a3a3e;
    --accent: #fba862;
    --field: #161618;
    --header-bg: rgba(11, 11, 12, .72);
    --tab-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
    --shot-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px -24px rgba(0, 0, 0, .6);
    --danger: #ff7a66;
    --ok: #5fd38a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-2: #161618;
  --fg: #f5f5f7;
  --fg-2: #a1a1a6;
  --fg-3: #7c7c82;
  --line: #2a2a2e;
  --phone: #3a3a3e;
  --accent: #fba862;
  --field: #161618;
  --header-bg: rgba(11, 11, 12, .72);
  --tab-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
  --shot-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px -24px rgba(0, 0, 0, .6);
  --danger: #ff7a66;
  --ok: #5fd38a;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.wrap { max-width: calc(var(--w) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-text { max-width: calc(var(--w-text) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section) 0; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
.display { font-size: clamp(42px, 7vw, 80px); line-height: 1.02; letter-spacing: -0.04em; }
.h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; }
.h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.06; letter-spacing: -0.035em; }
.h3 { font-size: 21px; line-height: 1.3; letter-spacing: -0.02em; }
.dot { color: var(--accent); }
.lead { margin: 0; font-size: clamp(19px, 1.9vw, 22px); line-height: 1.45; color: var(--fg-2); text-wrap: pretty; }
.small { font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.link { color: var(--fg); border-bottom: 1px solid var(--line); transition: border-color .15s; }
.link:hover { border-color: var(--fg); }
.link-arrow { font-weight: 500; color: var(--fg); }
.link-arrow::after { content: " →"; color: var(--accent); }
.icon { width: 28px; height: 28px; color: var(--accent); flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .bar { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.brand img { width: 26px; height: 26px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; margin-right: 12px; }
.nav a { color: var(--fg-2); transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav .btn { color: var(--bg); }

.icon-button {
  display: inline-flex; width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--fg-2);
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  cursor: pointer; transition: background .15s, color .15s;
}
.icon-button:hover { background: var(--bg-2); color: var(--fg); }
.icon-button svg { width: 18px; height: 18px; }
.menu-button { display: none; color: var(--fg); }

/* Theme toggle shows the theme you would switch TO. */
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.mobile-menu { border-top: 1px solid var(--line); padding-block: 8px 16px; }
.mobile-menu a { display: block; padding: 12px var(--gutter); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.mobile-menu a[aria-current="page"] { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  cursor: pointer;
  transition: opacity .15s;
}
.btn:hover { opacity: .82; }
.btn:disabled { opacity: .4; cursor: default; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge { display: inline-flex; flex-direction: column; gap: 6px; }
.badge img { height: 44px; width: auto; }
.badge span { font-size: 12px; color: var(--fg-3); padding-left: 2px; }

/* ---------- Media ---------- */
.shot { border-radius: var(--radius); overflow: hidden; background: var(--bg-2); box-shadow: var(--shot-shadow); }
.shot img, .shot video { width: 100%; height: auto; }
.shot-16x9 { aspect-ratio: 16 / 9; }
.shot-16x9 img, .shot-16x9 video { height: 100%; object-fit: cover; }

/* ---------- Landing page ---------- */
.hero { padding-block: 96px 0; }
.hero .shot-16x9 { border-radius: 28px; }
.hero-head { margin-top: 120px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px 64px; align-items: center; }
.hero-side { display: flex; flex-direction: column; gap: 28px; }

.strip {
  list-style: none; margin: 168px 0 0; padding: 0 0 88px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  border-bottom: 1px solid var(--line);
}
.strip li { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }

.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 64px; align-items: center; margin-bottom: 56px; }

.layouts { display: flex; flex-direction: column; gap: 24px; }
.layout-stage { position: relative; aspect-ratio: 3456 / 1635; }
.layout-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.layout-frame.is-active { opacity: 1; }
.layout-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); align-self: center; }
.layout-tabs button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border: 0; border-radius: 999px;
  background: transparent; color: var(--fg-2);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .2s, color .2s;
}
.layout-tabs button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity .2s; }
.layout-tabs button[aria-selected="true"] { background: var(--bg); color: var(--fg); box-shadow: var(--tab-shadow); }
.layout-tabs button[aria-selected="true"]::before { opacity: 1; }

.fitness-shot { aspect-ratio: 3522 / 1611; }
.features { margin-top: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 40px; }
.feature { display: flex; flex-direction: column; gap: 12px; }
.feature p, .view p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--fg-2); }

.views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; }
.view { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px 20px; padding-block: 36px; border-top: 1px solid var(--line); }
.view h3 { align-self: center; }
.view p { grid-column: 2; }

.setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.phone {
  position: relative; justify-self: center;
  width: min(340px, 100%); padding: 11px;
  border: 1.5px solid var(--phone); border-radius: 56px;
  background: var(--bg);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: var(--phone); }
.phone::before { left: -4.5px; top: 132px; height: 64px; }
.phone::after { right: -4.5px; top: 168px; height: 96px; }
.phone img { width: 100%; border-radius: 45px; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }

.privacy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 64px; align-items: center; padding-block: 56px; border-block: 1px solid var(--line); }

.closing { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.closing .sun { width: 56px; height: 56px; }

/* ---------- Subpages ---------- */
.page { padding-block: 96px 0; }
.page-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 72px; }
.page-section + .page-section { margin-top: 72px; }
.page-section > .label { margin-bottom: 20px; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; cursor: pointer; list-style: none; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 300; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--fg-2); }

.form { display: flex; flex-direction: column; gap: 20px; }
.form .btn { align-self: flex-start; }

/* Cards that app.js builds for the feature-request board. */
.request-list, .closed-list { border-top: 1px solid var(--line); }
.request-list:empty, .closed-list:empty { border-top: 0; }
.request-card { padding-block: 24px; border-bottom: 1px solid var(--line); }
.request-card-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.request-card-row > div:first-child { min-width: 0; }
.request-card-title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.request-card-body { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.request-card-meta { margin: 10px 0 0; font-size: 13px; color: var(--fg-3); }
.request-vote-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.request-vote-count { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vote-button {
  height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color .15s;
}
.vote-button:hover:not(:disabled) { border-color: var(--accent); }
.vote-button:disabled { cursor: default; opacity: .45; }
.closed-card { padding-block: 16px; border-bottom: 1px solid var(--line); }
.closed-card-title { margin: 0; font-size: 16px; font-weight: 500; color: var(--fg-2); }
.closed-card-meta { margin: 4px 0 0; font-size: 13px; color: var(--fg-3); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--section); }
.site-footer .bar { padding-block: 28px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--fg-3); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--fg-2); transition: color .15s; }
.site-footer a:hover { color: var(--fg); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.input, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--field); color: var(--fg);
  font: inherit; font-size: 16px; letter-spacing: normal;
  transition: border-color .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.input:focus, .textarea:focus { outline: none; border-color: var(--fg-2); }
.textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.form-error { color: var(--danger); font-size: 15px; }
.form-success { color: var(--ok); font-size: 15px; }

/* ---------- Long text (Datenschutz, Impressum) ---------- */
.prose { font-size: 17px; line-height: 1.65; }
.prose h2 { font-size: 26px; line-height: 1.2; letter-spacing: -0.025em; margin: 72px 0 8px; }
.prose h3 { font-size: 18px; letter-spacing: -0.015em; margin: 40px 0 8px; }
.prose p, .prose ul { margin: 0 0 16px; color: var(--fg-2); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 12px; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { border-bottom: 1px solid var(--line); color: var(--fg); overflow-wrap: anywhere; }
.prose a:hover { border-color: var(--fg); }
.prose .scope { font-size: 14px; color: var(--fg-3); margin-bottom: 24px; }
.prose .note { padding: 16px 20px; border-radius: 12px; background: var(--bg-2); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-button { display: inline-flex; }
}
@media (max-width: 860px) {
  :root { --section: 104px; --gutter: 20px; }
  .hero { padding-block: 40px 0; }
  .hero .shot-16x9 { border-radius: 18px; }
  .hero-head { margin-top: 64px; }
  .strip { margin-top: 104px; padding-bottom: 64px; grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .strip li { justify-content: flex-start; font-size: 17px; }
  .hero-head, .section-head, .setup, .privacy, .views { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 40px; }
  .features { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .layout-tabs button { padding: 0 12px; }
  .page { padding-block: 56px 0; }
  .page-head { margin-bottom: 48px; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .layout-tabs button::before { display: none; }
}
