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

html, body {
  height: 100%;
  background: #f7f4ef;
  color: #1a1814;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.logo {
  position: absolute;
  top: 2rem;
  left: 2rem;
  font-family: 'PT Serif', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  font-style: italic;
  color: #1a1814;
  text-decoration: none;
}

.top-nav {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.top-nav-link {
  font-family: inherit;
  font-size: 0.95rem;
  color: #1a1814;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.top-nav-link:hover {
  opacity: 0.6;
}

/* Newsletter modal */
.newsletter-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26, 24, 20, 0.4);
  align-items: center;
  justify-content: center;
}

.newsletter-modal.active {
  display: flex;
}

.newsletter-modal-content {
  background: #f7f4ef;
  border-radius: 12px;
  padding: 2.5rem;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.newsletter-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #8a857c;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.newsletter-close:hover {
  color: #1a1814;
}

.newsletter-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.newsletter-subtitle {
  font-size: 0.95rem;
  color: #8a857c;
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-input {
  flex: 1;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #d6d1c9;
  border-radius: 8px;
  background: #fff;
  color: #1a1814;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-input:focus {
  border-color: #1a1814;
}

.newsletter-input::placeholder {
  color: #b5b0a7;
}

.newsletter-submit {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  background: #1a1814;
  color: #f7f4ef;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.newsletter-submit:hover {
  opacity: 0.85;
}

.newsletter-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.newsletter-status {
  font-size: 0.88rem;
  margin-top: 0.75rem;
  min-height: 1.25em;
}

.newsletter-status.success {
  color: #3a7d44;
}

.newsletter-status.error {
  color: #c0392b;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.app-icon {
  height: 80px;
  width: auto;
  color: #1a1814;
  margin-bottom: 1.5rem;
}

.headline {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 5.5vw, 5rem);
  text-align: center;
  line-height: 1.15;
  margin-bottom: 2.5rem;
}

.app-store-link {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.app-store-link:hover {
  opacity: 0.7;
}

.app-store-link img {
  height: 54px;
  width: auto;
}

.footer-links {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: #8a857c;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #1a1814;
}

@media (max-width: 640px) {
  .logo {
    top: 1.25rem;
    left: 1.25rem;
    font-size: 1.1rem;
  }

  .app-icon {
    height: 56px;
  }

  .headline {
    margin-bottom: 2rem;
  }

  .app-store-link img {
    height: 44px;
  }

  .top-nav {
    top: 1.25rem;
    right: 1.25rem;
    gap: 1rem;
  }

  .top-nav-link {
    font-size: 0.88rem;
  }

  .footer-links {
    bottom: 1.25rem;
    right: 1.25rem;
    font-size: 0.8rem;
    gap: 1rem;
  }

  .newsletter-modal-content {
    padding: 2rem 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }
}
