/* ============================================
   Playful Geometric Design System
   My Pet Pet Website Styles
   ============================================ */

/* Design Tokens */
:root {
  /* Colors */
  --bg: #FFFDF5;
  --foreground: #1E293B;
  --muted: #F1F5F9;
  --muted-foreground: #64748B;
  --accent: #8B5CF6;
  --accent-foreground: #FFFFFF;
  --secondary: #F472B6;
  --tertiary: #FBBF24;
  --quaternary: #34D399;
  --border: #E2E8F0;
  --input: #FFFFFF;
  --card: #FFFFFF;
  --ring: #8B5CF6;
  
  /* Typography */
  --font-heading: "Outfit", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-pop: 4px 4px 0px 0px #1E293B;
  --shadow-pop-hover: 6px 6px 0px 0px #1E293B;
  --shadow-pop-active: 2px 2px 0px 0px #1E293B;
  --shadow-soft: 8px 8px 0px #E2E8F0;
  --shadow-pink: 8px 8px 0px #F472B6;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 48px;
  --spacing-xl: 96px;
  
  /* Border Width */
  --border-width: 2px;
  
  /* Animation */
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms ease;
  --transition-normal: 300ms var(--transition-bounce);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  margin-bottom: 1em;
  color: var(--muted-foreground);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
}

/* Header */
.header {
  padding: var(--spacing-md) 0;
  background-color: var(--card);
  border-bottom: var(--border-width) solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 253, 245, 0.9);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--foreground);
}

.logo-icon {
  font-size: 2rem;
  display: inline-block;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(3deg); }
  75% { transform: rotate(-3deg); }
}

.language-selector select {
  padding: var(--spacing-xs) var(--spacing-sm);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--input);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.language-selector select:hover {
  border-color: var(--accent);
  box-shadow: 2px 2px 0px 0px var(--accent);
}

.language-selector select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 2px 2px 0px 0px var(--ring);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: var(--border-width) solid var(--foreground);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--foreground);
  box-shadow: var(--shadow-pop);
}

.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-pop-hover);
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-pop-active);
}

.btn-large {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 1.125rem;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Hero Section */
.hero {
  padding: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-text {
  animation: popIn 0.6s var(--transition-bounce);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-title {
  margin-bottom: var(--spacing-md);
  color: var(--foreground);
}

.hero-subtitle {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
  color: var(--muted-foreground);
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-wrapper {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-width) solid var(--foreground);
  box-shadow: var(--shadow-soft);
  clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 85% 100%, 0% 100%);
}

.hero-screenshot {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
}

.hero-decoration {
  position: absolute;
  z-index: 1;
}

.hero-circle {
  width: 300px;
  height: 300px;
  background-color: var(--tertiary);
  border-radius: 50%;
  top: -50px;
  right: -50px;
  opacity: 0.3;
}

.hero-dots {
  width: 200px;
  height: 200px;
  background-image: radial-gradient(circle, var(--muted-foreground) 2px, transparent 2px);
  background-size: 20px 20px;
  bottom: -50px;
  left: -50px;
  opacity: 0.2;
}

/* Mission Section */
.mission {
  padding: var(--spacing-xl) 0;
  background-color: var(--muted);
}

.mission-card {
  background-color: var(--card);
  border: var(--border-width) solid var(--foreground);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-pink);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.mission-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  display: inline-block;
  animation: popIn 0.6s var(--transition-bounce) 0.2s both;
}

.mission-title {
  margin-bottom: var(--spacing-md);
  color: var(--secondary);
}

.mission-description {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
}

.mission-link {
  color: var(--secondary);
  font-weight: 600;
  font-size: 1.125rem;
}

.mission-link:hover {
  text-decoration: underline;
}

/* Features Section */
.features {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  font-size: clamp(2rem, 4vw, 2.5rem);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  position: relative;
}

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

.feature-card {
  background-color: var(--card);
  border: var(--border-width) solid var(--foreground);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-normal);
  position: relative;
}

.feature-card:hover {
  transform: rotate(-1deg) scale(1.02);
  box-shadow: var(--shadow-pop);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  border: var(--border-width) solid var(--foreground);
  position: relative;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--card);
}

.feature-icon-violet {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.feature-icon-pink {
  background-color: var(--secondary);
  color: var(--accent-foreground);
}

.feature-icon-yellow {
  background-color: var(--tertiary);
  color: var(--foreground);
}

.feature-title {
  margin-top: calc(-32px + var(--spacing-sm));
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

.feature-description {
  text-align: center;
  font-size: 0.9375rem;
}

.features-connector {
  display: none;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  width: 100%;
  height: 2px;
  z-index: 0;
}

@media (min-width: 768px) {
  .features-connector {
    display: block;
  }
}

/* Custom Pet Section */
.custom-pet {
  padding: var(--spacing-xl) 0;
  background-color: var(--muted);
}

.custom-pet-card {
  background-color: var(--quaternary);
  border: var(--border-width) solid var(--foreground);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-pop);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .custom-pet-card {
    grid-template-columns: 1fr 1fr;
  }
}

.custom-pet-title {
  margin-bottom: var(--spacing-md);
  color: var(--foreground);
}

.custom-pet-description {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
  color: var(--foreground);
}

.custom-pet-list {
  list-style: none;
  padding: 0;
}

.custom-pet-list li {
  padding: var(--spacing-xs) 0;
  padding-left: var(--spacing-md);
  position: relative;
  color: var(--foreground);
  font-weight: 500;
}

.custom-pet-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--foreground);
  font-weight: 700;
}

.custom-pet-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.custom-pet-screenshot {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--foreground);
  box-shadow: var(--shadow-soft);
}

.custom-pet-placeholder {
  font-size: 8rem;
  opacity: 0.3;
}

/* Financial Section */
.financial {
  padding: var(--spacing-xl) 0;
}

.financial-card {
  background-color: var(--tertiary);
  border: var(--border-width) solid var(--foreground);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-pop);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.financial-title {
  margin-bottom: var(--spacing-md);
  color: var(--foreground);
}

.financial-description {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
  color: var(--foreground);
}

.financial-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.financial-stat {
  background-color: var(--card);
  border: var(--border-width) solid var(--foreground);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: 2px 2px 0px 0px var(--foreground);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Download CTA Section */
.download-cta {
  padding: var(--spacing-xl) 0;
  background-color: var(--muted);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-title {
  margin-bottom: var(--spacing-md);
}

.download-subtitle {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.confetti {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--secondary);
  border-radius: 50%;
  animation: float 3s ease-in-out infinite;
  z-index: 0;
}

.confetti-1 {
  top: 20%;
  left: 10%;
  background-color: var(--accent);
  animation-delay: 0s;
}

.confetti-2 {
  top: 60%;
  right: 15%;
  background-color: var(--tertiary);
  animation-delay: 1s;
}

.confetti-3 {
  bottom: 20%;
  left: 20%;
  background-color: var(--quaternary);
  animation-delay: 2s;
}

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

/* Footer */
.footer {
  padding: var(--spacing-lg) 0;
  background-color: var(--card);
  border-top: var(--border-width) solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  display: inline-block;
  position: relative;
  z-index: 10;
}

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

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

.footer-copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* RTL Support */
[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] .hero-content {
  direction: rtl;
}

[dir="rtl"] .features-grid {
  direction: rtl;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .hero {
    padding: var(--spacing-lg) 0;
  }
  
  .hero-content {
    gap: var(--spacing-lg);
  }
  
  .mission-card,
  .financial-card {
    padding: var(--spacing-md);
  }
  
  .feature-card:hover {
    transform: scale(1.02);
  }
  
  .financial-stats {
    grid-template-columns: 1fr;
  }
  
  .confetti {
    display: none;
  }
}

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .btn,
  .confetti {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}
