@import url('./design-system.css');

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--af-font-sans);
  background-color: var(--af-bg-canvas);
  color: var(--af-text-primary);
  line-height: 1.6;
  font-size: var(--af-text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.08), transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px;
  background-attachment: fixed;
}

/* Accessibility: Skip to main content link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--af-copper);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: var(--af-radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--af-transition-fast);
}
.skip-link:focus {
  top: 1rem;
  outline: none;
  box-shadow: var(--af-focus-ring);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--af-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--af-border-subtle);
  height: var(--af-header-height);
  display: flex;
  align-items: center;
  transition: background-color var(--af-transition-fast), border-color var(--af-transition-fast);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--af-text-primary);
}

.brand-mark-img {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.35);
  object-fit: cover;
  transition: transform var(--af-transition-fast), box-shadow var(--af-transition-fast);
}

.brand-link:hover .brand-mark-img {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.6);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--af-copper);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--af-text-secondary);
  text-decoration: none;
  font-size: var(--af-text-sm);
  font-weight: 500;
  transition: color var(--af-transition-fast);
  padding: 0.35rem 0.5rem;
  border-radius: var(--af-radius-sm);
}

.nav-link:hover, .nav-link:focus-visible {
  color: #ffffff;
}

.nav-link.active {
  color: var(--af-copper);
  font-weight: 600;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--af-border-subtle);
  border-radius: var(--af-radius-md);
  padding: 0.5rem;
  color: var(--af-text-secondary);
  cursor: pointer;
}
.mobile-toggle:focus-visible {
  box-shadow: var(--af-focus-ring);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.35rem;
  font-size: var(--af-text-sm);
  font-weight: 600;
  border-radius: var(--af-radius-md);
  text-decoration: none;
  transition: all var(--af-transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--af-focus-ring);
}

.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 6px 24px rgba(249, 115, 22, 0.55);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(20, 28, 46, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--af-text-primary);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background-color: rgba(30, 42, 68, 0.95);
  border-color: var(--af-copper);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--af-border-muted);
  color: var(--af-text-secondary);
}
.btn-outline:hover {
  border-color: var(--af-copper);
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: var(--af-text-xs);
}

.btn-lg {
  padding: 0.875rem 1.85rem;
  font-size: var(--af-text-base);
}

/* Hero Section */
.hero {
  padding: 5.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--af-border-subtle);
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(249, 115, 22, 0.16), transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  border-radius: var(--af-radius-full);
  background-color: rgba(20, 28, 46, 0.85);
  border: 1px solid rgba(249, 115, 22, 0.3);
  font-size: var(--af-text-xs);
  font-weight: 600;
  color: #fdba74;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1.35rem;
}

.hero-title-highlight {
  background: linear-gradient(135deg, #ffffff 30%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--af-text-secondary);
  line-height: 1.65;
  margin-bottom: 2.25rem;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--af-font-mono);
  background: linear-gradient(135deg, #ffffff 40%, #fdba74 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: var(--af-text-xs);
  color: var(--af-text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Section Headings */
.section {
  padding: 4.5rem 0;
}

.section-header {
  margin-bottom: 2.75rem;
}

.section-header.text-center {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-block;
  font-size: var(--af-text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--af-copper);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--af-text-secondary);
  font-size: var(--af-text-base);
  line-height: 1.6;
}

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.product-card {
  background: linear-gradient(180deg, rgba(16, 23, 38, 0.85) 0%, rgba(10, 14, 24, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--af-radius-xl);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  transition: all var(--af-transition-base);
  position: relative;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.product-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 16px 40px -8px rgba(249, 115, 22, 0.22), 0 0 0 1px rgba(249, 115, 22, 0.3);
  transform: translateY(-4px);
}

.product-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.35rem;
}

.product-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(8, 12, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.product-icon-wrapper img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.product-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.product-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.product-handle {
  font-size: 0.8rem;
  color: #38bdf8;
  font-family: var(--af-font-mono);
  font-weight: 600;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--af-radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.product-desc {
  color: var(--af-text-secondary);
  font-size: var(--af-text-sm);
  line-height: 1.6;
  margin-bottom: 1.35rem;
  flex-grow: 1;
}

.product-features {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.product-features li {
  font-size: var(--af-text-xs);
  color: var(--af-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-features li::before {
  content: "✓";
  color: #10b981;
  font-weight: 800;
}

.product-best-for {
  background-color: rgba(20, 28, 46, 0.7);
  border-left: 3px solid var(--af-copper);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--af-radius-md) var(--af-radius-md) 0;
  font-size: var(--af-text-xs);
  color: var(--af-text-secondary);
  margin-bottom: 1.75rem;
}
.product-best-for strong {
  color: #ffffff;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  flex-wrap: wrap;
}

/* Interactive Demo Showcase */
.interactive-showcase {
  background: linear-gradient(180deg, rgba(14, 20, 32, 0.9) 0%, rgba(9, 13, 22, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--af-radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  margin: 2.5rem 0;
}

.showcase-nav {
  display: flex;
  background: rgba(8, 12, 18, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.showcase-tab-btn {
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--af-text-secondary);
  font-family: var(--af-font-sans);
  font-size: var(--af-text-sm);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  transition: all var(--af-transition-fast);
}

.showcase-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.02);
}

.showcase-tab-btn.active {
  color: #ffffff;
  border-bottom-color: var(--af-copper);
  background: rgba(249, 115, 22, 0.06);
}

.showcase-panel {
  display: none;
  padding: 2rem;
}

.showcase-panel.active {
  display: block;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.showcase-box {
  background: rgba(8, 11, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--af-radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.showcase-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.showcase-box-title {
  font-size: var(--af-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--af-text-muted);
}

.showcase-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--af-radius-sm);
  font-weight: 600;
  font-family: var(--af-font-mono);
}

.tag-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.showcase-code {
  font-family: var(--af-font-mono);
  font-size: 0.825rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-all;
  flex-grow: 1;
}

.showcase-footer {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Workflow Steps */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.workflow-card {
  background: linear-gradient(180deg, rgba(16, 23, 38, 0.8) 0%, rgba(10, 14, 24, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--af-radius-lg);
  padding: 2rem;
  position: relative;
  transition: all var(--af-transition-base);
}

.workflow-card:hover {
  border-color: rgba(249, 115, 22, 0.4);
  transform: translateY(-2px);
}

.workflow-step-num {
  font-family: var(--af-font-mono);
  font-size: var(--af-text-xs);
  font-weight: 700;
  color: var(--af-copper);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.workflow-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  color: #ffffff;
}

.workflow-card p {
  color: var(--af-text-secondary);
  font-size: var(--af-text-sm);
  line-height: 1.6;
}

/* Proof & Trust Grid */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.proof-card {
  background: rgba(13, 19, 31, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--af-radius-lg);
  padding: 1.75rem;
}

.proof-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.proof-card p {
  font-size: var(--af-text-sm);
  color: var(--af-text-secondary);
  line-height: 1.6;
}

/* Callout / Disclaimer */
.callout {
  border-radius: var(--af-radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: var(--af-text-sm);
  border-left: 4px solid var(--af-border-subtle);
  background-color: rgba(13, 19, 31, 0.9);
}

.callout-info {
  border-left-color: var(--af-blue-accent);
  background-color: rgba(56, 189, 248, 0.06);
}

.callout-warning {
  border-left-color: var(--af-copper);
  background-color: rgba(249, 115, 22, 0.06);
}

/* Code & Examples */
pre, code {
  font-family: var(--af-font-mono);
}

pre {
  background-color: var(--af-bg-code);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--af-radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  font-size: var(--af-text-xs);
  color: #e2e8f0;
  line-height: 1.6;
  margin: 1.25rem 0;
}

code {
  background-color: rgba(20, 28, 46, 0.8);
  padding: 0.15rem 0.4rem;
  border-radius: var(--af-radius-sm);
  font-size: 0.875em;
  color: #fdba74;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--af-radius-lg);
  background: rgba(13, 19, 31, 0.6);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--af-text-sm);
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  background-color: rgba(20, 28, 46, 0.9);
  color: #ffffff;
  font-weight: 700;
  font-size: var(--af-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* FAQs */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 840px;
  margin-top: 1.75rem;
}

.faq-item {
  background-color: rgba(13, 19, 31, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--af-radius-lg);
  padding: 1.5rem;
  transition: border-color var(--af-transition-fast);
}

.faq-item:hover {
  border-color: rgba(249, 115, 22, 0.4);
}

.faq-question {
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.faq-answer {
  color: var(--af-text-secondary);
  font-size: var(--af-text-sm);
  line-height: 1.6;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--af-text-xs);
  color: var(--af-text-muted);
  margin-bottom: 1.5rem;
  list-style: none;
}
.breadcrumbs a {
  color: var(--af-text-secondary);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--af-copper);
}

/* Footer */
.site-footer {
  background-color: #05070a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4.5rem 0 2.5rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--af-text-muted);
  font-size: var(--af-text-sm);
  margin-top: 0.85rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: var(--af-text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--af-text-secondary);
  text-decoration: none;
  font-size: var(--af-text-sm);
  transition: color var(--af-transition-fast);
}

.footer-links a:hover {
  color: var(--af-copper);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--af-text-xs);
  color: var(--af-text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Navigation Breakpoints */
@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 868px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--af-header-height);
    left: 0;
    right: 0;
    background-color: rgba(13, 19, 31, 0.98);
    border-bottom: 1px solid var(--af-border-subtle);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    backdrop-filter: blur(20px);
  }
  .nav-menu.open {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 3.5rem 0 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .product-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .product-actions .btn {
    width: 100%;
  }
}
