/*
  JURISTI — Shared Stylesheet
  Fonts: Playfair Display (editorial headings) + Inter (UI/body)
  Themes: Light (default) · Dark (via [data-theme="dark"] on <html>)
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─────────────────────────────────────────
   THEME VARIABLES
───────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:           #F5F4F0;
  --bg-alt:       #ECEBE5;
  --surface:      #FFFFFF;
  --surface-2:    #F2F1ED;
  --surface-3:    #E8E7E2;

  /* Brand */
  --navy:         #0F1C3F;
  --navy-mid:     #1A3264;
  --navy-light:   #E6EAF4;
  --gold:         #C9A96E;
  --gold-muted:   rgba(201,169,110,0.12);
  --gold-border:  rgba(201,169,110,0.28);

  /* Text */
  --text:         #0A0A0A;
  --text-2:       #2C2C2C;
  --text-3:       #5A5A5A;
  --text-4:       #9A9A9A;

  /* Borders */
  --border:       #E0DED8;
  --border-2:     #C9C7C0;

  /* Semantic */
  --success:      #1A6B40;
  --success-bg:   rgba(26,107,64,0.07);
  --error:        #B83232;
  --error-bg:     rgba(184,50,50,0.07);
  --warning:      #A05F0A;
  --warning-bg:   rgba(160,95,10,0.08);

  /* Shadows */
  --shadow-sm:    0 1px 2px rgba(15,28,63,0.05), 0 1px 4px rgba(15,28,63,0.04);
  --shadow:       0 4px 16px rgba(15,28,63,0.08), 0 1px 4px rgba(15,28,63,0.05);
  --shadow-lg:    0 20px 64px rgba(15,28,63,0.11), 0 6px 16px rgba(15,28,63,0.06);
  --shadow-xl:    0 40px 100px rgba(15,28,63,0.14), 0 12px 32px rgba(15,28,63,0.07);

  /* Antigravity orb colors */
  --orb-1:        #1A3264;
  --orb-2:        #C9A96E;
  --orb-3:        #0F1C3F;
  --orb-opacity:  0.09;

  /* Radii */
  --r-sm:   4px;
  --r:      8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;

  /* Fonts */
  --serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:   'JetBrains Mono', 'Fira Code', monospace;

  /* Timing */
  --t:      0.18s ease;
  --t-md:   0.30s ease;
  --t-lg:   0.50s cubic-bezier(0.4,0,0.2,1);

  --nav-h:    64px;
  --logo-blue: #2B40D4;
}

[data-theme="dark"] {
  --bg:           #0B0B10;
  --bg-alt:       #101018;
  --surface:      #16161E;
  --surface-2:    #1D1D27;
  --surface-3:    #242432;

  --navy:         #818CF8;
  --navy-mid:     #9198F5;
  --navy-light:   rgba(129,140,248,0.12);
  --gold:         #D4B47A;
  --gold-muted:   rgba(212,180,122,0.10);
  --gold-border:  rgba(212,180,122,0.22);

  --text:         #EEEDe8;
  --text-2:       #BDBCB5;
  --text-3:       #7E7D76;
  --text-4:       #4C4C47;

  --border:       rgba(255,255,255,0.08);
  --border-2:     rgba(255,255,255,0.14);

  --success:      #3DBE7A;
  --success-bg:   rgba(61,190,122,0.09);
  --error:        #E06060;
  --error-bg:     rgba(224,96,96,0.09);
  --warning:      #DDA030;
  --warning-bg:   rgba(221,160,48,0.09);

  --shadow-sm:    0 1px 4px rgba(0,0,0,0.25);
  --shadow:       0 4px 16px rgba(0,0,0,0.30);
  --shadow-lg:    0 20px 64px rgba(0,0,0,0.45);
  --shadow-xl:    0 40px 100px rgba(0,0,0,0.60);

  --orb-1:        #4F46E5;
  --orb-2:        #7C3AED;
  --orb-3:        #1E3A8A;
  --orb-opacity:  0.07;
  --logo-blue: #4D62E8;
}

/* ─────────────────────────────────────────
   STARFIELD CANVAS
───────────────────────────────────────── */
.sf-global {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.sf-chat {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ─────────────────────────────────────────
   RESET
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--t-md), color var(--t-md);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--sans); border: none; background: none; }
input, textarea, select { font-family: var(--sans); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
h1, .h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}
h2, .h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.02em;
  color: var(--text);
}
h3, .h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
h4, .h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-4);
}
p { color: var(--text-3); line-height: 1.72; }
strong { font-weight: 600; color: var(--text-2); }

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 10px 32px; }
.section { padding: 96px 0; position: relative; }

/* ─────────────────────────────────────────
   SECTION LABELS (editorial style)
───────────────────────────────────────── */
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--navy);
}
.label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--navy);
  opacity: 0.5;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .label { justify-content: center; }
.section-header .label::before { display: none; }
.section-header .label::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--navy);
  opacity: 0.5;
}
.section-title { margin: 12px 0; }
.section-sub { max-width: 500px; margin: 0 auto; font-size: 1.05rem; }

/* ─────────────────────────────────────────
   ANTIGRAVITY BACKGROUND ORBS
───────────────────────────────────────── */
.orb-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: var(--orb-opacity);
}
.orb-1 {
  width: 750px; height: 750px;
  background: radial-gradient(circle at 35% 35%, var(--orb-1) 0%, transparent 65%);
  top: -220px; left: -220px;
  animation: f1 34s ease-in-out infinite;
}
.orb-2 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--orb-2) 0%, transparent 65%);
  top: 28%; right: -160px;
  animation: f2 28s ease-in-out infinite;
}
.orb-3 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--orb-3) 0%, transparent 65%);
  bottom: -120px; left: 32%;
  animation: f3 38s ease-in-out infinite;
}
.orb-4 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--orb-2) 0%, transparent 65%);
  top: 65%; left: -80px;
  opacity: calc(var(--orb-opacity) * 0.55);
  animation: f4 44s ease-in-out infinite;
}
@keyframes f1 {
  0%,100% { transform: translate(0,0) scale(1); }
  25% { transform: translate(50px,-80px) scale(1.05); }
  55% { transform: translate(-30px,-110px) scale(0.97); }
  80% { transform: translate(70px,-50px) scale(1.03); }
}
@keyframes f2 {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(-55px,-70px) scale(1.07); }
  66% { transform: translate(35px,85px) scale(0.95); }
}
@keyframes f3 {
  0%,100% { transform: translate(0,0) scale(1); }
  20% { transform: translate(-45px,-55px) scale(1.06); }
  50% { transform: translate(55px,-30px) scale(0.97); }
  75% { transform: translate(-25px,45px) scale(1.04); }
}
@keyframes f4 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(90px,-110px); }
}

/* All content layers above orbs */
nav, main, footer, .cookie-banner, header { position: relative; z-index: 1; }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: all var(--t);
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
}
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-outline:hover { background: var(--surface-2); color: var(--text); border-color: var(--navy); }
.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; }
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 4px 16px var(--gold-muted); }
.btn-ghost { background: transparent; color: var(--text-3); border: none; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-lg { padding: 14px 30px; font-size: 0.95rem; border-radius: var(--r-md); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-xs { padding: 5px 10px; font-size: 0.75rem; }
.btn-icon { padding: 9px; }

/* ─────────────────────────────────────────
   BADGES
───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid;
}
.badge-navy { background: var(--navy-light); color: var(--navy); border-color: rgba(15,28,63,0.14); }
[data-theme="dark"] .badge-navy { border-color: rgba(129,140,248,0.28); }
.badge-gold { background: var(--gold-muted); color: var(--gold); border-color: var(--gold-border); }
.badge-success { background: var(--success-bg); color: var(--success); border-color: rgba(26,107,64,0.18); }
[data-theme="dark"] .badge-success { border-color: rgba(61,190,122,0.25); }

/* ─────────────────────────────────────────
   CARD
───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--t-md), box-shadow var(--t-md);
}
.card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }

/* ─────────────────────────────────────────
   INPUTS
───────────────────────────────────────── */
.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--t);
}
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-light); }
[data-theme="dark"] .input:focus { box-shadow: 0 0 0 3px rgba(129,140,248,0.15); }
.input::placeholder { color: var(--text-4); }

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  transition: background var(--t-md), border-color var(--t-md), box-shadow var(--t-md);
}
.nav.scrolled {
  background: rgba(245,244,240,0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .nav.scrolled { background: rgba(11,11,16,0.93); }

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo-mark {
  position: relative;
  width: 30px;
  height: 42px;
  flex-shrink: 0;
  overflow: visible;
}
.logo-mark .lm-s {
  position: absolute;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.logo-mark .lm-j {
  position: absolute;
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--logo-blue);
  line-height: 1;
  left: 5%;
  top: 45%;
  transform: translateY(-50%);
  z-index: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-3);
  font-weight: 500;
  transition: color var(--t);
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: all var(--t);
  cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 44px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 0.85rem; max-width: 250px; }
.footer-col h4 { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; color: var(--text-4); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { font-size: 0.85rem; color: var(--text-3); transition: color var(--t); }
.footer-col ul a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-4);
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-4); transition: color var(--t); }
.footer-links a:hover { color: var(--text-3); }

/* ─────────────────────────────────────────
   COOKIE BANNER
───────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
  animation: slideUp 0.4s ease;
}
.cookie-banner.show { display: block; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.cookie-text { font-size: 0.8rem; color: var(--text-3); line-height: 1.6; margin-bottom: 14px; }
.cookie-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* ─────────────────────────────────────────
   REVEAL ANIMATIONS
───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ─────────────────────────────────────────
   LEGAL PAGES
───────────────────────────────────────── */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 100px 32px 80px;
}
.legal-content h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 8px; }
.legal-content .legal-date { font-size: 0.82rem; color: var(--text-4); margin-bottom: 48px; }
.legal-content h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 40px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.legal-content h3 { font-size: 1rem; font-weight: 600; margin: 24px 0 8px; color: var(--text-2); }
.legal-content p { margin-bottom: 14px; font-size: 0.92rem; color: var(--text-3); }
.legal-content ul, .legal-content ol { padding-left: 20px; margin-bottom: 14px; }
.legal-content li { font-size: 0.92rem; color: var(--text-3); margin-bottom: 6px; line-height: 1.65; }
.legal-content a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* ─────────────────────────────────────────
   HAMBURGER MENU
───────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color var(--t), background var(--t);
}
.hamburger:hover { background: var(--surface-2); border-color: var(--border-2); }
.hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text-3);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease, width 0.22s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 199;
  padding: 20px 24px 28px;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}
.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
}
.mobile-nav .nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
}
.mobile-nav .nav-links li { border-bottom: 1px solid var(--border); }
.mobile-nav .nav-links li:last-child { border-bottom: none; }
.mobile-nav .nav-links a {
  display: block;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
}
.mobile-nav .nav-links a:hover { color: var(--navy); }

/* Action buttons inside mobile drawer */
.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
.mobile-nav-actions .btn {
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 12px 16px;
  font-size: 0.95rem;
}

/* Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 198;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.mobile-nav-overlay.open { opacity: 1; }

/* ─────────────────────────────────────────
   RESPONSIVE — TABLET (≤960px)
───────────────────────────────────────── */
@media (max-width: 960px) {
  .container { padding: 0 20px; }

  /* Show hamburger, hide desktop nav */
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .nav-links { display: none; }

  /* Hide nav CTA buttons — they move into the mobile drawer */
  .nav-actions .btn { display: none; }

  /* Section spacing */
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 44px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ─────────────────────────────────────────
   RESPONSIVE — MOBILE (≤640px)
───────────────────────────────────────── */
@media (max-width: 640px) {
  /* Typography scale-down */
  h1, .h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); }
  h2, .h2 { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* Section */
  .section { padding: 48px 0; }
  .section-header { margin-bottom: 32px; }
  .section-sub { font-size: 0.95rem; }

  /* Hero layouts: force single column */
  .hero-grid,
  .hero-inner,
  [class*="hero-col"],
  .features-grid,
  .pricing-grid,
  .how-grid,
  .testimonials-grid,
  .steps-grid {
    grid-template-columns: 1fr !important;
  }

  /* Pricing cards: full-width stack */
  .pricing-grid { gap: 16px; }
  .pricing-card { max-width: 100%; }

  /* Auth cards */
  .auth-card { padding: 24px 18px; }

  /* Buttons — slightly larger tap target on mobile */
  .btn-lg { padding: 13px 24px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* Cookie banner */
  .cookie-banner { left: 10px; right: 10px; max-width: none; padding: 16px; }

  /* Legal pages */
  .legal-content { padding: 80px 18px 60px; }
}

/* ─────────────────────────────────────────
   RESPONSIVE — SMALL (≤420px)
───────────────────────────────────────── */
@media (max-width: 420px) {
  .container { padding: 0 14px; }
  .auth-card { padding: 20px 14px; }
  .btn { padding: 10px 16px; }
}
