:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --slate-800: #1e293b;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(to bottom, #f7f9fc, #e9edf5);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  line-height: 1.6;
  color: var(--gray-800);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: var(--blue-600);
}

section {
  padding: 3rem 0;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--gray-900);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.site-nav {
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  position: relative;
}

.logo {
  color: var(--blue-900);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-top: 0.15rem;
}

.nav-toggle {
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--blue-900);
  border-radius: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.25rem;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.nav-links li a {
  color: var(--gray-800);
  text-decoration: none;
  display: block;
  padding: 0.75rem 0.5rem;
  font-weight: 500;
}

.nav-links li a:hover {
  color: var(--blue-600);
}

.nav-links.is-open {
  display: block;
}

.nav-cta {
  display: none;
  text-decoration: none;
  background: var(--blue-600);
  color: var(--white);
  padding: 0.65rem 1rem;
  border-radius: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--blue-700);
}

.hero {
  background: transparent;
  padding: 4rem 0 3rem;
  text-align: center;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  color: var(--gray-500);
  max-width: 780px;
  margin: 0 auto 1rem;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
}

.hero-headline {
  color: var(--gray-800);
  transition: opacity 0.5s ease-in-out;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  max-width: 800px;
  margin: 0 auto 1.5rem;
  min-height: 3.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: none;
  text-decoration: none;
  border-radius: 0.6rem;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-blue {
  background: var(--blue-600);
  color: var(--white);
}

.btn-blue:hover {
  background: var(--blue-700);
}

.btn-outline {
  background: var(--white);
  color: var(--blue-700);
  border: 1px solid var(--blue-600);
}

.btn-outline:hover {
  background: var(--blue-50);
}

.btn-dark {
  background: #1a2e44;
  color: var(--white);
  font-size: 1.1rem;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  margin-top: 1.5rem;
}

.stats-bar {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1d4ed8;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.star-gold {
  color: #c89d6f !important;
}

.ask-vandy-section {
  padding-top: 1rem;
}

.ask-vandy-section .container {
  max-width: 48rem;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.question-button {
  border: none;
  text-align: left;
  background: #dbeafe;
  color: #1e3a8a;
  border-radius: 1.5rem;
  padding: 0.75rem 1rem;
  min-height: 44px;
  cursor: pointer;
  font-weight: 500;
}

.main-chat-input-wrap {
  position: relative;
}

.main-chat-input {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  padding: 0.8rem 6.2rem 0.8rem 1rem;
  font-size: 1rem;
}

.main-chat-submit {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--blue-600);
  color: var(--white);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  min-height: 40px;
  cursor: pointer;
}

.differentiator {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-600);
  padding: 1rem 1.2rem;
  border-radius: 0.4rem;
  text-align: center;
}

.section-light {
  background: rgba(255, 255, 255, 0.65);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2,
.grid-3,
.grid-4 {
  grid-template-columns: 1fr;
}

.card {
  background: var(--white);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.13);
}

.site-footer {
  background: var(--slate-800);
  color: var(--white);
  padding: 2.5rem 0 1rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 1.25rem;
  padding-top: 1rem;
  font-size: 0.9rem;
}

.chat-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.7);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.chat-modal.is-open {
  display: flex;
}

.chat-modal-content {
  width: min(640px, 100%);
  background: var(--white);
  border-radius: 0.9rem 0.9rem 0 0;
  overflow: hidden;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  animation: chat-up 0.28s ease-out;
}

@keyframes chat-up {
  from {
    transform: translateY(16px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.chat-modal-header {
  background: var(--blue-600);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

.chat-modal-header h3 {
  color: var(--white);
  margin: 0;
}

.chat-modal-header button {
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

.chat-modal-messages {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  background: var(--gray-50);
}

.chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.85rem;
  margin-bottom: 0.6rem;
  word-break: break-word;
}

.chat-msg-user {
  margin-left: auto;
  background: var(--blue-600);
  color: var(--white);
}

.chat-msg-bot {
  background: var(--gray-100);
  color: var(--gray-900);
}

.chat-typing {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1rem 0.75rem;
}

.chat-typing.is-visible {
  display: flex;
}

.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gray-500);
  animation: dot-bounce 1s infinite ease-in-out;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-error {
  display: none;
  color: #b91c1c;
  font-size: 0.92rem;
  margin: 0;
  padding: 0 1rem 0.75rem;
}

.chat-error.is-visible {
  display: block;
}

.chat-modal-input-row {
  border-top: 1px solid var(--gray-200);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--white);
}

.chat-modal-input-row input {
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0 0.75rem;
}

.chat-modal-input-row button {
  min-height: 44px;
  border: none;
  border-radius: 0.5rem;
  background: var(--blue-600);
  color: var(--white);
  padding: 0 0.9rem;
  cursor: pointer;
}

#chatTurnstile {
  min-height: 1px;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    border: 0;
    box-shadow: none;
    background: transparent;
    margin-left: auto;
  }

  .nav-links li a {
    padding: 0;
  }

  .nav-cta {
    display: inline-flex;
  }

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

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

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

  .footer-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chat-modal-content {
    border-radius: 0.9rem;
  }
}

@media (max-width: 767px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0 0.75rem;
  }
  section {
    padding: 2rem 0;
  }
  .card {
    padding: 1rem;
  }
  .footer-inner {
    gap: 2rem;
  }
  .contact-modal-content {
    width: 95%;
  }
  .article-body img, .article-layout img {
    max-width: 100%;
    height: auto;
  }
  .hero {
    padding: 2rem 0;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 479px) {
  .question-grid {
    grid-template-columns: 1fr;
  }
  .stat-number {
    font-size: 1.25rem;
  }
}

/* Article cards */
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { transform: translateY(-4px); }
.badge { background: #dbeafe; color: #1e3a8a; font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.link-arrow { color: #2563eb; font-size: 0.875rem; font-weight: 600; margin-top: 0.5rem; display: block; }
.text-gray { color: #6b7280; }

/* Contact Modal */
.contact-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}
.contact-modal.is-open {
  display: flex;
}
.contact-modal-content {
  background: white;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 1rem;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.contact-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.contact-modal-header h3 {
  margin: 0;
  color: var(--blue-900);
  font-size: 1.25rem;
}
.contact-modal-header button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-500);
  width: auto;
  min-height: auto;
  padding: 0.25rem;
  margin: 0;
}
.contact-modal-body {
  padding: 1.5rem;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.form-group textarea {
  resize: vertical;
  min-height: 140px;
}
.form-submit-row {
  margin-top: 1.5rem;
}
.form-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  display: none;
}
.form-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  display: none;
}
