/* Layout utilities — modern theme inspired by apiui */

/* Google Fonts - Syne for display, Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700;800&display=swap');

/* CSS Variables for theming - Dark theme matching optibit.ai */
:root {
  --primary: 262 83% 58%;                 /* Purple #a855f7 */
  --primary-foreground: 210 40% 98%;      /* Light text on purple */
  --primary-light: 270 95% 96%;           /* Very light purple */
  --primary-soft: 270 77% 85%;            /* Soft purple #d8b4fe */
  --secondary: 217 24% 15%;               /* Dark gray */
  --secondary-foreground: 210 40% 98%;
  --muted: 217 24% 15%;                   /* Dark muted */
  --muted-foreground: 215 20% 65%;        /* Light gray text */
  --accent: 262 83% 58%;                  /* Purple accent */
  --accent-foreground: 210 40% 98%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 217 24% 20%;                  /* Dark border */
  --input: 217 24% 20%;
  --ring: 262 83% 58%;                    /* Focus ring purple */
  --background: 0 0% 4%;                  /* Very dark background #0a0a0a */
  --foreground: 210 40% 98%;              /* Light text */
  --card: 217 24% 8%;                     /* Dark card background */
  --card-foreground: 210 40% 98%;         /* Light text on cards */
  --popover: 217 24% 8%;
  --popover-foreground: 210 40% 98%;

  /* Stagger delay variables for animations */
  --stagger-1: 0ms;
  --stagger-2: 100ms;
  --stagger-3: 200ms;
  --stagger-4: 300ms;
  --stagger-5: 400ms;
  --stagger-6: 500ms;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    color: hsl(var(--foreground));
}

/* ===== Body padding override ===== */
body {
    padding: 2.618rem 11.09vw;
    background: hsl(var(--background));
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    color: hsl(var(--foreground));
}

/* ===== Navigation ===== */
nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding: 1rem 11.09vw;
    border-bottom: 1px solid hsl(var(--border));
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    margin: -2.618rem -11.09vw 0;
}

nav a {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Push right-aligned nav items */
nav .nav-right {
    margin-left: auto;
}

/* ===== Header / Hero ===== */
header {
    text-align: left;
    padding: 6.854rem 11.09vw 4.236rem;
    margin: 0 -11.09vw 2.618rem;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-soft)) 100%);
    border-bottom: none;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15);
}

header h1 {
    max-width: none;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header p {
    max-width: 42rem;
    color: white;
    opacity: 0.95;
}

/* ===== Inline text links ===== */
p a, li a, td a {
    text-decoration: none;
    border-bottom: 1px dashed #000;
}

p a:hover, p a:focus,
li a:hover, li a:focus,
td a:hover, td a:focus {
    border-bottom-style: solid;
}

/* ===== Buttons / CTAs ===== */
button, .cta {
    display: inline-block;
    width: auto;
}

a[href]:where(header a, .card a, section > p > a) {
    display: inline-block;
    border: 2px solid hsl(var(--primary));
    background: hsl(var(--primary));
    color: white;
    padding: 0.618rem 1.618rem;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 0.618rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

a[href]:where(header a, .card a, section > p > a):hover {
    background: hsl(var(--primary-soft));
    border-color: hsl(var(--primary-soft));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* ===== Cards Grid ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.618rem;
    margin-bottom: 2.618rem;
}

.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    padding: 1.618rem;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.15);
}

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

.card p, .card li {
    font-size: 1.236rem;
    line-height: 1.618;
}

.card small {
    font-size: 0.854rem;
}

/* ===== Two-column variant ===== */
.cards-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
    gap: 1.618rem;
    margin-bottom: 2.618rem;
}

/* ===== Section spacing ===== */
main > section {
    margin-bottom: 4.236rem;
}

/* ===== Main padding for non-hero pages ===== */
main > h1:first-child {
    margin-top: 6.854rem;
}

/* ===== Footer ===== */
footer {
    border-top: 1px solid #e5e5e5;
    padding-top: 2.618rem;
    margin-top: 4.236rem;
}

/* ===== Blockquote ===== */
blockquote {
    border-left: 3px solid #e5e5e5;
    padding-left: 1.618rem;
    margin-bottom: 1.618rem;
}

blockquote p {
    font-size: 1rem;
    color: #555;
    font-style: italic;
    line-height: 1.618;
}

/* ===== Table improvements ===== */
table {
    width: 100%;
    margin-bottom: 2.618rem;
}

th, td {
    text-align: left;
    padding: 0.618rem 1rem;
    border-bottom: 1px solid #e5e5e5;
    font-size: 1.618rem;
    line-height: 1.618;
}

th {
    font-weight: 700;
}

/* ===== Table of Contents ===== */
.toc {
    border: 1px solid hsl(var(--border));
    padding: 1.618rem;
    margin: 1.618rem 0 2.618rem;
    position: static;
    background: hsl(var(--card));
    border-radius: 0.75rem;
}

.toc p {
    margin-bottom: 0.618rem;
}

.toc ol {
    list-style: decimal;
    padding-left: 1.618rem;
}

.toc li {
    font-size: 1rem;
    line-height: 2;
}

/* ===== Comparison table ===== */
main table th,
main table td {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
}

/* ===== Citations ===== */
.citations p {
    font-size: 1rem;
    color: #666;
}

.citations p i {
    font-size: inherit;
}

/* ===== FAQ Accordion ===== */
.faq {
    border: 1px solid #e5e5e5;
    margin-bottom: 2.618rem;
}

.faq details {
    border-bottom: 1px solid #e5e5e5;
}

.faq details:last-child {
    border-bottom: none;
}

.faq summary {
    padding: 0.75rem 1.618rem;
    cursor: pointer;
    font-size: 1.236rem;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    font-size: 1.236rem;
    font-weight: 300;
    color: #999;
}

.faq details[open] summary::after {
    content: "\2212";
}

.faq summary:hover {
    background: #fafafa;
}

.faq details[open] summary {
    border-bottom: 1px solid #e5e5e5;
}

.faq p {
    padding: 1rem 1.618rem;
    font-size: 1rem;
    line-height: 1.618;
    color: #444;
    margin: 0;
}

/* ===== CTA button ===== */
a.btn-cta, a.btn-cta:link, a.btn-cta:visited, a.btn-cta:active,
button.btn-cta, .btn-cta {
    display: inline-block;
    padding: 0.618rem 1.618rem;
    background: #000;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid #000;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

a.btn-cta:hover, a.btn-cta:focus,
button.btn-cta:hover, button.btn-cta:focus {
    background: #fff;
    color: #000;
}

/* ===== Responsive ===== */
@media (max-width: 618px) {
    body {
        padding: 1rem 5vw;
    }

    nav {
        padding: 0.75rem 5vw;
        gap: 0.25rem 1rem;
        margin: -1rem -5vw 0;
    }

    nav a {
        font-size: 0.85rem;
    }

    header {
        padding: 4.236rem 5vw 2.618rem;
        margin: 0 -5vw 1.618rem;
    }

    .cards-2 {
        grid-template-columns: 1fr;
    }

    th, td {
        padding: 0.5rem 0.5rem;
        font-size: 1.2rem;
    }
}

/* ===== Modern Animations ===== */

/* Slide up with fade */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide in from left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in from right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale up with fade */
@keyframes scaleUpFade {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(40px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Glow pulse */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), 0 0 60px rgba(168, 85, 247, 0.2);
  }
}

/* Animation utility classes */
.animate-slide-up-fade {
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slide-left {
  animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slide-right {
  animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-scale-up {
  animation: scaleUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out;
}

.animate-glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

/* Stagger delay classes */
.stagger-1 { animation-delay: var(--stagger-1); }
.stagger-2 { animation-delay: var(--stagger-2); }
.stagger-3 { animation-delay: var(--stagger-3); }
.stagger-4 { animation-delay: var(--stagger-4); }
.stagger-5 { animation-delay: var(--stagger-5); }
.stagger-6 { animation-delay: var(--stagger-6); }

/* Scroll-triggered animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Landing Page Styles ===== */

.landing-hero {
  padding: 10rem 1.5rem 6rem;
  background: linear-gradient(135deg,
    hsla(var(--primary), 0.03) 0%,
    transparent 100%);
  position: relative;
  z-index: 10;
}

.landing-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 2rem;
  font-weight: 700;
}

.landing-hero p {
  font-size: 1.25rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.btn-primary:hover {
  background: hsl(var(--primary) / 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

/* Feature Cards */
.feature-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 10px 10px -5px rgb(0 0 0 / 0.2);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}

.feature-card p {
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  font-size: 1rem;
}

/* Canvas Background */
#feather-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Landing Navigation Header ===== */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-nav-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.landing-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.landing-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-nav-logo-img {
  height: 2rem;
  width: 2rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-nav-logo img {
  height: 2rem;
  width: 2rem;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.4));
}

.landing-nav-logo a {
  text-decoration: none;
}

.landing-nav-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Syne', sans-serif;
}

.landing-nav-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.landing-nav-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  height: 2.5rem;
  padding: 0 1.5rem;
  background: #a855f7;
  color: #ffffff;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.landing-nav-btn-primary:hover {
  background: #c084fc;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

.landing-nav-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  height: 2.5rem;
  padding: 0 1rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.landing-nav-btn-secondary:hover {
  color: #a855f7;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .landing-nav-container {
    padding: 0 1rem;
  }

  .landing-nav-logo-text {
    font-size: 1rem;
  }

  .landing-nav-logo-img {
    height: 1.5rem;
    width: 1.5rem;
  }

  .landing-nav-logo img {
    height: 1.5rem;
    width: 1.5rem;
  }

  .landing-nav-buttons {
    gap: 0.5rem;
  }

  .landing-nav-btn-primary,
  .landing-nav-btn-secondary {
    font-size: 0.625rem;
    padding: 0 0.75rem;
    height: 2rem;
  }
}

/* Responsive Hero */
@media (max-width: 1000px) {
  .landing-hero {
    padding: 6rem 1.5rem 3rem;
  }
}

@media (max-width: 618px) {
  .landing-hero {
    padding: 5rem 1rem 2rem;
  }

  .feature-card {
    padding: 1.5rem 1rem;
  }
}
