/* ============================================
   PUPPY POTTY TRAINING - PRODUCTION CSS
   Warm Minimalism Design System
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   ROOT VARIABLES & COLOR PALETTE
   ============================================ */

:root {
  /* Warm Minimalism Color Palette */
  --warm-cream: #F5F1E8;
  --sage-green: #B8D4C8;
  --terracotta: #D97757;
  --sky-blue: #A8D5E2;
  --dark-slate: #2C3E50;
  --light-gray: #F9F7F4;
  --text-gray: #7A8A7E;
  --border-color: #E8E3D8;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Typography */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--dark-slate);
  background-color: var(--warm-cream);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
}

h2 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
}

p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-gray);
}

/* ============================================
   LAYOUT & CONTAINER
   ============================================ */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: 1fr;
}

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

.grid-3 {
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

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

.gap-8 {
  gap: var(--spacing-xl);
}

.gap-12 {
  gap: 3rem;
}

.items-center {
  align-items: center;
}

.max-width-3xl {
  max-width: 48rem;
}

/* ============================================
   BUTTONS & CTA
   ============================================ */

.cta-button {
  display: inline-block;
  background-color: var(--terracotta);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.3);
  border: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.cta-button:hover {
  background-color: #C86547;
  box-shadow: 0 6px 16px rgba(217, 119, 87, 0.4);
  transform: translateY(-2px);
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.cta-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.cta-wrapper a {
  width: 100%;
}

@media (min-width: 768px) {
  .cta-wrapper {
    flex-direction: column;
    width: auto;
  }
  
  .cta-wrapper a {
    width: auto;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  padding: 3rem 0 4rem;
  background: linear-gradient(135deg, var(--warm-cream) 0%, var(--light-gray) 100%);
}

@media (min-width: 768px) {
  .hero {
    padding: 5rem 0 6rem;
  }
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero .subheadline {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--text-gray);
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.highlight {
  color: var(--terracotta);
}

/* ============================================
   DIVIDERS
   ============================================ */

.divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6rem;
  color: var(--warm-cream);
}

@media (min-width: 768px) {
  .divider {
    height: 8rem;
  }
}

/* ============================================
   PROBLEM SECTION
   ============================================ */

.problem-section {
  position: relative;
  background-color: white;
  padding: 4rem 0;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .problem-section {
    padding: 6rem 0;
    margin-top: 4rem;
  }
}

.problem-section h2 {
  margin-bottom: 1.5rem;
  color: var(--dark-slate);
}

.problem-section p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

/* ============================================
   VALUE SECTION
   ============================================ */

.value-section {
  position: relative;
  background: linear-gradient(135deg, var(--light-gray) 0%, white 100%);
  padding: 4rem 0;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .value-section {
    padding: 6rem 0;
    margin-top: 4rem;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
  color: var(--dark-slate);
}

.section-header p {
  font-size: 1.125rem;
  max-width: 32rem;
  margin: 0 auto;
}

.pillar-card {
  background-color: white;
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.pillar-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-8px);
}

.pillar-card h3 {
  margin-bottom: 1rem;
  color: var(--dark-slate);
}

.pillar-card p {
  font-size: 1rem;
}

.icon-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

/* ============================================
   SUCCESS SECTION
   ============================================ */

.success-section {
  background-color: white;
  padding: 4rem 0;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .success-section {
    padding: 6rem 0;
    margin-top: 4rem;
  }
}

.success-image img {
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.success-text h2 {
  margin-bottom: 1.5rem;
  color: var(--dark-slate);
}

.success-text p {
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.benefits-list {
  list-style: none;
  padding: 0;
}

.benefits-list li {
  padding: 0.75rem 0;
  font-size: 1.125rem;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ============================================
   TRAINING SECTION
   ============================================ */

.training-section {
  background: linear-gradient(135deg, var(--light-gray) 0%, white 100%);
  padding: 4rem 0;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .training-section {
    padding: 6rem 0;
    margin-top: 4rem;
  }
}

.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

.timeline-item {
  background-color: white;
  padding: 2rem;
  border-radius: 1rem;
  border-left: 4px solid var(--terracotta);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-marker {
  background-color: var(--terracotta);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.timeline-item h3 {
  margin-bottom: 0.5rem;
  color: var(--dark-slate);
}

.timeline-item p {
  font-size: 0.95rem;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

.testimonials-section {
  background-color: white;
  padding: 4rem 0;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .testimonials-section {
    padding: 6rem 0;
    margin-top: 4rem;
  }
}

.testimonial-card {
  background-color: var(--light-gray);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.testimonial-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stars {
  color: var(--terracotta);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  letter-spacing: 0.25rem;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--dark-slate);
  font-style: italic;
}

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

.avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-weight: 600;
  color: var(--dark-slate);
  margin: 0;
}

.author-dog {
  font-size: 0.875rem;
  color: var(--text-gray);
  margin: 0;
}

/* ============================================
   RELIEF SECTION
   ============================================ */

.relief-section {
  background: linear-gradient(135deg, var(--light-gray) 0%, white 100%);
  padding: 4rem 0;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .relief-section {
    padding: 6rem 0;
    margin-top: 4rem;
  }
}

.relief-text h2 {
  margin-bottom: 1.5rem;
  color: var(--dark-slate);
}

.relief-text p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.relief-image img {
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ============================================
   FINAL CTA SECTION
   ============================================ */

.final-cta-section {
  background: linear-gradient(135deg, var(--terracotta) 0%, #C86547 100%);
  padding: 4rem 0;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .final-cta-section {
    padding: 6rem 0;
    margin-top: 4rem;
  }
}

.cta-box {
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
}

.cta-box h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-box > p:first-of-type {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.cta-box .cta-button {
  background-color: white;
  color: var(--terracotta);
  margin: 0 auto 1rem;
  width: 100%;
  max-width: 100%;
}

.cta-box .cta-button:hover {
  background-color: var(--light-gray);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.guarantee-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.final-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: var(--dark-slate);
  color: white;
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.separator {
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
  opacity: 0;
}

/* ============================================
   RESPONSIVE FIXES FOR MOBILE
   ============================================ */

@media (max-width: 400px) {
  /* CTA Button overflow fix */
  .cta-button {
    font-size: 14px !important;
    padding: 12px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 90% !important;
    box-sizing: border-box !important;
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Text container fix for cutoff text */
  p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    height: auto !important;
    min-height: fit-content !important;
    line-height: 1.6 !important;
  }

  /* Specific fix for CTA link wrapper */
  a[href*="betterdailyguide"] {
    max-width: 90% !important;
    width: 90% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .cta-wrapper {
    width: 100% !important;
  }

  .cta-wrapper a {
    width: 100% !important;
    max-width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Headline responsive */
  h1 {
    font-size: 1.75rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  /* Section padding */
  .hero {
    padding: 2rem 0 3rem !important;
  }

  .problem-section,
  .value-section,
  .success-section,
  .training-section,
  .testimonials-section,
  .relief-section,
  .final-cta-section {
    padding: 2rem 0 !important;
    margin-top: 1rem !important;
  }

  /* Grid adjustments */
  .grid-3 {
    gap: 1rem !important;
  }

  .gap-12 {
    gap: 1.5rem !important;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

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

/* Focus states for keyboard navigation */
button:focus,
a:focus {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  body {
    color: #000;
  }

  .cta-button {
    border: 2px solid var(--dark-slate);
  }
}
