/* TallyPad – shared stylesheet
   Design tokens mirror TallyPad/Design/TallyTheme.swift and docs/STYLE_GUIDE.md.
   System fonts only, no external requests, no frameworks. */

:root {
  --paper: #FDFDFB;
  --ink: #303231;
  --quiet-ink: #6E736E;
  --input-surface: #F7F8F5;
  --hairline: #DEE0DB;
  --accent: #0E766F;
  --accent-contrast: #FDFDFB;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", ui-rounded, "Segoe UI", Roboto, sans-serif;
  --font-rounded: ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;

  --max-width: 720px;
  --edge: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E0F0E;
    --ink: #F0F2ED;
    --quiet-ink: #999E96;
    --input-surface: #1B1C1B;
    --hairline: #30332F;
    --accent: #57C7AB;
    --accent-contrast: #0E0F0E;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img,
svg {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  padding: 28px 0 8px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand__accent {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 15px;
  color: var(--quiet-ink);
}

@media (max-width: 480px) {
  .site-header .wrap {
    justify-content: center;
    text-align: center;
  }

  .site-nav {
    justify-content: center;
    width: 100%;
    order: 3;
  }
}

.site-nav a {
  color: var(--quiet-ink);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

/* ── Language switch ────────────────────────────────────── */

.lang-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--input-surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

.lang-switch__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--quiet-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch__btn.is-active {
  background: var(--accent);
  color: var(--accent-contrast);
}

.lang-switch__btn:hover:not(.is-active) {
  color: var(--ink);
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.hero__lede {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--quiet-ink);
  font-size: 18px;
  line-height: 1.6;
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ── App Store badge ────────────────────────────────────── */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000000;
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 12px;
  transition: opacity 0.15s ease;
  line-height: 1.1;
}

.store-badge:hover,
.store-badge:focus-visible {
  text-decoration: none;
  opacity: 0.85;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
  fill: #FFFFFF;
}

.store-badge__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-badge__eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.store-badge__title {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 1px;
}

.store-note {
  font-size: 13px;
  color: var(--quiet-ink);
}

/* ── Real device mockup ─────────────────────────────────── */

.showcase {
  padding: 8px 0 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-mock {
  position: relative;
  width: 240px;
  padding: 12px;
  background: linear-gradient(155deg, #3a3c3b, #131413 55%, #050505);
  border-radius: 46px;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.phone-mock__screen {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #FDFDFB;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.phone-mock__screen img {
  display: block;
  width: 100%;
  height: auto;
}

.phone-mock__screen img[hidden] {
  display: none;
}

.showcase__caption {
  margin-top: 22px;
  color: var(--quiet-ink);
  font-size: 14.5px;
  text-align: center;
  max-width: 32ch;
}

/* ── Benefits ───────────────────────────────────────────── */

.benefits {
  padding: 8px 0 56px;
}

.benefits__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.benefit {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}

.benefit__index {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.benefit h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 3px 0 4px;
}

.benefit p {
  margin: 0;
  color: var(--quiet-ink);
  font-size: 15.5px;
}

/* ── Closing CTA ────────────────────────────────────────── */

.cta {
  padding: 8px 0 64px;
  text-align: center;
  border-top: 1px solid var(--hairline);
  padding-top: 48px;
}

.cta h2 {
  font-family: var(--font-rounded);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.cta p {
  color: var(--quiet-ink);
  margin: 0 0 24px;
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--quiet-ink);
}

.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--quiet-ink);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
}

/* ── Content pages (Support / Datenschutz / Privacy) ───── */

.page {
  padding: 40px 0 24px;
}

.page__eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.page h1 {
  font-family: var(--font-rounded);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.page__intro {
  color: var(--quiet-ink);
  font-size: 17px;
  max-width: 60ch;
  margin: 0 0 8px;
}

.page__updated {
  color: var(--quiet-ink);
  font-size: 13.5px;
  margin: 0 0 36px;
}

.content-section {
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
}

.content-section:first-of-type {
  border-top: none;
}

.content-section h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}

.content-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 8px;
}

.content-section p {
  margin: 0 0 12px;
  font-size: 15.5px;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section ul {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 15.5px;
}

.content-section li {
  margin-bottom: 6px;
}

.placeholder {
  background: var(--input-surface);
  border: 1px dashed var(--hairline);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--quiet-ink);
  margin: 0 0 12px;
}

.placeholder strong {
  color: var(--ink);
}

/* ── FAQ ────────────────────────────────────────────────── */

.faq {
  border-top: 1px solid var(--hairline);
}

.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 20px;
  font-weight: 400;
  flex: none;
  transition: transform 0.15s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  margin: 12px 0 0;
  color: var(--quiet-ink);
  font-size: 15.5px;
}

.contact-box {
  background: var(--input-surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 24px 22px;
  margin-top: 40px;
}

.contact-box h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.contact-box p {
  margin: 0 0 14px;
  color: var(--quiet-ink);
  font-size: 15px;
}

.contact-box a.email {
  font-weight: 600;
  font-size: 16px;
  color: var(--accent);
}

@media (min-width: 640px) {
  body {
    font-size: 17.5px;
  }
}
