/* ================================================================
   Qurt landing page
   Design tokens from tailwind.config.ts · Dark theme · Inter
   ================================================================ */

:root {
  --n-1: #FAF8F4;
  --n-2: #F3F5F7;
  --n-3: #E8ECEF;
  --n-4: #6C7275;
  --n-5: #343839;
  --n-6: #232627;
  --n-7: #121212;
  --primary-1: #E9A341;
  --primary-1-hover: #D4923A;
  --accent-purple: #8E55EA;
  --accent-green: #3FDD78;
  --accent-orange: #D84C10;
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-inter);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--n-2);
  background: var(--n-7);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  min-width: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- Utilities ---- */
.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.platform-hidden {
  display: none !important;
}

/* ================================================================
   Header
   ================================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 1.5rem;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  max-width: 72rem;
  margin: 0 auto;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  height: 3rem;
  width: auto;
  max-width: none;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-right: auto;
  padding-top: 4px;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--n-4);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--n-1);
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

@media (max-width: 640px) {
  .nav {
    gap: 1rem;
  }
  .nav-actions [data-dl-nav] {
    display: none;
  }
}

/* ================================================================
   Buttons
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  font-family: var(--font-inter);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-radius: 0.625rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-icon { flex-shrink: 0; }

.btn-primary {
  background: var(--primary-1);
  border-color: var(--primary-1);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-1-hover);
  border-color: var(--primary-1-hover);
  box-shadow: 0 0 20px rgba(0, 132, 255, 0.3);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--n-1);
}
.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.btn-small {
  height: 2.25rem;
  padding: 0 0.875rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
}

.btn-large {
  height: 3.25rem;
  padding: 0 1.75rem;
  font-size: 0.9375rem;
  border-radius: 0.75rem;
}

/* ================================================================
   Hero
   ================================================================ */
.hero {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 0;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10rem;
  left: 50%;
  transform: translateX(-50%);
  width: 40rem;
  height: 40rem;
  background: radial-gradient(circle, rgba(0, 132, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  margin-bottom: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-green);
  background: rgba(63, 221, 120, 0.08);
  border: 1px solid rgba(63, 221, 120, 0.15);
  border-radius: 999px;
}

.hero-badge svg { stroke: var(--accent-green); }

.hero-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--n-1);
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--primary-1) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  margin: 0 auto 2.5rem;
  max-width: 32rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--n-3);
  letter-spacing: -0.01em;
}

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

.hero-platforms {
  margin: 0 0 4rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--n-4);
}

/* App screenshot frame */
.hero-screenshot {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
}

.screenshot-frame {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--n-6);
  box-shadow:
    0 4px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.screenshot-titlebar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.screenshot-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.screenshot-body {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-placeholder {
  text-align: center;
  color: var(--n-4);
  padding: 2rem;
}

.screenshot-placeholder-logo {
  width: 4rem;
  height: auto;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

.screenshot-placeholder p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.screenshot-placeholder-hint {
  margin-top: 0.25rem !important;
  font-size: 0.6875rem !important;
  font-weight: 400 !important;
  color: var(--n-5) !important;
}

.screenshot-frame-small .screenshot-body {
  aspect-ratio: 4 / 3;
}

/* ================================================================
   Provider strip
   ================================================================ */
.providers {
  padding: 4rem 1.5rem;
  text-align: center;
}

.providers-label {
  margin: 0 0 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--n-4);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.providers-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.provider-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--n-3);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.provider-item:hover {
  opacity: 1;
}

.provider-item img {
  height: 1.5rem;
  width: auto;
  filter: invert(1);
}

/* ================================================================
   Section headers
   ================================================================ */
.section-header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 3.5rem;
}

.section-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-1);
}

.section-label-orange {
  color: var(--accent-orange);
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--n-1);
}

.section-subtitle {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--n-3);
}

/* ================================================================
   Feature cards
   ================================================================ */
.features {
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

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

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

.feature-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.feature-card-highlight {
  background: linear-gradient(135deg, rgba(0, 132, 255, 0.06) 0%, rgba(0, 132, 255, 0.01) 100%);
  border-color: rgba(0, 132, 255, 0.12);
}

.feature-card-highlight:hover {
  border-color: rgba(0, 132, 255, 0.25);
  background: linear-gradient(135deg, rgba(0, 132, 255, 0.08) 0%, rgba(0, 132, 255, 0.02) 100%);
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 132, 255, 0.1);
  border-radius: 0.625rem;
  color: var(--primary-1);
}

.feature-icon-purple {
  background: rgba(142, 85, 234, 0.1);
  color: var(--accent-purple);
}

.feature-icon-green {
  background: rgba(63, 221, 120, 0.1);
  color: var(--accent-green);
}

.feature-icon-orange {
  background: rgba(216, 76, 16, 0.1);
  color: var(--accent-orange);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--n-1);
}

.feature-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--n-4);
}

/* ================================================================
   Showcase (split sections)
   ================================================================ */
.showcase,
.agent-section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.showcase-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.showcase-split-reverse .showcase-text { order: 2; }
.showcase-split-reverse .showcase-visual { order: 1; }

@media (max-width: 768px) {
  .showcase-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .showcase-split-reverse .showcase-text,
  .showcase-split-reverse .showcase-visual {
    order: unset;
  }
}

.showcase-title {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--n-1);
}

.showcase-desc {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--n-3);
}

.showcase-more {
  color: var(--accent-purple);
  font-weight: 500;
}

.showcase-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.showcase-list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--n-2);
}

.showcase-list svg {
  color: var(--accent-green);
  flex-shrink: 0;
}

/* ================================================================
   Agent tools list
   ================================================================ */
.agent-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .agent-tools { grid-template-columns: 1fr; }
}

.agent-tool {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
}

.agent-tool-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(216, 76, 16, 0.1);
  border-radius: 0.5rem;
  color: var(--accent-orange);
  flex-shrink: 0;
}

.agent-tool strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--n-1);
  margin-bottom: 0.125rem;
}

.agent-tool span {
  font-size: 0.75rem;
  color: var(--n-4);
  line-height: 1.4;
}

/* ================================================================
   Steps (how it works)
   ================================================================ */
.steps {
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
}

@media (max-width: 640px) {
  .steps-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .step-arrow { display: none; }
}

.step {
  flex: 1;
  max-width: 16rem;
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
}

@media (max-width: 640px) {
  .step {
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
    padding: 1.5rem 1rem;
  }
}

.step-number {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-1);
  background: rgba(0, 132, 255, 0.1);
  border-radius: 0.625rem;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--n-1);
}

.step p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--n-4);
  line-height: 1.5;
}

.step-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2.5rem;
  color: var(--n-5);
}

.step-arrow svg {
  flex-shrink: 0;
}

/* ================================================================
   Open source section
   ================================================================ */
.opensource {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.opensource-card {
  padding: 3rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.25rem;
  text-align: center;
}

.opensource-icon {
  margin: 0 auto 1.5rem;
  color: var(--n-3);
}

.opensource-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--n-1);
}

.opensource-card p {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--n-3);
}

/* ================================================================
   CTA
   ================================================================ */
.cta {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
  text-align: center;
}

.cta::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(0, 132, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.cta-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--n-1);
}

.cta-subtitle {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  color: var(--n-3);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ================================================================
   Footer
   ================================================================ */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 1.5rem;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    gap: 2rem;
  }
}

.footer-brand { max-width: 16rem; }

.footer-logo {
  height: 1.5rem;
  width: auto;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--n-4);
}

.footer-links {
  display: flex;
  gap: 4rem;
}

@media (max-width: 480px) {
  .footer-links { gap: 2rem; }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col h4 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--n-4);
}

.footer-col a {
  font-size: 0.8125rem;
  color: var(--n-3);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--n-1);
}

.footer-bottom {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--n-5);
}

/* ================================================================
   Scroll animations
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
  .feature-card,
  .step,
  .provider-item,
  .agent-tool,
  .showcase-text,
  .showcase-visual,
  .opensource-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
  }

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .feature-card:nth-child(1) { animation-delay: 0.05s; }
  .feature-card:nth-child(2) { animation-delay: 0.1s; }
  .feature-card:nth-child(3) { animation-delay: 0.15s; }
  .feature-card:nth-child(4) { animation-delay: 0.2s; }

  .step:nth-child(1) { animation-delay: 0.05s; }
  .step:nth-child(3) { animation-delay: 0.1s; }
  .step:nth-child(5) { animation-delay: 0.15s; }

  .provider-item:nth-child(1) { animation-delay: 0.05s; }
  .provider-item:nth-child(2) { animation-delay: 0.1s; }
  .provider-item:nth-child(3) { animation-delay: 0.15s; }
  .provider-item:nth-child(4) { animation-delay: 0.2s; }

  .agent-tool:nth-child(1) { animation-delay: 0.05s; }
  .agent-tool:nth-child(2) { animation-delay: 0.1s; }
  .agent-tool:nth-child(3) { animation-delay: 0.15s; }
  .agent-tool:nth-child(4) { animation-delay: 0.2s; }
}
