/* ==========================================================================
   Aksel's ONEderful Year - Custom Stylesheet
   Theme: Patchwork, Stitched Fabric, Gingham, Felt, Playful Warmth
   ========================================================================== */

:root {
  --color-primary-blue: #3B82F6;
  --color-sky-blue: #60A5FA;
  --color-soft-blue: #DBEAFE;
  --color-warm-brown: #78350F;
  --color-caramel: #92400E;
  --color-soft-cream: #FFFDF8;
  --color-linen: #FAF6EE;
  --color-berry-red: #EF4444;
  --color-gingham-red: #DC2626;
  --color-sun-yellow: #F59E0B;
  --color-butter-yellow: #FEF08A;
  --color-sage-green: #10B981;
  --color-forest-green: #047857;
  --color-tangerine: #F97316;
}

/* Background canvas texture */
body {
  background-color: var(--color-linen);
  background-image: 
    radial-gradient(#e5dec9 1px, transparent 1px),
    radial-gradient(#e5dec9 1px, var(--color-linen) 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  color: #4B382A;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

/* Fonts */
.font-display {
  font-family: 'Fredoka', 'Quicksand', cursive, sans-serif;
}
.font-handwritten {
  font-family: 'Short Stack', cursive, sans-serif;
}
.font-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Gingham CSS Patterns */
.bg-gingham-blue {
  background-color: #ffffff;
  background-image: 
    linear-gradient(90deg, rgba(59, 130, 246, 0.15) 50%, transparent 50%),
    linear-gradient(rgba(59, 130, 246, 0.15) 50%, transparent 50%);
  background-size: 24px 24px;
}

.bg-gingham-red {
  background-color: #ffffff;
  background-image: 
    linear-gradient(90deg, rgba(239, 68, 68, 0.15) 50%, transparent 50%),
    linear-gradient(rgba(239, 68, 68, 0.15) 50%, transparent 50%);
  background-size: 24px 24px;
}

.bg-gingham-orange {
  background-color: #ffffff;
  background-image: 
    linear-gradient(90deg, rgba(249, 115, 22, 0.15) 50%, transparent 50%),
    linear-gradient(rgba(249, 115, 22, 0.15) 50%, transparent 50%);
  background-size: 24px 24px;
}

.bg-gingham-yellow {
  background-color: #ffffff;
  background-image: 
    linear-gradient(90deg, rgba(245, 158, 11, 0.15) 50%, transparent 50%),
    linear-gradient(rgba(245, 158, 11, 0.15) 50%, transparent 50%);
  background-size: 24px 24px;
}

.bg-gingham-green {
  background-color: #ffffff;
  background-image: 
    linear-gradient(90deg, rgba(16, 185, 129, 0.15) 50%, transparent 50%),
    linear-gradient(rgba(16, 185, 129, 0.15) 50%, transparent 50%);
  background-size: 24px 24px;
}

/* Stitched Borders & Patchwork Elements */
.stitched-border {
  border: 3px dashed rgba(120, 53, 15, 0.35);
  box-shadow: inset 0 0 0 4px #ffffff, 0 8px 20px rgba(120, 53, 15, 0.08);
}

.stitched-border-white {
  border: 3px dashed rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.05), 0 8px 20px rgba(0, 0, 0, 0.08);
}

.stitched-badge {
  border: 2px dashed rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stitched-card {
  position: relative;
  background: #ffffff;
  border-radius: 1.5rem;
  border: 3px dashed #E2D9C8;
  box-shadow: 0 10px 25px -5px rgba(120, 53, 15, 0.07), 0 8px 10px -6px rgba(120, 53, 15, 0.05);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stitched-card:hover {
  transform: translateY(-6px) rotate(0.5deg);
  box-shadow: 0 20px 30px -10px rgba(120, 53, 15, 0.15), 0 10px 15px -5px rgba(120, 53, 15, 0.08);
}

/* Button & Patch Details */
.felt-button {
  position: relative;
  box-shadow: 0 6px 0 rgba(0,0,0,0.15), 0 10px 20px rgba(0,0,0,0.1);
  transition: all 0.15s ease;
}

.felt-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.15), 0 4px 10px rgba(0,0,0,0.1);
}

/* Cute fabric button with stitch cross */
.sewn-button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), 0 2px 5px rgba(0,0,0,0.2);
}

.sewn-button::after {
  content: '✕';
  font-size: 11px;
  color: rgba(0,0,0,0.4);
  font-weight: 900;
  line-height: 1;
}

/* Bunting / Pennant Flag Garland */
.bunting-container {
  display: flex;
  justify-content: space-around;
  width: 100%;
  overflow: hidden;
  padding: 0 10px;
}

.pennant {
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 32px solid #EF4444;
  position: relative;
  transform-origin: top center;
  animation: swing 3s ease-in-out infinite alternate;
}

.pennant:nth-child(2n) {
  border-top-color: #3B82F6;
  animation-delay: 0.3s;
}

.pennant:nth-child(3n) {
  border-top-color: #F59E0B;
  animation-delay: 0.6s;
}

.pennant:nth-child(4n) {
  border-top-color: #10B981;
  animation-delay: 0.9s;
}

.pennant:nth-child(5n) {
  border-top-color: #F97316;
  animation-delay: 1.2s;
}

@keyframes swing {
  0% { transform: rotate(-6deg); }
  100% { transform: rotate(6deg); }
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-slow {
  animation: float 6s ease-in-out infinite;
}

.animate-float-reverse {
  animation: float 5s ease-in-out infinite reverse;
}

/* Sparkle & Pulse */
@keyframes pulse-subtle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2.5s ease-in-out infinite;
}

/* Wiggle animation */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}

.hover-wiggle:hover {
  animation: wiggle 0.5s ease-in-out infinite;
}

/* Candle flame glow & flicker */
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-1deg); opacity: 0.95; }
  25% { transform: scale(1.1) rotate(1deg); opacity: 1; }
  50% { transform: scale(0.95) rotate(-2deg); opacity: 0.9; }
  75% { transform: scale(1.05) rotate(2deg); opacity: 1; }
}

.flame {
  animation: flicker 0.6s infinite alternate;
  transform-origin: bottom center;
}

/* Ribbon badge banner */
.ribbon-banner {
  position: relative;
  background: #EF4444;
  color: white;
  padding: 6px 24px;
}

.ribbon-banner::before,
.ribbon-banner::after {
  content: '';
  position: absolute;
  top: 0;
  border: 18px solid #DC2626;
  z-index: -1;
}

.ribbon-banner::before {
  left: -24px;
  border-left-color: transparent;
}

.ribbon-banner::after {
  right: -24px;
  border-right-color: transparent;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #F5EFE6;
}

::-webkit-scrollbar-thumb {
  background: #D97706;
  border-radius: 9999px;
  border: 2px solid #F5EFE6;
}

::-webkit-scrollbar-thumb:hover {
  background: #B45309;
}

/* Image photo frame styling */
.photo-polaroid {
  background: #FFFFFF;
  padding: 12px 12px 24px 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border: 1px solid #ECE3D2;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.photo-polaroid:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 0 16px 30px rgba(0,0,0,0.14);
}

/* Masked taped corner effect */
.washi-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 90px;
  height: 24px;
  background-color: rgba(254, 240, 138, 0.85);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-left: 2px dashed rgba(0,0,0,0.1);
  border-right: 2px dashed rgba(0,0,0,0.1);
  z-index: 10;
}

/* Modal animation */
.modal-backdrop {
  backdrop-filter: blur(6px);
  background-color: rgba(75, 56, 42, 0.6);
}

/* Milestone badge */
.milestone-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  font-weight: 800;
  border: 2px dashed #ffffff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
