/* Modern CSS Reset & Variables */
:root {
  --bg-color: #F5F5F7;
  --surface-color: #ffffff;
  --surface-strong: #ffffff;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --accent-color: #000000;
  --accent-hover: #333333;
  --accent-light: #f5f5f5;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.08);
  --container-width: 1024px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Load Chulapa only on pages that actually use it. */

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

html {
  scroll-behavior: smooth;
}

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

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: 2.75rem 0;
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 12ch;
  margin: 0 auto 0.9rem;
  text-align: center;
}

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

.eyebrow {
  color: var(--accent-color);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

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

.section-intro {
  font-size: 1.02rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 2rem;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
  box-shadow: 0 10px 24px rgba(32, 56, 100, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(32, 56, 100, 0.24);
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.72);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.brand-bar {
  padding-top: 1.2rem;
  padding-bottom: 0.35rem;
  position: relative;
  z-index: 1;
}

.brand-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo-image {
  display: block;
  width: auto;
  height: 1.55rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

.site-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.72);
}

.site-nav-featured {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

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

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

.hero-note {
  display: block;
  max-width: 42ch;
  margin: 1.1rem auto 0;
  color: var(--text-tertiary);
  font-size: 0.98rem;
}

#products.section {
  padding-top: 1.2rem;
}

/* Featured App Section */
.featured-section {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.featured-stack {
  display: grid;
  gap: 1.5rem;
}

.featured-card {
  display: flex;
  background: var(--surface-strong);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  flex-direction: row;
}

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

.featured-media {
  flex: 0 0 320px;
  background-color: #F0F0F2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-right: 1px solid var(--border-color);
}

.featured-media img {
  max-height: 400px;
  width: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.featured-content {
  flex: 1;
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.featured-app-name {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.featured-title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.featured-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 2rem;
  max-width: 48ch;
}

.featured-card-secondary {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.featured-card-secondary .featured-media {
  flex-basis: 250px;
  background-color: #F5F5F7;
}

.featured-card-secondary .featured-media img {
  max-height: 260px;
}

.featured-card-secondary .featured-content {
  padding: 2.5rem 2.75rem;
}

.featured-card-secondary .featured-title {
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  margin-bottom: 1rem;
}

.featured-card-secondary .featured-desc {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 800px) {
  .featured-card {
    flex-direction: column;
  }
  .featured-media {
    flex: none;
    height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .featured-media img {
    max-height: 100%;
  }
  .featured-content {
    padding: 2.5rem 1.75rem;
  }
  .featured-card-secondary .featured-media {
    height: 240px;
  }
  .featured-card-secondary .featured-content {
    padding: 2rem 1.5rem;
  }
}

/* Product Cards Redesign */
.product-group {
  margin-bottom: 2rem;
}

.tools-showcase {
  margin-top: 4.5rem;
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 249, 251, 0.92));
  box-shadow: var(--shadow-sm);
}

.tools-header {
  margin-bottom: 1.75rem;
}

.tools-showcase .group-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.6rem;
}

.tools-intro {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 42ch;
}

.group-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--surface-strong);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
}

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

.product-media {
  height: 280px;
  background-color: #F7F7F9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 640px) {
  .product-media {
    height: 240px;
  }
}

.product-media img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.4s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.02);
}

.product-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.product-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.product-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.product-copy {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.product-tag {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.product-link-label {
  margin-top: auto;
  color: var(--accent-color);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.product-link-label::after {
  content: '→';
  margin-left: 0.4rem;
  transition: transform 0.2s ease;
}

.product-card:hover .product-link-label::after {
  transform: translateX(4px);
}

/* Philosophy Section */
.philosophy-section {
  padding: 4.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 2rem 0;
}

.philosophy-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.philosophy-highlight {
  color: var(--accent-color);
  display: block;
  margin-top: 1rem;
}

.social-proof {
  padding: 2.4rem 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.social-proof-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.social-proof-header .section-title {
  margin-bottom: 0.75rem;
}

.social-proof-header .section-intro {
  margin-bottom: 0;
}

.social-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.proof-card {
  background: var(--surface-strong);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: all 0.25s ease;
}

.proof-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.12);
}

.proof-stars {
  color: #9a7b30;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
}

.proof-rating {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.proof-rating strong {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.proof-rating span,
.proof-meta {
  color: var(--text-secondary);
}

.proof-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.proof-meta {
  font-size: 0.95rem;
}

.proof-footnote {
  margin-top: 1.2rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.essay-main {
  flex: 1;
}

.essay-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.75rem 0 1rem;
}

.essay-header {
  margin-bottom: 2.75rem;
}

.essay-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.essay-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 42ch;
}

.essay-body {
  max-width: 720px;
}

.essay-body section + section {
  margin-top: 3rem;
}

.essay-body h2 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}

.essay-body p,
.essay-body li {
  font-size: 1.06rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.essay-body p + p {
  margin-top: 1.15rem;
}

.essay-body ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin-top: 0.75rem;
}

.essay-body li + li {
  margin-top: 0.55rem;
}

.essay-lead {
  font-size: 1.2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  padding: 3rem 0 2rem;
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
}

.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: 960px) {
  .container {
    padding: 0 2rem;
  }

  .brand-bar-inner {
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .section + .section {
    padding-top: 4rem;
  }
}

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

  .section + .section {
    padding-top: 4.5rem;
  }

  .brand-bar {
    padding-top: 1rem;
  }

  .site-nav {
    width: 100%;
    gap: 0.35rem;
  }

  .site-nav a {
    font-size: 0.92rem;
    padding: 0.42rem 0.72rem;
  }

  .hero-actions {
    padding: 0 1rem;
  }

  .hero {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
  }

  .eyebrow {
    margin-bottom: 0.7rem;
  }

  .lead {
    font-size: 1.02rem;
  }

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

  .tools-showcase,
  .social-proof {
    padding: 1.5rem;
  }

  .essay-shell {
    padding-top: 2rem;
  }

  .essay-body p,
  .essay-body li {
    font-size: 1rem;
  }

  .contact-personal-note {
    font-size: 1rem;
  }

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

/* Contact Section */
.contact-section {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(247, 249, 253, 0.9));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

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

.contact-personal-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-primary);
  font-size: 1.06rem;
  font-style: italic;
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 auto 2rem;
  max-width: 34ch;
}

/* 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.03);
  box-shadow: 0 16px 26px rgba(32, 56, 100, 0.22);
}

.page-glow {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.page-glow-left {
  top: -10rem;
  left: -12rem;
  background: rgba(255, 213, 184, 0.8);
}

.page-glow-right {
  top: -8rem;
  right: -14rem;
  background: rgba(191, 209, 255, 0.85);
}
