/**
 * Paper Plate Theme - StackCheck Brand
 *
 * Colors: Sunday Table palette
 * Typography: Fraunces (display) + Plus Jakarta Sans (body)
 */

/* Base styles */
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background-color: #FDFBF7;
  color: #2D2A26;
}

/* Prose styles for article content */
.prose {
  max-width: 65ch;
  line-height: 1.75;
}

.prose h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #2D2A26;
}

.prose h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #2D2A26;
}

.prose h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #2D2A26;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: #1B4332;
  text-decoration: underline;
  text-decoration-color: #C45A3B;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.prose a:hover {
  color: #2D5A45;
}

.prose strong {
  font-weight: 600;
  color: #2D2A26;
}

.prose blockquote {
  border-left: 4px solid #C45A3B;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #4A4640;
}

/* Warning/caution boxes - ensure readable text */
.prose .text-terracotta,
.text-terracotta {
  color: #C45A3B !important;
}

/* Fix amber text (used in warning boxes) - too light on cream */
.text-amber-300,
.text-amber-400,
.prose .text-amber-300,
.prose .text-amber-400 {
  color: #B45309 !important; /* Darker amber/orange for readability */
}

/* Warning boxes - white bg with terracotta border */
.bg-terracotta\/10,
[class*="bg-terracotta/10"] {
  background-color: #FFFFFF !important;
  border-left: 4px solid #C45A3B !important;
  box-shadow: 0 1px 3px rgba(45, 42, 38, 0.08);
}

/* Info boxes - cream bg with forest border and green-tinted shadow */
.bg-cream.border-l-4,
[class*="border-l-4"][class*="border-forest"],
.prose div.bg-cream[class*="rounded"] {
  background-color: #F5F1E8;
  border-left: 4px solid #1B4332 !important;
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.12), 0 1px 3px rgba(27, 67, 50, 0.08);
}

.prose code {
  background-color: #F5F1E8;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.prose pre {
  background-color: #2D2A26;
  color: #F5F1E8;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Study/citation cards */
.study-card {
  background-color: #F5F1E8;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-left: 4px solid #1B4332;
  box-shadow: 0 1px 3px rgba(45, 42, 38, 0.08), 0 1px 2px rgba(45, 42, 38, 0.06);
}

/* Card shadow utility for cream boxes */
.card-shadow {
  box-shadow: 0 1px 3px rgba(45, 42, 38, 0.08), 0 1px 2px rgba(45, 42, 38, 0.06);
}

.study-card-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: #1B4332;
  margin-bottom: 0.5rem;
}

/* Key takeaway boxes */
.takeaway-box {
  background-color: #1B4332;
  color: #FDFBF7;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.takeaway-box h3 {
  font-family: 'Fraunces', Georgia, serif;
  color: #F5F1E8;
  margin-top: 0;
}

/* CTA section */
.cta-section {
  background-color: #F5F1E8;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  margin: 3rem 0;
  box-shadow: 0 1px 3px rgba(45, 42, 38, 0.08), 0 1px 2px rgba(45, 42, 38, 0.06);
}

.cta-button {
  display: inline-block;
  background-color: #1B4332;
  color: #FDFBF7 !important;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.2s;
}

.cta-button:hover {
  background-color: #2D5A45;
  color: #FDFBF7 !important;
}

/* Force white text on forest green buttons inside prose */
.prose a.bg-forest,
.prose .bg-forest a,
a.bg-forest,
.prose a[class*="bg-forest"],
a[class*="bg-forest"] {
  color: #FDFBF7 !important;
  text-decoration: none !important;
}

.prose a.bg-forest:hover,
a.bg-forest:hover,
.prose a[class*="bg-forest"]:hover,
a[class*="bg-forest"]:hover {
  color: #FDFBF7 !important;
}

/* Info cards - left aligned with forest green left border */
.prose > div.border-l-4,
.prose > div[class*="border-l-4"] {
  text-align: left;
  border-left: 4px solid #1B4332 !important;
  box-shadow: 0 1px 3px rgba(27, 67, 50, 0.15), 0 1px 2px rgba(27, 67, 50, 0.1);
}

/* CTA boxes - centered (boxes with buttons/links inside) */
.prose > div:has(a[href*="play.google.com"]),
.prose > div:has(a[href*="apps.apple.com"]),
.prose > div:has(a.bg-forest),
.prose > div:has(a.bg-terracotta) {
  text-align: center;
}

.prose > div:has(a[href*="play.google.com"]) h3,
.prose > div:has(a.bg-forest) h3,
.prose > div:has(a.bg-terracotta) h3 {
  text-align: center;
}

.prose > div:has(a[href*="play.google.com"]) p,
.prose > div:has(a.bg-forest) p,
.prose > div:has(a.bg-terracotta) p {
  text-align: center;
}

/* Paper texture overlay (optional) */
.paper-texture {
  position: relative;
}

.paper-texture::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Header navigation */
.nav-link {
  color: #4A4640;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #1B4332;
}

/* Footer */
footer {
  border-top: 1px solid #F5F1E8;
  padding: 2rem 0;
  margin-top: 4rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .prose h1 {
    font-size: 2rem;
  }

  .prose h2 {
    font-size: 1.5rem;
  }
}
