/* Site chrome: header, footer, buttons, cards, tables, FAQ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--border-card);
  transition:
    box-shadow var(--duration) var(--ease-out),
    padding 220ms var(--ease-out);
}

[data-theme="dark"] .site-header {
  background: rgba(23, 28, 38, 0.85);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-card);
  padding-block: 6px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 14px var(--pad-x);
  transition: padding 220ms var(--ease-out);
}

.site-header.is-scrolled .site-header__inner {
  padding-block: 10px;
}

.site-logo {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.site-logo:hover {
  color: var(--color-primary);
}

.site-nav {
  display: none;
  align-items: center;
  gap: 28px;
}

@media (min-width: 960px) {
  .site-nav {
    display: flex;
  }
}

.site-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-primary);
}

.site-nav__indicator {
  position: relative;
}

.site-header__stores {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (min-width: 960px) {
  .site-header__stores {
    display: flex;
  }
}

.store-badge--sm img {
  height: 32px;
  width: auto;
}

.store-badge--lg img {
  height: 52px;
  width: auto;
}

@media (min-width: 480px) {
  .store-badge--lg img {
    height: 60px;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--color-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition:
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  background: var(--color-surface-secondary);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.menu-toggle {
  display: flex;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.menu-toggle:hover {
  background: var(--color-surface-secondary);
}

@media (min-width: 960px) {
  .menu-toggle {
    display: none;
  }
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.mobile-drawer.is-open {
  pointer-events: auto;
  opacity: 1;
}

.mobile-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.mobile-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 360px);
  height: 100%;
  background: var(--color-card);
  border-radius: 18px 0 0 18px;
  padding: 24px;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform var(--duration) var(--ease-out-cubic);
}

.mobile-drawer.is-open .mobile-drawer__panel {
  transform: translateX(0);
}

[data-theme="dark"] .mobile-drawer__panel {
  background: var(--color-card-inner-dark);
}

.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 32px;
}

.mobile-drawer__nav a {
  padding: 14px 12px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.mobile-drawer__nav a:hover {
  background: var(--color-surface-secondary);
}

.mobile-drawer__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-surface-secondary);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 4px 20px rgba(57, 118, 234, 0.35);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 6px 28px rgba(57, 118, 234, 0.45);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] .btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-inverse);
  border-color: rgba(241, 245, 249, 0.12);
}

.btn--secondary:hover {
  background: #fff;
}

[data-theme="dark"] .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid rgba(57, 118, 234, 0.35);
}

.btn--ghost:hover {
  background: rgba(57, 118, 234, 0.08);
}

/* Cards */
.card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.card--inner {
  border-radius: var(--radius-card-inner);
  padding: 16px;
}

.card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.card__desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.grid-2 {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hero layout */
.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
}

/* Phone mockup frame */
.phone-frame {
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  border-radius: 36px;
  padding: 12px;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
}

.phone-frame__notch {
  height: 22px;
  border-radius: 0 0 14px 14px;
  background: #0f172a;
  width: 38%;
  margin: -4px auto 8px;
}

.phone-frame__screen {
  border-radius: 26px;
  overflow: hidden;
  background: var(--gradient-page-light);
  min-height: 420px;
  position: relative;
}

[data-theme="dark"] .phone-frame__screen {
  background: var(--gradient-page-dark);
}

/* Social proof strip */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-card);
  border: 1px solid var(--border-card);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-card);
}

/* Comparison table */
.compare-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-card);
  background: var(--color-card);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-card);
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
  text-align: center;
}

.compare-table th {
  font-weight: 700;
  background: var(--color-surface-secondary);
}

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

/* FAQ */
.faq-item {
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card-inner);
  background: var(--color-card);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item__q {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
}

.faq-item__q::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform 220ms var(--ease-out);
}

.faq-item.is-open .faq-item__q::after {
  transform: rotate(45deg);
}

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out);
}

.faq-item.is-open .faq-item__a {
  max-height: 800px;
}

.faq-item__a-inner {
  padding: 0 18px 16px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--color-card);
  border-top: 1px solid var(--border-card);
  padding: 64px 0 32px;
  margin-top: auto;
}

[data-theme="dark"] .site-footer {
  background: var(--color-card-dark);
}

.footer-grid {
  display: grid;
  gap: 36px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--color-text-muted);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-card);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-social {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-social a {
  color: var(--color-text-muted);
  font-weight: 600;
}

.footer-social a:hover {
  color: var(--color-primary);
}

/* CTA band */
.cta-band {
  border-radius: var(--radius-card);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  background: linear-gradient(135deg, rgba(57, 118, 234, 0.12) 0%, rgba(234, 139, 57, 0.1) 100%);
  border: 1px solid var(--border-card);
}

[data-theme="dark"] .cta-band {
  background: linear-gradient(135deg, rgba(57, 118, 234, 0.2) 0%, rgba(234, 139, 57, 0.08) 100%);
}

/* Icon circle for feature cards */
.icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(57, 118, 234, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

/* Use case / testimonial */
.use-case-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(160deg, #3976ea 0%, #1e3a5f 50%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.use-case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(57, 118, 234, 0.25);
  color: #fff;
}

.use-case-card h3 {
  color: #fff;
  margin-bottom: 8px;
}

.use-case-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.92;
}

.testimonial-card {
  padding: 28px;
}

.testimonial-card blockquote {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-text);
}

.testimonial-card cite {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Chaotic chat illustration area */
.chaos-chat {
  border-radius: var(--radius-card);
  background: var(--color-card);
  border: 1px solid var(--border-card);
  padding: 20px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

.chaos-bubble {
  position: absolute;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  max-width: 70%;
  background: var(--color-surface-secondary);
  border: 1px solid var(--border-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Carousel simple horizontal scroll */
.carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbars while keeping swipe / trackpad scroll */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.carousel > * {
  flex: 0 0 min(280px, 85vw);
  scroll-snap-align: start;
}

/* Scandinavian section bg */
.section-nordic {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  min-height: 320px;
  background:
    linear-gradient(120deg, rgba(16, 185, 129, 0.15) 0%, transparent 45%),
    linear-gradient(300deg, rgba(57, 118, 234, 0.12) 0%, transparent 40%),
    linear-gradient(180deg, #e8f4f0 0%, #f5ebe0 100%);
}

[data-theme="dark"] .section-nordic {
  background:
    linear-gradient(120deg, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
    linear-gradient(300deg, rgba(57, 118, 234, 0.15) 0%, transparent 40%),
    linear-gradient(180deg, #1a2228 0%, #1b1a24 100%);
}

.section-nordic__content {
  position: relative;
  z-index: 1;
  padding: clamp(32px, 5vw, 56px);
}

/* Investors page tone */
.page-investors .site-header {
  background: rgba(16, 21, 31, 0.88);
  border-bottom-color: rgba(241, 245, 249, 0.08);
}

.page-investors .site-logo,
.page-investors .site-nav a {
  color: var(--color-text-inverse);
}

.page-investors .site-nav a:hover,
.page-investors .site-nav a.is-active {
  color: #93c5fd;
}

.page-investors .menu-toggle {
  color: var(--color-text-inverse);
}

.page-investors .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--color-text-inverse);
}

.page-investors body {
  background: var(--gradient-page-dark);
  color: var(--color-text-inverse);
}

.page-investors .subhead,
.page-investors .lead {
  color: var(--color-text-muted-inverse);
}

.page-investors .card {
  background: var(--color-card-inner-dark);
  border-color: rgba(241, 245, 249, 0.08);
}

.page-investors .eyebrow {
  color: #93c5fd;
}

.page-investors .mobile-drawer__panel {
  background: #171c26;
}

.page-investors .mobile-drawer__nav a {
  color: var(--color-text-inverse);
}

.page-investors .mobile-drawer__nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.page-investors .mobile-drawer__close {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-inverse);
}

/* Legal */
.legal-page {
  padding-top: 32px;
  padding-bottom: 80px;
}

.legal-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page li {
  color: var(--color-text-muted);
}

.legal-banner {
  padding: 16px;
  border-radius: var(--radius-card-inner);
  background: rgba(234, 139, 57, 0.15);
  border: 1px solid rgba(234, 139, 57, 0.35);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

[data-theme="dark"] .legal-banner {
  background: rgba(234, 139, 57, 0.12);
}

/* Sharp legal documents (privacypolicy.html, terms.html, guidelines.html) */
.legal-doc .policy-content,
.legal-doc .terms-content,
.legal-doc .guidelines-content {
  background: var(--color-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--shadow-card);
}

.legal-doc h1 {
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.legal-doc h2 {
  font-size: 1.25rem;
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-card);
  color: var(--color-text);
}

.legal-doc h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--color-text);
}

.legal-doc p,
.legal-doc li {
  color: var(--color-text-muted);
  line-height: 1.65;
}

.legal-doc p {
  margin-bottom: 1rem;
}

.legal-doc ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-doc li {
  margin-bottom: 0.5rem;
}

.legal-doc .last-updated {
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.legal-doc .section-divider {
  height: 1px;
  margin: 1.75rem 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-card),
    transparent
  );
}

.legal-doc .contact-info {
  background: rgba(57, 118, 234, 0.08);
  padding: 1.25rem;
  border-radius: var(--radius-card-inner);
  margin: 1.25rem 0;
  border-left: 4px solid var(--color-primary);
}

[data-theme="dark"] .legal-doc .contact-info {
  background: rgba(57, 118, 234, 0.12);
}

.legal-doc .legal-header {
  background: rgba(57, 118, 234, 0.08);
  padding: 1.25rem;
  border-radius: var(--radius-card-inner);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--color-primary);
  font-size: 0.95rem;
}

.legal-doc .legal-header p {
  margin-bottom: 0.5rem;
}

.legal-doc .legal-header p:last-child {
  margin-bottom: 0;
}

.legal-doc .intro-text {
  font-size: 1.05rem;
  padding: 1.25rem;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-card-inner);
  margin: 1.75rem 0;
}

.legal-doc .purpose-box {
  margin: 1.75rem 0;
  padding: 1.25rem;
  background: rgba(34, 197, 94, 0.12);
  border-radius: var(--radius-card-inner);
  border-left: 4px solid #22c55e;
}

.legal-doc .tldr-box {
  background: rgba(245, 158, 11, 0.14);
  padding: 1.25rem;
  border-radius: var(--radius-card-inner);
  margin: 1.75rem 0;
  border-left: 4px solid #f59e0b;
}

.legal-doc .tldr-box h2 {
  margin-top: 0;
  font-size: 1.2rem;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.75rem;
}

.legal-doc .highlight-box {
  background: rgba(245, 158, 11, 0.14);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-card-inner);
  margin: 1.25rem 0;
  border-left: 4px solid #f59e0b;
}

.legal-doc .info-box {
  background: rgba(57, 118, 234, 0.08);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-card-inner);
  margin: 1.25rem 0;
  border-left: 4px solid var(--color-primary);
}

.legal-doc .warning-box {
  background: rgba(239, 68, 68, 0.12);
  padding: 1.25rem;
  border-radius: var(--radius-card-inner);
  margin: 1.25rem 0;
  border-left: 4px solid #ef4444;
}

.legal-doc .tips-box {
  background: rgba(57, 118, 234, 0.08);
  padding: 1.25rem;
  border-radius: var(--radius-card-inner);
  margin: 1.25rem 0;
}

.legal-doc .cross-reference,
.legal-doc .legal-related {
  background: rgba(57, 118, 234, 0.1);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-card-inner);
  margin: 1.25rem 0;
  border-left: 4px solid var(--color-primary);
}

.legal-doc a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.legal-doc a:hover {
  text-decoration: underline;
}

.legal-doc .guidelines-content .contact-info {
  text-align: center;
}

/* QR block */
.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--color-card);
  border: 1px solid var(--border-card);
}

.qr-svg {
  width: 160px;
  height: 160px;
}

/* Timeline */
.timeline {
  border-left: 2px solid rgba(57, 118, 234, 0.35);
  padding-left: 24px;
  margin-left: 8px;
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-card);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* Tag pills for use cases */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(57, 118, 234, 0.12);
  color: var(--color-primary);
}
