/* ============================================================
   Lane Foundation — Design System & Styles
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --background: hsl(0 0% 100%);
  --foreground: hsl(215 25% 15%);
  --primary: hsl(215 40% 20%);
  --primary-foreground: hsl(0 0% 98%);
  --secondary: hsl(210 15% 92%);
  --secondary-foreground: hsl(215 40% 20%);
  --muted: hsl(210 15% 95%);
  --muted-foreground: hsl(215 15% 45%);
  --accent: hsl(195 100% 45%);
  --accent-foreground: hsl(0 0% 100%);
  --border: hsl(215 15% 88%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(215 25% 15%);
  --radius: 0.5rem;
  --shadow-sm: 0 1px 2px 0 hsl(215 25% 15% / 0.05);
  --shadow-md: 0 4px 6px -1px hsl(215 25% 15% / 0.1);
  --shadow-lg: 0 10px 15px -3px hsl(215 25% 15% / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--border);
}

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

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-feature-settings: "rlig" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: hsl(0 0% 100% / 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: opacity 0.3s;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-logo .caret {
  font-weight: 900;
  color: var(--accent);
}

/* Desktop links */
.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.3s;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--foreground);
}

.nav-link.active {
  color: var(--foreground);
  border-bottom-color: var(--accent);
}

/* Mobile menu button */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--foreground);
  transition: background 0.2s;
}

.nav-toggle:hover {
  background: var(--muted);
}

.nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Mobile menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile .nav-link {
  border-bottom: none;
  padding-bottom: 0;
}

.nav-mobile .nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

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

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: hsl(215 40% 25%);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background: hsl(210 15% 86%);
}

.btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.btn-full {
  width: 100%;
}

/* Card button (non-interactive visual) */
.btn-card {
  pointer-events: none;
  margin-top: 1rem;
}

/* --- Cards --- */
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.card-padded {
  padding: 1.5rem;
}

.card-bordered {
  border-width: 2px;
}

.card-accent-top {
  border-top: 4px solid var(--accent);
}

/* Homepage cards: border-top transitions from border to accent on hover */
.card-hover-accent-top {
  border-top: 4px solid var(--border);
}

.card-hover-accent-top:hover {
  border-top-color: var(--accent);
}

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

.card-lift:hover {
  transform: translateY(-0.25rem);
}

/* --- Sections --- */
.section {
  padding: 6rem 0;
}

.section-muted {
  background: hsl(210 15% 95% / 0.3);
}

.section-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* --- Hero (fund pages) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    hsl(0 0% 100% / 0.5),
    hsl(0 0% 100% / 0.8),
    var(--background)
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
  padding: 8rem 0;
}

.hero-content > * + * {
  margin-top: 2rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

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

/* --- Homepage --- */
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

.home-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.home-heading h1 {
  font-size: 1.875rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  word-break: break-word;
}

.typing-caret {
  color: var(--accent);
  transition: opacity 0.1s;
}

.typing-caret.hidden {
  opacity: 0;
}

/* Homepage card grid */
.home-grid {
  max-width: 56rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.home-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  height: 100%;
}

.home-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.home-card p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  flex-grow: 1;
}

/* Home footer */
.home-footer {
  position: absolute;
  bottom: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* --- Content Sections --- */
.section-header {
  text-align: center;
}

.section-header > * + * {
  margin-top: 1rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.accent-bar {
  height: 0.25rem;
  width: 6rem;
  background: var(--accent);
  margin: 0 auto;
  border-radius: 9999px;
}

/* Content cards (mission, story) */
.content-card {
  padding: 2rem;
}

.content-card > * + * {
  margin-top: 1.5rem;
}

.content-card p {
  font-size: 1.125rem;
  line-height: 1.75;
}

.content-card .emphasis {
  font-weight: 600;
  font-size: 1.25rem;
  padding-top: 1rem;
}

/* Impact / Focus area grids */
.impact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.impact-card {
  padding: 2rem;
}

.impact-card > * + * {
  margin-top: 1rem;
}

.impact-card h3 {
  font-size: 1.5rem;
}

.impact-card p {
  color: var(--muted-foreground);
  line-height: 1.75;
}

/* Blockquote */
.quote {
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
  text-wrap: balance;
  line-height: 1.6;
  max-width: 56rem;
  margin: 0 auto;
}

/* CTA section */
.cta-inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.cta-inner > * + * {
  margin-top: 2rem;
}

.cta-inner h2 {
  font-size: 2rem;
  font-weight: 700;
  text-wrap: balance;
}

.cta-inner p {
  font-size: 1.25rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  padding-top: 1rem;
}

/* --- Footer --- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
}

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

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--foreground);
}

/* Notice box (about page) */
.notice {
  margin-top: 2rem;
  padding: 1.5rem;
  background: hsl(210 15% 95% / 0.5);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.notice p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.notice strong {
  color: var(--foreground);
  font-weight: 600;
}

/* Funds grid (about page) */
.funds-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.fund-card {
  padding: 2rem;
  height: 100%;
}

.fund-card > * + * {
  margin-top: 1rem;
}

.fund-card h3 {
  font-size: 1.5rem;
  transition: color 0.3s;
}

.fund-card:hover h3 {
  color: var(--accent);
}

.fund-card p {
  color: var(--muted-foreground);
  line-height: 1.75;
}

/* 404 page */
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
}

.not-found-inner {
  text-align: center;
}

.not-found h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.not-found p {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.not-found a {
  color: var(--primary);
  text-decoration: underline;
  transition: opacity 0.3s;
}

.not-found a:hover {
  opacity: 0.9;
}

/* --- SVG Icons (inline) --- */
.icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

/* --- Max-width helpers --- */
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.text-center { text-align: center; }

/* --- Spacing helpers --- */
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-12 > * + * { margin-top: 3rem; }
.pt-top { padding-top: 8rem; }

/* ============================================================
   Responsive
   ============================================================ */

/* sm: 640px */
@media (min-width: 640px) {
  .home {
    padding: 0 1.5rem;
  }

  .home-heading {
    margin-bottom: 3rem;
  }

  .home-heading h1 {
    font-size: 2.25rem;
  }

  .home-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .home-card {
    padding: 2rem;
  }

  .home-card h3 {
    font-size: 1.5rem;
  }

  .home-card p {
    font-size: 1rem;
  }

  .nav-inner {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .nav-logo {
    font-size: 1.125rem;
  }

  .cta-buttons {
    flex-direction: row;
  }
}

/* md: 768px */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .home-heading h1 {
    font-size: 3.75rem;
  }

  .home-heading {
    margin-bottom: 4rem;
  }

  .home-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-title {
    font-size: 4.5rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .content-card {
    padding: 3rem;
  }

  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote {
    font-size: 1.875rem;
  }

  .cta-inner h2 {
    font-size: 2.5rem;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .footer-copy {
    text-align: left;
  }

  .funds-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* lg: 1024px */
@media (min-width: 1024px) {
  .home-heading h1 {
    font-size: 4.5rem;
  }

  .nav-links {
    gap: 2rem;
  }

  .impact-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .section-title {
    font-size: 3rem;
  }

  .cta-inner h2 {
    font-size: 3rem;
  }
}
