/* ========================================
   CasanChef Showcase — Styles
   Brand: CasanCrem (blue · white · red)
   ======================================== */

/* ===== Variables ===== */
:root {
  --blue: #0057B8;
  --blue-dark: #003D82;
  --blue-darker: #002855;
  --blue-light: #E8F2FF;
  --blue-lighter: #F0F6FF;
  --red: #E31937;
  --red-dark: #C01230;
  --red-light: #FFF0F2;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --shadow-xl: 0 24px 60px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
  --nav-height: 64px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== Floating Emojis Background ===== */
.floating-emojis {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.floating-emoji {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.07;
  animation: floatEmoji linear infinite;
  will-change: transform;
}
@keyframes floatEmoji {
  0% { transform: translateY(110vh) rotate(0deg); }
  100% { transform: translateY(-10vh) rotate(360deg); }
}

/* ===== Navbar ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(255,255,255,0.95);
  border-bottom-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo-casa { color: var(--blue); }
.logo-chef { color: var(--red); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--blue);
  background: var(--blue-light);
}
.lang-toggle {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-light);
  border: 1.5px solid var(--blue);
  transition: var(--transition);
  margin-left: 4px;
}
.lang-toggle:hover {
  background: var(--blue);
  color: var(--white);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,87,184,0.3);
}
.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,87,184,0.4);
}
.btn-whatsapp {
  background: #25D366;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover {
  background: #1DA851;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37,211,102,0.4);
}
.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}
.btn-outline {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: transparent;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}

/* ===== Section Shared ===== */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--blue-darker);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-subtitle {
  text-align: center;
  font-size: 1.05rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--transition), transform 0.6s var(--transition);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-height);
  background: linear-gradient(160deg, var(--blue-lighter) 0%, var(--white) 50%, var(--red-light) 100%);
}
.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
}
.shape-1 {
  width: 600px; height: 600px;
  background: var(--blue);
  top: -200px; right: -100px;
  animation: shapePulse 8s ease-in-out infinite;
}
.shape-2 {
  width: 400px; height: 400px;
  background: var(--red);
  bottom: -100px; left: -100px;
  animation: shapePulse 10s ease-in-out infinite 2s;
}
.shape-3 {
  width: 300px; height: 300px;
  background: var(--blue);
  top: 40%; left: 30%;
  animation: shapePulse 12s ease-in-out infinite 4s;
}
@keyframes shapePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-text h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--gray-800);
  margin-bottom: 20px;
}
.hero-title-name {
  display: block;
  background: linear-gradient(135deg, var(--blue) 0%, var(--red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--gray-500);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero Visual / Character */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-character-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
}
.hero-character {
  width: 100%;
  animation: heroFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
  transform: translateY(60px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(.34,1.56,.64,1), opacity 0.8s ease;
}
.hero-character.animate-in {
  transform: translateY(0);
  opacity: 1;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-speech-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.speech-bubble {
  position: absolute;
  background: var(--white);
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: scale(0.8) translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  border: 1px solid var(--gray-100);
}
.speech-bubble.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.sb-1 {
  top: 5%; left: -10%;
  border-bottom-left-radius: 4px;
}
.sb-2 {
  top: 40%; right: -5%;
  border-bottom-right-radius: 4px;
}
.sb-3 {
  bottom: 10%; left: -5%;
  border-bottom-left-radius: 4px;
}

/* Scroll Hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-arrow {
  width: 24px; height: 24px;
  border-right: 2.5px solid var(--gray-400);
  border-bottom: 2.5px solid var(--gray-400);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 0.4; }
}

/* ===== Character Peek Dividers ===== */
.character-peek {
  position: relative;
  height: 80px;
  overflow: visible;
  z-index: 10;
  pointer-events: none;
}
.peek-img {
  position: absolute;
  height: 140px;
  bottom: 0;
  transition: transform 0.8s cubic-bezier(.34,1.56,.64,1), opacity 0.6s ease;
}
.peek-1 .peek-img {
  left: 12%;
  transform: translateY(100%) rotate(-5deg);
  opacity: 0;
}
.peek-1 .peek-img.show {
  transform: translateY(10%) rotate(-5deg);
  opacity: 1;
}
.peek-2 .peek-img {
  right: 10%;
  transform: translateY(100%) rotate(5deg) scaleX(-1);
  opacity: 0;
}
.peek-2 .peek-img.show {
  transform: translateY(10%) rotate(5deg) scaleX(-1);
  opacity: 1;
}

/* ===== Chat Demo Section ===== */
.chat-demo {
  padding: 100px 0 80px;
  position: relative;
  background: var(--gray-50);
}

.phone-scene {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 32px;
  position: relative;
}

/* Phone Mockup */
.phone-mockup {
  width: 340px;
  min-height: 620px;
  background: #EDEDED;
  border-radius: 36px;
  border: 3px solid var(--gray-300);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  flex-shrink: 0;
}
.phone-notch {
  width: 120px;
  height: 6px;
  background: var(--gray-300);
  border-radius: 3px;
  margin: 10px auto 0;
  z-index: 2;
}
.phone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px;
  background: #075E54;
  color: var(--white);
}
.phone-header-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.phone-header-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.phone-header-status {
  display: block;
  font-size: 0.72rem;
  opacity: 0.8;
}
.phone-chat {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000' fill-opacity='0.02'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='80' cy='40' r='2'/%3E%3Ccircle cx='40' cy='70' r='2'/%3E%3Ccircle cx='60' cy='90' r='2'/%3E%3C/g%3E%3C/svg%3E") #E5DDD5;
  min-height: 440px;
  max-height: 500px;
}

/* Chat Messages */
.chat-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  animation: msgAppear 0.4s cubic-bezier(.34,1.56,.64,1) both;
  position: relative;
  word-wrap: break-word;
  white-space: pre-line;
}
@keyframes msgAppear {
  from { opacity: 0; transform: scale(0.85) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.chat-msg.user {
  background: #DCF8C6;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.chat-msg.bot {
  background: var(--white);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.chat-msg .msg-time {
  display: block;
  text-align: right;
  font-size: 0.65rem;
  color: var(--gray-400);
  margin-top: 4px;
}

/* Photo Message */
.chat-photo {
  width: 180px;
  height: 130px;
  border-radius: 8px;
  background: linear-gradient(135deg, #E8F0FE 0%, #B8D4FF 30%, #FFFFFF 50%, #FFF5E6 70%, #FFE0C2 100%);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}
.chat-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
  animation: photoShine 2s ease-in-out infinite;
}
@keyframes photoShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 10px;
  border-bottom-left-radius: 2px;
  align-self: flex-start;
  animation: msgAppear 0.3s ease both;
}
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gray-400);
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.phone-input-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #F0F0F0;
  gap: 8px;
}
.phone-input-placeholder {
  flex: 1;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--white);
  font-size: 0.8rem;
  color: var(--gray-400);
}
.phone-input-mic {
  font-size: 1.2rem;
}

/* Chat Annotations */
.chat-annotations {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 80px;
  max-width: 250px;
}
.annotation {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all 0.5s cubic-bezier(.34,1.56,.64,1);
}
.annotation.hidden {
  opacity: 0;
  transform: translateX(30px);
}
.annotation.show {
  opacity: 1;
  transform: translateX(0);
}
.annotation-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.annotation-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  line-height: 1.4;
}

.chat-replay-wrapper {
  text-align: center;
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 100px 0;
  background: var(--white);
}

.steps-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  justify-content: center;
}

.step-card {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 24px;
  position: relative;
}
.step-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.step-icon-area {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}
.step-icon-circle {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease;
}
.step-card:hover .step-icon-circle {
  transform: scale(1.1);
}
.step-icon-inner {
  position: relative;
}
.step-emoji {
  font-size: 2.2rem;
}
.step-emoji-secondary,
.step-emoji-tertiary {
  position: absolute;
  font-size: 1.1rem;
}
.step-emoji-secondary {
  top: -12px; right: -24px;
  animation: inputPop 3s ease-in-out infinite;
}
.step-emoji-tertiary {
  bottom: -12px; left: -24px;
  animation: inputPop 3s ease-in-out infinite 1.5s;
}
@keyframes inputPop {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Step 2 orbit */
.orbit-ring {
  position: absolute;
  width: 130px; height: 130px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orbitSpin 8s linear infinite;
}
.orbit-dot {
  position: absolute;
  font-size: 1rem;
  animation: orbitItemSpin 8s linear infinite;
  animation-delay: var(--delay);
}
.orbit-dot:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); }
.orbit-dot:nth-child(2) { top: 50%; right: 0; transform: translateY(-50%); }
.orbit-dot:nth-child(3) { bottom: 0; left: 50%; transform: translateX(-50%); }
.orbit-dot:nth-child(4) { top: 50%; left: 0; transform: translateY(-50%); }
@keyframes orbitSpin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes orbitItemSpin { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

/* Recipe card preview (step 3) */
.recipe-card-preview {
  position: absolute;
  right: -10px;
  top: 10px;
  width: 80px;
  padding: 10px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: recipeCardBob 3s ease-in-out infinite;
}
.rcp-line {
  height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
}
.rcp-title { width: 70%; background: var(--blue); height: 6px; }
.rcp-short { width: 40%; }
.rcp-medium { width: 70%; }
.rcp-long { width: 90%; }
@keyframes recipeCardBob {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-darker);
  margin-bottom: 8px;
}
.step-card p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.step-connector {
  display: flex;
  align-items: center;
  width: 60px;
  flex-shrink: 0;
  position: relative;
}
.connector-line {
  width: 100%;
  height: 2px;
  background: var(--gray-200);
}
.connector-pulse {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  top: 50%;
  transform: translateY(-50%);
  animation: connectorMove 2s ease-in-out infinite;
}
@keyframes connectorMove {
  0% { left: 0; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

/* ===== Features ===== */
.features {
  padding: 100px 0;
  background: var(--blue-lighter);
  position: relative;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--red));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}
.feature-card:hover::before {
  transform: scaleX(1);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.feature-icon-wrap {
  position: relative;
  width: 56px; height: 56px;
  margin-bottom: 20px;
}
.feature-icon {
  font-size: 2rem;
  position: relative;
  z-index: 1;
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon-bg {
  position: absolute;
  inset: 0;
  background: var(--blue-light);
  border-radius: 14px;
  transform: rotate(5deg);
  transition: transform 0.3s ease;
}
.feature-card:hover .feature-icon-bg {
  transform: rotate(-5deg) scale(1.1);
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-darker);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.features-character {
  text-align: center;
  pointer-events: none;
}
.features-char-img {
  max-width: 280px;
  margin: 0 auto;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.12));
  animation: featCharFloat 5s ease-in-out infinite;
}
@keyframes featCharFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

/* ===== Architecture ===== */
.architecture {
  padding: 100px 0;
  background: var(--blue-darker);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.architecture .section-title { color: var(--white); }
.architecture .section-subtitle { color: rgba(255,255,255,0.6); }

.arch-diagram {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 48px;
  overflow-x: auto;
  padding: 20px 0;
}

.arch-layer {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
}
.arch-layer-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.arch-nodes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.arch-node {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 170px;
  position: relative;
}
.arch-node:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.05);
}
.arch-node:hover::after {
  content: attr(data-tooltip-en);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  color: var(--gray-800);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 10;
  font-weight: 500;
}
body.lang-es .arch-node:hover::after {
  content: attr(data-tooltip-es);
}
.node-icon {
  font-size: 1.2rem;
}
.node-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

/* Brain node special */
.brain-node {
  background: rgba(0,87,184,0.4) !important;
  border-color: var(--blue) !important;
  max-width: 180px;
  padding: 16px 20px;
  position: relative;
}
.brain-node .node-icon { font-size: 1.6rem; }
.brain-node .node-label { font-size: 0.85rem; }
.brain-pulse {
  position: absolute;
  inset: -4px;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  animation: brainPulse 2s ease-in-out infinite;
}
@keyframes brainPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.06); }
}

.arch-connection {
  display: flex;
  align-items: center;
  width: 32px;
  flex-shrink: 0;
  position: relative;
}
.connection-line {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.15);
}
.data-pulse {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  top: 50%;
  transform: translateY(-50%);
  animation: dataPulseMove 3s ease-in-out infinite;
  animation-delay: var(--pulse-delay);
}
@keyframes dataPulseMove {
  0% { left: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

.arch-footer {
  text-align: center;
}
.arch-footer p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.arch-lib-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  padding: 8px 0;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  transition: var(--transition);
}
.arch-lib-link:hover {
  border-bottom-color: var(--white);
}
.arch-source-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.source-link {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.source-link:hover { color: var(--white); }
.source-sep { color: rgba(255,255,255,0.2); }

/* ===== CTA ===== */
.try-it {
  padding: 100px 0;
  background: linear-gradient(160deg, var(--blue-lighter) 0%, var(--white) 50%, var(--red-light) 100%);
}
.cta-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--gray-100);
}
.cta-content {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}
.cta-character {
  background: linear-gradient(135deg, var(--blue-light), var(--red-light));
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cta-char-img {
  max-width: 260px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.1));
  animation: ctaCharBounce 3s ease-in-out infinite;
}
@keyframes ctaCharBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}
.cta-text {
  padding: 48px;
}
.cta-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--blue-darker);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.cta-text p {
  color: var(--gray-500);
  margin-bottom: 28px;
  font-size: 1rem;
  line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-800);
  color: rgba(255,255,255,0.5);
  padding: 40px 0;
}
.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
}
.footer-brand p {
  font-size: 0.8rem;
  margin-top: 4px;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 0.85rem;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--white); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  .hero-subtitle { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .hero-character-wrapper { max-width: 300px; margin: 0 auto; }
  .sb-1 { left: 5%; }
  .sb-2 { right: 5%; }
  .sb-3 { left: 10%; }

  .phone-scene {
    flex-direction: column;
    align-items: center;
  }
  .chat-annotations {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    padding-top: 24px;
  }
  .annotation { flex: 1; min-width: 200px; max-width: 260px; }

  .steps-flow { flex-direction: column; align-items: center; }
  .step-connector {
    width: 2px;
    height: 40px;
    flex-direction: column;
  }
  .connector-line {
    width: 2px;
    height: 100%;
  }
  .connector-pulse {
    animation: connectorMoveV 2s ease-in-out infinite;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
  }
  @keyframes connectorMoveV {
    0% { top: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: calc(100% - 8px); opacity: 0; }
  }

  .features-grid { grid-template-columns: repeat(2, 1fr); }

  .arch-diagram {
    flex-direction: column;
    align-items: center;
  }
  .arch-layer { width: 100%; }
  .arch-nodes {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .arch-connection {
    width: 2px;
    height: 24px;
    flex-direction: column;
  }
  .connection-line { width: 2px; height: 100%; }
  .data-pulse {
    animation: dataPulseMoveV 3s ease-in-out infinite;
    animation-delay: var(--pulse-delay);
    left: 50%;
    transform: translateX(-50%);
    top: auto;
  }
  @keyframes dataPulseMoveV {
    0% { top: 0; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: calc(100% - 6px); opacity: 0; }
  }

  .cta-content { grid-template-columns: 1fr; }
  .cta-character { padding: 32px; }
  .cta-char-img { max-width: 200px; }
  .cta-text { padding: 32px; text-align: center; }

  .footer-container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px);
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
  }
  .nav-toggle { display: flex; }

  .features-grid { grid-template-columns: 1fr; }
  .phone-mockup { width: 100%; max-width: 340px; }

  .hero-text h1 { font-size: 2.2rem; }

  .peek-img { height: 100px; }

  .btn-large {
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  .cta-text {
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cta-text .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }
}
