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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --dark: #0f172a;
  --dark-800: #1e293b;
  --dark-700: #334155;
  --dark-600: #475569;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, #2563eb, #0ea5e9, #06b6d4);
  --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body.subpage {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 72px;
}

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

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

/* —— Nav (always “scrolled” look on inner pages) —— */
.navbar.subpage-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.6rem 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 12px rgba(15, 23, 42, 0.06);
}

.navbar.subpage-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--dark);
}

.nav-logo svg {
  width: 30px;
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--dark-600);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--gradient) !important;
  color: var(--white) !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.back-home {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.back-home:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  padding: 4px 0;
}

.mobile-toggle span {
  height: 2.5px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.7rem 0;
  font-weight: 500;
  color: var(--dark-600);
  border-bottom: 1px solid var(--gray-200);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .navbar.subpage-nav .container {
    position: relative;
  }
}

/* —— Legal / prose —— */
.page-header {
  padding: 2.5rem 0 1rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.page-header .meta {
  font-size: 0.9rem;
  color: var(--dark-600);
}

.legal-page {
  padding-bottom: 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.legal-page h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.25rem 0 0.75rem;
  color: var(--dark);
}

.legal-page h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--dark-800);
}

.legal-page p {
  font-size: 0.95rem;
  color: var(--dark-600);
  margin-bottom: 0.9rem;
  line-height: 1.75;
}

.legal-page ul,
.legal-page ol {
  margin: 0.5rem 0 1rem 1.25rem;
  color: var(--dark-600);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-page li {
  margin-bottom: 0.35rem;
}

.legal-page strong {
  color: var(--dark);
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0 1.5rem;
}

.legal-page th,
.legal-page td {
  border: 1px solid var(--gray-200);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal-page th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--dark);
}

.toc {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.88rem;
}

.toc ol {
  margin: 0.5rem 0 0 1.1rem;
  columns: 1;
}

.toc a {
  color: var(--primary);
  font-weight: 500;
}

.toc a:hover {
  text-decoration: underline;
}

.callout {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--dark-700);
}

/* About page extras */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.stat-card .num {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .lbl {
  font-size: 0.8rem;
  color: var(--dark-600);
  margin-top: 0.25rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

.info-table td {
  border: 1px solid var(--gray-200);
  padding: 0.65rem 0.85rem;
}

.info-table td:first-child {
  font-weight: 600;
  background: var(--gray-50);
  width: 32%;
  color: var(--dark);
}

@media (max-width: 768px) {
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 4rem;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-block h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}

.contact-block h3:first-of-type {
  margin-top: 0;
}

.contact-block p,
.contact-block li {
  font-size: 0.92rem;
  color: var(--dark-600);
  line-height: 1.7;
}

.contact-block a {
  color: var(--primary);
  font-weight: 600;
}

.form-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  padding: 2rem;
}

.form-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.form-card > p {
  font-size: 0.88rem;
  color: var(--dark-600);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--gradient);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn-submit:hover {
  transform: translateY(-1px);
}

.legal-inline {
  background: rgba(37, 99, 235, 0.05);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--dark-600);
  line-height: 1.7;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
}

.footer-logo svg {
  width: 28px;
  height: 28px;
}

.footer h4 {
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--gray-400);
  transition: color 0.2s;
}

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

.footer-contact-item {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.footer-contact-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--primary);
}

.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
