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

/* === Base === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f9f9f9;
}

a {
  color: #007AFF;
}

/* === Nav === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #e5e5ea;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.nav-right {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-right a {
  text-decoration: none;
  color: #1a1a1a;
  font-size: 0.9375rem;
}

.nav-right a:hover {
  color: #007AFF;
}

/* === Install banner === */
.install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #ffd60a;
  font-size: 0.875rem;
}

.install-banner button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #1a1a1a;
}

/* === Main === */
.main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  line-height: 1.4;
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: #007AFF;
  color: #fff;
  border: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #007AFF;
  color: #007AFF;
}

/* === Cards === */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

/* === Forms === */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d1d6;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* === Alerts === */
.alert-error {
  background: #fff0f0;
  border: 1px solid #ff3b30;
  color: #c0392b;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* === Hero === */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #6c6c70;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* === Features === */
.features {
  padding: 2.5rem 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  gap: 1rem;
}

/* === Download === */
.download {
  padding: 2.5rem 0;
  text-align: center;
}

.download p {
  color: #6c6c70;
  margin-bottom: 1.5rem;
}

.download-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.store-badge {
  height: 44px;
  width: auto;
}

/* === Footer === */
.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid #e5e5ea;
  margin-top: 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: #6c6c70;
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: #6c6c70;
}

/* === Offline toast === */
.toast-offline {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  z-index: 9999;
  display: none;
}

.toast-offline.visible {
  display: block;
}

/* === Responsive === */
@media (min-width: 640px) {
  .main {
    padding: 2rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
