/* Harbourline Insights — Cal.com-inspired design tokens (DESIGN.md) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --primary: #111111;
  --primary-active: #242424;
  --primary-disabled: #e5e7eb;
  --ink: #111111;
  --body: #374151;
  --muted: #6b7280;
  --muted-soft: #898989;
  --hairline: #e5e7eb;
  --hairline-soft: #f3f4f6;
  --canvas: #ffffff;
  --surface-soft: #f8f9fa;
  --surface-card: #f5f5f5;
  --surface-strong: #e5e7eb;
  --surface-dark: #101010;
  --surface-dark-elevated: #1a1a1a;
  --on-primary: #ffffff;
  --on-dark: #ffffff;
  --on-dark-soft: #a1a1aa;
  --brand-accent: #3b82f6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --badge-orange: #fb923c;
  --badge-pink: #ec4899;
  --badge-violet: #8b5cf6;
  --badge-emerald: #34d399;
  --rounded-xs: 4px;
  --rounded-sm: 6px;
  --rounded-md: 8px;
  --rounded-lg: 12px;
  --rounded-xl: 16px;
  --rounded-pill: 9999px;
  --spacing-section: 96px;
  --max-width: 1200px;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Display typography (Cal Sans substitute) */
.display-xl,
.display-lg,
.display-md,
.display-sm,
h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.display-xl,
h1.hero-title {
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.display-lg {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.display-md {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.display-sm {
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.title-lg {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.title-md {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.title-sm {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.caption {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Top nav */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline-soft);
}

.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--rounded-full, 50%);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg {
  width: 14px;
  height: 14px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  text-decoration: none;
  color: var(--muted);
}

.nav-links a.active {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--on-primary);
  background: var(--primary);
  border: none;
  border-radius: var(--rounded-md);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-md);
  cursor: pointer;
  text-decoration: none;
}

.btn-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.btn-text:hover {
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

/* Hero */
.hero-band {
  padding: var(--spacing-section) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  margin-top: 20px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-mockup-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

/* Disclaimer banner */
.disclaimer-banner {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 10px 0;
}

.disclaimer-banner p {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

.disclaimer-banner a {
  color: var(--ink);
  font-weight: 500;
}

/* Sections */
.section {
  padding: var(--spacing-section) 0;
}

.section-alt {
  background: var(--surface-soft);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-header p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--body);
}

/* Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface-card);
  border-radius: var(--rounded-lg);
  padding: 32px;
}

.feature-card .icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--rounded-md);
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 20px;
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
}

.feature-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-icon-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
}

.feature-icon-card h3 {
  font-size: 16px;
  margin: 16px 0 8px;
}

/* Product mockup / market widget */
.market-widget {
  font-family: var(--font-mono);
  font-size: 13px;
}

.market-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}

.market-widget-header span {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.market-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.market-row:last-child {
  border-bottom: none;
}

.market-row .name {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
}

.market-row .up {
  color: var(--success);
  text-align: right;
}

.market-row .down {
  color: var(--error);
  text-align: right;
}

.market-row .neutral {
  color: var(--muted);
  text-align: right;
}

.widget-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted-soft);
  font-family: var(--font-body);
}

/* Badge */
.badge-pill {
  display: inline-block;
  background: var(--surface-card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--rounded-pill);
  margin-bottom: 12px;
}

.badge-education {
  background: #dbeafe;
  color: #1e40af;
}

.badge-neutral {
  background: var(--surface-card);
}

/* CTA band */
.cta-band {
  background: var(--surface-card);
  border-radius: var(--rounded-lg);
  padding: 48px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-band p {
  margin: 16px auto 24px;
  max-width: 480px;
}

/* Legal / prose pages */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--hairline-soft);
}

.page-hero .updated {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.legal-content {
  max-width: 720px;
  padding: 48px 24px 96px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 22px;
  margin: 40px 0 16px;
  letter-spacing: -0.02em;
}

.legal-content h3 {
  font-size: 18px;
  margin: 28px 0 12px;
  color: var(--ink);
  font-weight: 600;
}

.legal-content p,
.legal-content li {
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px 24px;
}

.legal-content a {
  text-decoration: underline;
}

.callout-box {
  background: var(--surface-soft);
  border-left: 3px solid var(--warning);
  padding: 16px 20px;
  border-radius: 0 var(--rounded-md) var(--rounded-md) 0;
  margin: 24px 0;
}

.callout-box p {
  margin: 0;
  font-size: 14px;
  color: var(--body);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 24px 0;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
}

.data-table th {
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-soft);
}

/* Glossary */
.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.glossary-item {
  padding: 24px;
  background: var(--surface-card);
  border-radius: var(--rounded-lg);
}

.glossary-item dt {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.glossary-item dd {
  line-height: 1.6;
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.text-input,
.textarea {
  width: 100%;
  height: 40px;
  padding: 10px 14px;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-md);
}

.textarea {
  height: 120px;
  resize: vertical;
}

.text-input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
}

.checkbox-row input {
  margin-top: 4px;
}

/* Footer */
.site-footer {
  background: var(--surface-dark);
  color: var(--on-dark-soft);
  padding: 64px 0 32px;
}

.site-footer a {
  color: var(--on-dark-soft);
  text-decoration: none;
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--on-dark);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px 24px;
  margin-bottom: 48px;
}

.footer-brand {
  color: var(--on-dark);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.footer-brand + p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-entity {
  border-top: 1px solid var(--surface-dark-elevated);
  padding-top: 32px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-soft);
}

.footer-entity strong {
  color: var(--on-dark-soft);
  font-weight: 500;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-dark-elevated);
  font-size: 13px;
}

/* Article cards */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.article-card h3 {
  font-size: 18px;
  margin: 12px 0;
  line-height: 1.4;
}

.article-card p {
  flex: 1;
  font-size: 15px;
  margin-bottom: 16px;
}

.article-card .read-more {
  font-size: 14px;
  font-weight: 600;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-links,
  .nav-actions .btn-text {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--canvas);
    padding: 32px 24px;
    gap: 20px;
    z-index: 99;
  }

  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .feature-icon-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .hero-band {
    padding: 64px 0;
  }

  .section {
    padding: 64px 0;
  }
}

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

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