/* ============================================
   Petals of Life - Blue Fermion Labs Brand
   ============================================ */

/* Import variables */
@import url('variables.css');

/* ============================================
   Base Styles
   ============================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--gray-700);
  background-color: var(--gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--bf-navy);
}

.display-heading {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
}

.text-teal { color: var(--bf-teal) !important; }
.text-navy { color: var(--bf-navy) !important; }
.text-coral { color: var(--bf-orange) !important; }
.text-muted { color: var(--gray-500) !important; }

.eyebrow {
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bf-teal);
}

/* ============================================
   Navigation
   ============================================ */

.navbar-petals {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  height: 72px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-base);
}

.navbar-petals.scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: var(--gray-200);
  box-shadow: 0 4px 20px rgba(18, 60, 107, 0.08);
}

.navbar-petals .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--bf-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-petals .navbar-brand img {
  transition: transform var(--transition-base);
}

.navbar-petals .navbar-brand:hover img {
  transform: rotate(15deg) scale(1.1);
}

.navbar-petals .nav-link {
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.navbar-petals .nav-link:hover {
  color: var(--bf-teal);
  background: rgba(29, 167, 160, 0.08);
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary-gradient {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-teal);
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(29, 167, 160, 0.4);
  color: white;
}

.btn-coral {
  background: var(--gradient-cta);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1.125rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-coral);
}

.btn-coral:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(255, 107, 53, 0.4);
  color: white;
}

.btn-coral-lg {
  padding: 1rem 2.5rem;
  font-size: 1.25rem;
  border-radius: var(--radius-lg);
}

.btn-outline-navy {
  border: 2px solid var(--bf-navy);
  color: var(--bf-navy);
  background: transparent;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.btn-outline-navy:hover {
  background: var(--bf-navy);
  color: white;
}

.btn-link-arrow {
  color: var(--bf-teal);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-link-arrow:hover {
  color: var(--bf-teal-dark);
  gap: 0.75rem;
}

.btn-link-arrow i {
  transition: transform var(--transition-fast);
}

.btn-link-arrow:hover i {
  transform: translateX(4px);
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
  min-height: 100vh;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding-top: 120px;
  padding-bottom: 80px;
  background-size: cover;
  background-position: center right;
}

/* Overlay for text readability on left side */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255, 248, 240, 0.92) 0%,
    rgba(255, 248, 240, 0.75) 35%,
    rgba(255, 248, 240, 0.3) 55%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(29, 167, 160, 0.1);
  color: var(--bf-teal);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-small);
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-body);
  font-size: var(--text-display);
  font-weight: 800;
  color: var(--bf-navy);
  line-height: 1.1;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-body-lg);
  color: var(--gray-600);
  max-width: 480px;
  line-height: var(--leading-relaxed);
}

.hero-trust {
  border-top: 1px solid var(--gray-200);
}

.min-vh-75 {
  min-height: 75vh;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  color: var(--bf-navy);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subheadline {
  font-size: var(--text-body-lg);
  color: var(--gray-600);
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: var(--leading-relaxed);
}

.hero-flower {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

.hero-flower img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(29, 167, 160, 0.2));
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-400);
  font-size: var(--text-small);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   Social Proof Bar
   ============================================ */

.social-proof-bar {
  background: white;
  padding: 2rem 0;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.proof-stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--bf-navy);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: var(--text-small);
  color: var(--gray-500);
  font-weight: 500;
}

/* ============================================
   Section Shared Styles
   ============================================ */

.section-padding {
  padding: var(--space-20) 0;
}

.section-badge {
  display: inline-block;
  background: rgba(29, 167, 160, 0.1);
  color: var(--bf-teal);
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-badge-light {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.section-title {
  font-size: var(--text-h2);
  font-weight: 800;
  color: var(--bf-navy);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: var(--text-body-lg);
  color: var(--gray-500);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Fade Up Animations
   ============================================ */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Feature list for sections */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  font-size: 1.0625rem;
  color: var(--gray-700);
}

/* ============================================
   Section Styles
   ============================================ */

.section {
  padding: var(--space-24) 0;
}

.section-light {
  background: white;
}

.section-cream {
  background: var(--petal-cream);
}

.section-gray {
  background: var(--gray-100);
}

.section-dark {
  background: var(--gradient-dark);
  color: white;
}

.section-dark h2,
.section-dark h3 {
  color: white;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-16);
}

.section-header h2 {
  font-size: var(--text-h2);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: var(--text-body-lg);
  color: var(--gray-500);
}

/* ============================================
   How It Works / Steps
   ============================================ */

.steps-container {
  position: relative;
}

.step-card {
  text-align: center;
  padding: var(--space-8);
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-base);
  position: relative;
}

.step-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-teal);
  position: relative;
}

.step-icon i {
  font-size: 2rem;
  color: white;
}

.step-number {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: var(--bf-orange);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-small);
  box-shadow: var(--shadow-coral);
  z-index: 2;
}

.step-title {
  font-size: var(--text-h4);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--bf-navy);
}

.step-description {
  color: var(--gray-500);
  line-height: var(--leading-relaxed);
}

/* Connecting line between steps */
.step-connector {
  position: absolute;
  top: 40px;
  left: 50%;
  width: calc(100% - 120px);
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--bf-teal-light),
    var(--bf-teal-light) 8px,
    transparent 8px,
    transparent 16px
  );
  opacity: 0.4;
}

/* ============================================
   Feature Cards
   ============================================ */

.feature-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  height: 100%;
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  background: rgba(29, 167, 160, 0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.feature-icon-wrapper i {
  font-size: 1.5rem;
  color: var(--bf-teal);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--bf-navy);
}

.feature-description {
  color: var(--gray-500);
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
}

/* ============================================
   Testimonial
   ============================================ */

.testimonial-section {
  background: var(--gradient-primary);
  padding: var(--space-24) 0;
}

.testimonial-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  height: 100%;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base);
}

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

.testimonial-stars {
  color: var(--bf-gold);
  font-size: 0.875rem;
}

.testimonial-text {
  color: var(--gray-700);
  font-size: 1rem;
  line-height: var(--leading-relaxed);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar i {
  font-size: 2rem;
  color: var(--gray-400);
}

.testimonial-author img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.testimonial-author-info {
  text-align: left;
}

.testimonial-author-name {
  color: var(--bf-navy);
  font-weight: 600;
}

.testimonial-author-title {
  color: var(--gray-500);
  font-size: var(--text-small);
}

/* ============================================
   Print Section
   ============================================ */

.print-section {
  background: var(--petal-cream);
}

.print-mockup {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.print-mockup img {
  width: 100%;
  height: auto;
}

/* ============================================
   Final CTA Section
   ============================================ */

.cta-section {
  background: var(--petal-cream);
  padding: var(--space-24) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-petal-glow);
  pointer-events: none;
}

.cta-title {
  color: var(--bf-navy);
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: var(--text-body-lg);
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

.cta-note {
  color: var(--gray-500);
}

.cta-headline {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  color: white;
  margin-bottom: 1rem;
}

.cta-subheadline {
  font-size: var(--text-body-lg);
  color: rgba(255, 255, 255, 0.7);
  max-width: 500px;
  margin: 0 auto var(--space-8);
}

/* ============================================
   Footer
   ============================================ */

.footer-petals {
  background: var(--bf-navy-dark);
  color: rgba(255, 255, 255, 0.8);
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.footer-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
}

.footer-labs-badge {
  margin-top: 1rem;
}

.badge-labs {
  display: inline-block;
  background: rgba(29, 167, 160, 0.2);
  color: var(--bf-teal-light);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.footer-heading {
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: var(--text-small);
  transition: color var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--bf-teal-light);
}

.footer-link-desc {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
  font-size: var(--text-small);
  color: rgba(255, 255, 255, 0.5);
}

.footer-tagline {
  font-size: var(--text-small);
  color: rgba(255, 255, 255, 0.5);
}

.text-coral {
  color: var(--bf-orange) !important;
}

.text-teal {
  color: var(--bf-teal) !important;
}

.text-navy {
  color: var(--bf-navy) !important;
}

.footer-brand-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-brand-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: var(--text-small);
  transition: color var(--transition-fast);
}

.footer-brand-links a:hover {
  color: var(--bf-teal-light);
}

.footer-brand-links .divider {
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Cards (General)
   ============================================ */

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* ============================================
   Petal Cards
   ============================================ */

.petal-card {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.petal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.petal-card .card-header {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ============================================
   Forms
   ============================================ */

.form-control:focus,
.form-select:focus {
  border-color: var(--bf-teal);
  box-shadow: 0 0 0 0.25rem rgba(29, 167, 160, 0.25);
}

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

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

@keyframes bloom {
  0% {
    transform: scale(0) rotate(-30deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.animate-bloom {
  animation: bloom 0.8s ease forwards;
}

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ============================================
   HTMX States
   ============================================ */

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.htmx-indicator {
  display: inline-block;
}

.htmx-settling {
  opacity: 0.8;
}

.htmx-swapping {
  opacity: 0.5;
}

/* ============================================
   Utility Classes
   ============================================ */

.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-hero { background: var(--gradient-hero); }
.bg-gradient-dark { background: var(--gradient-dark); }
.bg-cream { background: var(--petal-cream); }

.shadow-teal { box-shadow: var(--shadow-teal); }
.shadow-coral { box-shadow: var(--shadow-coral); }

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 991px) {
  .hero-section {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero-flower {
    margin-top: var(--space-12);
  }

  .scroll-indicator {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
  }

  .section {
    padding: var(--space-16) 0;
  }

  .step-connector {
    display: none;
  }

  .footer-brand-links {
    justify-content: flex-start;
    margin-top: 1rem;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .navbar-petals,
  .footer-petals,
  .btn,
  form {
    display: none !important;
  }

  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-flower {
    animation: none;
  }
}
