/**
 * Site-wide look: colors, header, buttons, product pages, footer.
 * Edit :root variables below to change brand colors site-wide.
 *
 * See apps/web/README.md for which other files to open for copy/nav.
 */
:root {
  --color-primary: #c88aff;
  --color-primary-rgb: 200, 138, 255;
  --color-primary-dark: #e4ccff;
  --color-primary-bright: #f3e8ff;
  --color-primary-glow: rgba(200, 138, 255, 0.32);
  --color-bg: #16121f;
  --color-surface: #211a2e;
  --color-surface-raised: #2b243c;
  --color-text: #f3eef8;
  --color-text-muted: #a898c4;
  --color-border: #3a334d;
  --color-success: #4ade80;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1120px;
  --font-sans: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

.page-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 12% -8%, rgba(var(--color-primary-rgb), 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 8%, rgba(228, 204, 255, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(42, 34, 64, 0.45) 0%, transparent 58%);
}

main {
  padding-block: 0 3rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

.site-header {
  position: relative;
  z-index: 2;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.12);
  background: rgba(33, 26, 46, 0.82);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
}

.brand:hover {
  text-decoration: none;
  color: var(--color-text);
}

.brand-wordmark {
  height: 44px;
  width: auto;
  max-width: min(180px, 42vw);
  display: block;
  object-fit: contain;
  border-radius: 6px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--color-primary);
}

/* —— Hero —— */
.hero {
  padding-block: 1rem 2.5rem;
}

.hero-modern {
  position: relative;
  padding-block: 3rem 2.5rem;
  overflow: hidden;
}

.hero-bits {
  margin-inline: calc(-1 * max(0px, (100vw - var(--max-width)) / 2 - 1rem));
  padding-inline: max(1rem, calc((100vw - min(100% - 2rem, var(--max-width))) / 2 + 1rem));
  min-height: 28rem;
}

.hero-bits .hero-inner {
  max-width: 40rem;
}

.hero-title-bits {
  gap: 0.35rem;
}

.hero-blur-line {
  margin: 0;
  font-size: clamp(2.125rem, 5.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--color-text);
}

.hero-shiny-wrap {
  font-size: clamp(2.125rem, 5.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .card-spotlight::before {
    display: none;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.hero-title {
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-line {
  display: block;
  font-size: clamp(2.125rem, 5.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--color-text);
}

.hero-line-accent {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead-apps {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
}

.lead-app {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.lead-app strong {
  color: var(--color-primary);
  font-weight: 600;
}

.lead-app span:last-child {
  color: var(--color-text-muted);
}

.hero .lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.hero-glow {
  position: absolute;
  width: min(420px, 70vw);
  height: 420px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-glow-left {
  top: -100px;
  left: -120px;
}

.hero-glow-right {
  top: -80px;
  right: -100px;
  opacity: 0.7;
}

.hero-modern > *:not(.hero-glow) {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.trust-line {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  background: rgba(36, 32, 48, 0.8);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  flex-shrink: 0;
}

.trust-line strong {
  color: var(--color-success);
}

/* —— Highlight strip —— */
.highlight-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.highlight-chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s, transform 0.2s;
}

.highlight-chip:hover {
  border-color: rgba(var(--color-primary-rgb), 0.42);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.08);
}

.highlight-chip strong {
  font-size: 0.9375rem;
  color: var(--color-text);
}

.highlight-chip span {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* —— Products / accordion —— */
.products-section {
  margin-bottom: 3rem;
}

.section-head {
  margin-bottom: 1.25rem;
}

.section-subtitle {
  margin: 0.35rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.product-card {
  background: rgba(36, 32, 48, 0.65);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  align-self: start;
}

.product-card--owner {
  --card-accent: var(--color-primary);
  --card-accent-dim: rgba(var(--color-primary-rgb), 0.18);
  border-top: 3px solid var(--card-accent);
}

.product-card--tenant {
  --card-accent: var(--color-primary-dark);
  --card-accent-dim: rgba(var(--color-primary-rgb), 0.14);
  border-top: 3px solid var(--card-accent);
}

.product-card:hover {
  border-color: rgba(var(--color-primary-rgb), 0.45);
}

.product-card.is-open {
  border-color: rgba(var(--color-primary-rgb), 0.55);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(var(--color-primary-rgb), 0.12),
    0 0 24px rgba(var(--color-primary-rgb), 0.1);
}

.product-card-trigger {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.375rem 1.375rem 1.125rem;
  user-select: none;
}

.product-card-head {
  flex: 1;
  min-width: 0;
}

.product-card-title {
  margin: 0.5rem 0 0.35rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.product-card-summary {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.product-card-chevron {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  margin-top: 0.25rem;
  position: relative;
  transition: background 0.2s, transform 0.25s;
}

.product-card-chevron::before,
.product-card-chevron::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--card-accent, var(--color-primary));
  border-radius: 1px;
  transform: translate(-50%, -50%);
  transition: transform 0.25s, opacity 0.25s;
}

.product-card-chevron::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.product-card.is-open .product-card-chevron {
  background: var(--card-accent-dim);
  border-color: rgba(var(--color-primary-rgb), 0.35);
}

.product-card.is-open .product-card-chevron::after {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

.product-card-body {
  padding: 0 1.375rem 1.375rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.125rem;
  animation: accordion-in 0.25s ease;
}

.product-card-body .btn-primary {
  width: 100%;
  margin-top: 0.25rem;
}

.product-card-body[hidden] {
  display: none;
}

.section-head-centered {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.section-title-centered {
  text-align: center;
  margin-bottom: 1.25rem;
}

.trust-line-centered {
  margin: 2rem auto 0;
  display: flex;
  justify-content: center;
}

.highlight-strip-compact {
  margin-bottom: 2rem;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: rgba(var(--color-primary-rgb), 0.4);
}

.why-icon {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  opacity: 0.85;
}

.section-title-centered {
  margin-top: 0;
}

@keyframes accordion-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-points {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.625rem;
}

.product-points li {
  padding-left: 1.625rem;
  position: relative;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.product-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(var(--color-primary-rgb), 0.2);
  border: 1px solid rgba(var(--color-primary-rgb), 0.45);
}

.product-points li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(-45deg);
}

/* —— Why section —— */
.why-section {
  padding-top: 1rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.why-card {
  background: linear-gradient(145deg, var(--color-surface) 0%, rgba(var(--color-primary-rgb), 0.04) 100%);
  border: 1px solid rgba(var(--color-primary-rgb), 0.14);
  border-radius: var(--radius-lg);
  padding: 1.375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.why-card:hover {
  border-color: rgba(var(--color-primary-rgb), 0.32);
  box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.07);
}

.why-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.why-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  background: var(--color-surface-raised);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-bg);
  box-shadow: 0 4px 18px rgba(var(--color-primary-rgb), 0.42);
}

.btn-primary:hover {
  opacity: 1;
  box-shadow: 0 8px 28px rgba(var(--color-primary-rgb), 0.52);
  color: var(--color-bg);
}

.btn-secondary {
  background: var(--color-surface-raised);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-disabled {
  background: var(--color-surface-raised);
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  cursor: default;
  pointer-events: none;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.feature-list li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-text-muted);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}

.section-title {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.page-header p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Product / app landing pages */
.product-page {
  padding-top: clamp(2.5rem, 8vh, 5rem);
  padding-bottom: 2rem;
}

.draft-banner {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-warning, #fbbf24);
  color: var(--color-text);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.prose {
  color: var(--color-text-muted);
}

.prose h2 {
  color: var(--color-text);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.prose h3 {
  color: var(--color-text);
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
}

.prose p,
.prose li {
  margin: 0 0 0.75rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.prose th {
  background: var(--color-surface);
  color: var(--color-text);
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 32rem;
}

.contact-card-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-form-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.contact-form-toggle-label {
  margin: 0;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.contact-form-toggle-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  max-width: 16rem;
}

.contact-form-fallback {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.contact-card a {
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  background: rgba(36, 32, 48, 0.85);
  backdrop-filter: blur(12px);
  padding: 2rem 0;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.footer-copy {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.play-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
