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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  background: #F8F8F8;
  height: 100vh;   /* fallback for older browsers */
  height: 100dvh;  /* dynamic: accounts for mobile browser address bar */
  display: flex;
  flex-direction: column;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

.site-logo {
  display: block;
  height: 44px;
  width: auto;
}

/* ── Language switcher ────────────────────────────────────── */

.lang-switcher select {
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #222;
  cursor: pointer;
  appearance: auto;
}

.lang-switcher select option {
  background: #fff;
  color: #222;
}

.lang-switcher select:focus {
  outline: 2px solid #717e0a;
  outline-offset: 2px;
}

/* ── Main content ─────────────────────────────────────────── */

.site-main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* ── Home page ──────────────────────────────────────────── */

.container {
  text-align: center;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.container p {
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.5;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.logo {
  width: 120px;
  height: auto;
  margin-bottom: 40px;
}

.app-icon {
  margin-bottom: 10px;
}

.buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.store-text {
  margin-bottom: 10px;
}

/* ── Legal pages ─────────────────────────────────────────── */

.legal {
  max-width: calc(100vw - 3rem);
}

.legal h1 {
  margin: 0 0 20px;
}

.legal h2 {
  margin-bottom: 16px;
}

.legal h3 {
  margin-bottom: 8px;
}

.legal p {
  overflow-wrap: break-word;
  margin: 16px 0;
}

.legal ol {
  list-style: decimal;
  line-height: 1.6;
  padding-left: 22px;
}

.legal ul {
  list-style: none;
  line-height: 1.6;
  padding-left: 22px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.legal ul li {
  position: relative;
  padding: 0;
}

.legal ul li::before {
  content: '\2022';
  position: absolute;
  top: 0;
  left: -22px;
  display: block;
  color: #717e0a;
}

.legal a {
  color: #717e0a;
}

.legal a:hover {
  text-decoration: none;
}

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

.site-footer {
  background: #fff;
  border-top: 1px solid #ddd;
  padding: 1.25rem 2rem;
  text-align: center;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  justify-content: space-evenly;
  margin-bottom: 0.6rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: #717e0a;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.copyright {
  font-size: 0.8rem;
  color: #777;
}

/* ── Accessibility helper ─────────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
