/* ==========================================================================
   GLOBAL NAVIGATION
   ========================================================================== */
.global-header {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.5px;
}

.brand-symbol {
  color: var(--accent);
}

.nav-items {
  display: flex;
  gap: 20px;
}

.nav-items a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-items a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   BUTTONS & CTA
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ==========================================================================
   SHARED HERO SECTION & HEADINGS
   ========================================================================== */
.hero {
  text-align: center;
  padding: 80px 0 56px;
}

.hero h1 {
  font-size: 42px;
  letter-spacing: -1.2px;
  margin: 0 0 16px;
  font-weight: 800;
  line-height: var(--leading-tight);
}

.hero p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero p,
.hero-card .tagline {
  line-height: var(--leading-relaxed);
}

/* Enclosed hero container card (used on product landing pages) */
.hero-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 64px 48px;
  text-align: center;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

/* Ambient background screenshot / artwork layer */
.hero-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;

  /* Use cover and center it properly so it fills the card completely */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  /* Increased opacity so the artwork is actually visible */
  opacity: 0.45;
  filter: saturate(1.15);
  pointer-events: none;
  z-index: 0;

  /* Smooth fade that keeps the card visible while gently dissolving the edges */
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 95%);
}

/* Make sure it pops even on light mode */
[data-surface="light"] .hero-card-bg {
  opacity: 0.35;
  mix-blend-mode: multiply;
}

/* Ensures text, buttons, and app icons sit above the background layer */
.hero-card-content {
  position: relative;
  z-index: 1;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.hero-card h1 {
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -1px;
}

.hero-card .tagline {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 660px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  margin: 48px 0 20px 4px;
}

/* ==========================================================================
   PRODUCT SHOWCASE CARDS (HOME / PORTAL)
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  padding-bottom: 80px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

/* Faded ambient screenshot / theme artwork in card background */
.product-card-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-size: cover;
  background-position: top right;
  opacity: 0.52;
  filter: saturate(1.2);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 0;
  /* Smooth mask that fades away toward the bottom & left behind the text */
  /*mask-image: radial-gradient(circle at 80% 20%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 75%);
  -webkit-mask-image: radial-gradient(circle at 80% 20%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 75%);*/
  /* Renders opaque in the bottom-right and dissolves toward the top-left */
    mask-image: linear-gradient(to top left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 35%, rgba(0, 0, 0, 0) 80%);
    -webkit-mask-image: linear-gradient(to top left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 35%, rgba(0, 0, 0, 0) 80%);
}

.product-card:hover .product-card-bg {
  opacity: 1.0;
  transform: scale(1.04);
}

/* Card content layered above ambient background */
.product-card-content {
  position: relative;
  z-index: 1;
}

/* Top bar with icon badge & platform tag */
.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.product-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--card-bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.product-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
}

.product-card h2 {
  font-size: 22px;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

.product-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: var(--leading-relaxed);
  margin: 0 0 24px;
}

.card-footer {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.product-card:hover .card-footer {
  gap: 10px;
}

/* ==========================================================================
   APP ICON BADGE
   ========================================================================== */
.icon-wrapper {
  width: 64px;
  height: 64px;
  box-sizing: content-box;
  background: var(--accent-glow);
  border: 1px solid var(--border-focus);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.icon-wrapper img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 20px;
  display: block;
}

.icon-wrapper svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ==========================================================================
   CARD PANELS & PREVIEW MEDIA
   ========================================================================== */
.card-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-panel h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.2px;
  color: var(--text-main);
}

.card-panel p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: var(--leading-relaxed);
  margin: 0;
}

.card-panel p + p {
  margin-top: 12px; /* Spacing between multiple paragraphs within a card */
}

/* Badge Icon (supports both SVG and inline <img>) */
.badge-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;   /* Prevents flex compression */
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 10px;
  background: var(--card-bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;  /* Hard safety boundary: never lets an image overflow the badge */
}

/* SVG icons */
.badge-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: block;
}

.badge-icon img {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  display: block;
}

/* Card Screenshot / Feature Media Container */
.card-media {
  width: 100%;
  margin: -12px 0 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg-subtle);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  display: block;
}

.card-panel.media-side {
  display: flex;
  flex-direction: row;
  align-items: flex-start; /* Changed from center to align image and text to the top */
  gap: 24px;
}

/* Reverse orientation when you want the phone image on the right */
.card-panel.media-side.media-right {
  flex-direction: row-reverse;
}

/* Fix mobile portrait container width and ratio */
.card-panel.media-side .card-media {
  flex-shrink: 0;
  width: 130px; /* Ideal width for a phone frame */
  max-width: 38%;
  aspect-ratio: 9 / 19.5; /* Modern mobile aspect ratio */
  height: auto;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg-subtle);
  border: 1px solid var(--border);
}

.card-panel.media-side .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Ensure text section takes remaining space */
.card-panel.media-side .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Make sure the heading inside doesn't have an unwanted top gap */
.card-panel.media-side .card-content h3 {
  margin-top: 0;
}

/* Responsive fallback: collapse to vertical on narrow mobile viewports */
@media (max-width: 480px) {
  .card-panel.media-side,
  .card-panel.media-side.media-right {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-panel.media-side .card-media {
    width: 100%;
    max-width: 160px;
    margin: 0 auto 16px;
  }
}

.card-media img,
.card-media video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-panel:hover .card-media img {
  transform: scale(1.02);
}

/* Flush Media Variant (media bleeds to the top and side edges of the card) */
.card-panel.has-flush-media {
  padding-top: 0;
}

.card-panel.has-flush-media .card-media {
  margin: 0 -28px 24px -28px;
  width: calc(100% + 56px);
  border-radius: 19px 19px 0 0;
  border-left: none;
  border-right: none;
  border-top: none;
}

/* ==========================================================================
   FEATURE COMPARISON TABLE
   ========================================================================== */
.table-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 40px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

td:first-child {
  font-weight: 500;
}

tr:last-child td {
  border-bottom: none;
}

.col-center {
  text-align: center;
}

.check {
  color: var(--accent);
  font-weight: bold;
}

.dash {
  color: var(--text-muted);
  opacity: 0.4;
}

/* ==========================================================================
   COLLAPSIBLE FAQ ACCORDION COMPONENT
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-focus);
}

.faq-item[open] {
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* Accordion Trigger */
.faq-question {
  line-height: var(--leading-snug);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

/* Remove default browser arrow in WebKit/Firefox */
.faq-question::-webkit-details-marker,
.faq-question::marker {
  display: none;
}

/* Animated Chevron Icon */
.faq-chevron {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.25s ease, stroke 0.2s ease;
}

.faq-question:hover .faq-chevron,
.faq-item[open] .faq-chevron {
  stroke: var(--accent);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

/* Collapsible Content */
.faq-answer {
  padding: 0 24px 20px 24px;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: var(--leading-relaxed);
  margin: 0;
}

.faq-answer p + p {
  margin-top: 12px;
}


/* Inline standard link */
.link,
a.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.link:hover,
a.link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/*global fallback for links*/
main p a:not([class]) {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

main p a:not([class]):hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 48px 0 32px;
  width: 100%;
  border-top: 1px solid rgba(42, 42, 48, 0.4);
}

.site-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.8;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center; /* Centers the links row horizontally */
  gap: 16px;
  margin-top: 4px;
}

.footer-links a {
  font-size: 12px;
}

/* ==========================================================================
   APP STORE & MARKETPLACE BUTTON BADGES
   ========================================================================== */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center; /* Centers badges inside the hero card */
  margin: 24px auto 0;
}

.official-badge {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border-radius: 8px; /* Matches the curve of the badges */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.official-badge:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.official-badge img {
  height: 40px; /* Locks both badges to the exact same visual height */
  width: auto;
  display: block;
}

/* Optional: If you want Google Play to be purely monochrome (black/white/gray) */
.official-badge.monochrome-play img {
  filter: grayscale(100%) contrast(120%);
}