:root {
  --color-bg: #fdf6e8;
  --color-bg-alt: #fbecce;
  --color-text: #2b1c10;
  --color-text-soft: #7a5c3e;
  --color-primary: #e8821e;
  --color-primary-dark: #c2650f;
  --color-accent: #d99a1b;
  --color-border: #f3dfab;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(216, 145, 25, 0.12);
  --max-width: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1c1610;
    --color-bg-alt: #241c14;
    --color-text: #f8ecd8;
    --color-text-soft: #d9c2a0;
    --color-primary: #f0983a;
    --color-primary-dark: #ffb45c;
    --color-accent: #e0ab3e;
    --color-border: #3a2e1c;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--color-text-soft);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a:hover { color: var(--color-primary); }

.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-cta:hover { background: var(--color-primary-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 96px 0 72px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

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

.hero-text h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary-dark);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-text-soft);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover { background: var(--color-primary-dark); }

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

.btn-ghost:hover { border-color: var(--color-primary); }

.btn-block { width: 100%; }

.hero-cast {
  position: relative;
  height: 340px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-cast img {
  object-fit: contain;
  animation: mascot-float 4.5s ease-in-out infinite;
}

.cast-nia { height: 300px; z-index: 3; }
.cast-fresa { height: 250px; margin-left: -18px; z-index: 2; animation-delay: 0.4s; }
.cast-mora { height: 250px; margin-right: -18px; z-index: 2; animation-delay: 0.8s; }
.cast-razz { height: 210px; margin-left: -22px; z-index: 1; animation-delay: 1.2s; }
.cast-rozz { height: 210px; margin-right: -22px; z-index: 1; animation-delay: 1.6s; }

.cast-logo {
  position: absolute;
  top: -12px;
  right: 6%;
  width: 96px;
  height: 96px;
  z-index: 4;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

.hero-cast .cast-logo {
  animation: logo-float 5s ease-in-out infinite;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-9px) rotate(-9.5deg); }
}

.mascot-hero-art, .mascot-cta-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 320px;
}

.mascot-hero-art img, .mascot-cta-art img {
  height: 100%;
  width: auto;
  object-fit: contain;
  animation: mascot-float 4.5s ease-in-out infinite;
}

.mascot-hero-art img:nth-child(2), .mascot-cta-art img:nth-child(2) {
  animation-delay: 0.7s;
}

.mascot-cta-art {
  height: 240px;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 26ch;
}

.section-lead {
  color: var(--color-text-soft);
  font-size: 1.05rem;
  max-width: 60ch;
}

.nosotros-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.nosotros-mascot {
  text-align: center;
}

.mascot-wrap {
  position: relative;
  display: inline-block;
  height: 340px;
  animation: mascot-float 5s ease-in-out infinite;
}

.nosotros-mascot img {
  max-width: 100%;
  height: 340px;
  object-fit: contain;
  display: block;
}

.nia-wink {
  position: absolute;
  left: 58.9px;
  top: 82.2px;
  width: 17px;
  height: 11px;
  background: #f8a82c;
  border-radius: 50%;
  box-shadow: inset 0 -1.5px 0 rgba(30, 15, 0, 0.55);
  transform: translate(-50%, -50%) scaleY(0);
  transform-origin: center;
  animation: nia-wink 6s ease-in-out infinite;
}

@keyframes nia-wink {
  0%, 92%, 100% { transform: translate(-50%, -50%) scaleY(0); }
  94%, 97% { transform: translate(-50%, -50%) scaleY(1); }
}

.mascot-caption {
  margin-top: 12px;
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: 0.95rem;
}

.video-wrap {
  max-width: 800px;
  margin: 40px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-caption {
  text-align: center;
  margin-top: 16px;
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: 1.05rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.stat {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-label {
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card-link:hover .product-card {
  box-shadow: 0 14px 34px rgba(216, 145, 25, 0.2);
  transform: translateY(-3px);
}

.product-card h3 { font-size: 1.1rem; }
.product-card p { color: var(--color-text-soft); font-size: 0.92rem; margin: 0; }

.product-cta {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
}

.product-mascot {
  height: 230px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.product-mascot img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  animation: mascot-float 4.5s ease-in-out infinite;
  transition: transform 0.25s ease;
}

.product-card:hover .product-mascot img {
  transform: scale(1.04);
}

.product-mascot-pair img {
  height: 92%;
}

.product-card:nth-child(2) .product-mascot img { animation-delay: 0.3s; }
.product-card:nth-child(3) .product-mascot img { animation-delay: 0.9s; }

.product-mascot-pair img:nth-child(1) { animation-delay: 0s; }
.product-mascot-pair img:nth-child(2) { animation-delay: 0.7s; }

@keyframes mascot-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(-1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .product-mascot img, .mascot-wrap, .nia-wink, .hero-cast img,
  .mascot-hero-art img, .mascot-cta-art img {
    animation: none;
  }
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.feature {
  padding: 8px;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--color-text-soft); margin: 0; }

/* Contact */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-soft);
}

.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.form-status {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--color-accent);
  min-height: 1.2em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 32px;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.footer-inner a:hover {
  color: var(--color-primary);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary-dark);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-links a {
  color: var(--color-text-soft);
  display: flex;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--color-primary);
}

/* Responsive */
@media (max-width: 860px) {
  .hero-inner, .contact-inner, .nosotros-inner {
    grid-template-columns: 1fr;
  }
  .hero-cast { height: 230px; order: -1; }
  .cast-nia { height: 200px; }
  .cast-fresa, .cast-mora { height: 165px; }
  .cast-razz, .cast-rozz { height: 140px; }
  .cast-logo { width: 68px; height: 68px; }
  .nosotros-mascot { order: -1; }
  .stats { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .products-grid { grid-template-columns: 1fr; }
}

/* Chat widget */
.chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.chat-toggle:hover {
  transform: scale(1.06);
}

.chat-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
  border-radius: 50%;
}

.chat-window {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(340px, calc(100vw - 40px));
  height: 440px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-window[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.chat-header img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  object-position: top;
  background: rgba(255, 255, 255, 0.3);
}

.chat-header span {
  flex: 1;
}

.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.chat-msg-bot {
  align-self: flex-start;
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.chat-msg-user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg-typing {
  align-self: flex-start;
  background: var(--color-bg-alt);
  color: var(--color-text-soft);
  font-style: italic;
  border-bottom-left-radius: 4px;
}

.chat-input-row {
  display: flex;
  border-top: 1px solid var(--color-border);
}

.chat-input-row input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--color-bg);
  color: var(--color-text);
}

.chat-input-row input:focus {
  outline: none;
}

.chat-input-row button {
  border: none;
  background: var(--color-primary);
  color: #fff;
  width: 48px;
  font-size: 1.1rem;
  cursor: pointer;
}

.chat-input-row button:hover {
  background: var(--color-primary-dark);
}

@media (max-width: 480px) {
  .chat-window {
    height: 60vh;
  }
}
