/* webOcode — custom layer on Tailwind */

:root {
  --color-navy-950: #0a0f1c;
  --color-accent: #3b82f6;
  --color-cyan: #06b6d4;
  --glass-bg: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(148, 163, 184, 0.12);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  background-color: var(--color-navy-950);
}

/* Hero: grid + gradient mesh */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(6, 182, 212, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(59, 130, 246, 0.1), transparent),
    var(--color-navy-950);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-grid {
    animation: hero-grid-drift 60s linear infinite;
  }
}

@keyframes hero-grid-drift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 48px 48px, 48px 48px;
  }
}

/* Glass cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
}

/* Navbar states */
#site-nav.nav-scrolled {
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

#site-nav.nav-top {
  background: transparent;
  border-bottom: 1px solid transparent;
}

/* Focus visible for custom buttons */
.focus-ring:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Client logo hover: grayscale to color */
.client-logo-link img,
.client-logo-placeholder {
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.client-logo-link:hover img,
.client-logo-link:focus-visible img,
.client-logo-link:hover .client-logo-placeholder,
.client-logo-link:focus-visible .client-logo-placeholder {
  filter: grayscale(0);
  opacity: 1;
}

/* Map container */
#map {
  height: 280px;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

@media (min-width: 768px) {
  #map {
    height: 360px;
  }
}

/* Terminal decoration in hero */
.hero-terminal {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #94a3b8;
}

.hero-terminal .prompt {
  color: #22d3ee;
}

.hero-terminal .cmd {
  color: #e2e8f0;
}

.hero-terminal .string {
  color: #86efac;
}

@media (prefers-reduced-motion: reduce) {
  .hero-terminal .animate-pulse {
    animation: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Sub-pages (support, zla-inbox, data-deletion)
   --------------------------------------------------------------------------- */

/* Subpage header band — a shorter version of the hero treatment */
.page-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% -40%, rgba(59, 130, 246, 0.22), transparent),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(6, 182, 212, 0.1), transparent),
    var(--color-navy-950);
}

.page-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, black 10%, transparent 75%);
  pointer-events: none;
}

/* Long-form copy on legal / support pages */
.prose-dark {
  color: #94a3b8;
  line-height: 1.7;
}

.prose-dark h2 {
  color: #fff;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 6rem;
}

.prose-dark h3 {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose-dark p {
  margin-bottom: 1rem;
}

.prose-dark ul,
.prose-dark ol {
  margin: 0 0 1rem 1.25rem;
  padding-left: 0.5rem;
}

.prose-dark ul {
  list-style: disc;
}

.prose-dark ol {
  list-style: decimal;
}

.prose-dark li {
  margin-bottom: 0.5rem;
}

.prose-dark strong {
  color: #e2e8f0;
  font-weight: 600;
}

.prose-dark a {
  color: #60a5fa;
  text-underline-offset: 2px;
}

.prose-dark a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.prose-dark table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.prose-dark th,
.prose-dark td {
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.prose-dark th {
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  font-weight: 600;
}

/* Tables must scroll inside their own box on narrow screens */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* FAQ disclosure */
.faq-item {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.875rem;
  background: rgba(15, 23, 42, 0.5);
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(59, 130, 246, 0.35);
}

.faq-item > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  font-weight: 600;
  color: #e2e8f0;
  min-height: 2.75rem;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
  border-radius: 0.875rem;
}

.faq-item > summary .faq-chevron {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: #64748b;
  transition: transform 0.2s ease;
}

.faq-item[open] > summary .faq-chevron {
  transform: rotate(180deg);
  color: #60a5fa;
}

.faq-body {
  padding: 0 1.25rem 1.25rem;
  color: #94a3b8;
  line-height: 1.7;
}

.faq-body a {
  color: #60a5fa;
  text-underline-offset: 2px;
}

.faq-body a:hover {
  text-decoration: underline;
}

/* Phone screenshot frames on the app page */
.shot {
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #0f172a;
  overflow: hidden;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Horizontal screenshot rail — scrolls rather than squashing */
.shot-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(215px, 1fr);
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}

.shot-rail > * {
  scroll-snap-align: center;
}

@media (min-width: 1024px) {
  .shot-rail {
    overflow-x: visible;
    grid-auto-columns: 1fr;
  }
}

/* Store badge placeholders — swap for real badges once the listings are live */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0.625rem 1.125rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  line-height: 1.15;
}

.store-badge .store-badge-top {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.store-badge .store-badge-name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}
