/* ============================================
   NeuroLaw — Shared Design System
   Aesthetic: calm, editorial, cognitive
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand palette */
  --lavender: #B8A4E3;
  --lavender-soft: #D9CDF0;
  --lavender-pale: #F0EAFB;
  --teal: #4FB8B0;
  --teal-soft: #8FD1CC;
  --teal-pale: #E3F4F2;
  --navy: #1A2E4A;
  --navy-deep: #0F1D30;
  --navy-soft: #2C4468;

  /* Neutrals */
  --cream: #FBF8F3;
  --cream-warm: #F5EFE3;
  --ink: #141821;
  --ink-soft: #4A5068;
  --ink-muted: #8A90A3;
  --line: #E5DFD3;

  /* Accent */
  --accent-warm: #E8B88A;

  /* Gradients */
  --brand-gradient: linear-gradient(135deg, #B8A4E3 0%, #4FB8B0 55%, #1A2E4A 100%);
  --sky-gradient: linear-gradient(180deg, #F0EAFB 0%, #E3F4F2 50%, #FBF8F3 100%);

  /* Typography */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Spacing */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.08 0 0 0 0 0.13 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ Typography ============ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--navy-deep);
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variation-settings: "opsz" 144;
}

h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); }

p { color: var(--ink-soft); }

a { color: var(--navy); text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.65; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: currentColor;
}

/* Italic serif emphasis — editorial pulse */
.italic-display {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

/* ============ Layout ============ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

section { position: relative; z-index: 2; }

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(251, 248, 243, 0.78);
  border-bottom: 1px solid rgba(229, 223, 211, 0.6);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.1rem;
}

.logo-neuro {
  background: linear-gradient(100deg, #B8A4E3 0%, #4FB8B0 55%, #1A2E4A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 600;
}

.logo-law {
  color: var(--navy-deep);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  align-items: center;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--ink-soft);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a.active { color: var(--navy-deep); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 1px;
  background: var(--teal);
}

.nav-links a:hover { opacity: 1; color: var(--navy-deep); }

.nav-cta {
  padding: 0.55rem 1.15rem;
  background: var(--navy-deep);
  color: var(--cream) !important;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
}
.nav-cta:hover { background: var(--navy); opacity: 1 !important; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
}
.mobile-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--navy-deep);
  margin: 5px 0;
  transition: 0.25s;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.9rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--navy-deep);
  color: var(--cream);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 10px 30px -12px rgba(26, 46, 74, 0.4);
}
.btn-primary:hover {
  background: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 14px 36px -12px rgba(26, 46, 74, 0.55);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--navy-deep);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--navy);
  background: rgba(26, 46, 74, 0.03);
  opacity: 1;
}

.btn-arrow::after {
  content: '→';
  transition: transform 0.25s ease;
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ============ Footer ============ */
.footer {
  margin-top: 7rem;
  padding: 5rem 0 2.5rem;
  background: var(--navy-deep);
  color: var(--cream);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 164, 227, 0.6), rgba(79, 184, 176, 0.6), transparent);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 11rem);
  line-height: 0.9;
  font-weight: 300;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px rgba(251, 248, 243, 0.18);
  margin-bottom: 3rem;
  letter-spacing: -0.04em;
  user-select: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(251, 248, 243, 0.1);
}

.footer h4 {
  color: var(--lavender-soft);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 0.7rem; }
.footer a { color: rgba(251, 248, 243, 0.7); font-size: 0.92rem; }
.footer a:hover { color: var(--cream); opacity: 1; }

.footer-tagline {
  color: rgba(251, 248, 243, 0.55);
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.6;
  margin-top: 1rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 2rem;
  font-size: 0.82rem;
  color: rgba(251, 248, 243, 0.5);
}

.footer-credit {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(251, 248, 243, 0.08);
  font-size: 0.82rem;
  color: rgba(251, 248, 243, 0.5);
  text-align: center;
  letter-spacing: 0.01em;
}
.footer-credit a {
  font-weight: 500;
  background: linear-gradient(100deg, #D9CDF0 0%, #8FD1CC 60%, #FBF8F3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  transition: opacity 0.25s ease;
}
.footer-credit a:hover { opacity: 0.75; }

/* ============ Utilities ============ */
.divider-dot {
  display: inline-block;
  width: 3px; height: 3px;
  background: var(--teal);
  border-radius: 50%;
  margin: 0 0.8rem;
  vertical-align: middle;
}

/* ============ Animations ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(15px, -10px) rotate(2deg); }
}

.reveal {
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.2s; }
.reveal-3 { animation-delay: 0.35s; }
.reveal-4 { animation-delay: 0.5s; }
.reveal-5 { animation-delay: 0.65s; }

/* ============ Responsive ============ */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    padding: 1rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open li { width: 100%; padding: 0.6rem 0; border-bottom: 1px solid rgba(229, 223, 211, 0.5); }
  .mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}
