/* ==========================================================================
   Linoti Design System
   Canonical stylesheet for the whole site.
   Pure CSS, no build tools. System font stack, dark hero + warm off-white body.
   ========================================================================== */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Design tokens ---------- */
:root {
  /* Purple brand */
  --primary: #6C3AED;
  --primary-dark: #5B21B6;
  --primary-light: #A78BFA;
  --primary-glow: rgba(108, 58, 237, 0.15);

  /* Amber accent */
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --accent-light: #FCD34D;

  /* Status */
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.08);
  --info: #3B82F6;
  --info-bg: rgba(59, 130, 246, 0.08);

  /* Neutrals */
  --bg-white: #ffffff;
  --bg-warm: #FAF8F5;          /* warm off-white body */
  --bg-light: #F8FAFC;         /* cool surface */
  --bg-dark: #0F172A;          /* dark hero base */
  --bg-dark-card: #1E293B;
  --bg-dark-hover: #334155;

  --text-dark: #0F172A;
  --text-base: #334155;
  --text-light: #475569;
  --text-muted: #64748B;
  --text-white: #F8FAFC;

  --border: #E2E8F0;
  --border-soft: #EEF1F5;
  --border-dark: #334155;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
  --shadow-glow: 0 0 40px rgba(108, 58, 237, 0.2);

  /* Radius — 18px is the canonical card radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-card: 18px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Typography — system font stack */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base-size: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Motion */
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing helpers */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Backward-compat aliases (older pages) */
  --primary-color: #6C3AED;
  --secondary-color: #10B981;
  --border-color: #E2E8F0;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 8px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: 6px;
  z-index: 10000;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.app-card:focus-visible,
.content-card:focus-visible,
.help-link:focus-visible,
.blog-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

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

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base-size);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-base);
  background: var(--bg-warm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

strong {
  color: var(--text-dark);
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-mid {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 24px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.logo a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo h1,
.logo span {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-dark);
}

/* ---------- Typography utilities ---------- */
.heading-xl {
  font-size: var(--text-6xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text-dark);
}

.heading-lg {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-dark);
}

.heading-md {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-dark);
}

.heading-sm {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-dark);
}

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

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

.lead {
  font-size: var(--text-lg);
  color: var(--text-light);
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(108, 58, 237, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 58, 237, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-white {
  background: white;
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  color: var(--text-dark);
}

.btn-accent {
  background: var(--accent);
  color: var(--text-dark);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-accent:hover {
  background: var(--accent-dark);
  color: var(--text-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--text-base-size);
  border-radius: var(--radius-md);
}

.btn-xl {
  padding: 1.125rem 2.5rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-md);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--text-lg);
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(108, 58, 237, 0.35);
}

.cta-button:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 58, 237, 0.4);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-primary {
  background: var(--primary-glow);
  color: var(--primary);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-accent {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-dark);
}

.badge-white {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(10px);
}

/* ---------- Dark hero section ---------- */
.hero-dark {
  background: var(--bg-dark);
  color: white;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-dark::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 160%;
  height: 180%;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(108, 58, 237, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 60%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-dark > .container,
.hero-dark > .hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-dark h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: white;
}

.hero-dark .hero-sub,
.hero-dark p.lead {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-dark .hero-meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: 1rem;
}

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

/* ---------- Light section wrapper ---------- */
.section {
  padding: 5rem 1.5rem;
}

.section-tight {
  padding: 3rem 1.5rem;
}

.section-light {
  background: var(--bg-warm);
}

.section-white {
  background: var(--bg-white);
}

.section-cool {
  background: var(--bg-light);
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-heading p {
  font-size: var(--text-lg);
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Cards ---------- */
.app-card {
  background: var(--bg-white);
  border-radius: var(--radius-card);
  padding: 2.5rem 2rem 2rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  color: inherit;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.content-card {
  background: var(--bg-white);
  border-radius: var(--radius-card);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.content-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.content-card h2,
.content-card h3 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

/* ---------- Long-form content (legal / policy / support / article) ---------- */
.prose {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  line-height: 1.75;
  color: var(--text-base);
}

.prose h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.prose .last-updated,
.prose .meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 2.5rem;
}

.prose h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.prose h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.prose p,
.prose li {
  color: var(--text-base);
  margin-bottom: 1rem;
  font-size: 1.0625rem;
}

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

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

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--primary-dark);
}

.prose strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* Callout boxes for articles */
.prose .key-takeaway,
.callout {
  background: var(--info-bg);
  border-left: 4px solid var(--info);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--text-base);
}

.prose .key-takeaway strong,
.callout strong {
  color: var(--info);
}

.prose .danger-box,
.callout-danger {
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.prose .safe-box,
.callout-success {
  background: var(--success-bg);
  border-left: 4px solid var(--success);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.prose .cta-banner {
  background: var(--bg-dark);
  color: white;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-card);
  text-align: center;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}

.prose .cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(108, 58, 237, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.prose .cta-banner > * {
  position: relative;
  z-index: 1;
}

.prose .cta-banner h3 {
  color: white;
  font-size: var(--text-2xl);
  margin: 0 0 0.75rem;
}

.prose .cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  font-size: var(--text-base-size);
}

.prose .cta-banner a {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  transition: transform var(--transition);
}

.prose .cta-banner a:hover {
  transform: translateY(-2px);
}

/* ---------- FAQ block (long-form questions list) ---------- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  padding-top: 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h2,
.faq-item h3 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-size: var(--text-lg);
  font-weight: 700;
}

.faq-item p {
  line-height: 1.75;
  color: var(--text-base);
  font-size: var(--text-base-size);
  margin-bottom: 0.75rem;
}

.faq-item ul {
  margin: 0.75rem 0 0.75rem 1.25rem;
  color: var(--text-base);
}

.faq-item a {
  color: var(--primary);
  text-decoration: underline;
}

/* ---------- Support card ---------- */
.support-card {
  background: var(--bg-white);
  padding: 1.75rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: box-shadow var(--transition);
}

.support-card:hover {
  box-shadow: var(--shadow);
}

.support-card h3 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-size: var(--text-lg);
  font-weight: 700;
}

.support-card p {
  color: var(--text-base);
  line-height: 1.7;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.support-card p:last-child {
  margin-bottom: 0;
}

.support-card ul {
  margin: 0.5rem 0 0.5rem 1.25rem;
  color: var(--text-base);
}

.support-card a {
  color: var(--primary);
  text-decoration: underline;
}

/* Contact callout (end of support pages) */
.contact-callout {
  background: var(--bg-dark);
  color: white;
  padding: 3rem 2rem;
  border-radius: var(--radius-card);
  text-align: center;
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}

.contact-callout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(108, 58, 237, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.contact-callout > * {
  position: relative;
  z-index: 1;
}

.contact-callout h2 {
  font-size: var(--text-2xl);
  color: white;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.contact-callout p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.contact-callout a.btn,
.contact-callout a.btn-primary {
  color: white;
}

.contact-callout a:not(.btn) {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ---------- Color legend (support/faq pages) ---------- */
.color-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.color-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--text-base);
}

.color-badge {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
}

.color-badge.green { background: var(--success); }
.color-badge.orange { background: var(--warning); }
.color-badge.red { background: var(--danger); }

/* ---------- Footer ---------- */
footer {
  background: var(--bg-dark);
  color: var(--text-muted);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-dark);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

footer p {
  font-size: var(--text-sm);
  margin: 0;
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-dark {
    padding: 4.5rem 1.5rem 3.5rem;
  }

  .hero-dark h1 {
    font-size: var(--text-4xl);
  }

  .section {
    padding: 4rem 1.25rem;
  }

  .section-heading h2 {
    font-size: var(--text-3xl);
  }
}

@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: var(--text-xs);
  }

  footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .prose {
    padding: 2.5rem 1.25rem 3.5rem;
  }

  .prose h1 {
    font-size: var(--text-3xl);
  }

  .prose h2 {
    font-size: var(--text-xl);
  }

  .hero-dark h1 {
    font-size: var(--text-3xl);
  }

  .hero-dark .hero-sub {
    font-size: var(--text-base-size);
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 0.75rem;
  }

  .hero-dark h1 {
    font-size: var(--text-2xl);
  }
}
