@font-face {
  font-family: 'Comfortaa';
  src: url('/static/fonts/Comfortaa/Comfortaa-VariableFont_wght.woff2') format('woff2'),
       url('/static/fonts/Comfortaa/Comfortaa-VariableFont_wght.woff') format('woff'),
       url('/static/fonts/Comfortaa/Comfortaa-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --brand-dark-purple: #4B0082;
  --brand-very-dark-purple-navbar: #320652;
  --brand-header-text: #7A45A7;
  --brand-light-purple: #C89EFF;
  --brand-very-light-purple: #BEB3CC;
  --brand-pale-rose: #E6B3CC;
  --brand-body-bg: #FFDDFF;
  --brand-highlight: #E673E0;
  --brand-highlight-strong: #FF77FF;
  --brand-highlight-soft: #FFAAFF;
  --brand-highlight-softer: #FFCCFF;
  --base-beige: #F5F5F5;
  --pure-white: #FFFFFF;
  --shadow: rgba(0, 0, 0, 0.08);
  
  /* Font sizes - Desktop */
  --font-size-badge: 13px;
  --font-size-close-button: 20px;
  --font-size-company-name: 20px;
  --font-size-cta-button: 20px;
  --font-size-card-h3: 18px;
  --font-size-card-p: 15px;
  --font-size-hero-h1: 32px;
  --font-size-hero-p: 17px;
  --font-size-modal-header-h2: 18px;
  --font-size-footer-note: 16px;
  
  /* Font sizes - Mobile */
  --font-size-company-name-mobile: 14px;
  --font-size-cta-button-mobile: 16px;
  --font-size-hero-h1-mobile: 20px;
  --font-size-hero-p-mobile: 15px;
  --font-size-footer-note-mobile: 14px;
  --font-size-badge-mobile: 13px;
  --font-size-card-h3-mobile: 18px;
  --font-size-card-p-mobile: 15px;
  --font-size-modal-header-h2-mobile: 18px;
}

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

body {
  font-family: 'Comfortaa', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, var(--brand-dark-purple) 0%, var(--brand-body-bg) 100%);
  min-height: 100vh;
  padding-top: 88px;
}

a {
  color: inherit;
  text-decoration: none;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--brand-very-dark-purple-navbar);
  /* Prefer optimized webp background; fallback images remain in repo */
  background-image: url('/static/images/fondo-desktop.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 6px 18px var(--shadow);
  z-index: 1000;
}

.navbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 6px;
  border-radius: 14px;
  background-color: var(--brand-highlight-softer);
  background-color: color-mix(in srgb, var(--brand-highlight-softer) 82%, transparent);
}

.brand-lockup .logo {
  margin-top: 2px;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.company-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.company-name span:first-child {
  font-weight: 700;
  color: var(--brand-dark-purple);
  font-size: var(--font-size-company-name);
  line-height: 1.1;
}

.cta-button {
  border: none;
  background: linear-gradient(135deg, var(--brand-highlight) 0%, var(--brand-highlight-strong) 60%, var(--brand-highlight-soft) 100%);
  color: var(--pure-white);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-family: 'Comfortaa', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-size-cta-button);
  letter-spacing: 0.01em;
  box-shadow: 0 12px 30px rgba(255, 119, 255, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(255, 119, 255, 0.4);
}

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

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  gap: 28px;
}

.hero {
  background: var(--pure-white);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 10px 30px var(--shadow);
  display: grid;
  gap: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-highlight-softer);
  color: var(--brand-header-text);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--font-size-badge);
}

.hero h1 {
  color: var(--brand-dark-purple);
  font-size: var(--font-size-hero-h1);
  line-height: 1.25;
}

.hero p {
  color: #3a2d52;
  font-size: var(--font-size-hero-p);
  line-height: 1.6;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--base-beige);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--brand-very-light-purple);
  box-shadow: 0 8px 20px rgba(74, 0, 130, 0.06);
}

.card h3 {
  color: var(--brand-header-text);
  margin-bottom: 8px;
  font-size: var(--font-size-card-h3);
}

.card p {
  color: #3a2d52;
  line-height: 1.5;
  font-size: var(--font-size-card-p);
}

.footer-note {
  text-align: center;
  color: #3a2d52;
  font-weight: 600;
}

.site-footer {
  max-width: 1080px;
  margin: 0 auto 64px;
  padding: 0 24px 64px;
}

.sociales-label {
  text-align: center;
  color: #3a2d52;
  font-weight: 600;
  margin-bottom: 16px;
  font-size: var(--font-size-footer-note);
}

.redes-sociales {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.redes-sociales a {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}

.redes-sociales a:hover {
  transform: translateY(-2px);
}

.redes-sociales img {
  width: 32px;
  height: 32px;
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1500;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: var(--pure-white);
  width: min(900px, 100%);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.modal-header {
  padding: 16px 18px;
  background: var(--brand-header-text);
  color: var(--pure-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  font-size: var(--font-size-modal-header-h2);
  font-weight: 700;
}

.close-button {
  background: transparent;
  border: none;
  color: var(--pure-white);
  font-size: var(--font-size-close-button);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  background: var(--base-beige);
  padding: 0;
  min-height: 540px;
}

.modal iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cta-button,
  .redes-sociales a,
  .cta-button:hover,
  .redes-sociales a:hover {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 640px) {
  :root {
    --font-size-company-name: var(--font-size-company-name-mobile);
    --font-size-cta-button: var(--font-size-cta-button-mobile);
    --font-size-hero-h1: 26px;
    --font-size-hero-p: var(--font-size-hero-p-mobile);
    --font-size-footer-note: var(--font-size-footer-note-mobile);
  }

  body {
    padding-top: 78px;
  }

  .navbar {
    padding: 14px 16px;
  }

  .logo {
    width: 44px;
    height: 44px;
  }

  /* Use smaller/mobile background image on narrow viewports */
  header {
    background-image: url('/static/images/fondo-mobile.webp');
  }

  .redes-sociales {
    gap: 12px;
  }

  .redes-sociales a {
    width: 48px;
    height: 48px;
  }

  .redes-sociales img {
    width: 28px;
    height: 28px;
  }
}

/* Additional responsive tweaks */
@media (max-width: 820px) {
  :root {
    --font-size-company-name: 16px;
    --font-size-cta-button: 16px;
  }

  .navbar {
    max-width: 100%;
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }

  .brand-lockup {
    padding: 6px 10px;
  }

  .cta-button {
    padding: 10px 14px;
    box-shadow: 0 10px 24px rgba(255, 119, 255, 0.28);
  }

  main {
    padding: 20px 16px 48px;
  }

  .hero {
    padding: 20px;
  }

  .modal {
    width: min(900px, 100%);
    margin: 0 8px;
  }

  .modal-body {
    min-height: 60vh;
  }

  .redes-sociales a {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .redes-sociales img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 420px) {
  :root {
    --font-size-company-name: var(--font-size-company-name-mobile);
    --font-size-cta-button: var(--font-size-cta-button-mobile);
    --font-size-hero-h1: var(--font-size-hero-h1-mobile);
    --font-size-hero-p: var(--font-size-hero-p-mobile);
    --font-size-footer-note: var(--font-size-footer-note-mobile);
  }

  /* keep company name visible on very small screens by allowing wrapping
     and shrinking inside the flex container. Make CTA occupy full width
     below the brand when space is tight. */
  .navbar {
    flex-wrap: wrap;
    align-items: center;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0; /* allow children to shrink */
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .brand-lockup {
    padding: 4px 8px;
    border-radius: 10px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .logo {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
  }

  .company-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Place CTA on its own line and make it full width for easy tapping */
  .cta-button {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    text-align: center;
  }

  .features { gap: 12px; }

  /* Make iframe modal usable on small screens */
  .modal-body { min-height: 50vh; }
  .modal iframe { height: 50vh; }
}

/* Ensure images scale well */
.logo img, .redes-sociales img {
  max-width: 100%;
  height: auto;
}
