/* ═══════════════════════════════════════════════════════════════════
   NYC Property Intel — Landing Page Styles
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────── */

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

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #7189a8; /* bumped from #64748b for WCAG AA contrast (≥4.5:1) */
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-subtle: rgba(59, 130, 246, 0.15);
  --border: #334155;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  --max-width: 1120px;
}

/* ── Skip Link ────────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0.5rem;
  color: #fff;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 72px; /* 64px sticky header + 8px breathing room */
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

/* ── Container ────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* ── Header / Nav ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
}

.btn-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

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

.hero-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Sections ─────────────────────────────────────────────────────── */

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-align: center;
}

.section-intro {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ── Grid ─────────────────────────────────────────────────────────── */

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

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

/* ── Cards ────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--text-muted);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

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

.card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.card-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.card-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* ── Steps ────────────────────────────────────────────────────────── */

.step {
  text-align: center;
  padding: 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.75rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ── Demo Queries ─────────────────────────────────────────────────── */

.demo-queries {
  margin-top: 3rem;
  text-align: center;
}

.demo-queries h3 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.query-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.query-examples code {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  white-space: nowrap;
}

/* ── Tools Grid ───────────────────────────────────────────────────── */

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

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tool-card:hover {
  border-color: var(--text-muted);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.tool-card-featured {
  grid-column: 1 / -1;
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, var(--bg-card) 100%);
}

.tool-name {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.9375rem;
}

.tool-card h3 {
  margin-bottom: 0.75rem;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.tool-sources {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Data Table ───────────────────────────────────────────────────── */

.data-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.05);
}

.data-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Install ──────────────────────────────────────────────────────── */

.install-steps {
  max-width: 720px;
  margin: 0 auto;
}

.install-step {
  margin-bottom: 2.5rem;
}

.install-step h3 {
  font-size: 1.0625rem;
  margin-bottom: 1rem;
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-primary);
  line-height: 1.6;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
}

/* ── Install Tabs ─────────────────────────────────────────────────── */

.install-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
}

.tab-btn {
  padding: 0.5rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.tab-btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.tab-btn:not(:first-child) {
  border-left: none;
}

.tab-btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.prereqs {
  max-width: 720px;
  margin: 2rem auto 0;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.prereqs h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.prereqs ul {
  list-style: none;
  padding: 0;
}

.prereqs li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  padding: 0.25rem 0 0.25rem 1.5rem;
  position: relative;
}

.prereqs li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
}

/* ── Fair Housing ─────────────────────────────────────────────────── */

.fh-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.fh-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.fh-card h3 {
  text-align: left;
  font-size: 1.0625rem;
  margin-bottom: 1rem;
}

.fh-card ul {
  list-style: none;
  padding: 0;
}

.fh-card li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 0.375rem 0 0.375rem 1.75rem;
  position: relative;
  line-height: 1.55;
}

.fh-refuses {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.fh-refuses h3 {
  color: var(--danger);
}

.fh-refuses li::before {
  content: "\2717";
  position: absolute;
  left: 0;
  color: var(--danger);
  font-weight: 700;
}

.fh-provides {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
}

.fh-provides h3 {
  color: var(--success);
}

.fh-provides li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.fh-compliance {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ── Footer ───────────────────────────────────────────────────────── */

.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.footer-disclaimer {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 1.5rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.footer-disclaimer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.footer-disclaimer p:last-child {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a,
.footer-license {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

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

/* ── Legal Page ───────────────────────────────────────────────────── */

.legal-page {
  padding: 3rem 0 5rem;
}

.legal-page .container {
  max-width: 760px;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.legal-updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 3rem;
}

.legal-page section {
  margin-bottom: 3rem;
}

.legal-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: left;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.legal-page h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.legal-page p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.legal-page ol,
.legal-page ul {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
}

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

/* ── Responsive ───────────────────────────────────────────────────── */

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

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

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

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

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

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

  .hero {
    padding: 4rem 0 3rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .section {
    padding: 3rem 0;
  }

  .hero-signup-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .signup-input,
  .signup-select,
  .signup-btn {
    width: 100%;
    flex: none;
  }

  .query-examples {
    flex-direction: column;
    align-items: center;
  }

  .query-examples code {
    white-space: normal;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
}

/* ── Readable Line Length ──────────────────────────────────────────── */

.section-intro,
.hero-sub,
.fh-compliance,
.footer-disclaimer p,
.legal-page p {
  max-width: 70ch;
}

/* ── Hero Signup Form ─────────────────────────────────────────────── */

.hero-signup {
  max-width: 620px;
  margin: 0 auto 1.25rem;
}

.hero-signup-fields {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.signup-input,
.signup-select {
  height: 48px;
  padding: 0 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.signup-input {
  flex: 1 1 200px;
  min-width: 180px;
}

.signup-select {
  flex: 0 1 160px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.25rem;
}

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

.signup-input:focus,
.signup-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.signup-btn {
  height: 48px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.signup-error {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--danger);
  text-align: center;
  min-height: 1.2em;
}

.hero-signup-success {
  margin-bottom: 1.25rem;
}

.signup-success-msg {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  color: var(--success);
  font-size: 0.9375rem;
  font-weight: 500;
}

.hero-actions-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.link-subtle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.link-subtle:hover {
  color: var(--text-secondary);
}

.hero-note-sep {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* Nav accent button */
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff !important;
}

.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff !important;
}

/* ── Reduced Motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Focus Styles ─────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}
