/* ==========================================================================
   Sowia — landing page styles
   --------------------------------------------------------------------------
   Design tokens ported from the app's design system (ds-crm-app/src/constants/
   theme.ts) so the landing feels like the same product:
     - Brand indigo  #6C63FF / deep #4F46E5 / soft #9A8CFF
     - Cyan accent   #22D3EE
     - Success green #34D399
     - 4pt spacing scale, soft radii (10 / 16 / 22 / pill)
   No framework, no build step. Mobile-first, progressive enhancement:
   the page is fully readable and usable without JavaScript.
   ========================================================================== */

:root {
  /* Brand */
  --primary: #6c63ff;
  --primary-deep: #4f46e5;
  --primary-soft: #9a8cff;
  --accent: #22d3ee;
  --success: #34d399;

  /* Surfaces (light theme) */
  --bg: #f7f7fa;
  --surface: #ffffff;
  --bg-element: #f0f1f6;
  --border: #e4e7ec;

  /* Text */
  --text: #101828;
  --text-secondary: #5c6470;
  --text-muted: #98a2b3;

  /* Layout */
  --maxw: 1080px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm:
    0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-brand: 0 12px 32px rgba(108, 99, 255, 0.28);

  --gradient: linear-gradient(135deg, #6c63ff 0%, #9a8cff 100%);
}

/* ------------------------------- Reset ---------------------------------- */

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:hover {
  text-decoration: underline;
}

/* ----------------------------- Utilities -------------------------------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------ Buttons --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(108, 99, 255, 0.34);
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

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

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary-soft);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ------------------------------- Header --------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 247, 250, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(247, 247, 250, 0.92);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-brand);
  flex: none;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  display: none;
}

/* Mobile menu button */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 20px;
  border-top: 1px solid var(--border);
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  padding: 12px 4px;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.mobile-menu a:hover {
  text-decoration: none;
  color: var(--text);
}

.mobile-menu .btn {
  margin-top: 8px;
}

@media (min-width: 820px) {
  .nav-links,
  .nav-cta {
    display: inline-flex;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-menu {
    display: none !important;
  }
}

/* -------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  padding: 64px 0 72px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(
      600px 340px at 78% 0%,
      rgba(34, 211, 238, 0.16),
      transparent 70%
    ),
    radial-gradient(
      620px 360px at 12% 8%,
      rgba(108, 99, 255, 0.18),
      transparent 70%
    );
  z-index: -1;
}

.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-deep);
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.16);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  font-weight: 800;
}

h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 40ch;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Hero visual — a light "app card" mock, built with HTML/CSS (no image). */
.hero-visual {
  justify-self: center;
  width: 100%;
  max-width: 380px;
}

.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.mock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mock-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.mock-profit {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.mock-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 18px;
}

.mock-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 88px;
  margin-bottom: 18px;
}

.mock-bars span {
  flex: 1;
  border-radius: 8px 8px 4px 4px;
  background: var(--gradient);
  opacity: 0.85;
}

.mock-bars span:nth-child(1) {
  height: 40%;
}
.mock-bars span:nth-child(2) {
  height: 62%;
}
.mock-bars span:nth-child(3) {
  height: 50%;
}
.mock-bars span:nth-child(4) {
  height: 78%;
}
.mock-bars span:nth-child(5) {
  height: 64%;
  opacity: 1;
}
.mock-bars span:nth-child(6) {
  height: 92%;
  background: linear-gradient(135deg, #6c63ff, #22d3ee);
  opacity: 1;
}

.mock-rows {
  display: grid;
  gap: 10px;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.mock-row .ic {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--bg-element);
  display: grid;
  place-items: center;
  color: var(--primary-deep);
  flex: none;
}

.mock-row .ic svg {
  width: 15px;
  height: 15px;
}

.mock-row .val {
  margin-left: auto;
  font-weight: 700;
  color: var(--text);
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }
  .hero {
    padding: 88px 0 96px;
  }
}

/* ------------------------------ Sections -------------------------------- */

section {
  padding: 64px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head.left {
  margin-inline: 0;
  text-align: left;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0;
}

/* Feature grid */
.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: 1fr;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 99, 255, 0.35);
}

.card .feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(108, 99, 255, 0.1);
  color: var(--primary-deep);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.card .feat-icon svg {
  width: 22px;
  height: 22px;
}

.card p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.96rem;
}

.card .card-sub {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary-deep);
  margin: 0 0 8px;
}

/* ---------------------------- Alternating band -------------------------- */

.band {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

/* Steps (how it works) */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 24px;
}

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

.step {
  position: relative;
  padding-top: 8px;
}

.step-num {
  counter-increment: step;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-brand);
}

.step-num::before {
  content: counter(step);
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  color: var(--text-secondary);
  margin: 0;
}

/* ---------------------------- Value / split ----------------------------- */

.split {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.value-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 16px;
}

.value-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.value-list .check {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  color: #0f7a55;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.value-list .check svg {
  width: 14px;
  height: 14px;
}

.value-list strong {
  display: block;
  font-weight: 700;
}

.value-list span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ------------------------------- FAQ ------------------------------------ */

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary-deep);
  line-height: 1;
  transition: transform 0.2s ease;
  flex: none;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  color: var(--text-secondary);
  margin: 0 0 16px;
  font-size: 0.96rem;
}

/* ------------------------------ CTA final ------------------------------- */

.cta {
  text-align: center;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 28px;
  box-shadow: var(--shadow-brand);
  position: relative;
  overflow: hidden;
}

.cta::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 220px;
  background: radial-gradient(
    420px 180px at 50% 100%,
    rgba(255, 255, 255, 0.22),
    transparent 70%
  );
}

.cta h2 {
  color: #fff;
  position: relative;
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 46ch;
  margin: 0 auto 28px;
  position: relative;
}

.cta .btn-secondary {
  position: relative;
}

/* ------------------------------ Footer ---------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 32px;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 12px 0 0;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 12px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =========================== Privacy page ============================== */

.legal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  max-width: 820px;
  margin: 0 auto;
}

.legal h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin-bottom: 8px;
}

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

.legal h2 {
  font-size: 1.2rem;
  margin: 34px 0 10px;
}

.legal h3 {
  font-size: 1.02rem;
  margin: 22px 0 8px;
}

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

.legal p {
  margin: 0 0 12px;
}

.legal ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.legal li {
  margin-bottom: 8px;
}

.legal a {
  word-break: break-word;
}

.legal .back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------------------------- Reveal on scroll -------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* If JS is off, nothing should stay hidden. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
