/* ----------------------------------------------------
   Material Design 3 (MD3) - Cute & Clean Pastel System
---------------------------------------------------- */
:root {
  /* MD3 Light Color Palette (Tailored for Kuku Theme) */
  --md-sys-color-primary: #FF9E79;       /* Kuku Peach */
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #FFE5D9;
  --md-sys-color-on-primary-container: #802F00;
  
  --md-sys-color-secondary: #B19FFB;     /* Tarot Lavender */
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-secondary-container: #E8E5FF;
  --md-sys-color-on-secondary-container: #2A176B;
  
  --md-sys-color-tertiary: #8DE4B2;      /* Forest Mint */
  --md-sys-color-on-tertiary: #0F3722;
  --md-sys-color-tertiary-container: #D1FAE5;
  --md-sys-color-on-tertiary-container: #064E3B;

  --md-sys-color-background: #FCF9F6;    /* Soft Cream */
  --md-sys-color-on-background: #2E2724;
  --md-sys-color-surface: #FFFFFF;
  --md-sys-color-on-surface: #2E2724;
  --md-sys-color-surface-variant: #F5EBE6;
  --md-sys-color-on-surface-variant: #53433F;
  --md-sys-color-outline: #E6D5CE;
  
  /* Elevation Shadows (MD3 style) */
  --md-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
  --md-elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
  --md-elevation-3: 0px 1px 3px 0px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
  --md-elevation-4: 0px 2px 3px 0px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15);
  
  /* Fonts */
  --font-title: 'Gaegu', cursive;
  --font-body: 'Noto Sans KR', sans-serif;
  --font-accent: 'Outfit', sans-serif;
  --font-playful: 'Quicksand', sans-serif;
}

/* Base Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Animations and Decorations */
.bg-decorations {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}

.cloud {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.6;
}

.cloud-1 {
  top: 10%;
  left: -5%;
  animation: floatCloud 25s linear infinite;
}

.cloud-2 {
  top: 25%;
  right: -5%;
  animation: floatCloudReverse 30s linear infinite;
}

.star {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.8;
  animation: pulseStar 3s ease-in-out infinite;
}

.star-1 {
  top: 8%;
  right: 15%;
  animation-delay: 0.5s;
}

.star-2 {
  top: 18%;
  left: 10%;
  animation-delay: 1.5s;
}

.star-3 {
  top: 60%;
  right: 8%;
  animation-delay: 2.2s;
}

@keyframes floatCloud {
  0% { transform: translateX(-100px); }
  100% { transform: translateX(calc(100vw + 100px)); }
}

@keyframes floatCloudReverse {
  0% { transform: translateX(100px); }
  100% { transform: translateX(calc(-100vw - 100px)); }
}

@keyframes pulseStar {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* Top App Bar */
.top-app-bar {
  background-color: rgba(253, 248, 245, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--md-sys-color-outline);
  transition: box-shadow 0.3s;
}

.app-bar-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-emoji {
  font-size: 1.8rem;
  animation: bounceLogo 2s ease-in-out infinite;
}

.brand-name {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--md-sys-color-on-background);
  letter-spacing: -0.5px;
}

@keyframes bounceLogo {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(8deg); }
}

/* Main Container */
.main-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 3.5rem;
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-title {
  font-family: var(--font-title);
  font-size: 2.8rem;
  color: var(--md-sys-color-on-background);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 650px;
  margin: 0 auto;
  font-weight: 400;
  word-break: keep-all;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Services Grid Layout */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  width: 100%;
  margin-bottom: 2rem;
}

/* MD3 Elevated Card Styling */
.md-card {
  background-color: var(--md-sys-color-surface);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--md-elevation-1);
  border: 1px solid var(--md-sys-color-outline);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.card-ladder {
  animation-delay: 0.15s;
}

.card-tarot {
  animation-delay: 0.3s;
}

.md-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--md-elevation-3);
  border-color: var(--md-sys-color-primary);
}

.card-tarot:hover {
  border-color: var(--md-sys-color-secondary);
}

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

/* Image section of cards */
.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: var(--md-sys-color-surface-variant);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.md-card:hover .card-image {
  transform: scale(1.05);
}

.card-image-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.overlay-badge {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: inline-block;
  color: var(--md-sys-color-on-background);
}

/* Card Body Content */
.card-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-header-group {
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.9rem;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* MD3 Chips for Tags */
.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.md-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  display: inline-block;
  letter-spacing: -0.2px;
}

.chip-orange {
  background-color: #FFE5D9;
  color: #802F00;
}

.chip-green {
  background-color: #D1FAE5;
  color: #064E3B;
}

.chip-yellow {
  background-color: #FEF3C7;
  color: #78350F;
}

.chip-purple {
  background-color: #E8E5FF;
  color: #2A176B;
}

.chip-pink {
  background-color: #FCE7F3;
  color: #9D174D;
}

.chip-indigo {
  background-color: #E0E7FF;
  color: #1E3A8A;
}

.card-description {
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 2rem;
  flex: 1;
  word-break: keep-all;
}

/* MD3 Filled Buttons */
.card-actions {
  display: flex;
  justify-content: flex-end;
}

.md-btn {
  font-family: var(--font-playful);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--md-elevation-1);
}

.btn-filled {
  color: #FFFFFF;
}

.btn-ladder-theme {
  background-color: var(--md-sys-color-primary);
}

.btn-ladder-theme:hover {
  background-color: #E67A50;
  box-shadow: var(--md-elevation-2);
}

.btn-tarot-theme {
  background-color: var(--md-sys-color-secondary);
}

.btn-tarot-theme:hover {
  background-color: #927DFA;
  box-shadow: var(--md-elevation-2);
}

.btn-arrow {
  transition: transform 0.3s;
}

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

/* Footer styling */
.app-footer {
  background-color: var(--md-sys-color-surface-variant);
  border-top: 1px solid var(--md-sys-color-outline);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.copyright {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
}

.subtext {
  font-size: 0.75rem;
  color: #8C7873;
  font-family: var(--font-accent);
}

/* Dynamic Ripple effect on click */
.ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnimation 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnimation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ----------------------------------------------------
   Responsive Layout Settings (Mobile, Tablet, Desktop)
---------------------------------------------------- */

@media (min-width: 768px) {
  /* Tablet & Desktop */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

@media (max-width: 767px) {
  /* Mobile styling tweaks */
  .desktop-only {
    display: none;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .main-container {
    padding: 1.5rem 1rem;
  }
  
  .md-card {
    border-radius: 24px;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .card-title {
    font-size: 1.6rem;
  }
}
