* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background: #F5F4EB; /* Fallback for pages without gradient */
}

/* ===== Page layout with full-bleed background ===== */
.page-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ===== Animated gradient background (matches app: #FDF9EE, #F5F4EB, #F7DCD4) ===== */
.gradient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #FDF9EE 0%, #F5F4EB 50%, #F7DCD4 100%);
  animation: gradientRotate 10s ease-in-out infinite;
}

@keyframes gradientRotate {
  0%, 100%   { background: linear-gradient(0deg,    #FDF9EE 0%, #F5F4EB 50%, #F7DCD4 100%); }
  25%       { background: linear-gradient(90deg,   #FDF9EE 0%, #F5F4EB 50%, #F7DCD4 100%); }
  50%       { background: linear-gradient(180deg,  #FDF9EE 0%, #F5F4EB 50%, #F7DCD4 100%); }
  75%       { background: linear-gradient(270deg,  #FDF9EE 0%, #F5F4EB 50%, #F7DCD4 100%); }
}

/* ===== Floating icons layer (cute bobbing animation) ===== */
.floating-icons {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.float-icon {
  position: absolute;
  opacity: 0.45;
  object-fit: contain;
  animation: float 2.4s ease-in-out infinite;
}

/* Middle ground: not as far out as original (8%) nor as close as before (18%) */
.float-1 {
  top: 28%;
  left: 12%;
  width: 80px;
  height: 80px;
  animation-delay: 0s;
}
.float-2 {
  top: 30%;
  right: 12%;
  width: 84px;
  height: 84px;
  animation-delay: -0.6s;
}
.float-3 {
  top: 32%;
  left: 28%;
  width: 84px;
  height: 84px;
  animation-delay: -1.2s;
}
.float-4 {
  top: 28%;
  right: 28%;
  width: 82px;
  height: 82px;
  animation-delay: -1.8s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== Main hero content ===== */
.hero {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  width: 170px;
  height: auto;
  margin-bottom: 28px;
}

/* ===== Tagline with typewriter ===== */
.tagline {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #4B5563;
}

.typewriter-wrapper {
  display: inline;
  font-weight: 600;
}

.cursor {
  display: inline;
  font-weight: 600;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ===== Store buttons (identical containers, same visual size) ===== */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
}

.store-badge {
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* Fixed inner container - both badges forced into identical 155×48px boxes */
.store-badge__inner {
  display: block;
  width: 155px;
  height: 48px;
  overflow: hidden;
}

.store-badge__inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 2;
  padding: 24px 20px;
  font-size: 0.8125rem;
  color: #666;
  text-align: center;
}

footer .footer-brand {
  color: #666;
}

footer a {
  color: #555;
  text-decoration: underline;
}

footer a:hover {
  color: #1a1a1a;
}

/* ===== Responsive: hide floating icons on mobile to prevent overlap ===== */
@media (max-width: 768px) {
  .floating-icons {
    display: none;
  }
}

@media (max-width: 640px) {
  .tagline {
    font-size: 1rem;
  }
  
  .store-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  /* Same fixed size on mobile - both stack with identical dimensions */
  .store-badge__inner {
    width: 155px;
    height: 48px;
  }
}

/* ===== Document pages (privacy.html etc.) ===== */
body > main:not(.hero) {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: calc(100vh - 60px);
}

article.policy {
  margin-top: 2rem;
}

article.policy h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

article.policy h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

article.policy p,
article.policy ul {
  margin: 0 0 1rem;
  color: #333;
}

article.policy ul {
  padding-left: 1.5rem;
}

article.policy code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: #f0f0f0;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

a {
  color: #333;
  text-decoration: underline;
}

a:hover {
  color: #000;
}
