/* PatchWorthy Custom Styles */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Stagger children */
.stagger-children .fade-in:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .fade-in:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .fade-in:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .fade-in:nth-child(4) { transition-delay: 0.4s; }
.stagger-children .fade-in:nth-child(5) { transition-delay: 0.5s; }
.stagger-children .fade-in:nth-child(6) { transition-delay: 0.6s; }

/* Patch card hover */
.patch-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.patch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Button hover glow */
.btn-primary {
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 4px 14px rgba(212, 160, 23, 0.4);
}

/* Mobile menu animation */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.mobile-menu.open {
  max-height: 500px;
}

/* Tier badge styles */
.tier-foundation { border-color: #2D5016; }
.tier-intermediate { border-color: #D4A017; }
.tier-advanced { border-color: #DC2626; }

.tier-badge-foundation { background-color: #2D5016; }
.tier-badge-intermediate { background-color: #D4A017; }
.tier-badge-advanced { background-color: #DC2626; }

/* Patch icon placeholder */
.patch-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto;
}

/* Nav active link */
.nav-link.active {
  color: #D4A017;
  font-weight: 600;
}

/* Testimonial card */
.testimonial-card {
  transition: transform 0.3s ease;
}

.testimonial-card:hover {
  transform: scale(1.02);
}

/* Bundle card highlight */
.bundle-popular {
  position: relative;
  border: 2px solid #D4A017;
}

.bundle-popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #D4A017;
  color: white;
  padding: 2px 16px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Homepage redesign */
.patchworthy-home {
  font-family: 'Literata', serif;
  position: relative;
}

.patchworthy-home .font-heading {
  font-family: 'Bricolage Grotesque', sans-serif;
}

.site-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(45, 80, 22, 0.08), transparent 26%),
    radial-gradient(circle at 80% 10%, rgba(212, 160, 23, 0.07), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(122, 74, 39, 0.05), transparent 30%);
  mix-blend-mode: multiply;
}

.seal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 9999px;
  background:
    radial-gradient(circle at 30% 30%, #e2b233, #c59112 60%, #8f680c 100%);
  color: #132112;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 18px rgba(197, 145, 18, 0.18);
}

.hero-atlas {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.92), rgba(237, 228, 210, 0.9)),
    linear-gradient(0deg, rgba(45, 80, 22, 0.08), rgba(45, 80, 22, 0.08));
}

.hero-atlas::before,
.hero-atlas::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  filter: blur(6px);
}

.hero-atlas::before {
  width: 24rem;
  height: 24rem;
  right: -8rem;
  top: -8rem;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.26), transparent 60%);
}

.hero-atlas::after {
  width: 30rem;
  height: 30rem;
  left: -10rem;
  bottom: -12rem;
  background: radial-gradient(circle, rgba(45, 80, 22, 0.16), transparent 62%);
}

.hero-board {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.9), rgba(246, 239, 227, 0.95)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 28px,
      rgba(23, 32, 17, 0.035) 29px
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 18px 50px rgba(45, 80, 22, 0.12);
}

.merit-patch {
  position: relative;
  display: flex;
  min-height: 8.5rem;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  overflow: hidden;
  border-radius: 1.35rem;
  padding: 1rem;
  color: #fffdf7;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.merit-patch::before {
  content: '';
  position: absolute;
  inset: 0.7rem;
  border-radius: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.merit-patch strong,
.merit-patch__tier {
  position: relative;
  z-index: 1;
}

.merit-patch strong {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.02rem;
  line-height: 1.05;
  letter-spacing: 0.04em;
}

.merit-patch__tier {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  opacity: 0.8;
}

.merit-patch--sage { background: linear-gradient(135deg, #68834f, #355724); }
.merit-patch--gold { background: linear-gradient(135deg, #d6a83d, #9a6b1f); }
.merit-patch--rust { background: linear-gradient(135deg, #a34d2a, #6f2f18); }
.merit-patch--ink { background: linear-gradient(135deg, #34404f, #18202b); }
.merit-patch--cream { background: linear-gradient(135deg, #dbcdb8, #a89574); color: #3c2d20; }
.merit-patch--forest { background: linear-gradient(135deg, #2d5016, #132112); }

.field-step {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 239, 229, 0.92));
  box-shadow: 0 18px 40px rgba(26, 26, 26, 0.06);
}

.field-step::after {
  content: '';
  position: absolute;
  inset: auto 1.2rem 1rem auto;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.18), transparent 70%);
}

.field-step__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(45, 80, 22, 0.14);
  background: rgba(45, 80, 22, 0.08);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #2d5016;
}

.showcase-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1.65rem;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 254, 252, 0.94), rgba(247, 242, 235, 0.98));
  box-shadow: 0 20px 45px rgba(26, 26, 26, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(26, 26, 26, 0.1);
}

.showcase-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.showcase-card__tier,
.showcase-card__price {
  font-family: 'Bricolage Grotesque', sans-serif;
}

.showcase-card__tier {
  display: inline-flex;
  border-radius: 9999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.showcase-card__price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #2d5016;
}

.showcase-card__tier--foundation { background: #dfe9d1; color: #2d5016; }
.showcase-card__tier--street { background: #f1dfb4; color: #775213; }
.showcase-card__tier--advanced { background: #ebc1ad; color: #7c3318; }
.showcase-card__tier--bundle { background: #d7dfe5; color: #223443; }

.showcase-medallion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.7rem;
  height: 5.7rem;
  margin-top: 1.4rem;
  margin-bottom: 1.35rem;
  border-radius: 1.45rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 12px 24px rgba(0, 0, 0, 0.1);
}

.showcase-medallion--sage { background: linear-gradient(135deg, #b6c89c, #68834f); color: #163216; }
.showcase-medallion--ink { background: linear-gradient(135deg, #9eb1c4, #34404f); color: #132112; }
.showcase-medallion--gold { background: linear-gradient(135deg, #efd48a, #cb9630); color: #4a2f0f; }
.showcase-medallion--cream { background: linear-gradient(135deg, #fcf6e9, #d4b995); color: #6a4e2f; }
.showcase-medallion--rust { background: linear-gradient(135deg, #df9a75, #a34d2a); color: #36180f; }

.showcase-card--bundle {
  background:
    linear-gradient(180deg, rgba(236, 226, 206, 0.8), rgba(255, 250, 242, 0.96));
}

.bundle-stack {
  position: relative;
  width: 6.2rem;
  height: 5.8rem;
  margin-top: 1.4rem;
  margin-bottom: 1.35rem;
}

.bundle-stack span {
  position: absolute;
  inset: auto 0 0 auto;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 1.2rem;
  border: 1px dashed rgba(45, 80, 22, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.bundle-stack span:nth-child(1) {
  left: 0;
  top: 0.9rem;
  background: linear-gradient(135deg, #dfe9d1, #88a166);
}

.bundle-stack span:nth-child(2) {
  left: 0.7rem;
  top: 0.45rem;
  background: linear-gradient(135deg, #efd48a, #cb9630);
}

.bundle-stack span:nth-child(3) {
  left: 1.4rem;
  top: 0;
  background: linear-gradient(135deg, #ebc1ad, #a34d2a);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in,
  .patch-card,
  .testimonial-card,
  .btn-primary,
  .showcase-card {
    transition: none;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}
