/* ==========================================================================
   Lexoria — design system
   Loaded after the Tailwind Play CDN so component classes win over utilities.
   ========================================================================== */

:root {
  /* Navy — primary brand family */
  --lx-navy-900: #0b1524;
  --lx-navy-800: #122135;
  --lx-navy-700: #1a2f4a;
  --lx-navy-600: #24425f;
  --lx-navy-500: #35597b;
  --lx-navy-300: #7d95ac;

  /* Warm neutral — page fields and surfaces */
  --lx-sand-50:  #fbf9f5;
  --lx-sand-100: #f4f0e8;
  --lx-sand-200: #e9e2d5;
  --lx-sand-300: #d9cfbc;
  --lx-sand-400: #bdb09a;

  /* Brass — restrained accent, never a large fill */
  --lx-brass-600: #8a6d42;
  --lx-brass-500: #a3855a;
  --lx-brass-400: #c0a478;

  /* Ink */
  --lx-ink:      #121a24;
  --lx-body:     #3d4854;
  --lx-muted:    #6b7683;
  --lx-hairline: rgba(18, 33, 53, 0.12);
  --lx-hairline-strong: rgba(18, 33, 53, 0.22);

  /* Type */
  --lx-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --lx-sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --lx-radius: 3px;
  --lx-radius-lg: 6px;
  --lx-shell: 1180px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

body {
  font-family: var(--lx-sans);
  color: var(--lx-body);
  background: var(--lx-sand-50);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--lx-serif);
  color: var(--lx-ink);
  font-weight: 600;
  letter-spacing: -0.011em;
  line-height: 1.18;
}

a { color: inherit; }

::selection {
  background: var(--lx-navy-700);
  color: var(--lx-sand-50);
}

:focus-visible {
  outline: 2px solid var(--lx-brass-500);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.lx-shell {
  width: 100%;
  max-width: var(--lx-shell);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 1024px) {
  .lx-shell { padding-inline: 2.5rem; }
}

.lx-section       { padding-block: 5rem; }
.lx-section-tight { padding-block: 3.5rem; }

@media (min-width: 768px) {
  .lx-section       { padding-block: 7rem; }
  .lx-section-tight { padding-block: 4.5rem; }
}

.lx-rule {
  border: 0;
  border-top: 1px solid var(--lx-hairline);
}

/* Surfaces */
.lx-surface-sand { background: var(--lx-sand-100); }
.lx-surface-navy { background: var(--lx-navy-800); color: var(--lx-sand-200); }
.lx-surface-navy h1,
.lx-surface-navy h2,
.lx-surface-navy h3,
.lx-surface-navy h4 { color: #fff; }

/* --------------------------------------------------------------------------
   Type components
   -------------------------------------------------------------------------- */

.lx-eyebrow {
  font-family: var(--lx-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lx-brass-600);
}

.lx-surface-navy .lx-eyebrow { color: var(--lx-brass-400); }

.lx-display {
  font-family: var(--lx-serif);
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 600;
}

.lx-h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.018em;
}

.lx-h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.28;
}

.lx-lede {
  font-size: 1.1875rem;
  line-height: 1.68;
  color: var(--lx-muted);
}

@media (min-width: 768px) {
  .lx-lede { font-size: 1.28rem; }
}

.lx-surface-navy .lx-lede { color: var(--lx-navy-300); }

/* A serif pull-quote / editorial note */
.lx-note {
  font-family: var(--lx-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--lx-navy-700);
  border-left: 2px solid var(--lx-brass-500);
  padding-left: 1.25rem;
}

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

.lx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--lx-sans);
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: 0.005em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--lx-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  text-align: center;
}

.lx-btn:active { transform: translateY(1px); }

.lx-btn-primary {
  background: var(--lx-navy-800);
  color: #fff;
  border-color: var(--lx-navy-800);
}
.lx-btn-primary:hover { background: var(--lx-navy-600); border-color: var(--lx-navy-600); }

.lx-btn-outline {
  background: transparent;
  color: var(--lx-navy-800);
  border-color: var(--lx-hairline-strong);
}
.lx-btn-outline:hover { border-color: var(--lx-navy-800); background: rgba(18, 33, 53, .04); }

.lx-btn-onnavy {
  background: var(--lx-sand-100);
  color: var(--lx-navy-900);
  border-color: var(--lx-sand-100);
}
.lx-btn-onnavy:hover { background: #fff; border-color: #fff; }

.lx-btn-ghost-onnavy {
  background: transparent;
  color: var(--lx-sand-100);
  border-color: rgba(255, 255, 255, .28);
}
.lx-btn-ghost-onnavy:hover { border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .06); }

/* Quiet text link with an animated rule */
.lx-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 550;
  font-size: 0.9375rem;
  color: var(--lx-navy-700);
  border-bottom: 1px solid var(--lx-brass-400);
  padding-bottom: 1px;
  transition: color .18s ease, border-color .18s ease;
}
.lx-link:hover { color: var(--lx-brass-600); border-color: var(--lx-brass-600); }

.lx-surface-navy .lx-link { color: var(--lx-sand-100); border-color: var(--lx-brass-400); }
.lx-surface-navy .lx-link:hover { color: var(--lx-brass-400); }

/* --------------------------------------------------------------------------
   Cards & panels
   -------------------------------------------------------------------------- */

.lx-card {
  background: #fff;
  border: 1px solid var(--lx-hairline);
  border-radius: var(--lx-radius-lg);
  padding: 1.875rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.lx-card-hover:hover {
  border-color: var(--lx-hairline-strong);
  box-shadow: 0 1px 2px rgba(18, 33, 53, .04), 0 12px 32px -18px rgba(18, 33, 53, .35);
}

.lx-panel {
  background: #fff;
  border: 1px solid var(--lx-hairline);
  border-radius: var(--lx-radius-lg);
}

/* Numbered / iconed feature glyph */
.lx-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--lx-radius);
  background: var(--lx-sand-100);
  border: 1px solid var(--lx-hairline);
  color: var(--lx-navy-700);
  flex: none;
}

.lx-surface-navy .lx-glyph {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  color: var(--lx-brass-400);
}

/* Small capsule label */
.lx-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: 0.75rem;
  font-weight: 550;
  letter-spacing: .02em;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--lx-sand-100);
  border: 1px solid var(--lx-hairline);
  color: var(--lx-navy-700);
}

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

.lx-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 245, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--lx-hairline);
}

.lx-navlink {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--lx-body);
  padding: 0.45rem 0;
  position: relative;
  transition: color .18s ease;
}
.lx-navlink:hover { color: var(--lx-navy-800); }

.lx-navlink[aria-current="page"] { color: var(--lx-navy-800); font-weight: 600; }
.lx-navlink[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--lx-brass-500);
}

.lx-wordmark {
  font-family: var(--lx-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--lx-navy-900);
  line-height: 1;
}

/* Mobile drawer */
#lx-mobile-nav[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Logo strip (fictional client wordmarks)
   -------------------------------------------------------------------------- */

.lx-logo-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  align-items: center;
}

@media (min-width: 640px) { .lx-logo-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lx-logo-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.lx-logo-strip svg {
  width: 100%;
  height: auto;
  max-height: 30px;
  color: var(--lx-navy-800);
  opacity: .55;
  transition: opacity .2s ease;
}
.lx-logo-strip a:hover svg,
.lx-logo-strip li:hover svg { opacity: .85; }

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.lx-stat-value {
  font-family: var(--lx-serif);
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--lx-navy-800);
}
.lx-surface-navy .lx-stat-value { color: #fff; }

.lx-stat-label {
  font-size: 0.875rem;
  color: var(--lx-muted);
  margin-top: .625rem;
}
.lx-surface-navy .lx-stat-label { color: var(--lx-navy-300); }

/* --------------------------------------------------------------------------
   Tables (pricing comparison, sub-processors)
   -------------------------------------------------------------------------- */

.lx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.lx-table th,
.lx-table td {
  text-align: left;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--lx-hairline);
  vertical-align: top;
}

.lx-table thead th {
  font-family: var(--lx-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lx-muted);
  border-bottom-color: var(--lx-hairline-strong);
  white-space: nowrap;
}

.lx-table tbody tr:hover { background: var(--lx-sand-50); }

.lx-table .lx-row-head {
  font-weight: 550;
  color: var(--lx-ink);
}

.lx-table-group td {
  background: var(--lx-sand-100);
  font-family: var(--lx-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lx-navy-700);
}
.lx-table-group td:hover { background: var(--lx-sand-100); }

.lx-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   Prose — blog articles and legal pages
   -------------------------------------------------------------------------- */

.lx-prose {
  color: var(--lx-body);
  font-size: 1.0625rem;
  line-height: 1.78;
}

.lx-prose > * + * { margin-top: 1.375rem; }

.lx-prose h2 {
  font-size: 1.65rem;
  margin-top: 3rem;
  margin-bottom: -0.25rem;
  line-height: 1.25;
}

.lx-prose h3 {
  font-size: 1.24rem;
  margin-top: 2.25rem;
  margin-bottom: -0.4rem;
  line-height: 1.32;
}

.lx-prose ul,
.lx-prose ol { padding-left: 1.35rem; }
.lx-prose ul { list-style: disc; }
.lx-prose ol { list-style: decimal; }
.lx-prose li + li { margin-top: 0.5rem; }
.lx-prose li::marker { color: var(--lx-sand-400); }

.lx-prose a {
  color: var(--lx-navy-700);
  border-bottom: 1px solid var(--lx-brass-400);
  transition: color .18s ease;
}
.lx-prose a:hover { color: var(--lx-brass-600); }

.lx-prose strong { color: var(--lx-ink); font-weight: 600; }

.lx-prose blockquote {
  font-family: var(--lx-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--lx-navy-700);
  border-left: 2px solid var(--lx-brass-500);
  padding-left: 1.5rem;
  margin-block: 2.25rem;
}

.lx-prose hr {
  border: 0;
  border-top: 1px solid var(--lx-hairline);
  margin-block: 2.75rem;
}

.lx-prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.lx-prose th, .lx-prose td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--lx-hairline); }
.lx-prose thead th { font-family: var(--lx-sans); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--lx-muted); }

/* Numbered clause list used on privacy / terms */
.lx-clauses { counter-reset: clause; }
.lx-clauses > section { counter-increment: clause; }
.lx-clauses > section > h2::before {
  content: counter(clause) ".";
  color: var(--lx-brass-500);
  font-variant-numeric: tabular-nums;
  margin-right: .6rem;
}

/* --------------------------------------------------------------------------
   Forms (render only — nothing submits)
   -------------------------------------------------------------------------- */

.lx-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--lx-ink);
  margin-bottom: .4rem;
}

.lx-input,
.lx-select,
.lx-textarea {
  width: 100%;
  font-family: var(--lx-sans);
  font-size: 0.9375rem;
  color: var(--lx-ink);
  background: #fff;
  border: 1px solid var(--lx-hairline-strong);
  border-radius: var(--lx-radius);
  padding: 0.7rem 0.85rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.lx-textarea { min-height: 8.5rem; resize: vertical; }

.lx-input:focus,
.lx-select:focus,
.lx-textarea:focus {
  outline: none;
  border-color: var(--lx-navy-600);
  box-shadow: 0 0 0 3px rgba(36, 66, 95, .12);
}

.lx-input::placeholder,
.lx-textarea::placeholder { color: var(--lx-sand-400); }

.lx-help { font-size: 0.8125rem; color: var(--lx-muted); }

.lx-form-notice {
  border: 1px solid var(--lx-brass-400);
  background: #fdfbf6;
  border-radius: var(--lx-radius);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--lx-navy-700);
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.lx-tier {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--lx-hairline);
  border-radius: var(--lx-radius-lg);
  padding: 2rem;
}

.lx-tier-featured {
  border-color: var(--lx-navy-700);
  box-shadow: 0 1px 2px rgba(18, 33, 53, .05), 0 20px 46px -26px rgba(18, 33, 53, .5);
  position: relative;
}

.lx-price {
  font-family: var(--lx-serif);
  font-size: 2.85rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--lx-ink);
  font-variant-numeric: tabular-nums;
}

.lx-check { color: var(--lx-brass-500); flex: none; margin-top: .3rem; }

/* Billing toggle */
.lx-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--lx-sand-100);
  border: 1px solid var(--lx-hairline);
  border-radius: 999px;
}
.lx-toggle button {
  font-size: 0.8125rem;
  font-weight: 550;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  color: var(--lx-muted);
  transition: background .18s ease, color .18s ease;
}
.lx-toggle button[aria-pressed="true"] {
  background: #fff;
  color: var(--lx-navy-800);
  box-shadow: 0 1px 2px rgba(18, 33, 53, .12);
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */

/* Static map placeholder — drawn purely in CSS, no tiles requested */
.lx-map {
  position: relative;
  border-radius: var(--lx-radius-lg);
  border: 1px solid var(--lx-hairline);
  background-color: var(--lx-sand-100);
  background-image:
    linear-gradient(var(--lx-sand-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--lx-sand-200) 1px, transparent 1px),
    linear-gradient(115deg, transparent 46%, var(--lx-sand-300) 46%, var(--lx-sand-300) 49%, transparent 49%),
    linear-gradient(28deg, transparent 62%, var(--lx-sand-300) 62%, var(--lx-sand-300) 65%, transparent 65%);
  background-size: 28px 28px, 28px 28px, 100% 100%, 100% 100%;
  overflow: hidden;
}

.lx-map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  color: var(--lx-navy-800);
}

/* Article meta row */
.lx-meta {
  font-size: 0.8125rem;
  color: var(--lx-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.lx-meta .sep { color: var(--lx-sand-400); }

/* Footer */
.lx-footer-head {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lx-brass-400);
  margin-bottom: 1rem;
}

.lx-footer a {
  font-size: 0.9rem;
  color: var(--lx-navy-300);
  transition: color .18s ease;
}
.lx-footer a:hover { color: #fff; }

/* Skip link */
.lx-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--lx-navy-800);
  color: #fff;
  padding: .75rem 1.25rem;
  font-size: .875rem;
  border-radius: 0 0 var(--lx-radius) 0;
}
.lx-skip:focus { left: 0; }

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