/* Modern CSS Reset & Variables */
:root {
  /* Color Palette - Refined & Premium */
  --bg-color: #FAFAFA;
  --surface-color: #FFFFFF;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-tertiary: #888888;

  --accent-color: #4F46E5;
  /* Indigo 600 */
  --accent-hover: #4338CA;
  /* Indigo 700 */
  --accent-light: #E0E7FF;
  /* Indigo 100 */

  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Spacing & Layout */
  --container-width: 1024px;
  --header-height: 80px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@font-face {
  font-family: "Chulapa";
  src: url("../../assets/fonts/Chulapa-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  line-height: 1.2;
}

.display-title {
  font-family: "Chulapa", serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 60ch;
  margin: 0 auto 2rem;
  text-align: center;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--text-primary);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background-color: #000;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
}

.btn-secondary:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.03);
}

/* Header */
.site-header {
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo {
  font-family: "Chulapa", serif;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Product Triad */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.product-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 0, 0, 0.12);
}

.product-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.product-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background-color: var(--bg-color);
  /* Fallback */
}

/* Placeholders for missing icons */
.product-icon.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
  color: var(--accent-color);
  font-weight: bold;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.product-desc {
  color: var(--text-secondary);
  margin-bottom: auto;
  /* Pushes footer down */
}

.product-meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.works-with {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Why Chapiware */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.pillar-card {
  padding: 1.5rem;
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.pillar-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.pillar-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Privacy Promise */
.privacy-section {
  background-color: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 4rem auto;
  box-shadow: var(--shadow-sm);
}

.privacy-list {
  text-align: left;
  max-width: 500px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.privacy-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--text-secondary);
}

.check-icon {
  color: #10B981;
  /* Green */
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* Ecosystem */
.ecosystem-timeline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 3rem 0;
  color: var(--text-secondary);
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 50px;
}

.timeline-arrow {
  color: var(--text-tertiary);
}

/* Founder Note */
.founder-note {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.founder-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.founder-sig {
  font-weight: 600;
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  padding: 4rem 0 2rem;
  background-color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .display-title {
    font-size: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    padding: 0 2rem;
  }

  .privacy-section {
    padding: 2rem 1rem;
  }
}

/* Contact Section */
.contact-section {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.contact-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Juicy Effects */
.wave-emoji {
  display: inline-block;
  transform-origin: 70% 70%;
}

.contact-section:hover .wave-emoji {
  animation: wave 2.5s infinite;
}

@keyframes wave {
  0% {
    transform: rotate(0deg);
  }

  10% {
    transform: rotate(14deg);
  }

  20% {
    transform: rotate(-8deg);
  }

  30% {
    transform: rotate(14deg);
  }

  40% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(10deg);
  }

  60% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.contact-section .btn-primary {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-section .btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.5);
}