/* Threadline Static Landing Page - Stylesheet */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/InterVariable.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/InterVariable-Italic.woff2') format('woff2');
}

:root {
  /* Brand colors */
  --color-primary: #0E90D9;
  --color-primary-hover: #0b7bb8;
  --color-primary-dark: #086699;
  --color-primary-subtle: rgba(14, 144, 217, 0.1);
  --color-primary-border: rgba(14, 144, 217, 0.25);

  /* Light Theme (default) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverted: #ffffff;
  --badge-bg: #e0f2fe;
  --badge-text: #0369a1;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --nav-backdrop: rgba(255, 255, 255, 0.85);

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container-max: 1200px;
  --container-narrow: 840px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #090d16;
    --bg-surface: #0f172a;
    --bg-surface-alt: #162036;
    --border-subtle: #1e293b;
    --border-strong: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverted: #0f172a;
    --badge-bg: rgba(14, 144, 217, 0.15);
    --badge-text: #38bdf8;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --nav-backdrop: rgba(15, 23, 42, 0.88);
  }
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.section-alt {
  background-color: var(--bg-surface-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--nav-backdrop);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: 0.625rem;
  box-shadow: 0 2px 4px rgba(14, 144, 217, 0.3);
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.2;
}

.logo-subtext {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
}

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

.nav-links a {
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.375rem 0.125rem;
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .header-actions .btn {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(14, 144, 217, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
  box-shadow: 0 3px 6px rgba(14, 144, 217, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-alt);
  color: var(--text-main);
  border-color: var(--text-muted);
}

.btn-lg {
  padding: 0.8125rem 1.625rem;
  font-size: 1.0625rem;
  border-radius: 0.625rem;
}

.btn-sm {
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
  border-radius: 0.375rem;
}

/* Mobile Nav Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  color: var(--text-main);
  cursor: pointer;
}

.menu-toggle:hover {
  background-color: var(--bg-surface-alt);
}

.mobile-menu {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem;
  flex-direction: column;
  gap: 1rem;
}

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

.mobile-menu a {
  color: var(--text-main);
  font-size: 1.0625rem;
  font-weight: 500;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.mobile-menu a.active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Typography styles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  overflow-wrap: break-word;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .hero-subtitle {
    font-size: 1.125rem;
  }
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem auto;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 3.5rem;
  }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (min-width: 640px) {
  .section-subtitle {
    font-size: 1.0625rem;
  }
}

/* Cards & Grid */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.625rem;
  line-height: 1.3;
}

.card-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* How It Works Steps */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
}

.step-card {
  display: flex;
  gap: 1.25rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.step-num {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(14, 144, 217, 0.3);
}

.step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.step-content p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(14, 144, 217, 0.08) 0%, rgba(14, 144, 217, 0.02) 100%);
  border: 1px solid var(--color-primary-border);
  border-radius: 1.25rem;
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.cta-banner p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
}

@media (min-width: 500px) {
  .cta-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}

/* Legal & Document Container */
.legal-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.legal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.legal-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.legal-content p {
  margin-bottom: 0.75rem;
}

.legal-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-content li strong {
  color: var(--text-main);
}

.callout-box {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 1rem;
}

/* Contact Page Specifics */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-text strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-main);
}

.contact-info-text span,
.contact-info-text a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.contact-info-text a:hover {
  color: var(--color-primary);
}

/* Footer */
.footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.footer-links-group h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

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

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

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive Media Queries (Desktop >= 768px and >= 1024px) */
@media (min-width: 768px) {
  .hero-title {
    font-size: 3.25rem;
  }

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

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

  .legal-box {
    padding: 3rem;
  }

  .legal-header h1 {
    font-size: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }

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

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

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

  .menu-toggle {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }
}
