/* App landing page styling for the Tumblr slideshow product page and legal variant. */
@import "../components/topbar.css";
@import "../components/links.css";

:root {
  --primary: #5c7cfa;
  --secondary: #a5b4fc;
  --bg: #0d0f12;
  --on-bg: #e6e6e6;
  --surface: #161a20;
  --surface-variant: #1e2430;
  --outline: #2a3140;
}

* {
  box-sizing: border-box;
}

/* Root canvas fallback for the app landing background. */
html {
  margin: 0;
  min-height: 100%;
  background-color: #0d0f12;
}

/* Main app page background and typography. */
body {
  margin: 0;
  min-height: 100vh;
  background-color: #0d0f12;
  background: radial-gradient(circle at 10% 8%, #1b1f28 0%, var(--bg) 45%),
    radial-gradient(circle at 82% 70%, #1b2130 0%, transparent 44%), var(--bg);
  color: var(--on-bg);
  font-family: Calibri, "Segoe UI", Candara, Arial, sans-serif;
}

/* Page-level positioning context for decorative layers. */
body {
  position: relative;
  overflow-x: hidden;
}

/* Soft background glows add depth without competing with the phone preview. */
.bg-glow {
  position: fixed;
  z-index: -1;
  filter: blur(56px);
  opacity: 0.32;
  border-radius: 999px;
  pointer-events: none;
}

/* Top-left glow blob. */
.bg-glow-a {
  width: 320px;
  height: 320px;
  left: -110px;
  top: -80px;
  background: var(--primary);
}

/* Bottom-right glow blob. */
.bg-glow-b {
  width: 360px;
  height: 360px;
  right: -140px;
  bottom: -140px;
  background: var(--secondary);
}

/* The hero pairs the preview device with copy and store availability chips. */
.hero {
  width: min(1120px, 92vw);
  margin: 12px auto 0;
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* Preview column for the device mockup/video. */
.visual {
  display: flex;
  justify-content: center;
}

/* Actual autoplaying device preview video. */
.phone-video {
  width: 290px;
  height: 590px;
  border-radius: 8px;
  object-fit: cover;
  background: transparent;
}

/* Main app name. */
.content h1 {
  margin: 0;
  color: #d9e6ff;
  font-size: clamp(44px, 7vw, 77px);
  letter-spacing: 0.04em;
  line-height: 0.95;
}

/* Intro block under the main heading uses the same width as the detail block. */
.app-lead-inline {
  margin-top: 35px;
  width: min(100%, 530px);
}

/* Optional app subtitle under the main heading. */
.app-lead-inline .app-subheading {
  color: #bfd7ff;
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.02em;
  /* Match the detail-section heading alignment on wide layouts. */
  margin: 0;
  text-align: left;
}

/* Shared paragraph styling for the marketing copy. */
.content p {
  margin: 13px 0 0;
  max-width: 530px;
  color: #aeb6c7;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.4;
}

/* Let the lead paragraph fill the same constrained block as the detail copy. */
.app-lead-inline p {
  max-width: none;
}

/* Secondary detail block under the main description. */
.app-detail-inline {
  margin-top: 26px;
  width: min(100%, 530px);
}

/* Detail block heading. */
.app-detail-inline h2 {
  margin: 14px 0 0;
  color: #bfd7ff;
  font-size: clamp(16px, 2vw, 24px);
  font-family: inherit;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

/* Detail block copy. */
.app-detail-inline p {
  margin: 13px 0 0;
  max-width: 530px;
  color: #aeb6c7;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.4;
}

/* Row/grid wrapper for store chips. */
.store-chips {
  margin-top: 34px;
  width: min(100%, 530px);
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  padding-inline: 30px;
  margin-inline: 0;
}

/* Store chips switch between released and coming-soon states via class modifiers. */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  width: 212px;
  min-width: 212px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #e4e9ff;
  text-decoration: none;
  border: 1px solid #3a4458;
  background: linear-gradient(180deg, #2a313f 0%, #202732 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease,
    transform 180ms ease;
}

/* Shared icon slot inside each chip. */
.chip-icon {
  width: 27px;
  height: 27px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

/* Main store label text. */
.chip-label {
  display: block;
  font-size: 1.06rem;
  line-height: 1.1;
}

/* Wrapper for label plus secondary status. */
.chip-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
}

/* Small secondary state text such as "Coming soon". */
.chip-status {
  display: block;
  font-size: 0.78rem;
  line-height: 1.1;
  color: #aeb8c9;
  opacity: 0.82;
}

/* App Store icon artwork. */
.chip-icon-app-store {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23eef4ff'%3E%3Cpath d='M16.03 12.88c.02 2.18 1.92 2.9 1.94 2.91-.02.05-.3 1.02-.98 2.02-.59.87-1.21 1.74-2.17 1.76-.94.02-1.24-.56-2.32-.56-1.08 0-1.41.54-2.3.58-.92.03-1.62-.92-2.21-1.79-1.2-1.73-2.12-4.89-.89-7.02.61-1.06 1.71-1.73 2.9-1.75.9-.02 1.76.61 2.32.61.56 0 1.61-.75 2.72-.64.47.02 1.79.19 2.64 1.44-.07.05-1.58.92-1.57 2.44ZM14.06 4.7c.49-.59.83-1.42.74-2.24-.71.03-1.57.47-2.07 1.05-.46.53-.86 1.38-.75 2.19.79.06 1.59-.4 2.08-1Z'/%3E%3C/svg%3E");
}

/* Google Play icon artwork. */
.chip-icon-google-play {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4.8 3.6c-.19.2-.3.5-.3.88v15.04c0 .38.11.68.3.88l8.45-8.4L4.8 3.6Z' fill='%23eef4ff' fill-opacity='.92'/%3E%3Cpath d='m16.08 14.8-2.83-2.8 2.83-2.8 3.44 1.95c.64.36.64 1.14 0 1.5l-3.44 2.15Z' fill='%23eef4ff'/%3E%3Cpath d='M4.8 20.4c.3.32.79.36 1.33.06l9.95-5.66-2.83-2.8-8.45 8.4Z' fill='%23eef4ff' fill-opacity='.92'/%3E%3Cpath d='m4.8 3.6 8.45 8.4 2.83-2.8-9.95-5.66c-.54-.3-1.03-.26-1.33.06Z' fill='%23eef4ff' fill-opacity='.76'/%3E%3C/svg%3E");
}

/* Released chip styling shared by both stores. */
.chip-released {
  color: #e5f0ff;
  border-color: #4f688f;
  background: linear-gradient(180deg, #314767 0%, #23324a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 22px rgba(25, 38, 61, 0.24);
}

/* Hover feedback for released chips. */
.chip-released:hover {
  border-color: #7694c3;
  transform: translateY(-1px);
}

/* Default styling for unavailable store links. */
.chip-coming-soon {
  color: #c8cfdb;
  border-color: #5c6473;
  background: linear-gradient(180deg, #3a404b 0%, #2d323b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 22px rgba(20, 23, 29, 0.16);
  cursor: default;
}

/* App Store released variant. */
.chip-app-store.chip-released {
  color: #e5f0ff;
  border-color: #4f688f;
  background: linear-gradient(180deg, #314767 0%, #23324a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 22px rgba(25, 38, 61, 0.24);
}

/* App Store released hover state. */
.chip-app-store.chip-released:hover {
  border-color: #7694c3;
}

/* Google Play released variant. */
.chip-google-play.chip-released {
  color: #e5f0ff;
  border-color: #4f688f;
  background: linear-gradient(180deg, #314767 0%, #23324a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 22px rgba(25, 38, 61, 0.24);
}

/* Google Play released hover state. */
.chip-google-play.chip-released:hover {
  border-color: #7694c3;
}

/* App Store coming-soon variant. */
.chip-app-store.chip-coming-soon {
  color: #c8cfdb;
  border-color: #5f6675;
  background: linear-gradient(180deg, #3b4049 0%, #2d3139 100%);
}

/* Google Play coming-soon variant. */
.chip-google-play.chip-coming-soon {
  color: #bec8d5;
  border-color: #58616d;
  background: linear-gradient(180deg, #373d46 0%, #2a2f37 100%);
}

/* Collapse the two-column hero once the preview and copy no longer fit comfortably. */
@media (max-width: 930px) {
  /* Slightly reduce top spacing on smaller screens. */
  .topbar {
    padding-top: 18px;
  }

  /* Stack preview above copy on tablets and phones. */
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding: 8px 0 40px;
  }

  /* Center-align the copy once the layout collapses. */
  .content {
    text-align: center;
  }

  /* Keep paragraphs centered within the stacked layout. */
  .content p {
    margin-inline: auto;
  }

  /* Center the lead block in stacked mode, mirroring the detail block. */
  .app-lead-inline {
    margin-inline: auto;
    text-align: center;
  }

  /* Center the lead heading when the stacked layout centers its whole block. */
  .app-lead-inline .app-subheading {
    text-align: center;
  }

  /* Center the secondary detail block in stacked mode. */
  .app-detail-inline {
    margin-inline: auto;
    text-align: center;
  }

  /* Switch the chip row to a single-column stack. */
  .store-chips {
    width: min(100%, 530px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding-inline: 0;
    justify-items: center;
	margin-inline: auto;
  }

  /* Let each chip fill the available width in stacked mode. */
  .chip {
    width: min(100%, 212px);
    width: 100%;
    min-width: 0;
  }

  /* Slightly shrink the device preview for tablet widths. */
  .phone-video {
    width: 246px;
    height: 510px;
  }
}

@media (max-width: 560px) {
  /* Reduce vertical spacing on narrow phones. */
  .hero {
    gap: 18px;
  }

  /* Further shrink the preview device on small phones. */
  .phone-video {
    width: 210px;
    height: 430px;
  }

  /* Reduce heading size for small-phone readability. */
  .content h1 {
    font-size: clamp(36px, 13vw, 56px);
  }

  /* Tighten paragraph sizing for narrow screens. */
  .content p {
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.5;
  }

  /* Reduce store-chip spacing on small phones. */
  .store-chips {
    margin-top: 24px;
    gap: 10px;
  }

  /* Keep chips comfortable but compact on narrow screens. */
  .chip {
    min-width: 142px;
    width: 100%;
    max-width: 280px;
    padding: 11px 14px;
  }

}
