/* Nestify Components - Reusable UI Elements */

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-s) var(--space-m);
  font-size: var(--font-body);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px; /* Touch-friendly */
  gap: var(--space-xs);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background-color: var(--accent);
  color: var(--accent-contrast);
}

.btn-large {
  padding: var(--space-m) var(--space-l);
  font-size: var(--font-h2);
  min-height: 56px;
}

/* Header Component */
.header {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-s) 0;
  min-height: 64px;
}

.wordmark {
  font-size: var(--font-h2);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-l);
}

.nav-links {
  display: none;
  gap: var(--space-m);
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

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

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: var(--font-h2);
  cursor: pointer;
  padding: var(--space-xs);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-links {
  list-style: none;
  padding: var(--space-s) 0;
}

.mobile-menu-links a {
  display: block;
  padding: var(--space-s) var(--container-padding);
  color: var(--text);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  border-bottom: 1px solid var(--border);
}

.mobile-menu-links a:hover {
  background-color: var(--surface);
  color: var(--accent);
}

/* Desktop navigation */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
}

/* Footer Component */
.footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  margin-top: var(--space-3xl);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-s);
  list-style: none;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--font-small);
  transition: color var(--transition-fast);
}

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

.footer-contact {
  font-size: var(--font-small);
  color: var(--muted);
}

.footer-contact a {
  color: var(--accent);
  text-decoration: none;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* Section Component */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-eyebrow {
  font-size: var(--font-small);
  font-weight: var(--font-weight-semibold);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.section-title {
  margin-bottom: var(--space-s);
}

.section-subtitle {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Feature Card Component */
.feature-cards {
  display: grid;
  gap: var(--space-l);
  margin: var(--space-2xl) 0;
}

.feature-card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-l);
  text-align: center;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-s);
  display: block;
}

.feature-title {
  font-size: var(--font-h2);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  color: var(--text);
}

.feature-description {
  color: var(--muted);
  line-height: var(--line-height-relaxed);
}

@media (min-width: 768px) {
  .feature-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Callout Component */
.callout {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-l);
  margin: var(--space-l) 0;
}

.callout-title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-s);
  color: var(--text);
}

.callout-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.callout-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  color: var(--muted);
}

.callout-list li:before {
  content: "✓";
  color: var(--success);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

/* FAQ Item Component */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-m) 0;
  text-align: left;
  font-size: var(--font-body);
  font-weight: var(--font-weight-medium);
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question:after {
  content: "+";
  font-size: var(--font-h2);
  font-weight: var(--font-weight-normal);
  transition: transform var(--transition-fast);
}

.faq-question.active:after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-answer.active {
  max-height: 500px;
}

.faq-answer-content {
  padding-bottom: var(--space-m);
  color: var(--muted);
  line-height: var(--line-height-relaxed);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.hero-title {
  margin-bottom: var(--space-m);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: var(--font-h2);
  color: var(--muted);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 1s forwards;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 1s forwards;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* Hero Text Animation */
.hero-text-animated {
  display: inline-block;
}

.word-group {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) scale(0.8);
  animation: revealWord 0.6s ease-out forwards;
  position: relative;
}

.word-group.highlight-blue {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.word-group.highlight-green {
  background: linear-gradient(135deg, var(--success), #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.word-group.highlight-orange {
  background: linear-gradient(135deg, var(--warning), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.word-group.emphasis {
  color: var(--accent);
  font-weight: 800;
  position: relative;
}

.word-group.emphasis::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: underlineGrow 0.8s ease-out 0.3s forwards;
}

.punctuation {
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
  color: var(--muted);
}

.punctuation.final {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.2em;
}

/* Animation Keyframes */
@keyframes revealWord {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  60% {
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes underlineGrow {
  to {
    width: 100%;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .word-group,
  .hero-subtitle,
  .hero-actions {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .word-group.emphasis::after {
    animation: none;
    width: 100%;
  }
}

/* Proof Points */
.proof-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-m);
  margin: var(--space-xl) 0;
}

.proof-point {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-small);
  color: var(--muted);
}

.proof-point:before {
  content: "✓";
  color: var(--success);
  font-weight: var(--font-weight-bold);
}

/* Steps Component */
.steps {
  display: grid;
  gap: var(--space-l);
  margin: var(--space-2xl) 0;
}

.step {
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-radius: 50%;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-s);
}

.step-title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
}

.step-description {
  color: var(--muted);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
