:root {
  --color-bg: #f2f2f7;
  --color-card: #ffffff;
  --color-primary: #3b82f6;
  --color-text: #1c1c1e;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  --radius: 12px;
}

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 {
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  margin: 0;
}
header h1 a { text-decoration: none; color: inherit; }
nav a {
  color: var(--color-text);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover {
  color: var(--color-primary);
}


/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  padding: 4rem 2rem;
  background: linear-gradient(
    to bottom,
    rgba(151,84,199,1) 0%,
    rgba(9,51,69,1) 100%
  );
  color: white;
}
@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    padding: 6rem 4rem;
  }
}
.hero-image img {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: block;
  object-fit: cover;
  object-position: center;
}
.hero-content {
  text-align: center;
}
@media (min-width: 768px) {
  .hero-content {
    text-align: left;
  }
}
.hero-content > * {
  margin-bottom: 1rem;
}
.hero-content > *:last-child {
  margin-bottom: 0;
}

.hero-content h1 {
  font-size: clamp(2rem, 8vw, 3.5rem);
}
.hero-content h2 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}
.hero-content .subtitle {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  opacity: 0.9;
}

/* App Store button */
.button.app-store {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--color-primary);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  transition: transform 0.2s, opacity 0.2s;
}
.button.app-store:hover {
  transform: scale(1.05);
  opacity: 0.9;
}


/* Download buttons wrapper: center contents */
.button-container {
  text-align: center;
}

/* White App Store capsule: keep intrinsic width and center */
.button-container .button.app-store {
  display: inline-block;
  margin: 0 auto 1.2rem; /* center horizontally, small gap below */
}


/* Hero intro text */
.hero .intro {
  color: white;
}

/* Hero inline features */
.hero .hero-features {
  color: white;
}
.hero .hero-features h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.hero .hero-features ul {
  list-style: disc inside;
  padding: 0;
  margin: 0;
}
.hero .hero-features ul li {
  margin-bottom: 0.5rem;
}

/* VIDEO SECTION */
.video-section {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.video-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}
.video-section .video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-section .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* SCREENSHOT GALLERY */
.screenshots-section {
  padding: 2rem 1rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}
.screenshots-section h2 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  margin-bottom: 1rem;
  text-align: center;
}
.gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  padding-bottom: 1rem;
}
.gallery img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  scroll-snap-align: start;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}
.gallery img:hover {
  transform: translateY(-4px) scale(1.02);
}
@media (min-width: 600px) {
  .gallery img {
    flex: 0 0 calc(50% - 0.5rem);
  }
}
@media (max-width: 599px) {
  .gallery img {
    flex: 0 0 80%;
    max-width: 80%;
    margin: 0 auto;
  }
}
@media (min-width: 1200px) {
  .gallery img {
    flex: 0 0 calc(33.333% - 0.66rem);
    max-width: calc(33.333% - 0.66rem);
  }
}

/* Make the external badge sit nicely under the button */
.app-store-badge {
  display: block;
  margin: 0 auto 2.5rem;  max-width: 180px;     /* scale as needed */
  height: auto;
}

/* Inline container for button + badge */
.button-container-inline {
  text-align: center; /* centers inline-block children */
  margin-bottom: 4rem;   /* ↑ add this to push everything below further down */

}

.button-container-inline .button.app-store,
.button-container-inline .app-store-badge {
  display: inline-block;
  vertical-align: middle; /* align elements vertically */
  margin-top: 1rem;         /* push the badge down 1rem from the button’s baseline */

}

/* Spacing between button and badge */
.button-container-inline .app-store-badge {
  margin-left: 0.5rem; /* gap to the left of the badge */
  margin-bottom: 0;    /* override any bottom margin */
}
/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: clamp(0.75rem, 2.5vw, 0.875rem);
  color: #6e6e73;
}
footer a { color: inherit; text-decoration: underline; }
.email {
  color: #555;
  font-style: normal;
}


.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.back-link {
  color: white;
  text-decoration: none;
  font-size: 1rem;
}
.back-link:hover {
  text-decoration: underline;
}

/* Map canvas touch and selection handling */
#mapCanvas {
  touch-action: none;          /* Allow JS to handle pinch/drag instead of browser scroll */
  -webkit-user-select: none;   /* Prevent accidental text selection on Safari */
  user-select: none;
}
